/* Base Variables */
:root {
    --bg-color: #0b0f19;
    --panel-bg: rgba(20, 26, 40, 0.6);
    --panel-border: rgba(255, 255, 255, 0.08);
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --danger-color: #ef4444;
    --danger-hover: #dc2626;
    --success-color: #10b981;
    --success-hover: #059669;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --font-family: 'Inter', sans-serif;
}

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

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

/* Background Animated Blobs */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    filter: blur(100px);
    border-radius: 50%;
    opacity: 0.4;
    animation: float 20s infinite alternate cubic-bezier(0.5, 0, 0.5, 1);
}

.blob-1 {
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, #4f46e5 0%, rgba(79, 70, 229, 0) 70%);
    top: -10vw;
    left: -10vw;
}

.blob-2 {
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, #0ea5e9 0%, rgba(14, 165, 233, 0) 70%);
    bottom: -10vw;
    right: -10vw;
    animation-delay: -10s;
}

@keyframes float {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(100px, 100px) scale(1.1); }
}

/* Container & Typography */
.app-container {
    width: 100%;
    max-width: 1200px;
    padding: 2rem;
    z-index: 1;
}

.app-header {
    text-align: center;
    margin-bottom: 3rem;
}

.app-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #f8fafc, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.app-header h1 span {
    color: var(--primary-color);
    -webkit-text-fill-color: var(--primary-color);
}

.app-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Glassmorphism Panels */
.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--panel-border);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2rem;
}

@media (max-width: 900px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
}

h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #e2e8f0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* File Upload */
.setup-section {
    margin-bottom: 2.5rem;
}

.file-input {
    display: none;
}

.file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2rem;
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.02);
}

.file-label:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.file-label svg {
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.file-label:hover svg {
    color: var(--primary-color);
}

.helper-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 0.75rem;
}

/* Question Display */
.question-card {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    min-height: 120px;
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

#questionText {
    font-size: 1.1rem;
    line-height: 1.6;
}

.question-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#questionCounter {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Video Section */
.video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: inset 0 0 50px rgba(0,0,0,0.5);
}

video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1); /* Mirror effect */
}

/* Recording Indicator */
.recording-indicator {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    opacity: 0;
    transition: opacity 0.3s;
}

.recording-indicator.active {
    opacity: 1;
}

.red-dot {
    width: 10px;
    height: 10px;
    background-color: var(--danger-color);
    border-radius: 50%;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}

/* Buttons */
.recording-controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    border: none;
    border-radius: 12px;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn:active:not(:disabled) {
    transform: scale(0.97);
}

.btn-primary {
    background-color: var(--primary-color);
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--primary-hover);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

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

.btn-danger:hover:not(:disabled) {
    background-color: var(--danger-hover);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
}

.btn-success {
    background-color: var(--success-color);
}

.btn-success:hover:not(:disabled) {
    background-color: var(--success-hover);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    flex: none;
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.15);
}
