/* ============================================
   BACKFORTH - AI Discussion Arena
   Professional Modern Design
   ============================================ */

:root {
    /* Color System */
    --bg-base: #09090b;
    --bg-elevated: #0f0f12;
    --bg-surface: #16161a;
    --bg-hover: #1c1c21;
    --bg-active: #232329;
    
    /* Accent Gradient */
    --accent-1: #3b82f6;
    --accent-2: #8b5cf6;
    --accent-3: #d946ef;
    --gradient-primary: linear-gradient(135deg, var(--accent-1), var(--accent-2), var(--accent-3));
    --gradient-subtle: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    
    /* Model Colors */
    --model-1: #3b82f6;
    --model-2: #10b981;
    --model-3: #f59e0b;
    --model-4: #ef4444;
    
    /* Text */
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-tertiary: #71717a;
    --text-muted: #52525b;
    
    /* Borders */
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-default: rgba(255, 255, 255, 0.1);
    --border-strong: rgba(255, 255, 255, 0.15);
    
    /* Effects */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 40px rgba(139, 92, 246, 0.15);
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Space Grotesk', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    /* Spacing */
    --header-height: 72px;
    --sidebar-width: 280px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 15px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ============================================
   BACKGROUND EFFECTS
   ============================================ */

.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 0%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(139, 92, 246, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(217, 70, 239, 0.03) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.bg-noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.015;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

/* ============================================
   HEADER
   ============================================ */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(9, 9, 11, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    z-index: 100;
}

.header-content {
    max-width: 1600px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
}

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

.logo-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    font-size: 1.25rem;
    font-weight: 700;
    position: relative;
    overflow: hidden;
}

.logo-icon .arrow {
    color: white;
    font-weight: 900;
    animation: pulse-arrow 2s ease-in-out infinite;
}

.logo-icon .arrow.left {
    animation-delay: 0s;
}

.logo-icon .arrow.right {
    animation-delay: 1s;
}

@keyframes pulse-arrow {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-name {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-tagline {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.header-stats {
    display: flex;
    gap: 2rem;
}

.header-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}

.stat-icon {
    font-size: 1rem;
}

.stat-value {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.powered-link {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.powered-link:hover {
    color: var(--text-secondary);
    background: var(--bg-surface);
}

.powered-link strong {
    color: var(--accent-2);
}

/* ============================================
   MAIN LAYOUT
   ============================================ */

.main {
    position: relative;
    min-height: 100vh;
    padding-top: var(--header-height);
    z-index: 1;
}

/* ============================================
   SETUP PANEL
   ============================================ */

.setup-panel {
    padding: 3rem 2rem;
    display: flex;
    justify-content: center;
}

.setup-panel.hidden {
    display: none;
}

.setup-container {
    width: 100%;
    max-width: 900px;
}

.setup-section {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.step-number {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 50%;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    color: white;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    flex: 1;
}

.mini-btn {
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.75rem;
    font-weight: 600;
}

.mini-btn:hover {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-primary);
}

.selection-count {
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 0.4rem 0.8rem;
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    font-family: var(--font-mono);
}

.kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.35rem;
    height: 1.35rem;
    border-radius: 0.45rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(0, 0, 0, 0.28);
    color: rgba(255, 255, 255, 0.85);
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.input-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.topic-textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.2s ease;
}

.topic-textarea:focus {
    outline: none;
    border-color: var(--accent-2);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.topic-textarea::placeholder {
    color: var(--text-muted);
}

/* Mode Selector */
.mode-selector {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

/* Model Selection Helpers */
.selected-tray {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0.9rem;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    margin-bottom: 0.75rem;
    position: relative;
}

.selected-tray-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.selected-tray-title {
    font-weight: 800;
    font-size: 0.85rem;
    color: var(--text-primary);
    white-space: nowrap;
}

.selected-tray-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-width: 0;
}

.selected-empty {
    color: var(--text-tertiary);
    font-size: 0.85rem;
}

.selected-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.5rem;
    border-radius: 999px;
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.25);
    color: var(--text-secondary);
    max-width: 360px;
}

.selected-chip-order {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.75);
}

.selected-chip-icon {
    font-size: 0.95rem;
}

.selected-chip-name {
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}

.selected-chip-remove {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.2);
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    line-height: 1;
}

.selected-tray-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    white-space: nowrap;
}

.selected-tray-btn {
    padding: 0.45rem 0.8rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.selected-tray-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.selected-only {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.8rem;
    color: var(--text-tertiary);
    user-select: none;
}

.selected-only input {
    accent-color: #a78bfa;
}

.quick-teams {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.quick-teams-label {
    font-weight: 700;
    color: var(--text-secondary);
    font-size: 0.85rem;
    white-space: nowrap;
}

.quick-teams-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.team-btn {
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.8rem;
}

.team-btn:hover {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-primary);
}

.mode-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem 1rem;
    background: var(--bg-surface);
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.mode-btn:hover {
    background: var(--bg-hover);
    border-color: var(--border-default);
    color: var(--text-primary);
}

.mode-btn.active {
    background: var(--gradient-subtle);
    border-color: var(--accent-2);
    color: var(--text-primary);
}

.mode-btn.csu-mode {
    border-color: rgba(34, 197, 94, 0.35);
    background: rgba(34, 197, 94, 0.06);
}

.mode-btn.csu-mode:hover {
    border-color: rgba(34, 197, 94, 0.55);
}

.mode-btn.csu-mode.active {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.75);
}

.mode-icon {
    font-size: 1.5rem;
}

.mode-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.mode-desc {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    text-align: center;
}

.mode-btn.active .mode-desc {
    color: var(--text-secondary);
}

/* Model Grid */
.model-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tier-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-subtle);
}

.tier-btn {
    padding: 0.5rem 1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tier-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.tier-btn.active {
    background: var(--gradient-subtle);
    border-color: var(--accent-2);
    color: var(--text-primary);
}

.model-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.75rem;
    max-height: min(60vh, 720px);
    overflow-y: auto;
    padding-right: 0.5rem;
}

.model-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem;
    background: var(--bg-surface);
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    min-height: 80px;
}

.model-card:hover {
    background: var(--bg-hover);
    border-color: var(--border-default);
}

.model-card.selected {
    border-color: var(--accent-2);
    background: var(--gradient-subtle);
}

.model-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.model-card-check {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-strong);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.model-card.selected .model-card-check {
    background: var(--gradient-primary);
    border-color: transparent;
}

.model-card.selected .model-card-check::after {
    content: '✓';
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
}

.model-card-icon {
    font-size: 1.5rem;
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.model-card-info {
    flex: 1;
    min-width: 0;
}

.model-card-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.model-card-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}

.model-card-meta span {
    font-size: 0.65rem;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-family: var(--font-mono);
}

.model-provider {
    color: var(--text-tertiary);
    background: var(--bg-active);
}

.model-params {
    color: var(--accent-2);
    background: rgba(139, 92, 246, 0.15);
}

.model-context {
    color: var(--accent-1);
    background: rgba(59, 130, 246, 0.15);
}

.model-card-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
    line-height: 1.3;
}

.model-card-provider {
    font-size: 0.7rem;
    color: var(--text-tertiary);
}

.model-card-order {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.2s ease;
}

.model-card.selected .model-card-order {
    opacity: 1;
    transform: scale(1);
}

/* Config Grid */
.config-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.config-item {
    display: flex;
    flex-direction: column;
}

.blast-config {
    grid-column: 1 / -1;
    padding: 1rem 1rem 0.9rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.03);
}

.blast-controls {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.blast-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
    user-select: none;
}

.blast-checkbox input {
    accent-color: #a78bfa;
}

.config-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.config-slider {
    flex: 1;
    height: 6px;
    background: var(--bg-active);
    border-radius: 3px;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.config-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--gradient-primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-md);
}

.slider-value {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 80px;
}

.config-hint {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-top: 0.75rem;
}

.length-buttons {
    display: flex;
    gap: 0.5rem;
}

.length-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    background: var(--bg-surface);
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.length-btn:hover {
    background: var(--bg-hover);
    border-color: var(--border-default);
}

.length-btn.active {
    background: var(--gradient-subtle);
    border-color: var(--accent-2);
    color: var(--text-primary);
}

/* Start Section */
.start-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 0;
}

.start-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 3rem;
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-xl);
    color: white;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.start-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 60px rgba(139, 92, 246, 0.3);
}

.start-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.start-icon {
    font-size: 1.25rem;
}

.start-hint {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

/* ============================================
   DISCUSSION VIEW
   ============================================ */

.discussion-view {
    display: none;
    flex-direction: column;
    height: calc(100vh - var(--header-height));
}

.discussion-view.active {
    display: flex;
}

.discussion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-subtle);
}

.discussion-topic {
    flex: 1;
    min-width: 0;
}

.topic-label {
    font-size: 0.65rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.discussion-topic h2 {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 500px;
}

.discussion-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-bar {
    width: 150px;
    height: 6px;
    background: var(--bg-active);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 3px;
    width: 0%;
    transition: width 0.5s ease;
}

.progress-text {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.control-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.control-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-default);
}

.control-btn.pause-btn.paused {
    background: var(--accent-2);
    color: white;
    border-color: var(--accent-2);
}

.control-btn.stop-btn:hover {
    background: var(--model-4);
    border-color: var(--model-4);
    color: white;
}

/* Discussion Content */
.discussion-content {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* Participants Panel */
.participants-panel {
    width: var(--sidebar-width);
    background: var(--bg-elevated);
    border-right: 1px solid var(--border-subtle);
    padding: 1.5rem;
    overflow-y: auto;
}

.panel-title {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.participants-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.participant-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--model-1);
}

.participant-card:nth-child(2) { border-left-color: var(--model-2); }
.participant-card:nth-child(3) { border-left-color: var(--model-3); }
.participant-card:nth-child(4) { border-left-color: var(--model-4); }

.participant-card.speaking {
    background: var(--bg-hover);
    box-shadow: var(--shadow-md);
}

.participant-icon {
    font-size: 1.25rem;
}

.participant-info {
    flex: 1;
    min-width: 0;
}

.participant-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.participant-provider {
    font-size: 0.7rem;
    color: var(--text-tertiary);
}

.participant-stats {
    text-align: right;
}

.participant-stat {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-secondary);
}

/* Live Stats */
.live-stats {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.live-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.75rem;
    background: var(--bg-surface);
    border-radius: var(--radius-sm);
}

.live-stat-label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.live-stat-value {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Conversation Container */
.conversation-container {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

.conversation-thread {
    max-width: 800px;
    margin: 0 auto;
}

.conversation-start {
    display: flex;
    justify-content: center;
    padding: 3rem;
}

.start-indicator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

.pulse {
    width: 10px;
    height: 10px;
    background: var(--accent-2);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* Message Styles */
.message {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    animation: messageIn 0.4s ease;
}

@keyframes messageIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message-avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
    background: var(--bg-surface);
    border: 2px solid var(--model-1);
}

.message.model-1 .message-avatar { border-color: var(--model-1); }
.message.model-2 .message-avatar { border-color: var(--model-2); }
.message.model-3 .message-avatar { border-color: var(--model-3); }
.message.model-4 .message-avatar { border-color: var(--model-4); }
.message.advisor .message-avatar { border-color: rgba(34, 197, 94, 0.9); }
.message.csu .message-avatar { border-color: rgba(139, 92, 246, 0.95); }

.message-content {
    flex: 1;
    min-width: 0;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.message-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.message.model-1 .message-name { color: var(--model-1); }
.message.model-2 .message-name { color: var(--model-2); }
.message.model-3 .message-name { color: var(--model-3); }
.message.model-4 .message-name { color: var(--model-4); }
.message.advisor .message-name { color: #22c55e; }
.message.csu .message-name { color: #a78bfa; }

.message-params {
    font-size: 0.65rem;
    color: var(--accent-2);
    padding: 0.15rem 0.4rem;
    background: rgba(139, 92, 246, 0.15);
    border-radius: 4px;
    font-family: var(--font-mono);
}

.message-round {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    padding: 0.2rem 0.5rem;
    background: var(--bg-surface);
    border-radius: var(--radius-sm);
}

.message-time {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
}

.message-text {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-primary);
    white-space: pre-wrap;
}

.message-meta {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 0;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background: var(--accent-2);
    border-radius: 50%;
    animation: typing 1.4s ease-in-out infinite;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

.typing-text {
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

/* Summary Panel */
.summary-panel {
    display: none;
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 4rem);
    max-width: 700px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    z-index: 50;
}

.summary-panel.active {
    display: block;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.summary-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.summary-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

.close-summary {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.close-summary:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.summary-content {
    padding: 1.5rem;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.summary-stat {
    text-align: center;
    padding: 1rem;
    background: var(--bg-surface);
    border-radius: var(--radius-md);
}

.summary-stat-value {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.summary-stat-label {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    margin-top: 0.25rem;
}

.summary-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.summary-tools {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-subtle);
}

.summary-tools-title {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.summary-tools-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.transcript-ask {
    padding: 1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
}

.transcript-ask-title {
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.transcript-ask-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.transcript-select {
    width: 100%;
    padding: 0.75rem 0.9rem;
    background: var(--bg-base);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-sans);
}

.transcript-question {
    width: 100%;
    padding: 0.9rem;
    background: var(--bg-base);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-sans);
    resize: vertical;
    margin-bottom: 0.75rem;
}

.transcript-answer {
    min-height: 60px;
    white-space: pre-wrap;
    line-height: 1.6;
    padding: 0.9rem;
    border-radius: var(--radius-md);
    border: 1px dashed rgba(255, 255, 255, 0.12);
    color: var(--text-secondary);
}

.transcript-answer:empty::before {
    content: "Answer will appear here.";
    color: var(--text-tertiary);
}

.summary-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.summary-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

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

.summary-btn.primary:hover {
    box-shadow: var(--shadow-glow);
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 200;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.3s ease;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.toast.success { border-left: 3px solid var(--model-2); }
.toast.error { border-left: 3px solid var(--model-4); }
.toast.info { border-left: 3px solid var(--accent-1); }

/* ============================================
   ADVANCED SETTINGS
   ============================================ */

.advanced-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    margin-top: 1.5rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.advanced-toggle:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-default);
}

.advanced-toggle.active {
    border-color: var(--accent-2);
    color: var(--text-primary);
}

.toggle-icon {
    font-size: 1.1rem;
}

.toggle-arrow {
    margin-left: auto;
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}

.advanced-toggle.active .toggle-arrow {
    transform: rotate(180deg);
}

.advanced-panel {
    display: none;
    margin-top: 1rem;
    padding: 1.5rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    animation: slideDown 0.3s ease;
}

.advanced-panel.active {
    display: block;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.advanced-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.advanced-item {
    display: flex;
    flex-direction: column;
}

.advanced-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.advanced-value {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-2);
    padding: 0.25rem 0.5rem;
    background: rgba(139, 92, 246, 0.1);
    border-radius: var(--radius-sm);
}

.preset-buttons {
    grid-column: span 2;
}

.preset-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.preset-btn {
    padding: 0.6rem 0.75rem;
    background: var(--bg-active);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.preset-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--accent-2);
}

.preset-btn:active {
    transform: scale(0.98);
}

@media (max-width: 768px) {
    .advanced-grid {
        grid-template-columns: 1fr;
    }
    
    .preset-buttons {
        grid-column: span 1;
    }
    
    .preset-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   SCROLLBAR
   ============================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-base);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-active);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-2);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .participants-panel {
        display: none;
    }
    
    .mode-selector {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .config-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header-stats {
        display: none;
    }
    
    .discussion-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .discussion-topic h2 {
        max-width: 100%;
    }
    
    .discussion-controls {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .model-grid {
        grid-template-columns: 1fr;
    }
    
    .summary-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   V3.0 NEW FEATURES
   ============================================ */

/* Templates Section */
.templates-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2rem;
    margin-bottom: 1rem;
    overflow-x: auto;
}

.templates-label {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    white-space: nowrap;
}

.templates-container {
    display: flex;
    gap: 0.5rem;
}

.template-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 0.8rem;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
}

.template-btn:hover {
    background: var(--bg-hover);
    border-color: var(--accent-2);
    color: var(--text-primary);
}

.template-icon {
    font-size: 1rem;
}

/* Section hint */
.section-hint {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    margin-bottom: 1rem;
}

/* Model Filters */
.model-filters {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-subtle);
    position: sticky;
    top: calc(var(--header-height) + 0.75rem);
    z-index: 8;
    background: rgba(9, 9, 11, 0.78);
    backdrop-filter: blur(14px);
    border-radius: var(--radius-lg);
    padding: 0.85rem 0.85rem 1rem;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
}

.search-icon {
    color: var(--text-tertiary);
}

.model-search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    outline: none;
}

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

.filter-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.capability-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.cap-btn {
    padding: 0.35rem 0.7rem;
    background: var(--bg-active);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--text-tertiary);
    font-family: var(--font-sans);
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cap-btn:hover {
    color: var(--text-secondary);
    background: var(--bg-hover);
}

.cap-btn.active {
    background: rgba(139, 92, 246, 0.2);
    color: var(--text-primary);
    border-color: var(--accent-2);
}

/* Tier Groups */
.tier-group {
    margin-bottom: 1.5rem;
}

.tier-header {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.tier-title {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.tier-subtitle {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Enhanced Model Cards */
.model-card-caps {
    display: flex;
    gap: 0.25rem;
    margin-top: 0.35rem;
}

.cap-tag {
    font-size: 0.7rem;
    opacity: 0.7;
}

.model-output {
    color: var(--accent-3);
    background: rgba(217, 70, 239, 0.15);
    font-size: 0.6rem !important;
}

/* Role Selector */
.model-role-selector {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-subtle);
}

.role-select {
    width: 100%;
    padding: 0.4rem 0.6rem;
    background: var(--bg-active);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.75rem;
    cursor: pointer;
}

/* Participant Role Badge */
.participant-role {
    font-size: 0.8rem;
    margin-left: 0.25rem;
}

.msg-role {
    font-size: 0.8rem;
    margin-left: 0.25rem;
}

/* Verdict Button */
.verdict-btn {
    background: linear-gradient(135deg, #f59e0b, #ef4444) !important;
    border-color: transparent !important;
}

.verdict-btn:hover {
    opacity: 0.9;
}

/* Judge Panel */
.judge-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 2rem;
}

.judge-panel.active {
    display: flex;
}

.judge-panel-content {
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    padding: 2rem;
    overflow-y: auto;
}

.judge-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.judge-header h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
}

.close-judge {
    width: 32px;
    height: 32px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.close-judge:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.judge-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.judge-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.judge-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-surface);
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s ease;
}

.judge-card:hover {
    background: var(--bg-hover);
    border-color: var(--border-default);
}

.judge-card.selected {
    border-color: var(--accent-2);
    background: var(--gradient-subtle);
}

.judge-check {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-active);
    border-radius: 50%;
    font-size: 0.8rem;
    color: var(--accent-2);
}

.judge-card.selected .judge-check {
    background: var(--accent-2);
    color: white;
}

.judge-icon {
    font-size: 1.5rem;
}

.judge-info {
    flex: 1;
}

.judge-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.judge-context {
    font-size: 0.75rem;
    color: var(--accent-1);
    font-family: var(--font-mono);
}

.judge-card .judge-desc {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin: 0.25rem 0 0 0;
}

.get-verdict-btn {
    width: 100%;
    padding: 1rem;
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-lg);
    color: white;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.get-verdict-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.judge-verdicts {
    margin-top: 1.5rem;
}

.judge-loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.verdict-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.verdict-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-subtle);
}

.verdict-icon {
    font-size: 1.25rem;
}

.verdict-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.verdict-content {
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.verdict-content strong {
    color: var(--text-primary);
}

/* Message Reactions */
.message-reactions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-subtle);
}

.reaction-btn {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3rem 0.6rem;
    background: var(--bg-active);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--text-tertiary);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reaction-btn:hover {
    background: var(--bg-hover);
    color: var(--text-secondary);
}

.reaction-btn.reacted {
    background: rgba(139, 92, 246, 0.2);
    border-color: var(--accent-2);
    color: var(--text-primary);
}

.reaction-btn span {
    font-family: var(--font-mono);
    font-size: 0.7rem;
}

/* Mode selector - 6 modes now */
.mode-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

@media (max-width: 768px) {
    .mode-selector {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .templates-section {
        padding: 1rem;
    }
    
    .judge-panel-content {
        padding: 1.5rem;
    }
}

/* Model cards container with tier groups */
.model-cards-container {
    max-height: 450px;
    overflow-y: auto;
    padding-right: 0.5rem;
}
