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

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #000; color: #fff;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}

.cursor-glow {
  position: fixed; width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(200,255,0,0.05) 0%, transparent 70%);
  pointer-events: none; z-index: 0; transform: translate(-50%, -50%);
  transition: left 0.3s ease, top 0.3s ease;
}

.noise-layer {
  position: fixed; inset: 0; z-index: 0; opacity: 0.03; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
}

.grid-layer {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 60px 60px;
}

.page { position: relative; z-index: 1; }

/* Header */
header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 40px; border-bottom: 1px solid rgba(255,255,255,0.04);
  position: sticky; top: 0; z-index: 50;
  background: rgba(0,0,0,0.85); backdrop-filter: blur(20px);
}

.logo { color: #fff; font-size: 18px; font-weight: 300; letter-spacing: 5px; user-select: none; text-decoration: none; }
.logo .divider { opacity: 0.25; margin: 0 4px; font-weight: 200; }

.header-right { display: flex; align-items: center; gap: 16px; }

.back-link {
  font-size: 13px; color: rgba(255,255,255,0.4); text-decoration: none;
  display: flex; align-items: center; gap: 6px; transition: color 0.2s;
}
.back-link:hover { color: rgba(255,255,255,0.7); }

.header-cta {
  padding: 10px 20px; border-radius: 9999px; background: #C8FF00; color: #000;
  font-weight: 700; font-size: 13px; text-decoration: none; transition: all 0.3s;
}
.header-cta:hover { transform: scale(1.03); box-shadow: 0 0 20px rgba(200,255,0,0.3); }

/* Article */
article {
  max-width: 900px; margin: 0 auto;
  padding: 64px 24px 80px;
  width: 80%;
}

.level-tag {
  display: inline-block; font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.1em; padding: 4px 10px; border-radius: 6px; margin-bottom: 20px;
}
.level-beginner { background: rgba(100,200,100,0.12); color: #6dc86d; }
.level-intermediate { background: rgba(100,170,255,0.12); color: #64aaff; }
.level-advanced { background: rgba(255,130,80,0.12); color: #ff8250; }

article h1 {
  font-size: clamp(28px, 5vw, 44px); font-weight: 900;
  line-height: 1.1; letter-spacing: -1.5px; margin-bottom: 16px;
}
article h1 .gr {
  background: linear-gradient(to right, #C8FF00, #90EE90);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.article-meta { color: rgba(255,255,255,0.3); font-size: 14px; margin-bottom: 48px; }

article h2 {
  font-size: 22px; font-weight: 800; letter-spacing: -0.5px;
  margin: 48px 0 16px; padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
article h2:first-of-type { border-top: none; padding-top: 0; }

article h3 { font-size: 17px; font-weight: 700; margin: 32px 0 12px; }

article p {
  color: rgba(255,255,255,0.55); font-size: 15px; line-height: 1.8; margin-bottom: 16px;
}

article strong { color: rgba(255,255,255,0.85); font-weight: 600; }

article a { color: #C8FF00; text-decoration: underline; text-underline-offset: 3px; }
article a:hover { color: #90EE90; }

/* Code */
code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px; padding: 2px 7px; border-radius: 5px;
  background: rgba(255,255,255,0.06); color: #C8FF00;
}

.code-block {
  background: rgba(255,255,255,0.035); border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px; padding: 20px 24px; margin: 16px 0 24px;
  font-family: 'JetBrains Mono', monospace; font-size: 13px; line-height: 1.9;
  color: rgba(255,255,255,0.6); overflow-x: auto; white-space: pre;
}
.code-block .c { color: rgba(255,255,255,0.25); }
.code-block .h { color: #C8FF00; }
.code-block .s { color: #90EE90; }
.code-block .n { color: #64aaff; }

/* Lists */
ul, ol { padding-left: 0; list-style: none; margin-bottom: 16px; }

ul li, ol li {
  padding: 8px 0; display: flex; align-items: flex-start; gap: 10px;
  color: rgba(255,255,255,0.55); font-size: 15px; line-height: 1.6;
}

ul li::before {
  content: ''; width: 18px; height: 18px; flex-shrink: 0; margin-top: 3px;
  background-image: url("data:image/svg+xml,%3Csvg fill='none' viewBox='0 0 24 24' stroke='%23C8FF00' stroke-width='3' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
  background-size: contain; background-repeat: no-repeat;
}

ol { counter-reset: item; }
ol li::before {
  counter-increment: item; content: counter(item);
  width: 24px; height: 24px; border-radius: 6px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(200,255,0,0.1); color: #C8FF00;
  font-size: 12px; font-weight: 700; font-family: 'JetBrains Mono', monospace;
}

/* Tip box */
.tip {
  display: flex; gap: 12px; padding: 16px 20px;
  background: rgba(200,255,0,0.04); border-left: 2px solid rgba(200,255,0,0.3);
  border-radius: 0 10px 10px 0; margin: 24px 0; font-size: 14px;
  line-height: 1.6; color: rgba(255,255,255,0.5);
}
.tip-label { color: #C8FF00; font-weight: 600; white-space: nowrap; }

/* Warning box */
.warn {
  display: flex; gap: 12px; padding: 16px 20px;
  background: rgba(255,100,80,0.04); border-left: 2px solid rgba(255,100,80,0.3);
  border-radius: 0 10px 10px 0; margin: 24px 0; font-size: 14px;
  line-height: 1.6; color: rgba(255,255,255,0.5);
}
.warn-label { color: #ff6450; font-weight: 600; white-space: nowrap; }

/* CTA Banner */
.cta-banner {
  margin: 56px 0; padding: 32px 36px; border-radius: 16px;
  background: linear-gradient(135deg, rgba(200,255,0,0.06) 0%, rgba(200,255,0,0.02) 100%);
  border: 1px solid rgba(200,255,0,0.12);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.cta-banner h3 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.cta-banner p { font-size: 14px; color: rgba(255,255,255,0.4); line-height: 1.5; margin: 0; }

.cta-btn {
  padding: 14px 28px; border-radius: 9999px; background: #C8FF00; color: #000;
  font-weight: 700; font-size: 14px; text-decoration: none; white-space: nowrap;
  transition: all 0.3s; flex-shrink: 0;
}
.cta-btn:hover { transform: scale(1.03); box-shadow: 0 0 30px rgba(200,255,0,0.3); }

/* Next guide link */
.next-guide {
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px; border-radius: 12px; margin-top: 48px;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06);
  text-decoration: none; transition: all 0.3s;
}
.next-guide:hover { border-color: rgba(200,255,0,0.15); background: rgba(255,255,255,0.05); }
.next-label { font-size: 12px; color: rgba(255,255,255,0.3); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 500; }
.next-title { font-size: 16px; font-weight: 700; color: #fff; margin-top: 4px; }

/* Copy banner */
.copy-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 24px; margin-bottom: 40px; border-radius: 12px;
  background: rgba(200,255,0,0.04); border: 1px solid rgba(200,255,0,0.1);
}

.copy-banner-text { flex: 1; min-width: 0; }
.copy-banner-text p {
  font-size: 13px; color: rgba(255,255,255,0.45); line-height: 1.5; margin: 0;
}
.copy-banner-text strong { color: rgba(255,255,255,0.7); }

.copy-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: 9999px; border: none;
  background: rgba(200,255,0,0.12); color: #C8FF00;
  font-size: 13px; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: all 0.25s; white-space: nowrap; flex-shrink: 0;
}
.copy-btn:hover { background: rgba(200,255,0,0.2); transform: scale(1.02); }
.copy-btn.copied { background: rgba(100,200,100,0.15); color: #6dc86d; }
.copy-btn svg { width: 14px; height: 14px; }

/* Table wrapper - makes all tables horizontally scrollable on mobile */
.table-scroll {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  margin: 16px 0 24px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.06);
}
.table-scroll table { margin: 0; border: none; border-radius: 0; }

/* Tables */
article table {
  width: 100%; border-collapse: collapse; margin: 16px 0 24px;
  font-size: 14px; border-radius: 10px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
  min-width: 400px;
}
article th {
  text-align: left; padding: 12px 16px; font-weight: 600; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: rgba(255,255,255,0.45); background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  border-right: 1px solid rgba(255,255,255,0.04);
  white-space: nowrap;
}
article td {
  padding: 12px 16px; color: rgba(255,255,255,0.5);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  border-right: 1px solid rgba(255,255,255,0.04);
}
article th:last-child, article td:last-child { border-right: none; }
article tr:last-child td { border-bottom: none; }
article table code { font-size: 12px; }

/* Footer */
footer {
  text-align: center; padding: 40px 24px; margin-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.04);
}
footer p { color: rgba(255,255,255,0.2); font-size: 13px; }
footer a { color: rgba(200,255,0,0.4); text-decoration: none; }

/* Tablet */
@media (max-width: 900px) {
  article { width: 92%; }
}

/* Mobile */
@media (max-width: 640px) {
  header { padding: 14px 16px; }
  .header-right { gap: 10px; }
  .logo { font-size: 14px; letter-spacing: 3px; }
  .header-cta { padding: 8px 14px; font-size: 11px; }
  .back-link { font-size: 11px; }

  article { padding: 28px 16px 48px; width: 100%; max-width: 100%; }
  article h1 { font-size: clamp(22px, 7vw, 32px); letter-spacing: -0.8px; margin-bottom: 12px; }
  article h2 { font-size: 18px; margin: 32px 0 12px; padding-top: 20px; }
  article h3 { font-size: 15px; margin: 24px 0 10px; }
  article p { font-size: 14px; line-height: 1.7; }

  .code-block { padding: 14px 14px; font-size: 11px; line-height: 1.7; border-radius: 8px; }

  .tip, .warn { padding: 12px 14px; font-size: 13px; flex-direction: column; gap: 4px; }

  .cta-banner { flex-direction: column; text-align: center; padding: 20px 16px; margin: 36px 0; border-radius: 12px; }
  .cta-banner h3 { font-size: 16px; }
  .cta-banner p { font-size: 13px; }

  .next-guide { flex-direction: column; text-align: center; gap: 10px; padding: 18px 16px; }
  .next-title { font-size: 15px; }

  .copy-banner { flex-direction: column; gap: 10px; text-align: center; padding: 14px 16px; margin-bottom: 28px; }
  .copy-banner-text p { font-size: 12px; }
  .copy-btn { align-self: center; padding: 8px 16px; font-size: 12px; }

  .outcome-box { padding: 16px 18px !important; margin-bottom: 28px !important; }
  .outcome-box p { font-size: 13px !important; line-height: 1.6 !important; }

  ul li, ol li { font-size: 14px; gap: 8px; }

  /* Tables scroll horizontally on mobile */
  article table { font-size: 12px; min-width: 480px; }
  article th { padding: 10px 12px; font-size: 10px; }
  article td { padding: 10px 12px; }

  .level-tag { font-size: 9px; padding: 3px 8px; }

  .gate-box { padding: 32px 20px !important; margin: 40px 16px !important; }
  .gate-title { font-size: 24px !important; }
}

/* Gate overlay */
#gateOverlay {
  display: flex; align-items: center; justify-content: center;
  min-height: 60vh; padding: 48px 24px;
}

.gate-box {
  max-width: 440px; width: 100%; text-align: center;
  padding: 48px 40px; border-radius: 20px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
}

.gate-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 9999px; font-size: 12px;
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(200,255,0,0.2);
  color: #C8FF00; margin-bottom: 24px;
}

.gate-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #C8FF00;
  animation: gatePulse 2s infinite;
}

@keyframes gatePulse { 0%,100% { opacity:1; } 50% { opacity:0.4; } }

.gate-title {
  font-size: 28px; font-weight: 900; line-height: 1.1;
  letter-spacing: -1.5px; margin-bottom: 14px; color: #fff;
}

.gate-title .gr {
  background: linear-gradient(to right, #C8FF00, #90EE90);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.gate-sub {
  font-size: 14px; color: rgba(255,255,255,0.35); line-height: 1.6; margin-bottom: 28px;
}

.gate-fields { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }

.gate-input {
  width: 100%; padding: 14px 20px; border-radius: 12px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  color: #fff; font-size: 14px; font-family: inherit; outline: none; transition: all 0.3s;
}
.gate-input::placeholder { color: rgba(255,255,255,0.25); }
.gate-input:focus { border-color: rgba(200,255,0,0.3); background: rgba(255,255,255,0.06); }

/* intl-tel-input in gate */
#gateOverlay .iti { width: 100%; }
#gateOverlay .iti input {
  width: 100%; padding: 14px 20px 14px 52px; border-radius: 12px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  color: #fff; font-size: 14px; font-family: inherit;
  outline: none; transition: all 0.3s;
}
#gateOverlay .iti input::placeholder { color: rgba(255,255,255,0.25); }
#gateOverlay .iti input:focus { border-color: rgba(200,255,0,0.3); background: rgba(255,255,255,0.06); }
#gateOverlay .iti__country-container { --iti-border-color: rgba(255,255,255,0.08); }
#gateOverlay .iti__dropdown-content { background: #1a1a1a !important; border-color: rgba(255,255,255,0.1) !important; }
#gateOverlay .iti__search-input { background: #111 !important; color: #fff !important; border-color: rgba(255,255,255,0.1) !important; }
#gateOverlay .iti__country { color: #fff !important; }
#gateOverlay .iti__country:hover, #gateOverlay .iti__country--highlight { background: rgba(200,255,0,0.1) !important; }
#gateOverlay .iti__dial-code { color: rgba(255,255,255,0.5) !important; }

.gate-btn {
  width: 100%; padding: 16px 28px; border-radius: 12px;
  background: #C8FF00; color: #000; font-weight: 700; font-size: 15px;
  font-family: inherit; cursor: pointer; border: none; transition: all 0.3s;
}
.gate-btn:hover { transform: scale(1.02); box-shadow: 0 0 30px rgba(200,255,0,0.25); }
.gate-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.gate-consent {
  display: flex; align-items: flex-start; gap: 8px;
  text-align: left; cursor: pointer; padding: 12px 4px 0;
}
.gate-consent input[type="checkbox"] {
  -webkit-appearance: none; appearance: none; margin-top: 2px;
  width: 16px; height: 16px; flex-shrink: 0; border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.04);
  cursor: pointer; position: relative; transition: all 0.2s;
}
.gate-consent input[type="checkbox"]:checked { background: #C8FF00; border-color: #C8FF00; }
.gate-consent input[type="checkbox"]:checked::after {
  content: ''; position: absolute; left: 4.5px; top: 1.5px;
  width: 5px; height: 9px; border: solid #000; border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.gate-consent span { font-size: 12px; line-height: 1.5; color: rgba(255,255,255,0.2); }

.gate-msg {
  margin-top: 12px; font-size: 13px; text-align: center; opacity: 0; transition: opacity 0.3s;
}
.gate-msg.visible { opacity: 1; }
.gate-msg.error { color: #ff6b6b; }
