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

:root {
    --bg-body: #09090b;
    --bg-card: rgba(24, 24, 27, 0.5);
    --bg-elevated: rgba(39, 39, 42, 0.5);
    --bg-input: rgba(24, 24, 27, 0.8);
    --glass-edge: inset 0 1px 0 0 rgba(255, 255, 255, 0.05);
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --accent-soft: rgba(59, 130, 246, 0.12);
    --cyan: #06b6d4;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --text: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #52525b;
    --border: #27272a;
    --border-hover: #3f3f46;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --font-body: 'Inter', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --shadow-card: 0 1px 3px rgba(0,0,0,0.4);
    --transition: 0.2s ease;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background-color: var(--bg-body);
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(59, 130, 246, 0.08) 0%, transparent 35%),
        radial-gradient(circle at 85% 85%, rgba(6, 182, 212, 0.08) 0%, transparent 35%),
        radial-gradient(circle at 50% -20%, rgba(59, 130, 246, 0.06) 0%, transparent 50%);
    background-attachment: fixed;
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; }
h1 span, h2 span, h3 span { color: var(--accent); }

.bg-gradient, .bg-waves { display: none; }

/* ── Animations & Scroll Reveals ── */
@keyframes wordFadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes floatAnimation {
    0% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
    100% { transform: translateY(0) rotate(0deg); }
}
.scroll-reveal {
    opacity: 0; transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.scroll-reveal.is-visible {
    opacity: 1; transform: translateY(0);
}
.fade-up-element {
    animation: wordFadeUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    opacity: 0;
}

/* ── Navigation ── */
nav {
    position: fixed; top: 1.5rem; left: 50%; transform: translateX(-50%);
    width: 90%; max-width: 1200px; z-index: 1000;
    transition: var(--transition);
}
nav.scrolled { top: 1rem; width: 95%; }

.nav-container {
    display: flex; align-items: center; justify-content: space-between;
    height: 64px; padding: 0 1.5rem;
    background: var(--bg-card);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 999px;
    box-shadow: var(--glass-edge), 0 4px 20px rgba(0,0,0,0.4);
}

.logo { display: flex; align-items: center; font-weight: 800; font-size: 1.15rem; gap: 10px; z-index: 2; }
.logo img { height: 32px !important; }

.nav-center {
    position: absolute; left: 50%; transform: translateX(-50%);
    display: flex; gap: 2rem; align-items: center;
}
.nav-center a {
    font-size: 0.875rem; font-weight: 500; color: var(--text-secondary);
    transition: var(--transition); position: relative;
}
.nav-center a:hover { color: var(--text); }

.nav-right { display: flex; gap: 1rem; align-items: center; z-index: 2; }

.auth-btns { display: flex; gap: 0.75rem; align-items: center; }
.btn-login {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 0.5rem 1.2rem; font-size: 0.85rem; font-weight: 600;
    color: #fff; background: var(--accent); border-radius: 999px;
    transition: var(--transition);
}
.btn-login:hover { background: var(--accent-hover); }

.mobile-menu-btn {
    display: none; background: none; border: none; color: var(--text);
    font-size: 1.25rem; cursor: pointer;
}

.mobile-menu {
    position: fixed; top: 0; right: -100%; width: 280px; height: 100vh;
    background: var(--bg-elevated); border-left: 1px solid var(--border);
    z-index: 2000; display: flex; flex-direction: column; gap: 1.5rem;
    padding: 2rem 1.5rem; transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
}
.mobile-menu.active { right: 0; }
.mobile-menu a { font-size: 1.1rem; font-weight: 500; border-bottom: 1px solid var(--border); padding-bottom: 1rem; }

/* ── Hero ── */
.hero {
    min-height: 90vh;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    text-align: center; position: relative; overflow: hidden;
    padding: 160px clamp(1.5rem, 8vw, 10%) 100px;
}
.hero-content { position: relative; z-index: 10; display: flex; flex-direction: column; align-items: center; }

/* Abstract floating shapes */
.hero-bg-shapes { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.shape {
    position: absolute; border: 1px solid var(--border-hover); border-radius: 50%;
    opacity: 0.3; animation: floatAnimation 15s infinite ease-in-out;
}
.shape-1 { width: 300px; height: 300px; top: -10%; left: -5%; border-color: rgba(59, 130, 246, 0.15); animation-delay: 0s; }
.shape-2 { width: 500px; height: 500px; bottom: -20%; right: -10%; border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; border-color: rgba(6, 182, 212, 0.1); animation-delay: -5s; animation-duration: 20s; }
.shape-3 { width: 150px; height: 150px; top: 40%; left: 80%; border: 1px dashed var(--text-muted); border-radius: 10%; animation-delay: -2s; animation-duration: 12s; }

.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 0.4rem 1rem; margin-bottom: 1.5rem;
    font-size: 0.8rem; font-weight: 600; color: var(--accent);
    background: var(--accent-soft); border: 1px solid rgba(59,130,246,0.2);
    border-radius: 999px; animation-delay: 0.1s;
}

.hero-title {
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 900; letter-spacing: -0.04em;
    margin-bottom: 1.5rem; line-height: 1.05;
    display: flex; flex-wrap: wrap; justify-content: center; column-gap: 15px; row-gap: 5px;
}
.word-wrapper { overflow: hidden; display: inline-block; }
.word { display: inline-block; animation: wordFadeUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; opacity: 0; }
.word-wrapper:nth-child(1) .word { animation-delay: 0.1s; }
.word-wrapper:nth-child(2) .word { animation-delay: 0.25s; }
.word-wrapper:nth-child(4) .word { animation-delay: 0.4s; }
.accent-word { color: var(--accent); }

.hero p {
    font-size: 1.15rem; color: var(--text-secondary);
    max-width: 580px; margin-bottom: 3rem; line-height: 1.7;
}
.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }

/* ── Buttons ── */
.btn-primary {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 0.85rem 2rem; background: var(--accent); color: #fff;
    font-weight: 700; font-size: 0.9rem; border: none;
    border-radius: var(--radius-sm); cursor: pointer; transition: var(--transition);
    font-family: var(--font-body);
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); }

.btn-secondary {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 0.85rem 2rem; background: transparent; color: var(--text);
    font-weight: 600; font-size: 0.9rem;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    cursor: pointer; transition: var(--transition); font-family: var(--font-body);
}
.btn-secondary:hover { border-color: var(--border-hover); background: var(--bg-elevated); }

.btn-submit {
    width: 100%; padding: 0.8rem 1.5rem; background: var(--accent); color: #fff;
    font-weight: 700; font-size: 0.875rem; border: none;
    border-radius: var(--radius-sm); cursor: pointer; transition: var(--transition);
    font-family: var(--font-body);
}
.btn-submit:hover { background: var(--accent-hover); }

.btn-revoke {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 0.45rem 1rem; background: rgba(239,68,68,0.1); color: var(--danger);
    font-weight: 700; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.5px;
    border: 1px solid rgba(239,68,68,0.2); border-radius: var(--radius-sm);
    cursor: pointer; transition: var(--transition); font-family: var(--font-body);
}
.btn-revoke:hover { background: rgba(239,68,68,0.2); border-color: rgba(239,68,68,0.4); }

/* ── Section Layout ── */
.section-wrapper {
    max-width: 1200px; margin: 0 auto;
    padding: 5rem clamp(1.5rem, 5vw, 3rem);
}
.section-header { text-align: center; margin-bottom: 3.5rem; }
.section-header h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); margin-bottom: 0.8rem; }
.section-header p { color: var(--text-secondary); font-size: 1rem; max-width: 500px; margin: 0 auto; }

/* ── Bento Grid (Features) ── */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    grid-auto-rows: minmax(220px, auto);
    grid-auto-flow: dense;
}
@media (min-width: 1024px) { 
    .bento-grid { grid-template-columns: repeat(3, 1fr); } 
    .bento-wide { grid-column: span 2; }
    .bento-tall { grid-row: span 2; }
}

.bento-card {
    background: var(--bg-card); border: 1px solid var(--border);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--glass-edge), 0 8px 30px rgba(0,0,0,0.2);
    border-radius: var(--radius-lg); padding: 2.5rem;
    display: flex; flex-direction: column;
    transition: transform 0.1s ease-out, border-color 0.3s ease, box-shadow 0.3s ease;
    transform-style: preserve-3d;
    will-change: transform;
}
.bento-card:hover { border-color: var(--border-hover); box-shadow: var(--glass-edge), 0 12px 40px rgba(0,0,0,0.4); }

.bento-icon {
    font-size: 1.5rem; margin-bottom: 1.5rem;
    display: inline-flex; align-items: center; justify-content: center;
    width: 48px; height: 48px; border-radius: var(--radius-sm);
    background: var(--accent-soft); color: var(--accent);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.bento-card:hover .bento-icon { transform: scale(1.1) translateY(-5px); }

.bento-content h3 { font-size: 1.2rem; margin-bottom: 0.8rem; font-weight: 700; }
.bento-content p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.7; }

.bento-card ul { list-style: none; padding: 0; margin-top: 0.8rem; }
.bento-card ul li {
    color: var(--text-secondary); padding: 0.3rem 0; font-size: 0.85rem;
    position: relative; padding-left: 1.2rem;
}
.bento-card ul li::before {
    content: '✓'; position: absolute; left: 0; color: var(--success); font-weight: 700; font-size: 0.8rem;
}

/* ── How It Works (SVG Animation) ── */
.how-it-works { position: relative; max-width: 1000px; margin: 0 auto; }
.steps-container { position: relative; padding: 2rem 0; }
.steps-line {
    position: absolute; top: 50%; left: 0; width: 100%; height: 100px;
    transform: translateY(-50%); z-index: 0;
}
.steps-grid { 
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; 
    position: relative; z-index: 10;
}
@media (max-width: 860px) {
    .steps-grid { grid-template-columns: 1fr; }
    .steps-line { display: none; } /* Hide SVG on mobile */
}

.step-card { 
    background: var(--bg-card); border: 1px solid var(--border);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--glass-edge), 0 8px 30px rgba(0,0,0,0.2);
    border-radius: var(--radius-lg);
    text-align: center; padding: 2.5rem 1.5rem; 
    transition: transform 0.1s ease-out, border-color 0.3s ease, box-shadow 0.3s ease;
    transform-style: preserve-3d;
    will-change: transform;
}
.step-card:hover { border-color: var(--border-hover); box-shadow: var(--glass-edge), 0 12px 40px rgba(0,0,0,0.4); }
.step-number {
    font-size: 2.5rem; font-weight: 900; color: var(--bg-body);
    text-shadow: -1px -1px 0 var(--border-hover), 1px -1px 0 var(--border-hover), -1px 1px 0 var(--border-hover), 1px 1px 0 var(--border-hover);
    margin-bottom: 1rem; font-family: var(--font-mono);
    transition: transform 0.4s ease;
}
.step-card:hover .step-number { transform: translateY(-5px); text-shadow: -1px -1px 0 var(--accent), 1px -1px 0 var(--accent), -1px 1px 0 var(--accent), 1px 1px 0 var(--accent); }
.step-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.step-card p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.6; }

/* ── Pricing ── */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}
@media (min-width: 960px) { .pricing-grid { grid-template-columns: repeat(3, 1fr); } }

.pricing-card {
    background: var(--bg-card); border: 1px solid var(--border);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--glass-edge), 0 8px 30px rgba(0,0,0,0.2);
    border-radius: var(--radius-lg); padding: 2.5rem 2rem;
    position: relative; display: flex; flex-direction: column; height: 100%;
    transition: transform 0.1s ease-out, border-color 0.3s ease, box-shadow 0.3s ease;
    transform-style: preserve-3d;
    will-change: transform;
}
.pricing-card:hover { border-color: var(--border-hover); box-shadow: var(--glass-edge), 0 12px 40px rgba(0,0,0,0.4); }
.pricing-card.featured { border-color: var(--accent); }

.pricing-badge {
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: var(--accent); color: #fff;
    font-size: 0.7rem; font-weight: 700; padding: 0.3rem 1rem;
    border-radius: 999px; text-transform: uppercase; letter-spacing: 1px;
}
.pricing-tier {
    font-size: 0.7rem; font-weight: 700; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 2px; margin-bottom: 0.5rem;
}
.pricing-card h3 { font-size: 1.4rem; margin-bottom: 0.5rem; }
.pricing-amount {
    font-size: 2.2rem; font-weight: 800; margin-bottom: 1.5rem;
}
.pricing-amount span { font-size: 1rem; font-weight: 500; color: var(--text-muted); }

.pricing-card ul {
    list-style: none; padding: 0; margin: 0 0 2rem; flex-grow: 1;
}
.pricing-card ul li {
    color: var(--text-secondary); padding: 0.4rem 0; font-size: 0.875rem;
    position: relative; padding-left: 1.4rem;
}
.pricing-card ul li::before {
    content: '✓'; position: absolute; left: 0; color: var(--success); font-weight: 700;
}

/* ── CTA Banner ── */
.cta-banner {
    text-align: center; padding: 10rem 3rem;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-xl);
}
.cta-content { position: relative; }
.cta-banner h2 {
    font-size: clamp(2.4rem, 5vw, 3.2rem);
    margin-bottom: 2rem; font-weight: 800;
}
.cta-banner p {
    color: var(--text-secondary); font-size: 1.15rem;
    max-width: 580px; margin: 0 auto 4rem; line-height: 1.8;
}
.cta-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ── Footer ── */
footer {
    border-top: 1px solid var(--border);
    padding: 2rem clamp(1.5rem, 5vw, 10%);
    text-align: center; color: var(--text-muted); font-size: 0.8rem;
}

/* ── Alerts ── */
.alert-success {
    background: rgba(34, 197, 94, 0.08); border: 1px solid rgba(34, 197, 94, 0.2);
    color: var(--success); padding: 0.9rem 1.2rem; border-radius: var(--radius-sm);
    margin-bottom: 1.2rem; font-size: 0.875rem; font-weight: 500;
    display: flex; align-items: center; gap: 8px;
}
.alert-error {
    background: rgba(239, 68, 68, 0.08); border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--danger); padding: 0.9rem 1.2rem; border-radius: var(--radius-sm);
    margin-bottom: 1.2rem; font-size: 0.875rem; font-weight: 500;
    display: flex; align-items: center; gap: 8px;
}

/* ── Dashboard Bento ── */
.dashboard-container {
    padding: 100px clamp(1.2rem, 4vw, 2.5rem) 3rem;
}

.dashboard-bento {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    grid-auto-flow: dense;
}
@media (min-width: 1024px) {
    .dashboard-bento { grid-template-columns: repeat(3, 1fr); }
    .db-profile { grid-column: span 1; }
    .db-stat { grid-column: span 1; }
    .db-license { grid-column: span 2; }
    .db-download { grid-column: span 1; }
    .db-full { grid-column: span 3; }
}

.db-card {
    background: var(--bg-card); border: 1px solid var(--border);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--glass-edge), 0 8px 30px rgba(0,0,0,0.2);
    border-radius: var(--radius-lg); padding: 2rem;
    display: flex; flex-direction: column; justify-content: center;
    transition: transform 0.1s ease-out, border-color 0.3s ease, box-shadow 0.3s ease;
    transform-style: preserve-3d;
    will-change: transform;
}
.db-card:hover { border-color: var(--border-hover); box-shadow: var(--glass-edge), 0 12px 40px rgba(0,0,0,0.4); }

.profile-header {
    display: flex; align-items: center; gap: 1rem;
    margin-bottom: 1.5rem;
}
.avatar { width: 56px; height: 56px; border-radius: 50%; border: 2px solid var(--border); }

.stat-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 0.5rem; }
.stat-value { font-size: 2.5rem; font-weight: 900; line-height: 1; font-family: var(--font-mono); color: var(--text); }
.stat-icon { font-size: 1.5rem; color: var(--accent); margin-bottom: 1rem; display: inline-flex; width: 44px; height: 44px; background: var(--accent-soft); border-radius: 50%; align-items: center; justify-content: center; }

.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.5rem; margin-top: 1rem; }
.info-item { display: flex; flex-direction: column; gap: 6px; }
.info-item label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.info-item span { font-size: 0.95rem; font-weight: 500; font-family: var(--font-mono); }

.status-badge {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 0.8rem; font-weight: 600; padding: 0.4rem 1rem;
    border-radius: 999px; border: 1px solid currentColor;
}
.status-badge.active { color: var(--success); background: rgba(34,197,94,0.1); border-color: rgba(34,197,94,0.2); }
.status-badge.expired { color: var(--danger); background: rgba(239,68,68,0.1); border-color: rgba(239,68,68,0.2); }

/* ── Form Inputs ── */
.input-group { margin-bottom: 1rem; }
.input-group label {
    display: block; font-size: 0.75rem; font-weight: 600; color: var(--text-secondary);
    margin-bottom: 0.4rem; text-transform: uppercase; letter-spacing: 0.5px;
}
input[type="text"], input[type="number"], input[type="password"], input[type="email"] {
    width: 100%; padding: 0.7rem 1rem;
    background: var(--bg-input); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text);
    font-size: 0.875rem; font-family: var(--font-body);
    outline: none; transition: var(--transition);
}
input:focus { border-color: var(--accent); }

/* ── Admin ── */
.admin-layout { display: grid; grid-template-columns: 300px 1fr; gap: 1.5rem; }
.admin-sidebar-alt { display: flex; flex-direction: column; gap: 1rem; }
.admin-main-alt { min-width: 0; }

.stat-card {
    background: var(--bg-card); border: 1px solid var(--border);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--glass-edge);
    border-radius: var(--radius-sm); padding: 0.8rem 1.4rem; text-align: center;
    min-width: 90px;
}
.stat-card label { display: block; font-size: 0.6rem; color: var(--text-muted); letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 0.15rem; }

.admin-table {
    width: 100%; border-collapse: collapse; font-size: 0.85rem;
}
.admin-table thead th {
    text-align: left; font-size: 0.7rem; font-weight: 700;
    color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px;
    padding: 0.8rem 1rem; border-bottom: 1px solid var(--border);
}
.admin-table tbody td {
    padding: 0.75rem 1rem; border-bottom: 1px solid var(--border);
    color: var(--text-secondary); vertical-align: middle;
}
.admin-table tbody tr:hover td { background: rgba(255,255,255,0.02); }
.admin-table tbody tr:last-child td { border-bottom: none; }

/* ── Responsive ── */
@media (max-width: 860px) {
    .grid-layout { grid-template-columns: 1fr; }
    .admin-layout { grid-template-columns: 1fr; }
    .bento-grid { grid-template-columns: 1fr; }
    .bento-wide { grid-column: span 1; }
    .bento-tall { grid-row: span 1; }
    nav { width: 95%; top: 1rem; }
    .nav-center { display: none; }
    .auth-btns { display: none; }
    .mobile-menu-btn { display: block; }
}
@media (max-width: 600px) {
    .hero { padding: 120px 1.5rem 60px; min-height: 70vh; }
    .hero-title { font-size: 2.5rem; }
    .section-wrapper { padding: 3rem 1.2rem; }
    .pricing-grid { grid-template-columns: 1fr; }
    #licenseTable td::before {
        content: attr(data-label);
        display: block; font-size: 0.6rem; color: var(--text-muted);
        text-transform: uppercase; letter-spacing: 1px; margin-bottom: 2px;
    }
}
