:root {
    --bg-color: #0f172a;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #3b82f6;
    --accent-hover: #60a5fa;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --terminal-bg: #0f172a;
    --term-text: #34d399;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

.background-effect {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(59, 130, 246, 0.15) 0%, transparent 40%);
    z-index: -1;
    pointer-events: none;
}

.container {
    max-width: 1000px;
    width: 90%;
    margin: 2rem auto;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

header {
    text-align: center;
}

header h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #60a5fa, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

header h1 span {
    -webkit-text-fill-color: initial;
    font-size: 3rem;
    vertical-align: bottom;
}

header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto;
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.demo-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

/* Terminal Styles */
.terminal {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.terminal-header {
    background: rgba(15, 23, 42, 0.8);
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
}

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

.mac-btn.red { background: #ef4444; }
.mac-btn.yellow { background: #f59e0b; }
.mac-btn.green { background: #10b981; }

.terminal-title {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-family: 'JetBrains Mono', monospace;
    margin-left: auto;
    margin-right: auto;
}

.terminal-body {
    padding: 2rem;
    background: #020617;
    font-family: 'JetBrains Mono', monospace;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

#tui-face {
    color: var(--term-text);
    font-size: 1.2rem;
    text-align: center;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.tui-mood-label {
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--term-text);
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

.bars {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.bar-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.bar-label {
    width: 100px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.progress-bar {
    flex-grow: 1;
    height: 12px;
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
    overflow: hidden;
}

.progress-bar .fill {
    height: 100%;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.tui-logs {
    margin-top: auto;
    border-top: 1px dashed rgba(255,255,255,0.2);
    padding-top: 1rem;
    font-size: 0.9rem;
    color: #94a3b8;
}

.log-line {
    margin-bottom: 0.3rem;
}

.log-line .highlight { color: #facc15; }
.log-line .response { color: #f472b6; font-style: italic; }

/* Controls Styles */
.controls h3 {
    margin-bottom: 1rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    font-weight: 600;
}

.pack-selector {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.pack-btn, .event-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 0.8rem 1rem;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.pack-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.pack-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
}

.event-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}

.event-btn {
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
}

.event-btn:hover {
    background: var(--glass-border);
    transform: translateY(-2px);
}

.event-btn:active {
    transform: translateY(0);
}

.instruction {
    margin-top: 2rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-style: italic;
}

footer {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.github-link {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background: white;
    color: black;
    text-decoration: none;
    font-weight: 600;
    border-radius: 20px;
    margin-bottom: 1rem;
    transition: opacity 0.2s;
}

.github-link:hover {
    opacity: 0.9;
}

@media (max-width: 768px) {
    .demo-wrapper {
        grid-template-columns: 1fr;
    }
}
