:root {
    --bg: #020617;         
    --card: rgba(15, 23, 42, 0.6);       
    --border: rgba(255, 255, 255, 0.08);     
    --text: #f8fafc;       
    --text-dim: #94a3b8;   
    --accent: #10b981;     
    --accent-glow: rgba(16, 185, 129, 0.2);
    --danger: #ef4444;     
    --warning: #f59e0b;    
    --info: #3b82f6;       
    --sidebar: rgba(2, 6, 23, 0.8);
}

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

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

/* -----------------------------
   MARKETING LAYOUT / MAIN
----------------------------- */

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.navbar {
    height: 90px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: rgba(3, 7, 18, 0.85);
    backdrop-filter: blur(12px);
    z-index: 1000;
}

.nav-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--text);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-family: var(--font-main), sans-serif;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.btn-primary {
    background-color: var(--accent);
    color: #020617;
    box-shadow: 0 4px 14px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-ghost {
    background-color: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--text-dim);
}

h1 {
    font-size: 4rem;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 24px;
    font-family: var(--font-rationale), sans-serif;
    text-transform: uppercase;
}

h2 {
    font-size: 2.5rem;
    line-height: 1.2;
    font-weight: 700;
    margin-bottom: 16px;
    font-family: var(--font-rationale), sans-serif;
    text-transform: uppercase;
}

h3 {
    font-size: 1.5rem;
    line-height: 1.3;
    font-weight: 600;
    font-family: var(--font-rationale), sans-serif;
    text-transform: uppercase;
}

p {
    color: var(--text-dim);
    font-size: 1.125rem;
    margin-bottom: 24px;
}

.hero {
    padding: 120px 0;
    text-align: center;
    position: relative;
    overflow: visible;
}

.hero p {
    max-width: 600px;
    margin: 0 auto 40px auto;
}

.hero-dashboard {
    margin-top: 80px;
    position: relative;
}

.hero-dashboard img {
    width: 100%;
    max-width: 1000px;
    height: 600px;
    object-fit: cover;
    object-position: center;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    background: #000;
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-badge {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent);
    border: 1px solid var(--accent-glow);
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.section-slogan {
    max-width: 600px;
    margin: 0 auto;
}

.terminal {
    background: #000;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    font-family: 'JetBrains Mono', monospace;
}

.terminal-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #0c1120;
    border-bottom: 1px solid var(--border);
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

.dot-r { background: #ff5f56; }
.dot-y { background: #ffbd2e; }
.dot-g { background: #27c93f; }

.terminal-logs {
    padding: 24px;
    color: var(--text-dim);
    font-size: 0.9rem;
    line-height: 1.6;
}

.log.info { color: var(--text-dim); }
.log.warn { color: var(--warning); }
.log.error { color: var(--danger); font-weight: bold; }
.log.done { color: var(--accent); }

.score-flex {
    display: flex;
    align-items: center;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 48px;
    gap: 60px;
}

.score-circle {
    position: relative;
    width: 160px;
    height: 160px;
}

.score-circle svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.score-circle circle {
    fill: none;
    stroke-width: 12;
    stroke-linecap: round;
}

.score-circle .bg {
    stroke: var(--border);
}

.score-circle .fg {
    stroke: var(--accent);
    stroke-dasharray: 440;
    stroke-dashoffset: 44;
}

.score-val {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    font-weight: 800;
    color: var(--text);
}

.score-val::after {
    content: '%';
    font-size: 1.5rem;
    color: var(--accent);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 20px 40px -12px rgba(16, 185, 129, 0.15);
}

.card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(600px circle at var(--mouse-x) var(--mouse-y), rgba(16, 185, 129, 0.08), transparent 40%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}

.card:hover::after {
    opacity: 1;
}

.mouse-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(800px circle at var(--mouse-x) var(--mouse-y), rgba(16, 185, 129, 0.05), transparent 40%);
    pointer-events: none;
    z-index: -1;
    transition: opacity 0.8s;
}

.card-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 24px;
    color: var(--text);
}

.card-footer {
    margin-top: 24px;
    color: var(--accent);
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.dash-input {
    height: 44px;
    padding: 0 16px;
    border-radius: 8px;
    outline: none;
    background: #000;
    border: 1px solid var(--border);
    color: white;
}

.dash-input:focus {
    border-color: var(--accent) !important;
}

/* -----------------------------
   DASHBOARD ISLAND (SANDBOXED)
----------------------------- */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 16px 0;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(3, 7, 18, 0.1);
    backdrop-filter: blur(0px);
}

.navbar.scrolled {
    background: rgba(3, 7, 18, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 0;
}

.dashboard-body .dashboard-layout {
    display: flex;
    width: 100%;
    min-height: 100vh;
    background: var(--bg);
}

.dashboard-body .sidebar {
    width: 280px !important;
    min-width: 280px !important;
    max-width: 280px !important;
    background: var(--sidebar);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 32px 0;
    height: 100vh;
    position: sticky;
    top: 0;
    box-shadow: 20px 0 50px rgba(0,0,0,0.3);
}

.dashboard-body .dashboard-content {
    flex: 1;
    padding: 40px;
    min-height: 100vh;
}

.dashboard-body .sidebar-logo img {
    height: 60px !important;
    width: auto;
    display: block;
    margin: 0 auto;
}

.dashboard-body .side-nav {
    display: flex;
    flex-direction: column;
    margin-top: 20px;
    padding: 0 20px;
}

.dashboard-body .side-nav a {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    color: var(--text-dim);
    text-decoration: none;
    border-radius: 12px;
    transition: background 0.3s, color 0.3s;
    font-weight: 500;
}

.dashboard-body .side-nav a:hover,
.dashboard-body .side-nav a.active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent);
}

.dashboard-body .side-nav a i {
    width: 24px;
    text-align: center;
    font-size: 1.2rem;
}

.dashboard-body .stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 32px;
}

.dashboard-body .stat-card {
    padding: 24px;
    display: flex;
    align-items: center;
}

.dashboard-body .stat-head {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.dashboard-body .stat-head span {
    font-size: 0.9rem;
}

.dashboard-body .stat-head h2 {
    font-size: 2rem;
    margin-bottom: 0;
    font-weight: 700;
    line-height: 1;
}

.dashboard-body .domain-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.dashboard-body .domain-item:last-child {
    border-bottom: none;
}

.dashboard-body .domain-info {
    display: flex;
    flex-direction: column;
}

.dashboard-body .domain-info span {
    font-size: 0.85rem;
    color: var(--text-dim);
}

/* Language Flat Selector */
.lang-btn-flat {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 0.65rem;
    font-weight: 800;
    cursor: pointer;
    padding: 6px 4px;
    border-radius: 4px;
    flex: 1;
    transition: all 0.2s ease;
}

.lang-btn-flat:hover {
    color: var(--accent);
    background: rgba(255,255,255,0.05);
}

.lang-btn-flat.active {
    color: var(--accent);
    background: var(--accent-glow);
}

/* Command Bar */
.command-bar input::placeholder {
    color: rgba(255,255,255,0.2);
}

.command-bar:focus-within {
    border-color: #fff !important;
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.2) !important;
}

/* -----------------------------
   LOGO MARQUEE
----------------------------- */

.logo-marquee {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    padding: 20px 0;
}

.logo-marquee::before,
.logo-marquee::after {
    content: "";
    position: absolute;
    top: 0;
    width: 250px;
    height: 100%;
    z-index: 2;
}

.logo-marquee::before {
    left: 0;
    background: linear-gradient(to right, var(--bg) 0%, transparent 100%);
}

.logo-marquee::after {
    right: 0;
    background: linear-gradient(to left, var(--bg) 0%, transparent 100%);
}

.marquee-content {
    display: inline-flex;
    gap: 100px;
    animation: scroll 30s linear infinite;
}

@keyframes scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.trust-logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.15);
    letter-spacing: 0.1em;
    user-select: none;
    transition: color 0.3s;
}

.trust-logo:hover {
    color: rgba(255, 255, 255, 0.4);
}

/* Premium Upgrade Banner Styling */
.upgrade-banner {
    position: relative;
    padding: 1px;
    background: linear-gradient(90deg, #10b981, #3b82f6, #10b981);
    background-size: 200% auto;
    animation: borderRotate 4s linear infinite;
    border-radius: 16px;
    overflow: hidden;
}

.upgrade-banner-inner {
    background: #0f172a;
    padding: 16px 24px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

@keyframes borderRotate {
    to { background-position: 200% center; }
}

.dashboard-body .card {
    background: var(--card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.dashboard-body .card:hover {
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 0 10px 30px -10px rgba(16, 185, 129, 0.2);
}

/* Scrollbar Styling for High End Feel */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg);
}
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-dim);
}

/* -----------------------------
   LANGUAGE SELECTOR (PREMIUM)
----------------------------- */

.lang-switch {
    position: relative;
    display: inline-block;
}

.lang-current {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255,255,255,0.03);
    font-size: 11px;
    font-weight: 800;
    color: var(--text-dim);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.1em;
}

.lang-current:hover {
    border-color: var(--accent);
    color: var(--text);
    background: rgba(16, 185, 129, 0.05);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.1);
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    padding-top: 12px;
    display: none;
    flex-direction: column;
    min-width: 180px;
    z-index: 9999;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.4));
}

.lang-dropdown-inner {
    background: rgba(12, 17, 32, 0.98);
    backdrop-filter: blur(25px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    animation: slideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Dropdown shown via JS click-toggle in dashboard.js */

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    padding: 12px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.lang-btn:hover {
    background: rgba(16, 185, 129, 0.12);
    color: var(--accent);
    padding-left: 20px;
}

.lang-btn.active {
    color: var(--accent) !important;
    background: rgba(16, 185, 129, 0.08);
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-15px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* -----------------------------
   DASH HEADER
----------------------------- */

.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    position: relative;
}

/* -----------------------------
   BADGES
----------------------------- */

.badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.8rem;
}

.score-high { background: rgba(16, 185, 129, 0.15); color: var(--accent); }
.score-mid  { background: rgba(245, 158, 11, 0.15);  color: var(--warning); }
.score-low  { background: rgba(239, 68, 68, 0.15);   color: var(--danger); }

/* -----------------------------
   MODAL / AUDIT OVERLAY
----------------------------- */

.audit-overlay {
    position: fixed;
    inset: 0;
    background: rgba(3, 7, 18, 0.95);
    backdrop-filter: blur(12px);
    z-index: 5000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.audit-modal {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 24px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8);
    position: relative;
    padding: 48px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
}

/* -----------------------------
   SETTINGS-SPECIFIC
----------------------------- */

.api-key-box {
    flex: 1;
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--accent);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.action-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    color: var(--text-dim);
    border-radius: 10px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-btn:hover {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent);
    border-color: var(--accent);
}

.btn-ghost-inverted {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
    width: 100%;
}

.btn-ghost-inverted:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.snippet-box {
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px 24px;
    font-size: 0.85rem;
    position: relative;
    line-height: 1.8;
}

.copy-btn {
    position: absolute;
    top: 12px;
    right: 16px;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.copy-btn:hover { color: var(--accent); }

.trust-seal-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: rgba(16, 185, 129, 0.03);
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: 20px;
}

.seal-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--accent);
    padding: 16px 24px;
    border-radius: 12px;
}

.seal-badge i {
    font-size: 1.8rem;
    color: var(--accent);
}

/* Toast notifications (used by dashboard.js) */
.toast {
    position: fixed;
    bottom: 32px;
    right: 32px;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    background: #0f172a;
    border: 1px solid var(--border);
    color: white;
    z-index: 9999;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 360px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { border-color: var(--accent); color: var(--accent); }
.toast.error   { border-color: var(--danger);  color: var(--danger); }
.toast.info    { border-color: var(--info);    color: var(--info); }

/* -----------------------------
   RESPONSIVE (FINAL POLISH)
   ----------------------------- */
@media (max-width: 1024px) {
    .dashboard-body .sidebar {
        width: 80px !important;
        min-width: 80px !important;
    }
    .dashboard-body .side-nav span, 
    .dashboard-body .sidebar-logo img {
        display: none !important;
    }
    .dashboard-body .side-nav a {
        justify-content: center;
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .dashboard-body .dashboard-layout {
        flex-direction: column;
    }
    .dashboard-body .sidebar {
        width: 100% !important;
        height: auto;
        min-height: auto;
        position: relative;
        padding: 10px 0;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    .dashboard-body .side-nav {
        flex-direction: row;
        justify-content: space-around;
        margin-top: 0;
        padding: 0 10px;
    }
    .dashboard-body .side-nav a {
        padding: 12px;
    }
    .dashboard-body .dashboard-content {
        padding: 20px;
    }
    .grid-3, .dashboard-body .stat-grid {
        grid-template-columns: 1fr;
    }
}

/* -----------------------------
   MODALS & OVERLAYS
----------------------------- */

.modal-overlay, .audit-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.9);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 5000;
    animation: fadeIn 0.3s ease;
}

.modal {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    position: relative;
    box-shadow: 0 40px 100px rgba(0,0,0,0.8);
    animation: slideUp 0.4s cubic-bezier(0.17, 0.67, 0.83, 0.67);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--card);
    border: 1px solid var(--border);
    padding: 16px 24px;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    z-index: 9999;
    transform: translateY(100px);
    transition: all 0.4s cubic-bezier(0.17, 0.67, 0.83, 0.67);
    opacity: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    backdrop-filter: blur(10px);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success { border-left: 4px solid var(--accent); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.info { border-left: 4px solid var(--info); }

.pulse-scan {
    background: rgba(16, 185, 129, 0.1) !important;
    animation: scan-pulse 1.5s infinite ease-in-out;
}

@keyframes scan-pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; box-shadow: 0 0 15px var(--accent-glow); }
    100% { opacity: 0.6; }
}

