/* AB Test Evaluation Platform Styles - Modern Dark Theme */
:root {
    --bg-main: #0B0E14;
    --bg-card: rgba(22, 27, 38, 0.75);
    --bg-card-hover: rgba(30, 38, 54, 0.9);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-accent: rgba(99, 102, 241, 0.4);
    
    --primary: #6366F1;
    --primary-hover: #4F46E5;
    --primary-glow: rgba(99, 102, 241, 0.25);
    
    --accent-dev: #10B981;
    --accent-stage: #F59E0B;
    --accent-equal: #8B5CF6;
    
    --text-main: #F3F4F6;
    --text-muted: #9CA3AF;
    --text-dim: #6B7280;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-heading: 'Outfit', var(--font-sans);
}

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

body.dark-theme {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-sans);
    min-height: 100vh;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 85% 85%, rgba(139, 92, 246, 0.08) 0%, transparent 40%);
}

.app-container {
    max-width: 1380px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

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

.logo-icon {
    font-size: 28px;
    background: linear-gradient(135deg, #6366F1, #8B5CF6);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    box-shadow: 0 0 20px var(--primary-glow);
}

.brand-text h1 {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.sub-title {
    font-size: 12px;
    color: var(--text-muted);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.evaluator-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.25);
    padding: 6px 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.evaluator-box .label {
    font-size: 13px;
    color: var(--text-muted);
}

.evaluator-box input {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 500;
    outline: none;
    width: 130px;
}

/* Nav & Progress */
.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 18px;
    flex-wrap: wrap;
    gap: 14px;
}

.filter-group {
    display: flex;
    gap: 8px;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
}

.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 260px;
}

.progress-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

.progress-bar-bg {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366F1, #10B981);
    border-radius: 4px;
    transition: width 0.4s ease;
}

/* Main Content Area */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pair-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 8px;
}

.pair-badge {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: #A5B4FC;
    background: rgba(99, 102, 241, 0.15);
    padding: 6px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.blind-notice {
    font-size: 12px;
    color: var(--text-dim);
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

.video-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    transition: border-color 0.3s ease;
}

.video-card:hover {
    border-color: var(--border-accent);
}

.video-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--border-color);
}

.video-title {
    font-weight: 600;
    font-size: 15px;
}

.audio-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(16, 185, 129, 0.2);
    color: #34D399;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.audio-badge.muted {
    background: rgba(239, 68, 68, 0.15);
    color: #F87171;
    border-color: rgba(239, 68, 68, 0.3);
}

.video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.video-wrapper:hover .video-overlay {
    opacity: 1;
}

/* Black Curtain: covers the video that is not currently being played */
.video-curtain {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    color: rgba(255, 255, 255, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    z-index: 5;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, color 0.2s ease;
}

.video-curtain.active {
    opacity: 1;
    visibility: visible;
}

.video-curtain:hover {
    color: rgba(255, 255, 255, 0.75);
}

/* Controls */
.player-controls {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.timeline-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.time-display {
    font-family: monospace;
    font-size: 13px;
    color: var(--text-muted);
    min-width: 45px;
}

.seek-slider {
    flex: 1;
    accent-color: var(--primary);
    cursor: pointer;
    height: 6px;
}

.controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.btn-group {
    display: flex;
    gap: 8px;
}

.audio-switch-group, .speed-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.control-label {
    font-size: 12px;
    color: var(--text-muted);
}

.btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

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

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 0 15px var(--primary-glow);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
}

.btn-toggle.active {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--primary);
    color: #A5B4FC;
}

.speed-select {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    outline: none;
}

/* Evaluation Section */
.evaluation-section {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.eval-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.eval-title h3 {
    font-family: var(--font-heading);
    font-size: 18px;
    color: var(--text-main);
}

.hotkey-tip {
    font-size: 12px;
    color: #A5B4FC;
    background: rgba(99, 102, 241, 0.1);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
}

.choice-cards {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}

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

.choice-card {
    position: relative;
    cursor: pointer;
}

.choice-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.choice-content {
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    transition: all 0.25s ease;
}

.choice-card:hover .choice-content {
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.2);
}

.choice-card input[type="radio"]:checked + .choice-content {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--primary);
    box-shadow: 0 0 25px var(--primary-glow);
    transform: translateY(-2px);
}

.choice-icon {
    font-size: 32px;
}

.choice-text {
    font-size: 15px;
    font-weight: 600;
}

.choice-key {
    font-size: 11px;
    color: var(--text-dim);
    font-family: monospace;
}

.comment-box input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    color: var(--text-main);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.comment-box input:focus {
    border-color: var(--primary);
}

.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
}

.btn-large {
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
}

/* Pair Navigator Footer */
.app-footer {
    padding: 10px 0;
}

.pair-navigator {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.pair-nav-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.pair-nav-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pair-nav-btn.completed {
    border-color: var(--accent-dev);
    color: #34D399;
}

.pair-nav-btn.completed::after {
    content: " ✓";
}

/* Modal */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: #111622;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 960px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border-color);
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.stats-overview {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stat-card.primary-stat {
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.05);
}

.stat-card.secondary-stat {
    border-color: rgba(245, 158, 11, 0.3);
    background: rgba(245, 158, 11, 0.05);
}

.stat-card.equal-stat {
    border-color: rgba(139, 92, 246, 0.3);
    background: rgba(139, 92, 246, 0.05);
}

.stat-title {
    font-size: 13px;
    color: var(--text-muted);
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 700;
}

.primary-stat .stat-value { color: #34D399; }
.secondary-stat .stat-value { color: #FBBF24; }
.equal-stat .stat-value { color: #A78BFA; }

.stat-sub {
    font-size: 12px;
    color: var(--text-dim);
}

.section-title {
    font-size: 15px;
    font-weight: 600;
    color: #A5B4FC;
    margin-top: 10px;
}

.lang-breakdown-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 14px;
}

.lang-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    padding: 14px;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lang-card h4 {
    font-size: 14px;
}

.progress-bar-stack {
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
    display: flex;
}

.bar-fill.dev-bar { background: #10B981; }
.bar-fill.equal-bar { background: #8B5CF6; }
.bar-fill.stage-bar { background: #F59E0B; }

.lang-stat-detail {
    font-size: 12px;
    color: var(--text-muted);
}

/* Detail Table */
.table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}

.detail-table th, .detail-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
}

.detail-table th {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    font-weight: 600;
}

.btn-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #F87171;
    border-color: rgba(239, 68, 68, 0.4);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.3);
}

.config-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.config-desc {
    font-size: 13px;
    color: var(--text-muted);
}

.config-textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    color: #34D399;
    font-family: monospace;
    font-size: 12px;
    padding: 10px;
    border-radius: var(--radius-sm);
}

.config-btn-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Evaluator Results Modal */
.results-modal-card {
    max-width: 700px;
}

.results-header {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(16, 185, 129, 0.15));
}

.results-summary-banner {
    text-align: center;
    padding: 20px 10px;
}

.confetti-icon {
    font-size: 52px;
    animation: bounce-in 0.6s ease;
}

@keyframes bounce-in {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); opacity: 1; }
}

.results-msg {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    margin-top: 12px;
    color: #A5B4FC;
}

.results-sub {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 6px;
}

.results-stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 14px;
    margin: 16px 0;
}

.results-stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.results-stat-icon {
    font-size: 28px;
}

.results-stat-val {
    font-family: var(--font-heading);
    font-size: 36px;
    font-weight: 700;
    color: #A5B4FC;
}

.results-stat-label {
    font-size: 13px;
    color: var(--text-muted);
}

.results-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 18px;
}
