/* ===== RESET & BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --google-blue: #4285F4;
  --google-red: #EA4335;
  --google-yellow: #FBBC04;
  --google-green: #34A853;
  --bg: #f8f9fa;
  --bg-card: #ffffff;
  --text: #202124;
  --text-secondary: #5f6368;
  --border: #dadce0;
  --code-bg: #1e1e2e;
  --code-text: #cdd6f4;
  --blank: #f38ba8;
  --sidebar-w: 280px;
  --header-h: 64px;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.04);
  --shadow-hover: 0 2px 8px rgba(0,0,0,.12), 0 8px 24px rgba(0,0,0,.06);
  --transition: .2s cubic-bezier(.4,0,.2,1);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

body {
  font-family: 'Google Sans', 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* ===== HEADER ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background: #fff;
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
}

.header__logo {
  height: 32px;
  flex-shrink: 0;
}

.header__title {
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
}

.header__spacer {
  flex: 1;
}

.header__badge {
  background: var(--google-blue);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 100px;
  white-space: nowrap;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: background var(--transition);
}

.hamburger:hover {
  background: rgba(0,0,0,.06);
}

.hamburger svg {
  display: block;
  width: 24px;
  height: 24px;
  fill: var(--text);
}

/* ===== SIDEBAR ===== */
.sidebar {
  position: fixed;
  top: var(--header-h);
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: #fff;
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 16px 0;
  z-index: 900;
  transition: transform var(--transition);
}

.sidebar__section {
  padding: 8px 16px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text-secondary);
}

.sidebar__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px 10px 20px;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 400;
  transition: all var(--transition);
  border-left: 3px solid transparent;
}

.sidebar__link:hover {
  background: rgba(66, 133, 244, .06);
  color: var(--google-blue);
}

.sidebar__link.active {
  background: rgba(66, 133, 244, .08);
  color: var(--google-blue);
  font-weight: 500;
  border-left-color: var(--google-blue);
}

.sidebar__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  flex-shrink: 0;
  transition: all var(--transition);
}

.sidebar__link.active .sidebar__num {
  background: var(--google-blue);
  color: #fff;
}

.sidebar__divider {
  height: 1px;
  background: var(--border);
  margin: 8px 16px;
}

/* ===== MAIN CONTENT ===== */
.main {
  margin-left: var(--sidebar-w);
  margin-top: var(--header-h);
  min-height: calc(100vh - var(--header-h));
}

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, #1a73e8 0%, #4285f4 50%, #669df6 100%);
  color: #fff;
  padding: 80px 48px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255,255,255,.08) 0%, transparent 70%);
  border-radius: 50%;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,.05) 0%, transparent 70%);
  border-radius: 50%;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero__logos {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.hero__logos img {
  height: 40px;
}

.hero__logo--invert {
  filter: brightness(0) invert(1);
}

.hero__logos .separator {
  width: 1px;
  height: 32px;
  background: rgba(255,255,255,.3);
}

.hero__badge {
  display: inline-block;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(8px);
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 16px;
  letter-spacing: .3px;
}

.hero h1 {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.hero__subtitle {
  font-size: 20px;
  opacity: .9;
  margin-bottom: 32px;
  line-height: 1.5;
}

.hero__meta {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  font-size: 15px;
  opacity: .85;
}

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

.hero__meta-item svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  opacity: .8;
}

/* ===== SECTIONS ===== */
.section {
  padding: 48px;
  max-width: 900px;
}

.section + .section {
  border-top: 1px solid var(--border);
}

.section__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--google-blue);
  margin-bottom: 8px;
}

.section__label--break {
  color: var(--google-green);
}

.section h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
  letter-spacing: -0.3px;
}

.section h3 {
  font-size: 22px;
  font-weight: 600;
  margin: 32px 0 12px;
  color: var(--text);
}

.section h4 {
  font-size: 17px;
  font-weight: 600;
  margin: 24px 0 8px;
  color: var(--text);
}

.section p {
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.section ul, .section ol {
  color: var(--text-secondary);
  padding-left: 24px;
  margin-bottom: 16px;
}

.section li {
  margin-bottom: 6px;
}

.section li strong {
  color: var(--text);
}

/* ===== TASK CARD ===== */
.task {
  background: linear-gradient(135deg, #e8f0fe 0%, #f0f4ff 100%);
  border: 1px solid #c2d7fe;
  border-radius: var(--radius);
  padding: 24px;
  margin: 24px 0;
}

.task__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.task__badge {
  background: var(--google-blue);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.task__title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.task p {
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-size: 15px;
}

/* ===== INFO BOX ===== */
.info-box {
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 16px 0;
  font-size: 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.info-box svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.info-box--tip {
  background: #e6f4ea;
  border: 1px solid #ceead6;
  color: #137333;
}

.info-box--tip svg {
  fill: #137333;
}

.info-box--warning {
  background: #fef7e0;
  border: 1px solid #fde293;
  color: #7c5e00;
}

.info-box--warning svg {
  fill: #e37400;
}

.info-box--important {
  background: #fce8e6;
  border: 1px solid #f5c6c1;
  color: #a50e0e;
}

.info-box--important svg {
  fill: #c5221f;
}

/* ===== CODE BLOCK ===== */
.code-block {
  position: relative;
  margin: 16px 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.code-block__header {
  background: #181825;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #313244;
}

.code-block__lang {
  font-size: 12px;
  font-weight: 500;
  color: #a6adc8;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.code-block__dots {
  display: flex;
  gap: 6px;
}

.code-block__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.code-block__dot--red { background: #f38ba8; }
.code-block__dot--yellow { background: #f9e2af; }
.code-block__dot--green { background: #a6e3a1; }

.code-block__copy {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  color: #cdd6f4;
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 6px;
}

.code-block__copy:hover {
  background: rgba(255,255,255,.14);
}

.code-block__copy.copied {
  background: rgba(166, 227, 161, .2);
  border-color: rgba(166, 227, 161, .5);
  color: #a6e3a1;
  animation: copyPulse .4s ease-out;
}

@keyframes copyPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(166, 227, 161, .5); }
  50% { transform: scale(1.08); box-shadow: 0 0 0 8px rgba(166, 227, 161, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(166, 227, 161, 0); }
}

.code-block__copy svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.code-block pre {
  margin: 0;
  padding: 20px;
  background: var(--code-bg);
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.65;
  tab-size: 4;
}

.code-block code {
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  color: var(--code-text);
}

/* Syntax colors */
.code-block .comment { color: #6c7086; font-style: italic; }
.code-block .keyword { color: #cba6f7; }
.code-block .string { color: #a6e3a1; }
.code-block .number { color: #fab387; }
.code-block .function { color: #89b4fa; }
.code-block .blank {
  color: #f38ba8;
  font-weight: 700;
  background: rgba(243, 139, 168, .12);
  padding: 2px 4px;
  border-radius: 3px;
}
.code-block .hint-text { color: #a6adc8; font-style: italic; }

/* ===== TABLE ===== */
.table-wrap {
  overflow-x: auto;
  margin: 16px 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  font-size: 14px;
}

thead {
  background: #f1f3f4;
}

th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: var(--text);
  border-bottom: 2px solid var(--border);
}

td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: rgba(66, 133, 244, .03);
}

/* ===== BREAK SECTION ===== */
.break-card {
  background: linear-gradient(135deg, #e6f4ea 0%, #f0faf3 100%);
  border: 1px solid #ceead6;
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  margin: 24px 0;
}

.break-card h3 {
  color: #137333;
  margin: 8px 0 4px;
}

.break-card p {
  color: #137333;
  opacity: .7;
}

/* ===== DOWNLOAD CARD ===== */
.download-card {
  background: linear-gradient(135deg, #fff8e1 0%, #fffde7 100%);
  border: 1px solid #fde293;
  border-radius: var(--radius);
  padding: 24px 32px;
  margin: 32px 0;
  display: flex;
  align-items: center;
  gap: 20px;
}

.download-card svg {
  width: 40px;
  height: 40px;
  fill: #e37400;
  flex-shrink: 0;
}

.download-card__text h4 {
  margin: 0 0 4px;
  font-size: 16px;
  color: var(--text);
}

.download-card__text p {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.download-card__btn {
  margin-left: auto;
  background: var(--google-blue);
  color: #fff;
  padding: 10px 24px;
  border-radius: 100px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: all var(--transition);
  box-shadow: 0 1px 3px rgba(66,133,244,.3);
}

.download-card__btn:hover {
  background: #1a73e8;
  box-shadow: 0 2px 8px rgba(66,133,244,.4);
}

/* ===== FOOTER ===== */
.footer {
  background: #202124;
  color: rgba(255,255,255,.7);
  padding: 48px;
  margin-left: var(--sidebar-w);
}

.footer__content {
  max-width: 900px;
}

.footer__logos {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.footer__logos img {
  height: 32px;
  opacity: .8;
}

.footer__logos .separator {
  width: 1px;
  height: 24px;
  background: rgba(255,255,255,.2);
}

.footer__links {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.footer__links a {
  color: #8ab4f8;
  text-decoration: none;
  font-size: 14px;
  transition: color var(--transition);
}

.footer__links a:hover {
  color: #aecbfa;
}

.footer__copy {
  font-size: 13px;
  opacity: .5;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.1);
}

/* ===== SIDEBAR OVERLAY (mobile) ===== */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 899;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay.open {
    display: block;
  }

  .main, .footer {
    margin-left: 0;
  }

  .hamburger {
    display: block;
  }

  .hero {
    padding: 48px 24px;
  }

  .hero h1 {
    font-size: 32px;
  }

  .section {
    padding: 32px 24px;
  }

  .footer {
    padding: 32px 24px;
  }

  .download-card {
    flex-direction: column;
    text-align: center;
  }

  .download-card__btn {
    margin-left: 0;
  }
}

@media (max-width: 600px) {
  .hero h1 {
    font-size: 26px;
  }

  .hero__subtitle {
    font-size: 16px;
  }

  .hero__meta {
    flex-direction: column;
    gap: 12px;
  }

  .header__title {
    font-size: 15px;
  }

  .header__badge {
    display: none;
  }

  .code-block pre {
    font-size: 12px;
    padding: 14px;
  }
}
