:root {
    --bg-primary: #0a0a14;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --purple: #8b5cf6;
    --blue: #3b82f6;
    --pink: #ec4899;
    --text: #ffffff;
    --text-muted: #94a3b8;
    --success: #10b981;
    --danger: #ef4444;
}

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

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

/* Animated Background */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.6;
    animation: float 20s infinite ease-in-out;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--purple), transparent);
    top: -200px;
    left: -200px;
    animation-delay: 0s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--blue), transparent);
    bottom: -150px;
    right: -150px;
    animation-delay: -10s;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--pink), transparent);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -5s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(50px, -30px) scale(1.1);
    }

    66% {
        transform: translate(-30px, 40px) scale(0.9);
    }
}

/* Views */
.view {
    display: none;
    height: 100vh;
    width: 100%;
}

.view.active {
    display: flex;
    flex-direction: column;
}

/* Glassmorphism Nav */
.glass-nav {
    padding: 20px 40px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-container {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-logo {
    animation: pulse 3s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.brand-name {
    display: flex;
    align-items: center;
    gap: 8px;
}

.daral-text {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--purple), var(--blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ai-badge {
    background: linear-gradient(135deg, var(--purple), var(--pink));
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    color: white;
}

.status-pill {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    color: var(--success);
}

/* Hero Section */
.hero-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.hero-content {
    max-width: 600px;
    width: 100%;
    text-align: center;
}

.hero-headline {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-headline span {
    display: block;
    opacity: 0;
    transform: translateY(20px);
}

.animate-in-1 {
    animation: slideIn 0.6s 0.2s forwards;
}

.animate-in-2 {
    animation: slideIn 0.6s 0.4s forwards;
}

.animate-in-3 {
    animation: slideIn 0.6s 0.6s forwards;
}

.animate-in-4 {
    animation: slideIn 0.6s 0.8s forwards;
}

.animate-in-5 {
    animation: slideIn 0.6s 1s forwards;
}

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gradient-text {
    background: linear-gradient(135deg, var(--purple), var(--blue), var(--pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-tagline {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 40px;
    line-height: 1.6;
}

/* Glass Card */
.connect-glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1), transparent 50%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Avatar Upload */
.avatar-upload-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 32px;
    position: relative;
    z-index: 1;
}

.avatar-ring {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple), var(--blue));
    padding: 3px;
    cursor: pointer;
    transition: transform 0.3s;
}

.avatar-ring:hover {
    transform: scale(1.05);
}

.avatar-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.avatar-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-hint {
    margin-top: 12px;
    font-size: 14px;
    color: var(--text-muted);
}

/* Glass Inputs */
.input-container {
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.glass-input-wrap {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s;
    position: relative;
}

.glass-input-wrap:focus-within {
    border-color: var(--purple);
    background: rgba(139, 92, 246, 0.05);
}

.input-icon {
    color: var(--text-muted);
    font-size: 20px;
}

.glass-input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text);
    font-size: 16px;
    font-family: inherit;
}

.glass-input::placeholder {
    color: var(--text-muted);
}

.input-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--purple), var(--blue));
    transition: width 0.3s;
}

.glass-input-wrap:focus-within .input-line {
    width: 100%;
}

.shuffle-btn {
    background: rgba(139, 92, 246, 0.1);
    border: none;
    color: var(--purple);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.shuffle-btn:hover {
    background: rgba(139, 92, 246, 0.2);
    transform: rotate(180deg);
}

/* Primary CTA */
.primary-cta {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--purple), var(--blue));
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s;
    z-index: 1;
    margin-bottom: 24px;
}

.primary-cta:hover {
    transform: translateY(-2px);
}

.cta-shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    to {
        left: 100%;
    }
}

/* Feature Pills */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    position: relative;
    z-index: 1;
}

.feature-pill {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
}

/* Setup Page */
.setup-container {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
    padding: 40px;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

.video-preview-card {
    background: var(--glass-bg);
    backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 16/9;
    margin-bottom: 24px;
}

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

.preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(59, 130, 246, 0.1));
}

.avatar-preview-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple), var(--blue));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    overflow: hidden;
}

.avatar-preview-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-tag {
    position: absolute;
    bottom: 16px;
    left: 16px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
}

/* Audio Card */
.audio-card {
    background: var(--glass-bg);
    backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 24px;
}

.audio-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    font-size: 16px;
    font-weight: 600;
}

.volume-wrapper {
    margin-bottom: 12px;
}

.volume-track {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.volume-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success), var(--purple));
    width: 0%;
    transition: width 0.1s;
}

.audio-tip {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
}

/* Device Toggles */
.device-toggles {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 24px 0;
}

.device-toggle-btn {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 16px 20px;
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    transition: all 0.2s;
}

.device-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--purple);
}

.device-toggle-btn.disabled {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger);
}

.join-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--purple), var(--blue));
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Meeting Room */
.room-header {
    padding: 20px 40px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.room-code-badge {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    padding: 8px 16px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.video-grid-container {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    padding: 20px;
    overflow-y: auto;
}

.video-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 2px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 16/9;
    transition: all 0.3s;
}

.video-card.is-speaking {
    border-color: var(--success);
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.3);
}

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

.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(59, 130, 246, 0.1));
}

.avatar-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple), var(--blue));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    font-weight: 700;
    overflow: hidden;
}

.avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-label {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mute-indicator {
    color: var(--danger);
}

/* Floating Controls */
.floating-controls {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
}

.controls-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 12px 20px;
    display: flex;
    gap: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.ctrl-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    position: relative;
}

.ctrl-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.ctrl-btn.muted {
    background: var(--danger);
}

.danger-ctrl {
    background: var(--danger);
}

.participant-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--purple);
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
}

/* Sidebar */
.glass-sidebar {
    position: fixed;
    top: 0;
    right: -380px;
    width: 380px;
    height: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(30px);
    border-left: 1px solid var(--glass-border);
    transition: right 0.3s;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.glass-sidebar.active {
    right: 0;
}

.sidebar-top {
    padding: 24px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.participants-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.participant-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.participant-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple), var(--blue));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    overflow: hidden;
}

.participant-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.back-glass-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.permission-box {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.permission-box.success {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
}

.permission-box.error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
}

.code-highlight {
    color: var(--purple);
    font-weight: 700;
}
/* Mic Test Controls */
.mic-test-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    margin-bottom: 8px;
}

.test-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    width: 100%;
    justify-content: center;
}

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

.test-btn.recording {
    background: rgba(239, 68, 68, 0.2);
    border-color: var(--danger);
    color: var(--danger);
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

#audio-playback {
    height: 32px;
    border-radius: 16px;
    opacity: 0.9;
}

/* ====== Updated Styles (Scrolling & New Sections) ====== */

/* Allow scrolling on landing page */
#landing-page.view.active {
    overflow-y: auto;
    height: 100vh;
    scroll-behavior: smooth;
    display: block; /* Changed from flex to block for scrolling */
}

/* Adjust nav for scrolling page */
#landing-page .glass-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
}

.hero-section {
    min-height: 90vh; /* Make hero take most of viewport */
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 80px;
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 14px;
    animation: bounce 2s infinite;
    cursor: pointer;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateX(-50%) translateY(0);}
    40% {transform: translateX(-50%) translateY(-10px);}
    60% {transform: translateX(-50%) translateY(-5px);}
}

/* Drag & Drop Avatar Area */
.avatar-upload-area {
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.02);
    margin-bottom: 24px;
    position: relative;
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-upload-area:hover, .avatar-upload-area.dragover {
    border-color: var(--purple);
    background: rgba(139, 92, 246, 0.1);
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
}

.upload-icon {
    font-size: 32px;
    color: var(--purple);
}

.upload-text strong {
    color: var(--text);
}

.upload-preview-container {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 14px;
    overflow: hidden;
    background: #000;
}

.upload-preview-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.remove-avatar-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.6);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.remove-avatar-btn:hover {
    background: var(--danger);
}

/* Info Section (Why Daral) */
.info-section {
    padding: 80px 40px;
    background: rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

.section-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 60px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.info-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    transition: transform 0.3s;
}

.info-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.05);
}

.info-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--purple), var(--blue));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 28px;
    color: white;
}

/* How it Works Section */
.steps-section {
    padding: 80px 40px;
    position: relative;
    z-index: 1;
}

.steps-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    max-width: 1000px;
    margin: 0 auto;
    gap: 20px;
}

.step-item {
    text-align: center;
    flex: 1;
    position: relative;
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--glass-bg);
    border: 2px solid var(--purple);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: var(--purple);
    margin: 0 auto 20px;
}

.step-line {
    flex: 1;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    margin-top: 25px;
    display: none; /* Hidden on mobile */
}

@media (min-width: 768px) {
    .step-line {
        display: block;
    }
}

.step-text h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.step-text p {
    color: var(--text-muted);
    font-size: 14px;
}

/* Footer style */
.landing-footer {
    padding: 40px;
    border-top: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.5);
    text-align: center;
    position: relative;
    z-index: 1;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 16px;
}

.copyright {
    color: var(--text-muted);
    font-size: 14px;
}

/* Speaker Wave Animation */
.avatar-circle {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.video-card.is-speaking .avatar-circle {
    animation: speak-wave 1.5s infinite;
    border: 2px solid var(--success);
}

.video-card.is-speaking {
    border-color: var(--success);
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.2);
}

@keyframes speak-wave {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 20px rgba(16, 185, 129, 0);
        transform: scale(1.05);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
        transform: scale(1);
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    padding: 24px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-glass {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
}

.settings-section h3 {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 16px; /* Increased from 16 to separate better */
    display: flex;
    align-items: center;
    gap: 8px;
}

.device-group {
    margin-bottom: 20px;
}

.device-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-muted);
}

.select-wrapper {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
}

.select-wrapper select {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text);
    padding: 12px;
    appearance: none;
    font-size: 14px;
    cursor: pointer;
}

.select-wrapper select option {
    background: #1a1a1a;
    color: var(--text);
}

.select-wrapper .arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-muted);
}

.test-sound-btn {
    margin-top: 8px;
    background: transparent;
    border: 1px solid var(--purple);
    color: var(--purple);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    width: 100%;
    justify-content: center;
}

.test-sound-btn:hover {
    background: rgba(139, 92, 246, 0.1);
}

.mic-test-area {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 16px;
    margin-top: 24px;
}

.modal-footer {
    border-top: 1px solid var(--glass-border);
    margin-top: 24px;
    padding-top: 16px;
    display: flex;
    justify-content: flex-end;
}

/* Audio Alert System */
.audio-panel-alert {
    position: absolute;
    top: 90px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(239, 68, 68, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px 24px;
    border-radius: 16px;
    display: none; /* Hidden by default */
    align-items: center;
    gap: 16px;
    z-index: 1001;
    cursor: pointer;
    box-shadow: 0 10px 40px rgba(239, 68, 68, 0.4);
    animation: slideDownAlert 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.audio-panel-alert.active {
    display: flex;
}

@keyframes slideDownAlert {
    from {
        top: 50px;
        opacity: 0;
    }
    to {
        top: 90px;
        opacity: 1;
    }
}

.audio-panel-alert .material-icons-round {
    font-size: 32px;
    color: white;
}

.alert-text {
    flex: 1;
}

.alert-text strong {
    display: block;
    font-size: 16px;
}

.alert-text p {
    font-size: 12px;
    opacity: 0.9;
}

.alert-btn {
    background: white;
    color: var(--danger);
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

/* Persistent Avatar Styles */
.video-placeholder.has-video {
    background: transparent !important;
    pointer-events: none; /* Let clicks pass through if needed */
}

.video-placeholder.has-video .avatar-circle {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    opacity: 0.8; /* Subtle transparency so video shows through slightly */
    transform: scale(0.9); /* Slightly smaller when video is active */
    background: var(--bg-primary); /* Ensure avatar circle itself has solid bg */
    border: 2px solid var(--glass-border);
}

.video-card.is-speaking .avatar-circle {
    opacity: 1 !important;
    transform: scale(1) !important;
    border-color: var(--success) !important;
}
