/* ===== ZenthrexApi — Claude Yellow Theme ===== */

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #111118;
    --bg-card: #16161f;
    --bg-card-hover: #1c1c28;
    --bg-elevated: #1e1e2a;

    --accent: #f5c542;
    --accent-light: #ffd866;
    --accent-dark: #d4a830;
    --accent-glow: rgba(245, 197, 66, 0.15);
    --accent-glow-strong: rgba(245, 197, 66, 0.3);

    --text-primary: #f0f0f5;
    --text-secondary: #9898a8;
    --text-muted: #5e5e70;

    --border: #2a2a3a;
    --border-hover: #3a3a4a;

    --gradient: linear-gradient(135deg, #f5c542 0%, #ff9f43 50%, #f5c542 100%);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(245, 197, 66, 0.15);

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

body.dashboard-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Particles ===== */
.bg-particles {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px; height: 4px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0;
    animation: particleFloat 10s infinite ease-in-out;
    box-shadow: 0 0 6px 2px rgba(245, 197, 66, 0.4), 0 0 12px 4px rgba(245, 197, 66, 0.15);
}

.particle.bright {
    width: 5px; height: 5px;
    box-shadow: 0 0 8px 3px rgba(245, 197, 66, 0.6), 0 0 20px 6px rgba(245, 197, 66, 0.25);
}

@keyframes particleFloat {
    0% { opacity: 0; transform: translateY(100vh) scale(0); }
    8% { opacity: 0.9; }
    85% { opacity: 0.4; }
    100% { opacity: 0; transform: translateY(-10vh) scale(1.2); }
}

.particle {
    position: absolute;
    width: 3px; height: 3px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0;
    animation: particleFloat 8s infinite ease-in-out;
}

@keyframes particleFloat {
    0% { opacity: 0; transform: translateY(100vh) scale(0); }
    10% { opacity: 0.6; }
    90% { opacity: 0.1; }
    100% { opacity: 0; transform: translateY(-10vh) scale(1); }
}

/* ===== Gradient Text ===== */
.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient);
    color: #0a0a0f;
    box-shadow: 0 2px 12px rgba(245, 197, 66, 0.25);
}

.btn-primary:hover {
    box-shadow: 0 4px 24px rgba(245, 197, 66, 0.4);
    transform: translateY(-2px);
}

.btn-ghost {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-glow);
}

.btn-lg { padding: 14px 28px; font-size: 15px; }
.btn-block { width: 100%; justify-content: center; }

/* ===== Language Switcher ===== */
.lang-switcher {
    display: flex;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.lang-btn {
    padding: 6px 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 0.03em;
}

.lang-btn:hover { color: var(--text-secondary); }

.lang-btn.active {
    background: var(--accent);
    color: #0a0a0f;
}

/* ===== Navbar ===== */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: var(--transition);
    background: rgba(10, 10, 15, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    padding: 10px 0;
    background: rgba(10, 10, 15, 0.9);
    border-bottom-color: var(--border);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
}

.logo-icon {
    width: 36px; height: 36px;
    background: var(--gradient);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0a0a0f;
    font-size: 16px;
}

.logo-accent {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 0;
    width: 0; height: 2px;
    background: var(--accent);
    border-radius: 1px;
    transition: var(--transition);
}

.nav-links a:hover { color: var(--text-primary); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: var(--accent); }
.nav-links a.active::after { width: 100%; }

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 18px;
    cursor: pointer;
}

/* ===== Dashboard Shared ===== */
.dashboard-main {
    position: relative;
    z-index: 1;
    padding: 120px 0 60px;
    flex: 1;
}

/* ===== Dashboard Background Image ===== */
.dash-bg-image {
    position: absolute;
    top: 0;
    right: 0;
    width: 55%;
    height: 100%;
    background: url('dashboard.jpg') center center / cover no-repeat;
    z-index: 0;
    opacity: 0.45;
    mask-image: linear-gradient(to left, rgba(0,0,0,1) 0%, rgba(0,0,0,0.5) 55%, transparent 100%);
    -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,1) 0%, rgba(0,0,0,0.5) 55%, transparent 100%);
}

/* ===== Dashboard Layout — Content Shifted Left ===== */
.dash-layout {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: flex-start;
}

.dash-content {
    width: 60%;
    max-width: 680px;
}

.dash-header {
    text-align: left;
    margin-bottom: 48px;
}

.dash-title {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.dash-title i {
    color: var(--accent);
    margin-right: 8px;
}

.dash-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
}

/* ===== Key Input ===== */
.dash-input-section {
    max-width: 560px;
    margin: 0 0 48px;
}

.key-input-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 40px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.key-input-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--gradient);
}

.key-input-icon {
    width: 64px; height: 64px;
    background: var(--accent-glow);
    border: 1px solid rgba(245, 197, 66, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--accent);
    margin: 0 auto 20px;
}

.key-input-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.key-input-card > p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.key-input-group {
    display: flex;
    gap: 12px;
}

.key-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0 12px;
    transition: var(--transition);
}

.key-input-wrapper:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.key-input-wrapper > i {
    color: var(--text-muted);
    font-size: 14px;
    margin-right: 8px;
}

.key-input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 14px;
    padding: 12px 0;
    outline: none;
}

.key-input::placeholder { color: var(--text-muted); }

.key-toggle-vis {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    font-size: 14px;
    transition: var(--transition);
}

.key-toggle-vis:hover { color: var(--accent); }

.key-input-error {
    margin-top: 12px;
    font-size: 13px;
    color: #ff5f57;
    display: none;
}

.key-input-error.show { display: block; }

/* ===== Balance Cards ===== */
.dash-balance-section {
    max-width: 800px;
    margin: 0 0 64px;
    animation: fadeInUp 0.5s ease-out;
}

.balance-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.balance-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: var(--transition);
}

.balance-card:hover {
    border-color: rgba(245, 197, 66, 0.3);
    box-shadow: var(--shadow-glow);
}

.balance-card-icon {
    width: 44px; height: 44px;
    background: var(--accent-glow);
    border: 1px solid rgba(245, 197, 66, 0.2);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--accent);
    margin-bottom: 16px;
}

.balance-card-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.balance-card-value {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
    font-family: var(--font-mono);
}

.balance-card-bar {
    width: 100%;
    height: 6px;
    background: var(--bg-primary);
    border-radius: 3px;
    overflow: hidden;
}

.balance-bar-fill {
    height: 100%;
    background: var(--gradient);
    border-radius: 3px;
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.balance-bar-fill.dollars {
    background: linear-gradient(135deg, #28c840, #5bf080);
}

/* ===== Flip Card — My Keys ===== */
.my-keys-wrapper {
    max-width: 560px;
    margin: 0;
}

.flip-card {
    perspective: 1000px;
    width: 100%;
    height: 80px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card.flipped {
    height: auto;
    min-height: 200px;
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    backface-visibility: hidden;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.flip-card-front {
    height: 80px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
}

.flip-card-back {
    background: var(--bg-card);
    border: 1px solid var(--accent);
    box-shadow: var(--shadow-glow);
    transform: rotateY(180deg);
    padding: 20px;
    min-height: 200px;
}

.my-keys-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    color: var(--accent);
    cursor: pointer;
    text-shadow: 0 0 20px rgba(245, 197, 66, 0.6), 0 0 40px rgba(245, 197, 66, 0.3);
    animation: glowPulse 2s ease-in-out infinite;
    transition: var(--transition);
    user-select: none;
}

.my-keys-btn:hover {
    text-shadow: 0 0 30px rgba(245, 197, 66, 0.8), 0 0 60px rgba(245, 197, 66, 0.5);
}

.my-keys-btn i { font-size: 22px; }

@keyframes glowPulse {
    0%, 100% { text-shadow: 0 0 20px rgba(245, 197, 66, 0.6), 0 0 40px rgba(245, 197, 66, 0.3); }
    50% { text-shadow: 0 0 30px rgba(245, 197, 66, 0.9), 0 0 60px rgba(245, 197, 66, 0.5), 0 0 80px rgba(245, 197, 66, 0.2); }
}

.keys-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.keys-list-header h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
}

.flip-back-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 28px; height: 28px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: var(--transition);
}

.flip-back-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.keys-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
    max-height: 140px;
}

.keys-list-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 13px;
    padding: 16px 0;
}

.keys-list-empty i { font-size: 18px; opacity: 0.5; }

.key-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-secondary);
    gap: 8px;
}

.key-item-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.key-item-actions { display: flex; gap: 4px; }

.key-item-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 11px;
    padding: 2px 4px;
    transition: var(--transition);
}

.key-item-btn:hover { color: var(--accent); }
.key-item-btn.delete:hover { color: #ff5f57; }

/* ===== Purchase Page — Packages ===== */
.packages-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}

.package-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 32px;
    text-align: center;
    transition: var(--transition);
    position: relative;
}

.package-card:hover {
    
    box-shadow: var(--shadow-md);
}

.package-card.featured {
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
    background: linear-gradient(180deg, rgba(245, 197, 66, 0.05), var(--bg-card));
}

.package-card.featured:hover {
    box-shadow: 0 0 50px rgba(245, 197, 66, 0.2);
}

.package-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 16px;
    background: var(--gradient);
    color: #0a0a0f;
    font-size: 12px;
    font-weight: 700;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.package-tokens {
    font-size: 48px;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

.package-token-label {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.package-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
    margin-bottom: 20px;
}

.package-price-currency {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-secondary);
}

.package-price-amount {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.package-includes {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.package-includes li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.package-includes li i {
    font-size: 11px;
    color: var(--accent);
    width: 14px;
    text-align: center;
}

.package-card.custom .package-tokens {
    font-size: 36px;
}

/* ===== FunPay Modal ===== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal-overlay.open {
    display: flex;
}

.modal-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    max-width: 440px;
    width: 100%;
    overflow: hidden;
    animation: fadeInUp 0.3s ease-out;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-header h3 i { color: var(--accent); }

.modal-close {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 32px; height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: var(--transition);
}

.modal-close:hover {
    border-color: #ff5f57;
    color: #ff5f57;
}

.modal-body {
    padding: 24px;
}

.modal-order {
    text-align: center;
    margin-bottom: 20px;
}

.modal-order-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.modal-order-value {
    font-size: 28px;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}

.modal-order-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-divider {
    height: 1px;
    background: var(--border);
    margin: 20px 0;
}

.modal-payment-method {
    margin-bottom: 20px;
}

.modal-pay-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.modal-fanpay {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: var(--accent-glow);
    border: 1px solid rgba(245, 197, 66, 0.3);
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    color: var(--accent);
}

.modal-fanpay i { font-size: 20px; }

.modal-pay-btn {
    margin-bottom: 12px;
}

.modal-note {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.5;
}

/* ===== Pricing Page ===== */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: start;
}

.pricing-card {
    padding: 36px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    transition: var(--transition);
    position: relative;
}

.pricing-card:hover {
    
    box-shadow: var(--shadow-md);
}

.pricing-card.featured {
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
    background: linear-gradient(180deg, rgba(245, 197, 66, 0.05), var(--bg-card));
}

.pricing-card.featured:hover {
    box-shadow: 0 0 50px rgba(245, 197, 66, 0.2);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 16px;
    background: var(--gradient);
    color: #0a0a0f;
    font-size: 12px;
    font-weight: 700;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pricing-header h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}

.pricing-desc { font-size: 14px; color: var(--text-muted); }

.pricing-price {
    margin: 24px 0;
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.price-currency { font-size: 20px; font-weight: 600; color: var(--text-secondary); }
.price-amount { font-size: 56px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.price-period { font-size: 14px; color: var(--text-muted); margin-left: 4px; }

.pricing-features {
    margin-bottom: 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-secondary);
}

.pricing-features li i { font-size: 12px; width: 16px; text-align: center; }
.pricing-features li .fa-check { color: var(--accent); }
.pricing-features li .fa-xmark { color: var(--text-muted); }
.pricing-features li.disabled { color: var(--text-muted); opacity: 0.5; }

/* ===== Token Rates Table ===== */
.token-rates { margin-bottom: 40px; }

.rates-table-wrap {
    overflow-x: auto;
}

.rates-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.rates-table th,
.rates-table td {
    padding: 14px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.rates-table th {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--bg-secondary);
}

.rates-table td {
    font-size: 14px;
    color: var(--text-secondary);
}

.rates-table tr:last-child td { border-bottom: none; }

.rates-table tr:hover td {
    background: var(--bg-card-hover);
}

.model-icon {
    color: var(--accent);
    margin-right: 8px;
    font-size: 14px;
}

/* ===== Docs Page ===== */
.docs-section {
    margin-bottom: 64px;
}

.docs-section-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.docs-section-title i { color: var(--accent); }

/* Docs Page Layout with Sidebar */
.docs-page-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 48px;
    align-items: start;
}

/* Sidebar */
.docs-sidebar {
    position: sticky;
    top: 100px;
    border-right: 1px solid var(--border);
    padding-right: 24px;
}

.docs-sidebar h6 {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
    margin-top: 24px;
}

.docs-sidebar h6:first-child { margin-top: 0; }

.docs-sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 8px;
}

.docs-sidebar nav a {
    font-size: 13px;
    color: var(--text-muted);
    transition: var(--transition);
    padding: 4px 8px;
    border-radius: 4px;
}

.docs-sidebar nav a:hover {
    color: var(--accent);
    background: var(--accent-glow);
}

/* Content Area */
.docs-content-area {
    max-width: 780px;
}

.docs-content-area section {
    margin-bottom: 56px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border);
}

.docs-content-area section:last-child {
    border-bottom: none;
}

.docs-eyebrow {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
}

.docs-display {
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.docs-lead {
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
}

.docs-content-area h2 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.docs-content-area h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 28px 0 12px;
}

.docs-content-area h4 {
    font-size: 16px;
    font-weight: 700;
    margin: 20px 0 10px;
}

.docs-content-area p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 12px;
}

.docs-content-area ul, .docs-content-area ol {
    margin: 12px 0;
    padding-left: 24px;
}

.docs-content-area li {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 6px;
}

.docs-content-area code {
    font-family: var(--font-mono);
    font-size: 13px;
    background: var(--bg-card);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--accent);
}

/* Callout */
.docs-callout {
    background: var(--accent-glow);
    border: 1px solid rgba(245, 197, 66, 0.2);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin: 20px 0;
}

.docs-callout p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.docs-callout ul {
    padding-left: 20px;
}

.docs-callout li {
    font-size: 14px;
    margin-bottom: 6px;
}

.docs-callout-warn {
    background: rgba(255, 95, 87, 0.08);
    border-color: rgba(255, 95, 87, 0.2);
}

/* Chips */
.docs-chips {
    display: flex;
    gap: 8px;
    margin: 8px 0 16px;
    flex-wrap: wrap;
}

.docs-chip {
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
}

.docs-chip-ok {
    border-color: rgba(40, 200, 64, 0.3);
    color: #28c840;
}

.docs-chip-warn {
    border-color: rgba(255, 159, 67, 0.3);
    color: #ff9f43;
}

/* Params Table */
.docs-params {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 14px;
}

.docs-params th, .docs-params td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.docs-params th {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--bg-secondary);
}

.docs-params td {
    color: var(--text-secondary);
}

.docs-params tr:hover td {
    background: var(--bg-card-hover);
}

/* Docs Tabs */
.docs-tabs {
    margin: 16px 0;
}

.docs-tab-btns {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
}

.docs-tab-btn {
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.docs-tab-btn:hover {
    color: var(--text-secondary);
    border-color: var(--border-hover);
}

.docs-tab-btn.active {
    background: var(--accent);
    color: #0a0a0f;
    border-color: var(--accent);
}

.docs-tab-panel {
    display: none;
}

.docs-tab-panel.active {
    display: block;
}

/* ===== Stats Page ===== */
.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-top: 16px;
}

.stats-title {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.stats-subtitle {
    font-size: 16px;
    color: var(--text-muted);
    margin-top: 6px;
}

.stats-live-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(40, 200, 64, 0.1);
    border: 1px solid rgba(40, 200, 64, 0.25);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 700;
    color: #28c840;
    letter-spacing: 0.1em;
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #28c840;
    animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(40, 200, 64, 0.5); }
    50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(40, 200, 64, 0); }
}

/* Uptime Banner */
.stats-uptime-banner {
    display: flex;
    align-items: center;
    gap: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    margin-bottom: 32px;
}

.uptime-left {
    flex-shrink: 0;
}

.uptime-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.uptime-value {
    font-size: 32px;
    font-weight: 800;
    color: #28c840;
}

.uptime-bars {
    display: flex;
    gap: 3px;
    flex: 1;
    align-items: flex-end;
    height: 40px;
}

.uptime-bar {
    flex: 1;
    border-radius: 2px;
    min-height: 4px;
    transition: var(--transition);
    position: relative;
}

.uptime-bar.ok { background: #28c840; }
.uptime-bar.warn { background: #ff9f43; }
.uptime-bar.down { background: #ff5f57; }
.uptime-bar.future { background: var(--border); opacity: 0.3; }

.uptime-bar:hover {
    filter: brightness(1.3);
    transform: scaleY(1.15);
}

/* Key Metrics Grid */
.stats-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.stats-metric-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    transition: var(--transition);
}

.stats-metric-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
}

.metric-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-glow);
    border-radius: var(--radius-md);
    color: var(--accent);
    font-size: 16px;
    flex-shrink: 0;
}

.metric-info { flex: 1; }

.metric-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.metric-value {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.metric-delta {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
}

.metric-delta.positive { color: #28c840; }
.metric-delta.negative { color: #28c840; }

.metric-delta i { margin-right: 2px; }

/* Two Column Layout */
.stats-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

/* Stats Card */
.stats-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 16px;
}

.stats-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.stats-card-header h3 {
    font-size: 16px;
    font-weight: 700;
}

.stats-card-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 100px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-muted);
}

.stats-card-badge.ok {
    border-color: rgba(40, 200, 64, 0.3);
    color: #28c840;
    background: rgba(40, 200, 64, 0.08);
}

/* Model Popularity Bars */
.stats-model-bars {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.model-bar-row {
    display: grid;
    grid-template-columns: 140px 1fr 40px;
    gap: 12px;
    align-items: center;
}

.model-bar-label {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-secondary);
}

.model-bar-track {
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
}

.model-bar-fill {
    height: 100%;
    border-radius: 4px;
    background: var(--accent);
    transition: width 0.8s ease;
}

.model-bar-fill.haiku { background: #4ecdc4; }
.model-bar-fill.opus { background: #a855f7; }
.model-bar-fill.opus-old { background: #6366f1; }

.model-bar-pct {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: right;
}

/* Latency List */
.stats-latency-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.latency-row {
    display: grid;
    grid-template-columns: 140px 1fr 60px;
    gap: 12px;
    align-items: center;
}

.latency-model {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-secondary);
}

.latency-bar-wrap {
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
}

.latency-bar {
    height: 100%;
    border-radius: 4px;
    background: var(--accent);
    transition: width 0.8s ease;
}

.latency-bar.sonnet { background: var(--accent); }
.latency-bar.opus { background: #a855f7; }
.latency-bar.opus7 { background: #ec4899; }

.latency-ms {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: right;
}

/* Incident Log */
.incident-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.incident-row {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.incident-status {
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

.incident-row.resolved .incident-status { color: #28c840; }
.incident-row.active .incident-status { color: #ff9f43; }

.incident-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.incident-meta {
    font-size: 12px;
    color: var(--text-muted);
}

/* Endpoint Status */
.endpoint-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.endpoint-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
}

.endpoint-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.endpoint-dot.ok { background: #28c840; }
.endpoint-dot.warn { background: #ff9f43; }
.endpoint-dot.down { background: #ff5f57; }

.endpoint-path {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-secondary);
    flex: 1;
}

.endpoint-uptime {
    font-size: 13px;
    font-weight: 600;
    color: #28c840;
}

/* Docs Code Block */
.docs-code-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin: 12px 0;
}

.code-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    gap: 12px;
}

.code-dots { display: flex; gap: 6px; }

.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }

.code-title {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
    flex: 1;
}

.code-copy {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    transition: var(--transition);
}

.code-copy:hover { color: var(--accent); }
.code-copy.copied { color: #28c840; }

.code-body {
    padding: 20px;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.8;
    overflow-x: auto;
    color: var(--text-secondary);
}

.code-keyword { color: #c678dd; }
.code-string { color: var(--accent); }
.code-comment { color: var(--text-muted); font-style: italic; }

/* API Reference */
.api-ref-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.api-ref-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    transition: var(--transition);
}

.api-ref-card:hover {
    border-color: var(--border-hover);
}

.api-ref-method {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.api-ref-method + .api-ref-method,
.api-ref-card:nth-child(1) .api-ref-method,
.api-ref-card:nth-child(2) .api-ref-method {
    background: rgba(245, 197, 66, 0.15);
    color: var(--accent);
}

.api-ref-card:nth-child(3) .api-ref-method,
.api-ref-card:nth-child(4) .api-ref-method {
    background: rgba(40, 200, 64, 0.15);
    color: #28c840;
}

.api-ref-path {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.api-ref-card p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Models Grid */
.models-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.model-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    transition: var(--transition);
}

.model-card:hover {
    border-color: rgba(245, 197, 66, 0.3);
    box-shadow: var(--shadow-glow);
}

.model-icon-wrap {
    width: 44px; height: 44px;
    background: var(--accent-glow);
    border: 1px solid rgba(245, 197, 66, 0.2);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--accent);
    margin: 0 auto 12px;
}

.model-card h4 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
}

.model-id {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
}

/* ===== Footer ===== */
.footer {
    position: relative;
    z-index: 1;
    padding: 32px 0;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
}

.dashboard-body .footer { margin-top: auto; }

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.footer-bottom p { font-size: 13px; color: var(--text-muted); }

.footer-bottom-links { display: flex; gap: 24px; }

.footer-bottom-links a {
    font-size: 13px;
    color: var(--text-muted);
    transition: var(--transition);
}

.footer-bottom-links a:hover { color: var(--text-secondary); }

/* ===== Animations ===== */

.tilt-card {
    transition: transform 0.15s ease-out, box-shadow 0.15s ease-out;
    will-change: transform;
}

.tilt-card .tilt-shine {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    background: radial-gradient(circle at var(--shine-x, 50%) var(--shine-y, 50%), rgba(245, 197, 66, 0.12) 0%, transparent 60%);
    z-index: 0;
}

.tilt-card:hover .tilt-shine {
    opacity: 1;
}

.package-card.tilt-card:hover {
    transform: var(--tilt-transform, none);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 20px rgba(245, 197, 66, 0.08);
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .packages-grid { grid-template-columns: repeat(2, 1fr); }
    .pricing-grid { grid-template-columns: 1fr; max-width: 440px; margin: 0 auto; }
    .balance-grid { grid-template-columns: 1fr; }
    .docs-grid-layout { grid-template-columns: 1fr; gap: 32px; }
    .models-grid { grid-template-columns: repeat(2, 1fr); }

    .dash-content { width: 70%; }
    .dash-bg-image { width: 45%; opacity: 0.18; }
}

@media (max-width: 768px) {
    .nav-links, .nav-actions { display: none; }
    .mobile-toggle { display: block; }

    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%; left: 0; right: 0;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border);
        padding: 20px 24px;
        gap: 16px;
    }

    .packages-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
    .api-ref-grid { grid-template-columns: 1fr; }
    .models-grid { grid-template-columns: 1fr; }
    .key-input-group { flex-direction: column; }
    .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }

    .dash-layout { justify-content: center; }
    .dash-content { width: 100%; max-width: 100%; }
    .dash-bg-image { display: none; }
    .dash-header { text-align: center; }

    /* Docs page mobile */
    .docs-page-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .docs-sidebar {
        position: static;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding-right: 0;
        padding-bottom: 16px;
        margin-bottom: 24px;
    }
    .docs-sidebar nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 4px;
    }
    .docs-sidebar nav a {
        font-size: 12px;
        padding: 4px 8px;
    }

    /* Stats page mobile */
    .stats-metrics-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-two-col { grid-template-columns: 1fr; }
    .endpoint-grid { grid-template-columns: 1fr; }
    .stats-uptime-banner { flex-direction: column; gap: 16px; }
    .model-bar-row { grid-template-columns: 110px 1fr 40px; }
    .latency-row { grid-template-columns: 110px 1fr 60px; }
}

@media (max-width: 480px) {
    .dash-title { font-size: 28px; }
    .flip-card { height: 70px; }
    .flip-card.flipped { min-height: 180px; }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }

::selection {
    background: rgba(245, 197, 66, 0.3);
    color: var(--text-primary);
}
