:root {
    --primary: #6C5CE7;
    --primary-light: #A29BFE;
    --primary-dark: #5A4BD1;
    --accent: #00CEC9;
    --accent-light: #81ECEC;
    --success: #00B894;
    --warning: #FDCB6E;
    --danger: #E17055;
    --danger-light: #FAB1A0;
    --bg: #F8F9FE;
    --bg-card: #FFFFFF;
    --text: #2D3436;
    --text-light: #636E72;
    --text-muted: #B2BEC3;
    --border: #DFE6E9;
    --shadow: 0 2px 12px rgba(108,92,231,0.08);
    --shadow-lg: 0 8px 32px rgba(108,92,231,0.12);
    --radius: 16px;
    --radius-sm: 10px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.container-wide {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Auth */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
}

.auth-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 48px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.auth-card h1 {
    font-size: 28px;
    margin-bottom: 8px;
    color: var(--primary);
}

.auth-card .subtitle {
    color: var(--text-light);
    margin-bottom: 32px;
    font-size: 15px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 14px;
    color: var(--text);
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    transition: var(--transition);
    background: var(--bg);
    font-family: inherit;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108,92,231,0.15);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-family: inherit;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

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

.btn-accent:hover {
    background: #00B5B0;
    transform: translateY(-1px);
}

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

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

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

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

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

.btn-lg {
    padding: 16px 36px;
    font-size: 17px;
    border-radius: var(--radius);
}

.btn-full {
    width: 100%;
}

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

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
    background: var(--text-muted) !important;
    color: white !important;
    pointer-events: none;
    box-shadow: none !important;
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.card-header .icon {
    font-size: 28px;
}

.card-header h3 {
    font-size: 18px;
    font-weight: 700;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    text-align: center;
}

.stat-card .stat-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
}

.stat-card .stat-label {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 4px;
}

/* Header */
.app-header {
    background: var(--bg-card);
    padding: 16px 24px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-header .logo {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
}

.app-header .user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.app-header .xp-badge {
    background: linear-gradient(135deg, var(--warning), #F39C12);
    color: var(--text);
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 14px;
}

.app-header nav a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.app-header nav a:hover {
    color: var(--primary);
    background: rgba(108,92,231,0.08);
}

/* Progress */
.progress-bar {
    background: var(--border);
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
    margin: 8px 0;
}

.progress-bar .fill {
    height: 100%;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width 0.5s ease;
}

.day-progress {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 20px 0;
}

.day-dot {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    border: 3px solid var(--border);
    color: var(--text-muted);
    transition: var(--transition);
}

.day-dot.completed {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.day-dot.current {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: scale(1.15);
    box-shadow: 0 0 0 4px rgba(108,92,231,0.2);
}

.day-dot.locked {
    opacity: 0.4;
}

/* Agent cards */
.agent-card {
    border-left: 4px solid var(--primary);
    padding: 20px;
    margin: 12px 0;
    background: var(--bg-card);
    border-radius: 0 var(--radius) var(--radius) 0;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.agent-card.trend_scout { border-color: #E17055; }
.agent-card.audience_analyst { border-color: #00CEC9; }
.agent-card.competitor_tracker { border-color: #FDCB6E; }
.agent-card.content_strategist { border-color: #6C5CE7; }

.agent-card .agent-name {
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.agent-card .agent-proposal {
    margin-top: 10px;
    color: var(--text-light);
    font-size: 14px;
}

.agent-card .confidence-bar {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-muted);
}

.agent-card .confidence-bar .bar {
    flex: 1;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}

.agent-card .confidence-bar .bar .fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

.agent-card.trend_scout .confidence-bar .bar .fill { background: #E17055; }
.agent-card.audience_analyst .confidence-bar .bar .fill { background: #00CEC9; }
.agent-card.competitor_tracker .confidence-bar .bar .fill { background: #FDCB6E; }
.agent-card.content_strategist .confidence-bar .bar .fill { background: #6C5CE7; }

.agent-simple-explanation {
    background: linear-gradient(135deg, #f8f9fe 0%, #eef0ff 100%);
    border-radius: var(--radius-sm);
    padding: 16px 18px;
    margin: 12px 0;
    border-left: 4px solid var(--primary-light);
}

.simple-recommendation {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    margin-bottom: 10px;
}

.simple-reasoning {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text);
    margin-bottom: 8px;
}

.simple-effect {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-light);
    margin-bottom: 6px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.6);
    border-radius: 8px;
}

.effect-label {
    font-weight: 700;
    color: var(--primary);
    margin-right: 4px;
}

.simple-confidence {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 6px;
    font-style: italic;
}

.simple-bias-warning {
    font-size: 13px;
    color: var(--danger);
    background: rgba(225,112,85,0.08);
    padding: 8px 12px;
    border-radius: 8px;
    border-left: 3px solid var(--danger);
    margin-top: 8px;
}

.agent-disagreements {
    background: #FFF8F0;
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin: 10px 0;
    border: 1px solid #FDEBD0;
}

.disagreements-title {
    font-size: 15px;
    color: #E67E22;
    margin-bottom: 10px;
}

.disagreement-item {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #FDEBD0;
}

.disagreement-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.disagreement-agent {
    font-weight: 700;
    font-size: 14px;
    color: var(--text);
    margin-bottom: 4px;
}

.disagreement-points {
    margin: 4px 0 0 20px;
    padding: 0;
}

.disagreement-points li {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-light);
    margin-bottom: 3px;
}

.agent-card.trend_scout .agent-simple-explanation { border-left-color: #E17055; }
.agent-card.audience_analyst .agent-simple-explanation { border-left-color: #00CEC9; }
.agent-card.competitor_tracker .agent-simple-explanation { border-left-color: #FDCB6E; }
.agent-card.content_strategist .agent-simple-explanation { border-left-color: #6C5CE7; }

.tech-question {
    margin-bottom: 16px;
}

.tech-question label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
    line-height: 1.5;
}

.tech-question textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: var(--transition);
}

.tech-question textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* Under the hood */
.hood-panel {
    background: #F0EFFF;
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-top: 12px;
    display: none;
    animation: slideDown 0.3s ease;
}

.hood-panel.visible {
    display: block;
}

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

.hood-panel h4 {
    font-size: 14px;
    color: var(--primary);
    margin-bottom: 10px;
}

.factor-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 6px 0;
    font-size: 13px;
}

.factor-row .factor-name {
    width: 160px;
    color: var(--text-light);
}

.factor-row .factor-bar {
    flex: 1;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.factor-row .factor-bar .fill {
    height: 100%;
    border-radius: 4px;
    background: var(--primary);
}

.factor-row .factor-value {
    width: 40px;
    text-align: right;
    font-weight: 600;
    font-size: 12px;
}

/* Hint */
.hint-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary-light);
    color: white;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.hint-btn:hover {
    background: var(--primary);
    transform: scale(1.1);
}

.hint-tooltip {
    display: none;
    background: var(--text);
    color: white;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-top: 6px;
    line-height: 1.5;
    animation: slideDown 0.2s ease;
}

.hint-tooltip.visible {
    display: block;
}

/* Conflict banner */
.conflict-banner {
    background: linear-gradient(135deg, #FFF3E0, #FFE0B2);
    border: 2px solid var(--warning);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin: 16px 0;
}

.conflict-banner h4 {
    color: #E65100;
    margin-bottom: 8px;
}

.conflict-banner p {
    font-size: 14px;
    color: var(--text);
}

/* Synthesis */
.synthesis-card {
    background: linear-gradient(135deg, #E8E5FF, #F0EFFF);
    border: 2px solid var(--primary-light);
    border-radius: var(--radius);
    padding: 24px;
    margin: 20px 0;
}

.synthesis-card h3 {
    color: var(--primary);
    margin-bottom: 12px;
}

/* Platform cards */
.platform-card {
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.platform-card:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
}

.platform-card.selected {
    border-color: var(--primary);
    background: rgba(108,92,231,0.05);
    box-shadow: 0 0 0 3px rgba(108,92,231,0.15);
}

.platform-card .platform-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.platform-card .platform-name {
    font-weight: 700;
    font-size: 15px;
}

.platform-card .platform-type {
    font-size: 12px;
    color: var(--text-muted);
}

.platform-card .checkmark {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.platform-card.selected .checkmark {
    display: flex;
}

/* Outcome */
.outcome-display {
    text-align: center;
    padding: 32px;
}

.outcome-score {
    font-size: 72px;
    font-weight: 900;
}

.outcome-score.strong { color: var(--success); }
.outcome-score.moderate { color: var(--primary); }
.outcome-score.neutral { color: var(--warning); }
.outcome-score.error { color: var(--danger); }

.outcome-category {
    font-size: 18px;
    font-weight: 600;
    margin-top: 8px;
}

.outcome-breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin: 24px 0;
    text-align: center;
}

.outcome-factor {
    padding: 12px;
    background: var(--bg);
    border-radius: var(--radius-sm);
}

.outcome-factor .value {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}

.outcome-factor .label {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
}

/* Reflection */
.reflection-section {
    margin-top: 24px;
}

.reflection-block {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    margin: 16px 0;
    box-shadow: var(--shadow);
}

.reflection-block h4 {
    color: var(--primary);
    margin-bottom: 12px;
}

.reflection-block .char-count {
    text-align: right;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.reflection-block .char-count.warning {
    color: var(--danger);
}

/* Risk selector */
.risk-selector {
    display: flex;
    gap: 12px;
    margin: 16px 0;
}

.risk-option {
    flex: 1;
    padding: 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.risk-option:hover { border-color: var(--primary-light); }

.risk-option.selected.low {
    border-color: var(--success);
    background: rgba(0,184,148,0.08);
}
.risk-option.selected.medium {
    border-color: var(--warning);
    background: rgba(253,203,110,0.15);
}
.risk-option.selected.high {
    border-color: var(--danger);
    background: rgba(225,112,85,0.08);
}

.risk-option .risk-icon { font-size: 24px; margin-bottom: 6px; }
.risk-option .risk-label { font-weight: 600; font-size: 14px; }

/* Choice cards for Day 0 */
.choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin: 16px 0;
}

.choice-card {
    padding: 20px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.choice-card:hover { border-color: var(--primary-light); }

.choice-card.selected {
    border-color: var(--primary);
    background: rgba(108,92,231,0.08);
    color: var(--primary);
    font-weight: 700;
}

/* Slider */
.slider-group {
    margin: 16px 0;
}

.slider-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
}

/* Reactions */
.reaction-card {
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin: 12px 0;
}

.reaction-card .metric {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 14px;
}

.reaction-card .metric .value {
    font-weight: 700;
}

.reaction-card .comment {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 10px 14px;
    margin: 6px 0;
    font-size: 13px;
    color: var(--text-light);
    border-left: 3px solid var(--border);
}

/* Chart */
.chart-container {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin: 20px 0;
}

/* XP Animation */
.xp-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    padding: 32px 48px;
    border-radius: var(--radius);
    text-align: center;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
    animation: popIn 0.5s ease;
    display: none;
}

.xp-popup.visible { display: block; }

.xp-popup .xp-value {
    font-size: 48px;
    font-weight: 900;
}

.xp-popup .xp-text {
    font-size: 16px;
    margin-top: 8px;
}

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

/* Overlay */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    display: none;
}

.overlay.visible { display: block; }

/* Motivation */
.motivation-banner {
    background: linear-gradient(135deg, var(--success), var(--accent));
    color: white;
    padding: 20px 28px;
    border-radius: var(--radius);
    text-align: center;
    font-weight: 600;
    font-size: 16px;
    margin: 20px 0;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}

th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

th {
    font-weight: 700;
    color: var(--text-light);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Screen transitions */
.screen {
    display: none;
    animation: fadeIn 0.4s ease;
}

.screen.active {
    display: block;
}

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

/* Responsive */
@media (max-width: 768px) {
    .container { padding: 12px; }
    .auth-card { padding: 28px 20px; }
    .card-grid { grid-template-columns: 1fr; }
    .risk-selector { flex-direction: column; }
    .choice-grid { grid-template-columns: 1fr 1fr; }
    .btn-group { flex-direction: column; }
    .app-header { flex-direction: column; gap: 10px; }
    .outcome-score { font-size: 48px; }
    .day-progress { flex-wrap: wrap; }
}

/* Alert */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    margin: 12px 0;
    font-size: 14px;
}

.alert-error {
    background: rgba(225,112,85,0.12);
    color: var(--danger);
    border: 1px solid var(--danger-light);
}

.alert-success {
    background: rgba(0,184,148,0.12);
    color: var(--success);
    border: 1px solid var(--success);
}

/* Source selector */
.source-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
    margin: 12px 0;
}

.source-option {
    padding: 10px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 13px;
}

.source-option:hover { border-color: var(--primary-light); }
.source-option.selected {
    border-color: var(--primary);
    background: rgba(108,92,231,0.08);
    font-weight: 600;
}

/* Agent config cards for Day 0 */
.agent-setup-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    margin: 16px 0;
    box-shadow: var(--shadow);
}

.agent-setup-card .agent-icon {
    font-size: 36px;
    margin-bottom: 8px;
}

.agent-summary {
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin: 8px 0;
    font-size: 13px;
}

.agent-summary .param {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
}

.agent-summary .param .value {
    font-weight: 700;
    color: var(--primary);
}

/* Step indicator */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin: 20px 0;
}

.step-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border);
    transition: var(--transition);
}

.step-dot.active {
    background: var(--primary);
    width: 24px;
    border-radius: 5px;
}

.step-dot.done {
    background: var(--success);
}

/* Agent meet cards for Day 0 */
.agent-meet-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 28px;
    margin: 20px 0;
    box-shadow: var(--shadow);
}

.agent-meet-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.agent-meet-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}

.agent-meet-header h3 {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.agent-role-tag {
    font-size: 12px;
    font-weight: 600;
    background: var(--bg);
    color: var(--text-light);
    padding: 3px 10px;
    border-radius: 12px;
}

.agent-meet-subtitle {
    font-size: 14px;
    color: var(--text-light);
    margin-top: 2px;
}

.agent-meet-description {
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.7;
}

.btn-hood {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 2px dashed var(--primary-light);
    color: var(--primary);
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    margin-bottom: 16px;
}

.btn-hood:hover {
    background: rgba(108,92,231,0.08);
    border-color: var(--primary);
}

.hood-detail {
    display: none;
    background: linear-gradient(135deg, #F0EFFF, #E8E5FF);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin-bottom: 20px;
    animation: slideDown 0.3s ease;
}

.hood-detail.visible {
    display: block;
}

.hood-detail h4 {
    color: var(--primary);
    margin-bottom: 14px;
    font-size: 15px;
}

.formula-block {
    background: white;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 10px 0;
}

.formula-line {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: var(--text);
    font-weight: 600;
}

.formula-var {
    color: var(--primary);
}

.formula-val {
    color: var(--accent);
}

.formula-explain {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 6px;
    font-style: italic;
}

.hood-params {
    margin-top: 16px;
}

.hood-params h5 {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.param-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 12px;
    background: white;
    border-radius: 6px;
    margin: 4px 0;
    font-size: 13px;
    font-family: 'Courier New', monospace;
}

.param-val {
    font-weight: 700;
}

.param-val.high {
    color: var(--danger);
}

.param-val.low {
    color: var(--accent);
}

.hood-insight {
    background: rgba(108,92,231,0.1);
    border-left: 3px solid var(--primary);
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
    margin-top: 14px;
    font-size: 13px;
    line-height: 1.6;
}

.agent-sources-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.agent-sources-section h4 {
    margin-bottom: 4px;
}

.source-hint {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 8px;
}

/* Orchestrator flow */
.orchestrator-flow {
    padding: 8px 0;
}

.flow-step {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 14px 16px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    margin: 4px 0;
}

.flow-icon {
    font-size: 24px;
    flex-shrink: 0;
    width: 36px;
    text-align: center;
}

.flow-text strong {
    font-size: 15px;
}

.flow-text p {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 4px;
}

.flow-arrow {
    text-align: center;
    font-size: 18px;
    color: var(--primary-light);
    padding: 2px 0;
}

.mini-factor {
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 14px;
    text-align: center;
    font-size: 13px;
    line-height: 1.5;
}

.mini-factor strong {
    color: var(--primary);
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

.mini-factor span {
    color: var(--accent);
    font-weight: 700;
    font-size: 12px;
}

/* Hood Panel Enhanced */
.hood-toggle {
    margin-top: 10px;
    font-size: 13px;
    padding: 6px 14px;
}

.hood-section {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px dashed var(--border);
}

.hood-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.hood-section-title {
    color: var(--primary);
    font-size: 15px;
    margin-bottom: 8px;
    font-weight: 700;
}

.hood-explanation {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.6;
    margin: 4px 0 8px;
}

.hood-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin: 8px 0;
}

.hood-table th,
.hood-table td {
    padding: 6px 10px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.hood-table th {
    background: var(--bg);
    font-weight: 700;
    color: var(--text);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hood-table td code {
    background: var(--bg);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    color: var(--primary);
}

.hood-table td strong {
    color: var(--primary);
}

.source-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.source-tag {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.hood-details {
    margin: 8px 0;
}

.hood-details summary {
    cursor: pointer;
    font-size: 13px;
    color: var(--primary);
    font-weight: 600;
    padding: 4px 0;
}

.hood-json {
    background: #1a1a2e;
    color: #a8e6cf;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    line-height: 1.5;
    overflow-x: auto;
    margin-top: 6px;
    font-family: 'Courier New', monospace;
}

.hood-computation {
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.03), rgba(0, 206, 209, 0.03));
    border-radius: var(--radius-sm);
    padding: 16px;
    margin: 12px -16px;
}

.computation-step {
    background: white;
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-bottom: 10px;
    border-left: 3px solid var(--primary);
}

.step-header {
    font-weight: 700;
    font-size: 14px;
    color: var(--primary);
    margin-bottom: 6px;
}

.step-explanation {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 6px;
    line-height: 1.5;
}

.formula-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 6px 0;
}

.formula-line {
    display: block;
    background: #f0f0f8;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-family: 'Courier New', monospace;
    color: #333;
    line-height: 1.4;
    word-break: break-all;
}

.formula-main {
    font-size: 13px;
    font-weight: 700;
    background: linear-gradient(135deg, #f0e6ff, #e6f7ff);
    border: 1px solid var(--primary);
    margin-bottom: 8px;
}

.clamp-warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    font-size: 12px;
    color: #856404;
    margin-top: 6px;
}

.clamp-warning code {
    display: block;
    margin-top: 4px;
}

.memory-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-light);
}

.memory-info code {
    background: var(--bg);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
}

.risk-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.risk-badge.risk-low {
    background: #d4edda;
    color: #155724;
}

.risk-badge.risk-medium {
    background: #fff3cd;
    color: #856404;
}

.risk-badge.risk-high {
    background: #f8d7da;
    color: #721c24;
}

.synthesis-formula-row {
    margin-bottom: 6px;
}

.synthesis-formula-row .formula-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    display: block;
    margin-bottom: 2px;
}

.hood-insights {
    list-style: none;
    padding: 0;
    margin: 0;
}

.hood-insights li {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-light);
    padding: 6px 0 6px 20px;
    position: relative;
    border-bottom: 1px dotted var(--border);
}

.hood-insights li:last-child {
    border-bottom: none;
}

.hood-insights li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 700;
}

/* Topic Suggestions */
.topic-suggestion {
    background: white;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.topic-suggestion:hover {
    border-color: var(--primary-light);
    background: #f8f7ff;
    transform: translateX(4px);
}

.topic-suggestion.selected {
    border-color: var(--primary);
    background: linear-gradient(135deg, #f0ecff 0%, #e8e0ff 100%);
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.15);
}

.topic-suggestion.selected .topic-title {
    color: var(--primary);
}

.topic-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
    line-height: 1.4;
}

.topic-why {
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.4;
    font-style: italic;
}

/* Channel info card */
.channel-info-card {
    background: linear-gradient(135deg, #f8f6ff 0%, #f0f4ff 100%);
    border-left: 4px solid var(--primary);
}

.channel-params {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.channel-param {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    flex: 1;
    min-width: 160px;
    box-shadow: var(--shadow);
}

.param-label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.param-value {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

/* Platforms grid */
.platforms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.platform-card-home {
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 16px 12px;
    text-align: center;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.platform-card-home:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.platform-icon-big {
    font-size: 28px;
    margin-bottom: 8px;
}

.platform-card-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.platform-card-type {
    font-size: 11px;
    color: var(--text-light);
}

/* Stat hints */
.stat-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
    line-height: 1.4;
}

/* Recent posts */
.recent-posts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recent-post-card {
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 16px;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.recent-post-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow);
}

.recent-post-card.example-post {
    border-style: dashed;
    opacity: 0.85;
}

.recent-post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.recent-post-day {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
}

.recent-post-score {
    font-size: 14px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 12px;
}

.score-good { background: #e6f9f0; color: #00B894; }
.score-ok { background: #fef9e7; color: #e17055; }
.score-low { background: #fde8e8; color: #d63031; }

.example-badge {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--border);
    padding: 2px 8px;
    border-radius: 8px;
}

.recent-post-strategy {
    font-size: 14px;
    color: var(--text);
    line-height: 1.6;
    margin-bottom: 10px;
}

.recent-post-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.recent-post-risk {
    font-size: 12px;
    color: var(--text-light);
}

.recent-post-platforms {
    display: flex;
    gap: 4px;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
}

.platform-badge-mini {
    background: var(--primary-light);
    color: white;
    padding: 1px 8px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 500;
}

.recent-post-xp {
    margin-top: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--success);
}

/* === INTRO PAGE === */
.intro-page {
    background: var(--bg);
}

.intro-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 24px;
}

.intro-hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(160deg, #f8f6ff 0%, #eef2ff 40%, #f0f9ff 100%);
    padding: 60px 24px;
}

.intro-title {
    font-size: 48px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 8px;
    letter-spacing: -1px;
}

.intro-subtitle {
    font-size: 22px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 20px;
}

.intro-lead {
    font-size: 16px;
    color: var(--text-light);
    line-height: 1.7;
    max-width: 520px;
    margin: 0 auto 32px;
}

.btn-intro-start {
    display: inline-block;
    padding: 14px 36px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.btn-intro-start:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.intro-section {
    padding: 56px 24px;
}

.intro-section-alt {
    background: linear-gradient(135deg, #f8f6ff 0%, #f5f3ff 100%);
}

.intro-section-final {
    text-align: center;
    padding: 64px 24px 120px;
    background: linear-gradient(160deg, #f0f4ff 0%, #f8f6ff 100%);
}

.intro-section-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 20px;
}

.intro-text {
    font-size: 16px;
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 24px;
}

.intro-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.intro-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    transition: var(--transition);
}

.intro-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow);
}

.intro-card-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.intro-card-text {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

/* Timeline */
.intro-timeline {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
}

.timeline-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    text-align: center;
    min-width: 100px;
    transition: var(--transition);
}

.timeline-item:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow);
}

.timeline-item-crisis {
    border-color: var(--danger-light);
    background: #fff5f5;
}

.timeline-item-crisis .timeline-day {
    color: var(--danger);
}

.timeline-day {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

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

.timeline-connector {
    width: 24px;
    height: 2px;
    background: var(--border);
    flex-shrink: 0;
}

/* Principles */
.intro-principles {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.intro-principle {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 20px 24px;
}

.principle-number {
    width: 36px;
    height: 36px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
}

.principle-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.principle-text {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
}

/* Responsibility */
.intro-responsibility {
    font-size: 18px;
    color: var(--text);
    line-height: 1.8;
    margin-bottom: 32px;
}

.btn-intro-go {
    display: inline-block;
    padding: 16px 48px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius);
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
}

.btn-intro-go:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.intro-login-form {
    max-width: 360px;
    margin: 32px auto 0;
    padding: 28px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

/* Sticky bar */
.intro-sticky-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(8px);
    padding: 12px 24px;
    text-align: center;
    border-top: 1px solid var(--border);
    z-index: 100;
}

.btn-intro-sticky {
    display: inline-block;
    padding: 12px 40px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.btn-intro-sticky:hover {
    background: var(--primary-dark);
}

@media (max-width: 600px) {
    .intro-title { font-size: 32px; }
    .intro-subtitle { font-size: 18px; }
    .intro-cards { grid-template-columns: 1fr; }
    .intro-timeline { flex-direction: column; }
    .timeline-connector { width: 2px; height: 16px; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
