
* { margin:0; padding:0; box-sizing:border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #0a0a0a;
  color: #eee;
  line-height: 1.7;
  min-height: 100vh;
}

/* ====================== КОНТЕЙНЕР ====================== */
.container {
  max-width: 860px;
  margin: 0 auto;
  background: #111;
  padding: 3.5rem;
  border-radius: 20px;
  box-shadow: 0 15px 50px rgba(0,255,136,.08);
}

/* ====================== ПОСТЫ ====================== */
h1 {
  font-size: 2.8rem;
  margin-bottom: 1.8rem;
  text-align: center;
  background: linear-gradient(90deg,#00ff88,#00d4ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
h2 {
  font-size: 1.9rem;
  margin: 2.8rem 0 1.2rem;
  color: #00ff88;
}
p { margin: 1.3rem 0; font-size: 1.12rem; }
strong { color: #00ff88; }

img {
  max-width: 100%;
  border-radius: 16px;
  margin: 2.8rem auto;
  display: block;
  box-shadow: 0 12px 40px rgba(0,0,0,.7);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  background: #1a1a1a;
  border-radius: 12px;
  overflow: hidden;
}
th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #333;
}
th {
  background: #00ff88;
  color: #000;
  font-weight: 700;
}

/* Навигация между главами */
.post-nav {
  background: #000;
  padding: 2rem;
  border-radius: 16px;
  margin-top: 4rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  text-align: center;
  font-size: 1.2rem;
}
.post-nav a {
  color: #00ff88;
  text-decoration: none;
  font-weight: 600;
}
.post-nav a:hover { text-decoration: underline; }

/* ====================== ГЛАВНАЯ ====================== */
.home-hero {
  text-align: center;
  padding: 6rem 1rem 4rem;
  background: linear-gradient(135deg,#000,#001a0f);
}
.home-hero h1 {
  font-size: 5rem;
  margin-bottom: 1rem;
}
.home-hero h1 span {
  display: block;
  background: linear-gradient(90deg,#00ff88,#00d4ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.subtitle {
  font-size: 1.5rem;
  color: #aaa;
  max-width: 800px;
  margin: 0 auto;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(340px,1fr));
  gap: 2.5rem;
  max-width: 1400px;
  margin: 4rem auto;
  padding: 0 2rem;
}
.post-card {
  background: #111;
  border-radius: 20px;
  overflow: hidden;
  transition: all .4s ease;
  border: 1px solid #222;
}
.post-card:hover {
  transform: translateY(-16px);
  box-shadow: 0 25px 50px rgba(0,255,136,.25);
  border-color: #00ff88;
}
.post-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform .6s ease;
}
.post-card:hover img { transform: scale(1.08); }
.post-info {
  padding: 1.8rem;
}
.post-info h2 {
  font-size: 1.35rem;
  margin-bottom: .8rem;
  color: #fff;
  line-height: 1.3;
}
.post-desc {
  color: #aaa;
  font-size: 1rem;
  margin-bottom: 1rem;
}
.read-more {
  color: #00ff88;
  font-weight: 600;
  font-size: 1.1rem;
}

.made-with {
  text-align: center;
  padding: 6rem 1rem 3rem;
  color: #666;
  font-size: .95rem;
}

/* ====================== АДАПТИВ ====================== */
@media (max-width:768px) {
  .container { padding: 2rem; border-radius: 16px; }
  h1 { font-size: 2.3rem; }
  .home-hero h1 { font-size: 3.2rem; }
  .posts-grid { grid-template-columns: 1fr; padding: 0 1rem; }
  .post-card img { height: 180px; }
  .post-nav { flex-direction: column; font-size: 1.1rem; }
}

.next-chapter {
  margin: 4rem 0 2rem;
  padding: 1.5rem;
  background: #000;
  border-left: 4px solid #00ff88;
  border-radius: 0 12px 12px 0;
  font-size: 1.2rem;
}
.next-chapter a { color: #00ff88; text-decoration: none; font-weight: 600; }
.next-chapter a:hover { text-decoration: underline; }
