/* ============================================
   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;
}

.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);
}

.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;
}

.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-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: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}

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

.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;
}

.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;
}

.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-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;
}

.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-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-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-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); }

/* ============================================
   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);
    }
}
