:root {
    --bg-color: #080913;
    --panel-bg: rgba(15, 18, 36, 0.4);
    --panel-border: rgba(139, 92, 246, 0.15);
    --accent-primary: #8b5cf6;
    --accent-secondary: #f472b6;
    --accent-glow: rgba(139, 92, 246, 0.4);
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --error: #ef4444;
}

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

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

.glow-bg {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(139, 92, 246, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(244, 114, 182, 0.05) 0%, transparent 40%);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--panel-border);
}

.logo { display: flex; align-items: center; gap: 10px; }
.logo-dot {
    width: 12px; height: 12px;
    background: var(--accent-primary);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--accent-primary);
}
h1 {
    font-family: 'Outfit', sans-serif; font-size: 24px; font-weight: 800;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.nav-links { display: flex; gap: 30px; }
.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active {
    color: var(--text-primary);
}

/* Sections */
.section { display: none; animation: fadeIn 0.4s ease-in-out; }
.section.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Hero */
.hero {
    text-align: center;
    padding: 80px 0;
}
.hero h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 56px;
    line-height: 1.2;
    margin-bottom: 20px;
}
.text-gradient {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.6;
}
.hero-buttons { display: flex; justify-content: center; gap: 20px; }

/* Buttons & Inputs */
button {
    border: none; border-radius: 12px;
    padding: 12px 24px; font-weight: 600; cursor: pointer;
    font-family: inherit; font-size: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
}
button:hover { transform: translateY(-2px); }
button:active { transform: translateY(0); }

.btn-primary {
    background: var(--accent-primary); color: white;
    box-shadow: 0 4px 15px var(--accent-glow);
}
.btn-secondary {
    background: rgba(255,255,255,0.05); color: var(--text-primary);
    border: 1px solid var(--panel-border);
}

input[type="email"], input[type="password"], input[type="text"] {
    width: 100%;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    padding: 14px 16px;
    color: var(--text-primary);
    font-family: inherit;
    margin-bottom: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.1);
}

/* Dashboard */
.dashboard-card {
    max-width: 450px;
    margin: 0 auto;
    background: var(--panel-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--panel-border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}
.dashboard-card h3 { font-size: 24px; margin-bottom: 10px; }
.dashboard-card p { color: var(--text-secondary); margin-bottom: 25px; font-size: 14px; }
.auth-buttons { display: flex; gap: 15px; margin-top: 10px; }
.auth-buttons button { flex: 1; }
.error-msg { color: var(--error); font-size: 13px; margin-top: 15px; text-align: center; }

.badge {
    background: rgba(139, 92, 246, 0.2);
    color: #c4b5fd; padding: 4px 10px; border-radius: 20px;
    font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px;
}
.keys-list { margin: 20px 0; display: flex; flex-direction: column; gap: 10px; }
.api-key-item {
    background: rgba(0,0,0,0.3); border: 1px solid var(--panel-border);
    border-radius: 10px; padding: 12px 15px; display: flex; justify-content: space-between;
    align-items: center; font-family: monospace; font-size: 13px;
}

/* Playground */
.playground-layout {
    display: flex; height: 75vh; gap: 20px;
    background: var(--panel-bg); backdrop-filter: blur(20px);
    border: 1px solid var(--panel-border); border-radius: 24px;
    overflow: hidden; box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}
.sidebar { width: 300px; padding: 30px; border-right: 1px solid var(--panel-border); background: rgba(5,6,12,0.3); }
.chat { flex: 1; display: flex; flex-direction: column; }
.section-title { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-secondary); margin-bottom: 15px; }

.slider-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.slider-label { font-size: 12px; display: flex; justify-content: space-between; }
.slider-val { color: var(--accent-primary); font-weight: 600; }
input[type="range"] { -webkit-appearance: none; width: 100%; height: 5px; background: rgba(255,255,255,0.08); border-radius: 3px; outline: none; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; background: var(--accent-primary); border-radius: 50%; cursor: pointer; box-shadow: 0 0 8px var(--accent-glow); transition: transform 0.1s ease; }
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.25); }

.api-key-input { margin-top: 30px; padding-top: 30px; border-top: 1px solid var(--panel-border); }

.chat-header { padding: 20px 30px; border-bottom: 1px solid var(--panel-border); }
.messages { flex: 1; padding: 30px; overflow-y: auto; display: flex; flex-direction: column; gap: 20px; }
.messages::-webkit-scrollbar { width: 5px; }
.messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.05); border-radius: 3px; }

.message { max-width: 75%; padding: 14px 18px; border-radius: 16px; font-size: 14px; line-height: 1.6; }
.message.user { background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(244, 114, 182, 0.15)); border: 1px solid rgba(139, 92, 246, 0.2); align-self: flex-end; border-bottom-right-radius: 4px; }
.message.assistant { background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.04); align-self: flex-start; border-bottom-left-radius: 4px; }
.message.system { background: rgba(239, 68, 68, 0.08); border: 1px solid rgba(239, 68, 68, 0.15); align-self: center; color: var(--error); font-size: 12.5px; }

.input-area { padding: 20px 30px; border-top: 1px solid var(--panel-border); }
.input-box { background: rgba(0,0,0,0.15); border: 1px solid var(--panel-border); border-radius: 16px; padding: 8px 12px; display: flex; align-items: center; gap: 15px; }
.input-box:focus-within { border-color: var(--accent-primary); box-shadow: 0 0 15px rgba(139, 92, 246, 0.1); }
textarea { flex: 1; background: transparent; border: none; outline: none; color: var(--text-primary); font-size: 14px; font-family: inherit; resize: none; height: 36px; line-height: 36px; }

.thinking { display: flex; gap: 4px; align-items: center; padding: 5px 0; }
.dot { width: 5px; height: 5px; background: var(--accent-primary); border-radius: 50%; animation: bounce 1.4s infinite ease-in-out both; }
.dot:nth-child(1) { animation-delay: -0.32s; }
.dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes bounce { 0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1); } }
