/* ═══════════════════════════════════════════
   placement.learn-o-meter.com
   LearnOMeter Brand System
   ═══════════════════════════════════════════ */

:root {
    --navy: #0B1524;
    --steel: #4471A6;
    --amber: #F5A524;
    --green: #10B981;
    --red: #EF4444;
    --purple: #7C3AED;
    --surface: #F8FAFC;
    --card: #FFFFFF;
    --border: #E2E8F0;
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #94A3B8;
    --gradient-start: #0B1524;
    --gradient-end: #1E3A5F;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --shadow: 0 4px 24px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.10);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--surface);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--steel); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── Hero / Header ─── */
.hero {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    color: white;
    padding: 24px 20px 56px;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 200px; height: 200px;
    border-radius: 50%;
    background: rgba(245,165,36,0.08);
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(245,165,36,0.15);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 12px;
    color: var(--amber);
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}
.hero h1 {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 12px;
}
.hero h1 span { color: var(--amber); }
.hero p { font-size: 15px; color: rgba(255,255,255,0.65); line-height: 1.6; margin-bottom: 20px; }

/* ─── Container ─── */
.container { max-width: 800px; margin: 0 auto; padding: 0 20px; }

/* ─── Cards ─── */
.card {
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 1px solid var(--border);
    margin-bottom: 16px;
}
.card-elevated {
    box-shadow: var(--shadow);
    margin-top: -32px;
    position: relative;
    z-index: 2;
}
.card-dark {
    background: linear-gradient(135deg, var(--navy), var(--gradient-end));
    color: white;
    border: none;
}
.card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ─── Profile Header ─── */
.profile-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}
.avatar {
    width: 56px; height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 800;
    color: white;
    border: 3px solid rgba(255,255,255,0.2);
}
.profile-name { font-size: 18px; font-weight: 700; }
.profile-meta { font-size: 13px; color: rgba(255,255,255,0.6); }

/* ─── Tier Bar ─── */
.tier-bar {
    background: rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 16px 18px;
    border: 1px solid rgba(255,255,255,0.08);
}
.tier-label {
    font-size: 16px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
}
.tier-meta { font-size: 13px; color: rgba(255,255,255,0.5); }
.progress-track {
    background: rgba(255,255,255,0.08);
    border-radius: 6px;
    height: 8px;
    overflow: hidden;
    margin: 10px 0 8px;
}
.progress-fill {
    height: 100%;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--amber), #F97316);
    transition: width 1s ease;
}
.progress-stats {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: rgba(255,255,255,0.4);
}

/* ─── Streak ─── */
.streak-grid {
    display: flex;
    gap: 8px;
    justify-content: space-between;
}
.streak-dot {
    text-align: center;
    flex: 1;
}
.streak-circle {
    width: 36px; height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 4px;
    font-size: 16px;
}
.streak-circle.active {
    background: linear-gradient(135deg, var(--amber), #F97316);
    color: white;
}
.streak-circle.inactive {
    background: var(--surface);
    border: 1px solid var(--border);
}
.streak-label { font-size: 10px; color: var(--text-muted); }

/* ─── Skill Radar ─── */
.skill-radar-container { margin: 12px 0; }
.skill-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}
.skill-name {
    width: 120px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    flex-shrink: 0;
}
.skill-track {
    flex: 1;
    height: 10px;
    background: var(--surface);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border);
}
.skill-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.8s ease;
}
.skill-fill.high { background: var(--green); }
.skill-fill.mid { background: var(--amber); }
.skill-fill.low { background: var(--red); }
.skill-score {
    width: 36px;
    font-size: 13px;
    font-weight: 700;
    text-align: right;
}

/* ─── Challenge Cards ─── */
.challenge-card {
    background: var(--card);
    border-radius: 14px;
    border: 1px solid var(--border);
    margin-bottom: 12px;
    transition: border-color 0.2s;
    overflow: hidden;
}
.challenge-card:hover { border-color: var(--steel); }
.challenge-card.completed { opacity: 0.7; }
.challenge-header {
    padding: 16px 18px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
.challenge-dim {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.challenge-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--navy);
    margin-top: 6px;
}
.challenge-xp {
    background: rgba(245,165,36,0.12);
    color: var(--amber);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 800;
    flex-shrink: 0;
}
.challenge-time {
    font-size: 10px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 3px;
}
.ai-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(16,185,129,0.06);
    border: 1px solid rgba(16,185,129,0.15);
    font-size: 12px;
    color: var(--green);
    font-weight: 600;
    margin: 12px 18px 16px;
}

/* ─── Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: transform 0.1s, opacity 0.2s;
    text-decoration: none;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--amber); color: var(--navy); }
.btn-navy { background: var(--navy); color: white; }
.btn-steel { background: var(--steel); color: white; }
.btn-green { background: var(--green); color: white; }
.btn-outline {
    background: transparent;
    color: var(--navy);
    border: 2px solid var(--border);
}
.btn-outline-white {
    background: rgba(255,255,255,0.1);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
}
.btn-block { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 13px; }

/* ─── Forms ─── */
.form-group { margin-bottom: 16px; }
.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.form-input {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    font-size: 15px;
    font-family: inherit;
    background: var(--card);
    transition: border-color 0.2s;
}
.form-input:focus {
    outline: none;
    border-color: var(--steel);
    box-shadow: 0 0 0 3px rgba(68,113,166,0.1);
}
select.form-input { appearance: auto; }
textarea.form-input {
    min-height: 200px;
    resize: vertical;
    line-height: 1.6;
}

/* ─── Alerts ─── */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 14px;
}
.alert-error { background: #FEF2F2; color: #DC2626; border: 1px solid #FECACA; }
.alert-success { background: #F0FDF4; color: #16A34A; border: 1px solid #BBF7D0; }
.alert-warning { background: #FFFBEB; color: #D97706; border: 1px solid #FDE68A; }

/* ─── Leaderboard ─── */
.leader-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 6px;
}
.leader-row.highlight {
    background: rgba(245,165,36,0.06);
    border: 1px solid rgba(245,165,36,0.2);
}
.leader-rank {
    width: 32px; height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    color: white;
    flex-shrink: 0;
}
.leader-info { flex: 1; margin-left: 12px; }
.leader-name { font-size: 14px; font-weight: 600; }
.leader-meta { font-size: 11px; color: var(--text-muted); }
.leader-xp { font-size: 16px; font-weight: 800; }

/* ─── Score Display ─── */
.score-display {
    text-align: center;
    padding: 24px;
}
.score-circle {
    width: 100px; height: 100px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    border: 4px solid;
}
.score-number { font-size: 32px; font-weight: 800; line-height: 1; }
.score-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }

.feedback-section { padding: 16px; }
.feedback-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 13px;
    line-height: 1.5;
}

/* ─── Achievement Badges ─── */
.badge-grid {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.badge-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(245,165,36,0.08);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--amber);
}

/* ─── Activity List ─── */
.activity-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.activity-item:last-child { border-bottom: none; }

/* ─── Dimension Colors ─── */
.dim-ai-fluency { color: #7C3AED; background: rgba(124,58,237,0.1); }
.dim-build-ship { color: #3B82F6; background: rgba(59,130,246,0.1); }
.dim-system-design { color: #0EA5E9; background: rgba(14,165,233,0.1); }
.dim-data-thinking { color: #10B981; background: rgba(16,185,129,0.1); }
.dim-communication { color: #F59E0B; background: rgba(245,158,11,0.1); }
.dim-problem-solving { color: #EF4444; background: rgba(239,68,68,0.1); }
.dim-collaboration { color: #EC4899; background: rgba(236,72,153,0.1); }
.dim-domain-awareness { color: #6366F1; background: rgba(99,102,241,0.1); }

/* ─── Responsive ─── */
@media (max-width: 480px) {
    .hero h1 { font-size: 24px; }
    .skill-name { width: 90px; font-size: 11px; }
}

/* ─── Navbar (bottom) ─── */
.bottom-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: white;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    padding: 8px 0 12px;
    z-index: 100;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.06);
}
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 4px 12px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 10px;
    font-weight: 500;
    transition: color 0.15s;
}
.nav-item.active { color: var(--navy); font-weight: 700; }
.nav-item.active .nav-icon {
    background: rgba(245,165,36,0.12);
    border-radius: 12px;
    padding: 4px 12px;
}
.nav-icon { padding: 4px 12px; }

/* ─── Page bottom padding for fixed nav ─── */
.page-content { padding-bottom: 80px; }

/* ─── Landing page specific ─── */
.landing-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-top: -28px;
    position: relative;
    z-index: 2;
    box-shadow: var(--shadow);
}
.stat-item {
    background: var(--card);
    padding: 18px 12px;
    text-align: center;
}
.stat-value { font-size: 24px; font-weight: 800; color: var(--navy); }
.stat-label { font-size: 10px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }

/* ─── Submission textarea ─── */
.submission-area {
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 1px solid var(--border);
}
.char-count {
    text-align: right;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
}
