/* =========================================================
   USELESS AI ASSISTANT — STYLESHEET
   Hackathon Edition: Useless Projects 3.0
   Dark Futuristic / Neon Theme • 100% Offline
   ========================================================= */

:root {
    --bg-base: #090d16;
    --bg-surface: #111827;
    --bg-card: #1a2234;
    --bg-card-hover: #222d42;
    --bg-input: #151d2f;

    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
    --user-bubble-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);

    --accent-cyan: #06b6d4;
    --accent-emerald: #10b981;
    --accent-rose: #f43f5e;
    --accent-amber: #f59e0b;

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-bright: rgba(99, 102, 241, 0.35);
    --border-focus: #6366f1;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-pill: 9999px;

    --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.35);
    --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.2);
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-base);
    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%);
    color: var(--text-primary);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
    overflow-x: hidden;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Main App Wrapper */
.app-container {
    width: 100%;
    max-width: 1200px;
    height: 92vh;
    min-height: 650px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-subtle), var(--shadow-glow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* =========================================================
   HEADER
   ========================================================= */
.app-header {
    background: rgba(17, 24, 39, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
    z-index: 10;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-wrapper {
    position: relative;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform var(--transition-bounce);
}

.logo-wrapper:hover {
    transform: rotate(8deg) scale(1.08);
}

.bot-logo-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 2px 8px rgba(99, 102, 241, 0.4));
}

.online-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 11px;
    height: 11px;
    background: var(--accent-emerald);
    border: 2px solid var(--bg-surface);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-emerald);
    animation: pulseStatus 2s infinite;
}

@keyframes pulseStatus {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.9); }
}

.header-titles .title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-titles h1 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.version-tag {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-primary);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-pill);
}

.subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-action {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
    padding: 8px 14px;
    border-radius: var(--radius-md);
    font-size: 0.825rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition-fast);
}

.btn-action:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

.btn-danger:hover {
    background: rgba(244, 63, 94, 0.15);
    color: var(--accent-rose);
    border-color: rgba(244, 63, 94, 0.4);
}

/* =========================================================
   MAIN LAYOUT (2 COLUMNS)
   ========================================================= */
.main-layout {
    display: flex;
    flex: 1;
    min-height: 0; /* Crucial for internal scroll */
    overflow: hidden;
}

/* =========================================================
   SIDEBAR CONTROLS
   ========================================================= */
.sidebar-controls {
    width: 320px;
    background: rgba(15, 23, 42, 0.6);
    border-right: 1px solid var(--border-subtle);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    flex-shrink: 0;
}

.sidebar-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 14px;
    transition: border-color var(--transition-fast);
}

.sidebar-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--accent-primary);
}

.card-header h3 {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-primary);
}

.card-tip {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

/* System Metrics */
.status-metrics {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.metric-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.metric-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.metric-val {
    font-weight: 600;
    font-size: 0.8rem;
}

.progress-bar {
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: var(--radius-pill);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent-cyan);
    border-radius: var(--radius-pill);
    transition: width 0.5s ease;
}

.fill-emerald { background: var(--accent-emerald); }
.fill-rose { background: var(--accent-rose); }

.spinner-text {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.mini-spinner {
    width: 10px;
    height: 10px;
    border: 2px solid rgba(245, 158, 11, 0.25);
    border-top-color: var(--accent-amber);
    border-radius: 50%;
    display: inline-block;
    animation: spinLoader 0.9s linear infinite;
}

@keyframes spinLoader {
    to { transform: rotate(360deg); }
}

/* Colors */
.text-cyan { color: var(--accent-cyan); }
.text-emerald { color: var(--accent-emerald); }
.text-rose { color: var(--accent-rose); }
.text-amber { color: var(--accent-amber); }

/* Personality Modes Grid */
.mode-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.mode-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 10px 8px;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    transition: all var(--transition-fast);
}

.mode-btn:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.16);
    transform: translateY(-1px);
}

.mode-btn.active {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--accent-primary);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.25);
}

.mode-emoji {
    font-size: 1.25rem;
    line-height: 1;
}

.mode-label strong {
    display: block;
    font-size: 0.8rem;
    color: var(--text-primary);
}

.mode-label small {
    display: block;
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 1px;
    line-height: 1.1;
}

/* Mood Sensor Chips */
.mood-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mood-chip {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 6px 10px;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.mood-chip:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: var(--accent-cyan);
    transform: scale(1.04);
}

/* Action Card & Advice Button */
.action-card {
    padding: 8px;
    background: transparent;
    border: none;
    margin-top: auto;
}

.btn-advice {
    width: 100%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    border: 1px solid rgba(99, 102, 241, 0.4);
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--transition-fast);
}

.btn-advice:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3) 0%, rgba(139, 92, 246, 0.3) 100%);
    border-color: var(--accent-primary);
    box-shadow: 0 0 16px rgba(99, 102, 241, 0.3);
    transform: translateY(-2px);
}

.advice-icon {
    font-size: 1.1rem;
}

/* =========================================================
   CHAT WORKSPACE
   ========================================================= */
.chat-workspace {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0; /* Prevents overflow issues */
    background: var(--bg-surface);
}

/* Active Mode Banner */
.active-mode-banner {
    padding: 8px 24px;
    background: rgba(26, 34, 52, 0.4);
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
}

.mode-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-primary);
    box-shadow: 0 0 6px var(--accent-primary);
}

.mode-banner-text strong {
    color: var(--accent-cyan);
}

.mode-banner-desc {
    color: var(--text-muted);
}

/* Chat Stream */
.chat-stream {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    scroll-behavior: smooth;
}

/* =========================================================
   WELCOME SCREEN (EMPTY STATE)
   ========================================================= */
.welcome-screen {
    margin: auto;
    max-width: 580px;
    text-align: center;
    padding: 24px 16px;
    animation: fadeIn 0.5s ease-out;
}

.welcome-robot {
    margin-bottom: 16px;
    display: inline-block;
    filter: drop-shadow(0 4px 16px rgba(99, 102, 241, 0.35));
    animation: floatRobot 4s ease-in-out infinite;
}

@keyframes floatRobot {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.welcome-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.welcome-lead {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.welcome-lead strong {
    color: var(--accent-primary);
}

.prompt-chips-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chips-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    font-weight: 600;
}

.prompt-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.prompt-chip {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 9px 14px;
    border-radius: var(--radius-pill);
    font-size: 0.825rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.prompt-chip:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.25);
    transform: translateY(-2px);
}

/* =========================================================
   CHAT MESSAGES
   ========================================================= */
.messages-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message-row {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    max-width: 80%;
    animation: messageAppear 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes messageAppear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* User Message */
.message-row.user-row {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-row.user-row .bubble {
    background: var(--user-bubble-gradient);
    color: #ffffff;
    border-radius: 18px 18px 4px 18px;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.25);
}

/* Bot Message */
.message-row.bot-row {
    align-self: flex-start;
}

.bot-avatar-msg {
    width: 32px;
    height: 32px;
    background: #1e1b4b;
    border: 1px solid var(--accent-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.3);
}

.message-row.bot-row .bubble {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    border-radius: 18px 18px 18px 4px;
}

/* Bubble Content */
.bubble {
    padding: 12px 16px;
    font-size: 0.92rem;
    line-height: 1.55;
    word-break: break-word;
    position: relative;
}

.bubble-meta {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 5px;
    text-align: right;
}

.message-row.user-row .bubble-meta {
    color: rgba(255, 255, 255, 0.7);
}

/* Special Advice Card in Chat */
.advice-bubble {
    background: linear-gradient(135deg, rgba(26, 34, 52, 0.9) 0%, rgba(30, 27, 75, 0.9) 100%) !important;
    border: 1px solid rgba(139, 92, 246, 0.4) !important;
    box-shadow: 0 0 16px rgba(139, 92, 246, 0.2) !important;
}

.advice-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-secondary);
    margin-bottom: 6px;
}

/* =========================================================
   TYPING INDICATOR
   ========================================================= */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    align-self: flex-start;
    animation: fadeIn 0.2s ease-out;
}

.bot-avatar-small {
    width: 28px;
    height: 28px;
    background: #1e1b4b;
    border: 1px solid var(--accent-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.typing-bubble {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.825rem;
    color: var(--text-secondary);
}

.typing-dots {
    display: inline-flex;
    gap: 4px;
}

.typing-dots span {
    width: 5px;
    height: 5px;
    background: var(--accent-primary);
    border-radius: 50%;
    animation: dotBounce 1.2s infinite ease-in-out;
}

.typing-dots span:nth-child(1) { animation-delay: 0s; }
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotBounce {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
    40% { transform: translateY(-4px); opacity: 1; }
}

/* =========================================================
   INPUT DOCK AREA
   ========================================================= */
.chat-input-area {
    padding: 16px 24px;
    background: rgba(17, 24, 39, 0.9);
    border-top: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-form {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-pill);
    padding: 6px 8px 6px 18px;
    transition: all var(--transition-fast);
}

.input-form:focus-within {
    border-color: var(--border-focus);
    box-shadow: 0 0 16px rgba(99, 102, 241, 0.2);
}

.input-form input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.92rem;
    font-family: inherit;
}

.input-form input::placeholder {
    color: var(--text-muted);
}

.btn-send {
    background: var(--accent-gradient);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-pill);
    padding: 10px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition-fast);
}

.btn-send:hover:not(:disabled) {
    box-shadow: 0 0 14px rgba(99, 102, 241, 0.45);
    transform: scale(1.03);
}

.btn-send:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(0.5);
}

.input-disclaimer {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-align: center;
}

/* =========================================================
   MODALS
   ========================================================= */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(4, 7, 14, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 1000;
    animation: fadeIn 0.25s ease-out;
}

.modal-card {
    background: var(--bg-surface);
    border: 1px solid rgba(99, 102, 241, 0.35);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 540px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalScale 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalScale {
    from { transform: scale(0.92); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-header {
    padding: 16px 22px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(26, 34, 52, 0.4);
}

.modal-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-icon {
    font-size: 1.3rem;
}

.modal-title-wrap h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.modal-close:hover {
    color: var(--accent-rose);
}

.modal-body {
    padding: 20px 22px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.report-lead {
    font-size: 0.88rem;
    color: var(--text-secondary);
}

/* Stats Grid inside Report */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 14px;
    text-align: center;
}

.stat-num {
    display: block;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--accent-primary);
    margin-bottom: 4px;
}

.stat-lbl {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Verdict Box */
.verdict-box {
    background: rgba(99, 102, 241, 0.08);
    border: 1px dashed rgba(99, 102, 241, 0.4);
    border-radius: var(--radius-md);
    padding: 14px;
}

.verdict-tag {
    font-size: 0.72rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--accent-primary);
    display: block;
    margin-bottom: 6px;
}

.verdict-text {
    font-size: 0.95rem;
    font-style: italic;
    color: var(--text-primary);
    line-height: 1.5;
}

.report-subtext {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-style: italic;
}

/* About Modal Details */
.about-tagline {
    display: flex;
    gap: 8px;
    margin-bottom: 4px;
}

.badge-pill {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-primary);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.pill-cyan {
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent-cyan);
    border-color: rgba(6, 182, 212, 0.3);
}

.about-section h4 {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.about-section p, .about-section ul {
    font-size: 0.825rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

.about-section ul {
    padding-left: 20px;
    margin-top: 4px;
}

.team-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 6px;
}

.team-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 10px;
}

.team-card strong {
    display: block;
    font-size: 0.8rem;
    color: var(--text-primary);
}

.team-card small {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin: 2px 0 6px 0;
}

.team-placeholder {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-emerald);
    background: rgba(16, 185, 129, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.judges-tip {
    background: rgba(245, 158, 11, 0.08);
    border-left: 3px solid var(--accent-amber);
    padding: 10px 12px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.judges-tip h4 {
    color: var(--accent-amber);
}

/* Modal Footer */
.modal-footer {
    padding: 14px 22px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: rgba(26, 34, 52, 0.25);
}

.btn-primary {
    background: var(--accent-gradient);
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity var(--transition-fast);
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

/* =========================================================
   RESPONSIVE DESIGN (Laptops, Tablets, Mobiles)
   ========================================================= */
@media (max-width: 950px) {
    .app-container {
        height: 98vh;
    }
    .sidebar-controls {
        width: 260px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 0;
    }
    .app-container {
        height: 100vh;
        border-radius: 0;
        border: none;
    }
    .main-layout {
        flex-direction: column;
    }
    .sidebar-controls {
        width: 100%;
        max-height: 210px;
        border-right: none;
        border-bottom: 1px solid var(--border-subtle);
        padding: 12px;
        gap: 12px;
    }
    .mode-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .mode-btn {
        padding: 6px;
    }
    .mode-label small {
        display: none;
    }
    .sidebar-card {
        padding: 10px;
    }
    .app-header {
        padding: 10px 14px;
    }
    .subtitle {
        display: none;
    }
    .chat-stream {
        padding: 14px;
    }
    .message-row {
        max-width: 90%;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}
