@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

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

:root {
  --color-bg: #f8f9fa;
  --color-surface: #ffffff;
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-text: #1e293b;
  --color-text-secondary: #64748b;
  --color-border: #e2e8f0;
  --color-accent: #f59e0b;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.12);
  --max-width: 1200px;
  --content-width: 800px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  font-size: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--color-primary-dark);
}

img {
  max-width: 100%;
  height: auto;
}

/* ===== HEADER ===== */

.header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.header__logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.header__logo span {
  color: var(--color-primary);
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav__link {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: background 0.2s, color 0.2s;
}

.nav__link:hover,
.nav__link--active {
  background: var(--color-primary);
  color: #fff;
}

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.burger__line {
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* ===== AD BANNERS ===== */

.ad-banner {
  display: none;
  background: var(--color-surface);
  border: 2px dashed var(--color-border);
  border-radius: var(--radius);
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  font-size: 0.85rem;
  max-width: var(--max-width);
  margin: 16px auto;
  padding: 0 24px;
}

.ad-banner--leaderboard {
  height: 90px;
}

.ad-banner--rectangle {
  height: 250px;
  max-width: var(--content-width);
}

/* ===== HERO ===== */

.hero {
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  color: #fff;
  padding: 80px 24px;
  text-align: center;
}

.hero__title {
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
}

.hero__subtitle {
  font-size: 1.2rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ===== CARDS GRID ===== */

.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px;
}

.section__title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 32px;
  text-align: center;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.card {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.3s, transform 0.3s;
  display: flex;
  flex-direction: column;
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.card__icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.card__title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.card__text {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  flex-grow: 1;
  margin-bottom: 16px;
}

.card__link {
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.card__link::after {
  content: '\2192';
}

/* ===== ARTICLE PAGE ===== */

.article {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 48px 24px;
}

.article__header {
  margin-bottom: 40px;
}

.article__title {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 12px;
}

.article__meta {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
}

.article h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 40px 0 16px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}

.article h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 24px 0 12px;
}

.article p {
  margin-bottom: 16px;
}

.article ul,
.article ol {
  margin: 0 0 16px 24px;
}

.article li {
  margin-bottom: 8px;
}

.article blockquote {
  border-left: 4px solid var(--color-primary);
  padding: 16px 20px;
  margin: 24px 0;
  background: rgba(37, 99, 235, 0.05);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--color-text-secondary);
}

.article__tip {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.05));
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 24px 0;
}

.article__tip strong {
  color: var(--color-accent);
}

/* ===== FOOTER ===== */

.footer {
  margin-top: auto;
  background: var(--color-text);
  color: rgba(255, 255, 255, 0.7);
  padding: 40px 24px;
}

.footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
}

.footer__brand {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
}

.footer__text {
  font-size: 0.85rem;
  max-width: 320px;
}

.footer__nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer__nav-title {
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
  font-size: 0.95rem;
}

.footer__link {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer__link:hover {
  color: #fff;
}

.footer__bottom {
  max-width: var(--max-width);
  margin: 24px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.8rem;
}

/* ===== ABOUT PAGE ===== */

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
  margin: 32px 0;
}

.about-card {
  text-align: center;
  padding: 32px 20px;
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.about-card__icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.about-card__title {
  font-weight: 600;
  margin-bottom: 8px;
}

.about-card__text {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

/* ===== RESPONSIVE ===== */

@media (max-width: 768px) {
  .hero__title {
    font-size: 2rem;
  }

  .hero {
    padding: 56px 20px;
  }

  .article__title {
    font-size: 1.75rem;
  }

  .burger {
    display: flex;
  }

  .nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--color-surface);
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow);
  }

  .nav--open {
    display: flex;
  }

  .nav__link {
    width: 100%;
    text-align: center;
    padding: 12px;
  }

  .footer__inner {
    flex-direction: column;
  }

  .ad-banner--leaderboard {
    height: 60px;
  }
}

@media (max-width: 480px) {
  .hero__title {
    font-size: 1.6rem;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 32px 16px;
  }
}
