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

:root {
    --accent:   #00b4d8;
    --accent-2: #7c3aed;
    --bg:       #0f0f12;
    --surface:  #19191f;
    --surface-2:#222228;
    --border:   rgba(255,255,255,0.07);
    --text:     #f0f0f8;
    --muted:    rgba(255,255,255,0.45);
    --radius:   12px;
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.6;
}

/* ── BG ── */
.bg-effects { position:fixed; inset:0; pointer-events:none; z-index:0; overflow:hidden; }
.orb { position:absolute; border-radius:50%; filter:blur(140px); }
.orb-1 { width:600px; height:600px; background:rgba(0,180,216,0.12); top:-250px; left:-200px; }
.orb-2 { width:500px; height:500px; background:rgba(124,58,237,0.10); bottom:-150px; right:-150px; }
.orb-3 { width:400px; height:400px; background:rgba(0,180,216,0.05); top:20%; right:10%; }

/* ── Z-layers ── */
.navbar, .hero, .section, footer { position:relative; z-index:1; }

/* ──────────────────────────────────────────
   NAVBAR
──────────────────────────────────────────── */
.navbar {
    position:sticky; top:0;
    background:rgba(15,15,18,0.85);
    backdrop-filter:blur(20px);
    border-bottom:1px solid var(--border);
    z-index:100;
}
.nav-inner {
    max-width:1200px; margin:0 auto;
    padding:0 24px; height:64px;
    display:flex; align-items:center; justify-content:space-between;
}
.logo {
    font-family:'Outfit',sans-serif; font-size:20px; font-weight:700;
    color:var(--text); text-decoration:none;
    display:flex; align-items:center; gap:8px;
}
.logo-icon { color:var(--accent); }
.nav-links { display:flex; gap:32px; }
.nav-links a { color:var(--muted); text-decoration:none; font-size:14px; font-weight:500; transition:color .2s; }
.nav-links a:hover { color:var(--text); }

/* ──────────────────────────────────────────
   HERO
──────────────────────────────────────────── */
.hero {
    max-width:720px; margin:0 auto;
    padding:90px 24px 120px; text-align:center;
}
.hero-badge {
    display:inline-block; padding:5px 14px;
    border-radius:999px; border:1px solid rgba(0,180,216,0.35);
    background:rgba(0,180,216,0.08); font-size:12px; font-weight:600;
    color:var(--accent); letter-spacing:.5px; margin-bottom:24px;
}
.hero-title {
    font-family:'Outfit',sans-serif;
    font-size:clamp(40px,6.5vw,68px);
    font-weight:800; line-height:1.08;
    letter-spacing:-1.5px; margin-bottom:20px;
}
.gradient-text {
    background:linear-gradient(120deg, var(--accent), #7c3aed);
    -webkit-background-clip:text; -webkit-text-fill-color:transparent;
}
.hero-subtitle { font-size:17px; color:var(--muted); line-height:1.7; margin-bottom:36px; }

/* ── Buttons ── */
.hero-actions { display:flex; gap:14px; justify-content:center; flex-wrap:wrap; }
.btn {
    display:inline-flex; align-items:center; gap:8px;
    padding:12px 26px; border-radius:9px;
    font-size:14px; font-weight:600; cursor:pointer;
    text-decoration:none; border:none;
    transition:all .2s ease; font-family:'Inter',sans-serif;
}
.btn-primary { background:var(--accent); color:#000; }
.btn-primary:hover { background:#48cae4; transform:translateY(-1px); box-shadow:0 8px 20px rgba(0,180,216,0.3); }
.btn-outline { background:transparent; border:1px solid var(--border); color:var(--text); }
.btn-outline:hover { background:var(--surface-2); border-color:rgba(255,255,255,0.15); }

/* ──────────────────────────────────────────
   ABOUT SECTION
──────────────────────────────────────────── */
.about-section {
    max-width: 800px;
    margin: 0 auto 20px;
    padding: 0 24px;
    text-align: center;
}
.about-tag {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 999px;
    background: rgba(124, 58, 237, 0.1);
    color: var(--accent-2);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    border: 1px solid rgba(124, 58, 237, 0.2);
}
.about-title {
    font-family: 'Outfit', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 24px;
    line-height: 1.3;
}
.about-text {
    font-size: 15px;
    color: var(--muted);
    line-height: 1.8;
    margin-bottom: 20px;
}
.about-text strong {
    color: var(--text);
}
.about-text:last-child {
    margin-bottom: 0;
}

/* ──────────────────────────────────────────
   SECTIONS
──────────────────────────────────────────── */
.section { max-width:1200px; margin:0 auto; padding:60px 24px; }
.section-title { font-family:'Outfit',sans-serif; font-size:26px; font-weight:700; color:var(--text); margin-bottom:24px; }

/* ──────────────────────────────────────────
   PLAYER SHELL (Live Preview)
──────────────────────────────────────────── */
.player-shell {
    background:#000; border:1px solid var(--border);
    border-radius:14px; overflow:hidden;
    box-shadow:0 24px 64px rgba(0,0,0,0.6);
    margin-bottom:8px;
}
.player-topbar {
    background:rgba(255,255,255,0.04);
    border-bottom:1px solid var(--border);
    display:flex; align-items:center; gap:12px; padding:10px 16px;
}
.dots { display:flex; gap:6px; }
.dots span { width:10px; height:10px; border-radius:50%; }
.dots span:first-child { background:#ff5f57; }
.dots span:nth-child(2) { background:#febc2e; }
.dots span:nth-child(3) { background:#28c840; }
.embed-url-bar {
    flex:1; background:rgba(255,255,255,0.05);
    border:1px solid var(--border); border-radius:6px;
    padding:5px 12px; font-size:12px; color:var(--muted);
    font-family:'SF Mono','Fira Code',monospace;
    overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.open-btn { font-size:18px; color:var(--muted); text-decoration:none; transition:color .2s; }
.open-btn:hover { color:var(--text); }
.player-frame-wrap { width:100%; aspect-ratio:16/9; }
.player-frame-wrap iframe { width:100%; height:100%; border:none; display:block; }
.player-note {
    text-align:center; padding:10px;
    font-size:12px; color:var(--muted);
    border-top:1px solid var(--border);
}

/* ──────────────────────────────────────────
   GENERATOR GRID
──────────────────────────────────────────── */
.generator-grid {
    display:grid;
    grid-template-columns:repeat(2, 1fr);
    gap:20px;
    margin-top:20px;
}

.gen-card {
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:var(--radius);
    padding:24px;
    display:flex; flex-direction:column; gap:20px;
}
.gen-card.full-width { grid-column:1/-1; }

.gen-card-header {
    font-family:'Outfit',sans-serif; font-size:17px; font-weight:700;
    display:flex; align-items:center; gap:10px;
    padding-bottom:16px; border-bottom:1px solid var(--border);
}

/* ── Fields ── */
.gen-field { display:flex; flex-direction:column; gap:8px; }
.gen-field label { font-size:12px; font-weight:700; color:var(--text); text-transform:uppercase; letter-spacing:.5px; }
.tv-only { display:none !important; }
.tv-only.show { display:flex !important; }

/* ── Inputs ── */
.gen-input {
    height:46px;
    background:#111115;
    border:1px solid var(--border);
    border-radius:9px;
    color:var(--text);
    font-size:14px; font-weight:500;
    padding:0 14px;
    outline:none;
    font-family:'Inter',sans-serif;
    transition:border-color .2s, box-shadow .2s;
    width:100%;
}
.gen-input:focus { border-color:var(--accent); box-shadow:0 0 0 3px rgba(0,180,216,0.1); }

select.gen-input {
    appearance:none; -webkit-appearance:none;
    background-image:url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.4)' stroke-width='2'%3e%3cpolyline points='6 9 12 15 18 9'/%3e%3c/svg%3e");
    background-repeat:no-repeat; background-position:right 12px center; background-size:16px;
    padding-right:36px; cursor:pointer;
}
select.gen-input option { background:#1a1a1f; color:var(--text); }

/* ── Type Toggle ── */
.type-toggle { display:flex; gap:8px; }
.toggle-btn {
    flex:1; height:46px; border-radius:9px;
    border:1px solid var(--border); background:transparent;
    color:var(--muted); font-size:14px; font-weight:600;
    cursor:pointer; transition:all .2s; font-family:'Inter',sans-serif;
}
.toggle-btn.active { border-color:var(--accent); color:var(--accent); background:rgba(0,180,216,0.07); }
.toggle-btn:hover:not(.active) { background:var(--surface-2); color:var(--text); }

/* ── Colors ── */
.color-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; }
.color-swatch-wrap { display:flex; flex-direction:column; align-items:center; gap:6px; cursor:pointer; }
.color-swatch { width:100%; aspect-ratio:16/9; border-radius:7px; border:1px solid rgba(255,255,255,0.1); transition:transform .15s, box-shadow .15s; }
.color-swatch-wrap:hover .color-swatch { transform:scale(1.06); box-shadow:0 4px 12px rgba(0,0,0,0.4); }
.color-swatch-wrap small { font-size:10px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; width:100%; text-align:center; }

.hex-input-wrap { display:flex; gap:10px; align-items:center; }
.hex-input-wrap input { flex:1; }
.color-preview { width:46px; height:46px; border-radius:9px; border:1px solid rgba(255,255,255,0.1); flex-shrink:0; }

/* ── Feature Toggles ── */
.feature-toggle {
    display:flex; justify-content:space-between; align-items:center;
    background:#111115; padding:16px 18px;
    border-radius:10px; border:1px solid rgba(255,255,255,0.04);
}
.feature-text { display:flex; flex-direction:column; gap:3px; }
.feature-text strong { font-size:14px; font-weight:700; color:var(--text); }
.feature-text span { font-size:12px; color:var(--muted); }

/* iOS Switch */
.switch { position:relative; display:inline-block; width:46px; height:26px; flex-shrink:0; }
.switch input { opacity:0; width:0; height:0; }
.slider {
    position:absolute; cursor:pointer; top:0; left:0; right:0; bottom:0;
    background:rgba(255,255,255,0.15); border-radius:26px; transition:.3s;
}
.slider:before {
    position:absolute; content:"";
    height:20px; width:20px; left:3px; bottom:3px;
    background:#888; border-radius:50%; transition:.3s;
}
input:checked + .slider { background:var(--accent); }
input:checked + .slider:before { transform:translateX(20px); background:#fff; }

/* ── Code Boxes ── */
.code-box-inline {
    display:flex; justify-content:space-between; align-items:center;
    background:#0a0a0d; border:1px solid var(--border); border-radius:9px;
    padding:12px 16px; gap:16px;
}
.url-text { font-family:'SF Mono','Fira Code',monospace; font-size:13px; color:var(--accent); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; flex:1; }
.code-box-block { background:#0a0a0d; border:1px solid var(--border); border-radius:9px; padding:20px; overflow-x:auto; }
pre { font-family:'SF Mono','Fira Code',monospace; font-size:13px; color:#a8d8ea; line-height:1.6; white-space:pre; }
.copy-btn {
    background:transparent; border:1px solid var(--border); color:var(--muted);
    border-radius:6px; padding:6px 14px; font-size:12px; font-weight:500;
    cursor:pointer; transition:all .2s; font-family:'Inter',sans-serif; flex-shrink:0;
}
.copy-btn:hover { background:var(--surface-2); color:var(--text); }

/* ──────────────────────────────────────────
   API ROUTES & TABLE
──────────────────────────────────────────── */
.api-routes-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(360px,1fr)); gap:20px; margin-bottom:40px; }
.api-route-card { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:24px; }
.api-route-card h3 { font-size:16px; font-weight:700; margin-bottom:14px; }
.route-box { background:#0a0a0d; border:1px solid var(--border); border-radius:8px; padding:12px 16px; font-family:'SF Mono','Fira Code',monospace; font-size:14px; color:var(--accent); margin-bottom:10px; }
.api-route-card p { font-size:13px; color:var(--muted); }

.table-responsive { overflow-x:auto; border-radius:var(--radius); border:1px solid var(--border); }
.params-table { width:100%; border-collapse:collapse; text-align:left; font-size:14px; }
.params-table th { background:rgba(0,0,0,0.3); padding:14px 24px; font-weight:600; border-bottom:1px solid var(--border); color:var(--text); }
.params-table td { padding:14px 24px; border-bottom:1px solid var(--border); color:var(--muted); }
.params-table tr:last-child td { border-bottom:none; }
.param-name { color:var(--accent) !important; font-family:'SF Mono','Fira Code',monospace; font-size:13px; }

/* ──────────────────────────────────────────
   EXAMPLES
──────────────────────────────────────────── */
.example-list { display:flex; flex-direction:column; gap:20px; }
.example-card { 
    background:var(--surface); 
    border:1px solid var(--border); 
    border-radius:var(--radius); 
    padding:24px; 
    transition: transform 0.2s, border-color 0.2s;
}
.example-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0,180,216,0.3);
}
.example-header { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:18px; }
.example-header h3 { font-size:16px; font-weight:700; margin-bottom:4px; }
.example-header p { font-size:13px; color:var(--muted); }
.preview-btn {
    display:inline-flex; align-items:center; gap:6px;
    background:rgba(0,180,216,0.1); border:1px solid rgba(0,180,216,0.3);
    color:var(--accent); text-decoration:none;
    padding:6px 16px; border-radius:7px;
    font-size:13px; font-weight:600; transition:all .2s; flex-shrink:0;
}
.preview-btn:hover { background:var(--accent); color:#000; }

/* ── FOOTER ── */
footer { text-align:center; padding:48px 24px; border-top:1px solid var(--border); }
.footer-logo { font-family:'Outfit',sans-serif; font-size:20px; font-weight:700; display:flex; align-items:center; justify-content:center; gap:8px; margin-bottom:10px; }
footer p { font-size:13px; color:var(--muted); }

/* ──────────────────────────────────────────
   MODAL
──────────────────────────────────────────── */
.modal-backdrop {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8); backdrop-filter: blur(5px);
    display: none; align-items: center; justify-content: center; z-index: 9999;
    opacity: 0; transition: opacity 0.3s;
}
.modal-backdrop.show { display: flex; opacity: 1; }
.modal-box {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 16px; padding: 32px; width: 90%; max-width: 400px;
    position: relative; box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    transform: translateY(20px); transition: transform 0.3s;
}
.modal-backdrop.show .modal-box { transform: translateY(0); }
.modal-close {
    position: absolute; top: 16px; right: 16px; background: transparent;
    border: none; color: var(--muted); font-size: 24px; cursor: pointer; transition: color 0.2s;
}
.modal-close:hover { color: var(--text); }
.modal-title { font-family: 'Outfit', sans-serif; font-size: 22px; margin-bottom: 8px; }
.modal-desc { font-size: 14px; color: var(--muted); margin-bottom: 24px; line-height: 1.5; }

/* ──────────────────────────────────────────
   RESPONSIVE
──────────────────────────────────────────── */

/* Tablet */
@media (max-width: 1024px) {
    .section { padding: 48px 20px; }
    .generator-grid { grid-template-columns: 1fr; }
    .gen-card.full-width { grid-column: 1; }
    .api-routes-grid { grid-template-columns: 1fr; }
}

/* Mobile landscape / small tablet */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero { padding: 64px 20px 48px; }
    .hero-subtitle { font-size: 15px; }
    .hero-actions { flex-direction: column; align-items: center; }
    .hero-actions .btn { width: 100%; max-width: 300px; justify-content: center; }

    .section { padding: 36px 16px; }
    .section-title { font-size: 22px; }

    .player-shell { border-radius: 10px; }

    .gen-card { padding: 18px; gap: 16px; }
    .gen-card-header { font-size: 15px; }
    .type-toggle { gap: 6px; }
    .toggle-btn { height: 42px; font-size: 13px; }
    .gen-input { height: 42px; font-size: 13px; }

    .api-route-card { padding: 18px; }
    .params-table th, .params-table td { padding: 10px 14px; font-size: 13px; }

    .example-card { padding: 18px; }
    .example-header { flex-direction: column; gap: 12px; align-items: flex-start; }
    .preview-btn { align-self: flex-start; }

    footer { padding: 36px 16px; }
    .footer-logo { font-size: 17px; }
}

/* Mobile portrait */
@media (max-width: 480px) {
    .hero-title { font-size: clamp(30px, 9vw, 48px); letter-spacing: -0.5px; }
    .hero-subtitle { font-size: 14px; }
    .nav-inner { padding: 0 16px; }
    .logo span:last-child { font-size: 17px; }

    .code-box-inline { flex-direction: column; align-items: flex-start; gap: 10px; }
    .url-text { font-size: 12px; }

    .params-table { font-size: 12px; }
    .params-table th, .params-table td { padding: 8px 10px; }

    .copy-btn { padding: 5px 10px; font-size: 11px; }
    pre { font-size: 11px; }
}
