:root {
    --bg-main: #0f172a; /* Slate 900 */
    --bg-card: #1e293b; /* Slate 800 */
    --text-main: #f8fafc; /* Slate 50 */
    --text-muted: #94a3b8; /* Slate 400 */
    --accent-green: #10b981; /* Emerald 500 */
    --accent-red: #ef4444; /* Red 500 */
    --accent-orange: #f59e0b; /* Amber 500 */
    --bottom-nav-bg: #1e293b;
    --border-color: #334155;
}

[data-theme="light"] {
    --bg-main: #ffffff; /* White */
    --bg-card: #ffffff; /* White */
    --text-main: #b91c1c; /* Deep Red for readability */
    --text-muted: #f87171; /* Lighter Red for secondary text */
    --bottom-nav-bg: #ffffff;
    --border-color: #fca5a5; /* Soft red border */
    --accent-green: #dc2626; /* Change accents to red in light mode too */
}

[data-theme="light"] .card-dark {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .bottom-nav {
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

[data-theme="light"] .setting-item:hover {
    background-color: rgba(0, 0, 0, 0.05) !important;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    padding-bottom: 70px; /* Space for bottom nav */
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-main);
    font-weight: 600;
}

p, span {
    color: var(--text-main); /* Changed to text-main by default */
}

.text-muted {
    color: var(--text-muted) !important;
}

.text-main {
    color: var(--text-main) !important;
}

/* Cards */
.card-dark {
    background-color: var(--bg-card);
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    color: var(--text-main);
}
.card-dark * {
    color: var(--text-main);
}
.card-dark .text-muted {
    color: var(--text-muted) !important;
}

/* Video / Camera Container */
.video-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    background-color: #000;
    aspect-ratio: 3/4;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Face API Canvas Canvas Overlay */
.video-container canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--bottom-nav-bg);
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
    z-index: 1000;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

.nav-item {
    text-align: center;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.nav-item i {
    font-size: 1.25rem;
}

.nav-item.active {
    color: var(--accent-green);
}

/* Progress Bars Custom */
.progress {
    background-color: #334155; /* Slate 700 */
    height: 8px;
    border-radius: 4px;
}
.progress-bar-green { background-color: var(--accent-green); }
.progress-bar-orange { background-color: var(--accent-orange); }
.progress-bar-red { background-color: var(--accent-red); }

/* Buttons */
.btn-primary-custom {
    background-color: var(--accent-green);
    border: none;
    color: #fff;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 500;
}
.btn-primary-custom:hover {
    background-color: #059669; /* Emerald 600 */
    color: #fff;
}
.btn-danger-custom {
    background-color: var(--accent-red);
    border: none;
    color: #fff;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 500;
}

/* Landing Page Specific */
.landing-hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}
.landing-logo {
    max-height: 220px !important;
    max-width: 100%;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0px 0px 25px rgba(255, 255, 255, 0.2)) brightness(1.2) contrast(1.1);
    transition: all 0.3s ease;
}
.landing-logo:hover {
    filter: drop-shadow(0px 0px 35px rgba(255, 255, 255, 0.3)) brightness(1.3) contrast(1.1);
    transform: scale(1.02);
}

/* Audio Visualizer Animation */
@keyframes sound-bars {
    0% { height: 10px; }
    50% { height: 35px; }
    100% { height: 10px; }
}

.audio-bar {
    animation: sound-bars 1.2s ease-in-out infinite;
    transform-origin: bottom;
}

.audio-bar:nth-child(1) { animation-duration: 1.1s; animation-delay: 0.1s; }
.audio-bar:nth-child(2) { animation-duration: 0.9s; animation-delay: 0.3s; }
.audio-bar:nth-child(3) { animation-duration: 1.3s; animation-delay: 0.0s; }
.audio-bar:nth-child(4) { animation-duration: 1.0s; animation-delay: 0.2s; }
.audio-bar:nth-child(5) { animation-duration: 1.2s; animation-delay: 0.4s; }
.audio-bar:nth-child(6) { animation-duration: 0.8s; animation-delay: 0.1s; }
.audio-bar:nth-child(7) { animation-duration: 1.4s; animation-delay: 0.5s; }
