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

@font-face {
    font-family: 'Striker';
    src: url('/assets/Striker.woff2') format('woff2'),
         url('/assets/Striker.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Backgrounds */
    --bg-primary: #0a0e17;
    --bg-secondary: #111827;
    --bg-card: #1a2233;
    
    /* Text */
    --text-primary: #e8ecf1;
    --text-secondary: #8892a4;
    --text-muted: #5a6477;
    
    /* Accents */
    --accent: #099dd7;
    --accent-hover: #0bb5f0;
    --accent-dim: rgba(9, 157, 215, 0.1);
    --accent-glow: rgba(9, 157, 215, 0.15);
    
    /* Status Colors */
    --success: #10b981;
    --success-dim: rgba(16, 185, 129, 0.15);
    --warning: #f59e0b;
    --warning-dim: rgba(245, 158, 11, 0.15);
    --danger: #ef4444;
    --danger-dim: rgba(239, 68, 68, 0.15);

    /* Borders & Spacing */
    --border: #1e293b;
    --border-light: #2a3548;
    --radius: 8px;
    --radius-lg: 12px;
    --transition: 0.2s ease;
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-sans);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Site Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 14, 23, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.25rem;
    text-decoration: none;
}

.logo-icon {
    width: 28px;
    height: 28px;
}

.logo .accent {
    color: var(--accent);
}

.logo-text {
    font-family: 'Striker', sans-serif;
    letter-spacing: 0.02em;
}

/* Navigation Links */
.main-nav {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.main-nav a,
.main-nav button {
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius);
    text-decoration: none;
    transition: all var(--transition);
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.main-nav a:hover,
.main-nav a.active,
.main-nav button:hover,
.main-nav button.active {
    color: var(--text-primary);
    background: var(--accent-dim);
}

.nav-sso-link {
    background: var(--accent-dim) !important;
    border: 1px solid var(--accent) !important;
    color: var(--accent) !important;
    font-weight: 600 !important;
    margin-left: 0.5rem;
}

.nav-sso-link:hover {
    background: var(--accent) !important;
    color: #ffffff !important;
}

/* Header Actions & Mobile Toggle */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.mobile-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 2px;
    transition: all var(--transition);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 1rem 2rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.hero p {
    color: var(--text-secondary);
    max-width: 650px;
    margin: 0 auto 1.5rem;
    font-size: 1.1rem;
}

.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    background: var(--accent-dim);
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(9, 157, 215, 0.3);
    margin-bottom: 1.5rem;
}

/* Search Box */
.search-wrapper {
    max-width: 700px;
    margin: 0 auto 2rem;
}

.search-box {
    display: flex;
    gap: 0.5rem;
}

.search-box input {
    flex: 1;
    padding: 0.85rem 1.2rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: var(--font-sans);
    transition: border-color var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.search-box button {
    padding: 0.85rem 1.75rem;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background var(--transition);
}

.search-box button:hover {
    background: var(--accent-hover);
}

.search-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.search-options label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
}

.api-key-input-inline {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-family: var(--font-mono);
    width: 200px;
}

/* Result Card */
.result-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    margin-top: 2rem;
    display: none;
}

.result-card.active {
    display: block;
}

.result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.result-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    font-family: var(--font-mono);
}

.badge-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-success {
    background: var(--success-dim);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-warning {
    background: var(--warning-dim);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-danger {
    background: var(--danger-dim);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-info {
    background: var(--accent-dim);
    color: var(--accent);
    border: 1px solid rgba(9, 157, 215, 0.3);
}

.badge-muted {
    background: rgba(90, 100, 119, 0.2);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

/* Metadata Grid */
.meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.meta-item {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.meta-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.meta-value {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    word-break: break-word;
}

.meta-value.mono {
    font-family: var(--font-mono);
}

/* Preformatted code block */
pre {
    font-family: var(--font-mono);
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: var(--radius);
    overflow-x: auto;
    border: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--text-primary);
}

/* Section Headings */
.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 3.5rem 0 0.5rem;
    text-align: center;
}

.section-subtitle {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1rem;
}

/* Pricing Section */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.pricing-card.featured {
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--accent-dim);
    position: relative;
}

.pricing-card.featured::before {
    content: 'RECOMMENDED';
    position: absolute;
    top: -12px;
    right: 20px;
    background: var(--accent);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    letter-spacing: 0.05em;
}

.pricing-header h3 {
    margin: 0 0 0.5rem;
    font-size: 1.3rem;
}

.pricing-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0 0 1.5rem;
}

.price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.price span {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: normal;
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
    flex-grow: 1;
}

.features-list li {
    padding: 0.4rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.features-list li::before {
    content: '✓';
    color: var(--accent);
    font-weight: bold;
}

.pricing-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pricing-form input {
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: var(--radius);
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    transition: background var(--transition);
    text-align: center;
    text-decoration: none;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    transition: all var(--transition);
    text-align: center;
    text-decoration: none;
}

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

/* API Logs Table */
.logs-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 3rem;
}

.logs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.logs-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    text-align: left;
}

th, td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
}

th {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

td {
    color: var(--text-primary);
}

td.mono {
    font-family: var(--font-mono);
}

/* Site Footer */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 2.5rem 0;
    margin-top: 4rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.site-footer a {
    color: var(--accent);
    text-decoration: none;
}

/* Alert Boxes */
.alert {
    padding: 1rem;
    border-radius: var(--radius);
    margin-top: 1rem;
    font-size: 0.9rem;
    display: none;
}

.alert-danger {
    background: var(--danger-dim);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Mobile Responsive Drawer (<= 768px) */
@media (max-width: 768px) {
    .main-nav {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 1rem;
        z-index: 99;
    }
    
    .main-nav.open {
        display: flex;
    }
    
    .main-nav a {
        padding: 0.75rem 1rem;
    }
    
    .mobile-toggle {
        display: flex;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .search-box {
        flex-direction: column;
    }

    .search-options {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Modal Overlay & Dialog */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 14, 23, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 480px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

.login-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border);
}

.login-divider span {
    padding: 0 0.8rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.btn-sso {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    background: var(--accent);
    color: #ffffff;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.btn-sso:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

/* Floating Toast Notifications */
#toastContainer {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 400px;
    width: calc(100% - 40px);
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 0.85rem 1.1rem;
    color: var(--text-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    animation: toastIn 0.25s ease-out;
    transition: all 0.25s ease;
}

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

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

.toast.toast-warning {
    border-left: 4px solid var(--warning);
}

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

@keyframes toastIn {
    from { opacity: 0; transform: translateX(25px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Auth Page & Dashboard Styles (v0.2.0) */
.auth-page-wrapper {
    min-height: calc(100vh - 180px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 480px;
    padding: 2.25rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.auth-tabs, .dash-tabs {
    display: flex;
    gap: 0.5rem;
    background: var(--bg-primary);
    padding: 0.35rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.auth-tab, .dash-tab {
    flex: 1;
    padding: 0.65rem 1rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--transition);
    font-family: var(--font-sans);
    text-align: center;
}

.auth-tab.active, .dash-tab.active {
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 2px 10px var(--accent-glow);
}

.auth-tab:hover:not(.active), .dash-tab:hover:not(.active) {
    color: var(--text-primary);
    background: var(--accent-dim);
}

.form-field {
    margin-bottom: 1.15rem;
}

.form-field label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}

.form-field input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: var(--font-sans);
    transition: border-color var(--transition);
}

.form-field input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.dash-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 2.25rem 0 1.5rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.75rem;
}

.dash-header h1 {
    margin: 0 0 0.25rem;
    font-size: 1.85rem;
}

.dash-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.35rem 1.5rem;
}

.stat-card-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
    font-weight: 600;
}

.stat-card-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-mono);
}

.key-reveal-banner {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid var(--success);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    margin-top: 1.25rem;
    display: none;
}

.key-reveal-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    background: var(--bg-primary);
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    margin-top: 0.65rem;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--success);
    word-break: break-all;
}
