/* ===========================================
   DISCIPLINE SCORE PAGE - TradeRune Elite
   Pure Vanilla CSS
=========================================== */

:root {
    --disc-purp-main: #a855f7;
    --disc-purp-light: #c084fc;
    --disc-purp-deep: #7e22ce;
    --disc-purp-glow: rgba(168, 85, 247, 0.4);
    
    --disc-white-pure: #ffffff;
    --disc-white-soft: rgba(255, 255, 255, 0.95);
    --disc-white-muted: rgba(255, 255, 255, 0.6);
    --disc-white-faded: rgba(255, 255, 255, 0.4);
    
    --disc-cyan: #06b6d4;
    --disc-green: #22c55e;
    --disc-red: #ef5350;
    --disc-gold: #fbbf24;

    --disc-bg-card: rgba(14, 12, 18, 0.85);
    --disc-bg-hover: rgba(30, 20, 45, 0.9);
    --disc-border-base: rgba(192, 132, 252, 0.2);
    
    --disc-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Utilities */
.disc-text-cyan { color: var(--disc-cyan); text-shadow: 0 0 10px rgba(6,182,212,0.4); }
.disc-text-green { color: var(--disc-green); text-shadow: 0 0 10px rgba(34,197,94,0.4); }
.disc-text-red { color: var(--disc-red); text-shadow: 0 0 10px rgba(239,83,80,0.4); }
.disc-text-gold { color: var(--disc-gold); text-shadow: 0 0 10px rgba(251,191,36,0.4); }
.disc-muted-text { color: var(--disc-white-muted); font-size: 11px; font-weight: 600; font-family: 'JetBrains Mono', monospace; text-transform: uppercase; letter-spacing: 1px; }

/* Main Wrapper */
.disc-main-wrapper {
    margin-left: 20px; padding: 30px 40px; font-family: 'Inter', sans-serif;
    color: var(--disc-white-soft); display: flex; flex-direction: column; gap: 24px; min-height: calc(100vh - 100px);
}

/* Glass Card */
.disc-glass-card {
    background: var(--disc-bg-card); backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--disc-border-base); border-radius: 20px; padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.08); transition: all 0.4s var(--disc-ease);
}
.disc-glass-card:hover { border-color: rgba(192,132,252,0.4); box-shadow: 0 15px 40px rgba(0,0,0,0.6), inset 0 0 20px rgba(192,132,252,0.05); }

/* Header */
.disc-header { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 24px; margin-bottom: 8px; }
.disc-subtitle { font-size: 11px; font-weight: 800; letter-spacing: 2px; color: var(--disc-purp-light); text-transform: uppercase; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.disc-pulse-icon { animation: dcPulse 2s infinite; opacity: 0.8; }
@keyframes dcPulse { 0%, 100% { transform: scale(1); opacity: 0.8; } 50% { transform: scale(1.2); opacity: 1; text-shadow: 0 0 15px var(--disc-purp-light); } }

.disc-title { font-size: 42px; font-weight: 900; margin: 0; letter-spacing: -1px; color: var(--disc-white-pure); line-height: 1.1; }
.disc-text-gradient { background: linear-gradient(90deg, var(--disc-white-pure), var(--disc-purp-light)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; text-shadow: 0 0 30px var(--disc-purp-glow); }
.disc-desc { margin: 8px 0 0 0; color: var(--disc-white-muted); font-family: 'JetBrains Mono', monospace; font-size: 12px; }

/* Filter Pills */
.disc-period-toggles { display: flex; gap: 8px; background: rgba(0,0,0,0.4); padding: 6px; border-radius: 24px; border: 1px solid var(--disc-border-base); }
.disc-pill { background: transparent; border: none; color: var(--disc-white-faded); padding: 8px 16px; border-radius: 16px; font-size: 11px; font-weight: 700; cursor: pointer; transition: 0.3s; text-transform: uppercase; }
.disc-pill:hover { color: #fff; background: rgba(255,255,255,0.05); }
.disc-pill.active { background: rgba(168, 85, 247, 0.2); color: var(--disc-purp-light); box-shadow: 0 0 15px rgba(168,85,247,0.3); border: 1px solid rgba(168,85,247,0.4); }

/* Zero State */
.disc-empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 20px; background: var(--disc-bg-card); border: 1px dashed rgba(255,255,255,0.1); border-radius: 20px; text-align: center; }
.disc-empty-state i { font-size: 48px; color: var(--disc-purp-light); opacity: 0.5; margin-bottom: 16px; }
.disc-empty-state h3 { font-size: 20px; color: #fff; margin: 0 0 8px 0; }
.disc-empty-state p { color: var(--disc-white-muted); font-size: 13px; max-width: 350px; }

/* General Progres Bar */
.disc-prog-bg { width: 100%; height: 8px; background: rgba(0,0,0,0.5); border-radius: 4px; overflow: hidden; border: 1px solid rgba(255,255,255,0.05); }
.disc-prog-fill { height: 100%; background: var(--disc-purp-main); transition: width 0.5s var(--disc-ease); }

/* Title Panels */
.disc-panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.disc-panel-title { font-size: 12px; font-weight: 800; color: var(--disc-white-pure); letter-spacing: 2px; text-transform: uppercase; margin: 0; display: flex; align-items: center; gap: 8px; }
.disc-panel-title i { color: var(--disc-purp-main); }
.disc-section-title { font-size: 14px; font-weight: 800; color: var(--disc-white-pure); letter-spacing: 2px; text-transform: uppercase; text-shadow: 0 0 15px var(--disc-purp-glow); margin: 0 0 16px 0; }

/* Hero Grid Layout */
.disc-hero-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 24px; }
@media (max-width: 1024px) { .disc-hero-grid { grid-template-columns: 1fr; } }

/* Hero Gauge */
.disc-hero-card { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px; }
.disc-hero-gauge { position: relative; width: 260px; height: 260px; display: flex; flex-direction: column; align-items: center; justify-content: center; margin-bottom: 16px; }
.disc-gauge-svg { width: 100%; height: 100%; transform: rotate(-90deg); position: absolute; inset: 0; }
.disc-gauge-bg { fill: none; stroke: rgba(255, 255, 255, 0.05); stroke-width: 12; }
.disc-gauge-fill { fill: none; stroke: var(--disc-purp-main); stroke-width: 12; stroke-linecap: round; stroke-dasharray: 534; stroke-dashoffset: 534; transition: stroke-dashoffset 1.5s var(--disc-ease), stroke 0.5s ease; }
.disc-gauge-content { position: relative; z-index: 10; display: flex; flex-direction: column; align-items: center; }
.disc-score-val { font-size: 80px; font-weight: 900; font-family: 'JetBrains Mono', monospace; line-height: 0.9; color: var(--disc-white-pure); font-variant-numeric: tabular-nums; transition: color 0.5s; text-shadow: 0 0 30px var(--disc-purp-glow); }
.disc-tier-badge { margin-top: 8px; font-size: 14px; font-weight: 900; letter-spacing: 3px; background: rgba(168,85,247,0.15); color: var(--disc-purp-light); padding: 4px 16px; border-radius: 12px; border: 1px solid rgba(168,85,247,0.3); text-transform: uppercase; }

.disc-hero-stats { text-align: center; }
.disc-trend-txt { font-size: 13px; font-weight: 800; font-family: monospace; color: var(--disc-green); margin-bottom: 8px; }
.disc-mood-txt { font-size: 14px; color: var(--disc-white-soft); font-style: italic; margin: 0; max-width: 250px; line-height: 1.5; }

/* XP System */
.disc-xp-card { display: flex; flex-direction: column; }
.disc-lvl-txt { font-size: 18px; font-weight: 900; color: #fff; font-family: monospace; }
.disc-xp-bar-bg { width: 100%; height: 16px; background: rgba(0,0,0,0.5); border-radius: 8px; border: 1px solid var(--disc-border-base); overflow: hidden; position: relative; margin-bottom: 20px; }
.disc-xp-bar-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #3b82f6, var(--disc-purp-main)); border-radius: 8px; transition: width 1s var(--disc-ease); position: relative; box-shadow: 0 0 15px var(--disc-purp-glow); }
.disc-xp-shimmer { position: absolute; top: 0; left: -100%; width: 50%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent); animation: xpShimmer 2s infinite; }
@keyframes xpShimmer { 100% { left: 200%; } }

.disc-xp-log { flex: 1; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; padding-right: 8px; max-height: 180px; }
.xp-row { display: flex; justify-content: space-between; align-items: center; font-size: 11px; background: rgba(0,0,0,0.2); padding: 8px 12px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.02); }
.xp-reason { color: var(--disc-white-soft); font-weight: 600; }
.xp-amt { font-weight: 900; font-family: monospace; }

/* Streaks */
.disc-streaks-card { display: flex; flex-direction: column; }
.disc-streaks-list { display: flex; flex-direction: column; gap: 12px; flex: 1; overflow-y: auto; max-height: 250px; }
.strk-row { background: rgba(0,0,0,0.2); border: 1px solid var(--disc-border-base); border-radius: 12px; padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; transition: 0.3s; }
.strk-row:hover { background: rgba(255,255,255,0.05); transform: translateX(4px); }
.strk-top { display: flex; justify-content: space-between; align-items: center; }
.strk-name { font-size: 12px; font-weight: 800; color: #fff; display: flex; align-items: center; gap: 8px; }
.strk-val { font-size: 14px; font-weight: 900; color: var(--disc-gold); font-family: monospace; }
.strk-flame { animation: fire 1.5s infinite alternate; }
@keyframes fire { 0% { transform: scale(1) rotate(-5deg); } 100% { transform: scale(1.2) rotate(5deg); } }

/* Components Breakdown */
.disc-components-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.comp-card { background: rgba(20,15,30,0.8); border: 1px solid var(--disc-border-base); border-radius: 16px; padding: 20px; transition: 0.3s; display: flex; flex-direction: column; gap: 10px; cursor: pointer; position: relative; overflow: hidden; }
.comp-card:hover { transform: translateY(-4px); box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.comp-card-top { display: flex; justify-content: space-between; align-items: center; }
.comp-name { font-size: 11px; font-weight: 800; color: #fff; letter-spacing: 1px; text-transform: uppercase; display: flex; align-items: center; gap: 6px; }
.comp-score { font-size: 24px; font-weight: 900; font-family: monospace; line-height: 1; }
.comp-desc { font-size: 11px; color: var(--disc-white-muted); line-height: 1.4; }
.comp-trend { font-size: 10px; font-weight: 800; margin-top: 4px; }
.comp-card.tier-4 { border-top: 3px solid var(--disc-purp-light); background: linear-gradient(180deg, rgba(168,85,247,0.1), rgba(20,15,30,0.8)); }
.comp-card.tier-3 { border-top: 3px solid var(--disc-green); background: linear-gradient(180deg, rgba(34,197,94,0.05), rgba(20,15,30,0.8)); }
.comp-card.tier-2 { border-top: 3px solid var(--disc-gold); }
.comp-card.tier-1 { border-top: 3px solid var(--disc-red); }

/* Trend SVG */
.disc-svg-wrapper { flex: 1; position: relative; width: 100%; border-radius: 12px; background: rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.02); overflow: hidden; }
.disc-tooltip { position: absolute; display: none; background: rgba(14,12,18,0.95); border: 1px solid var(--disc-white-faded); padding: 12px; border-radius: 8px; font-family: monospace; font-size: 11px; color: #fff; z-index: 10; pointer-events: none; box-shadow: 0 10px 20px rgba(0,0,0,0.8); }

/* Insights */
.disc-insights-section { margin-top: 32px; }
.disc-insights-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.disc-ic-card { background: var(--disc-bg-card); backdrop-filter: blur(16px); border: 1px solid var(--disc-border-base); border-left: 3px solid var(--disc-purp-main); border-radius: 16px; padding: 20px; transition: all 0.4s var(--disc-ease); display: flex; gap: 12px; align-items: flex-start; font-size: 13px; line-height: 1.5; color: var(--disc-white-soft); }
.disc-ic-card:hover { transform: translateY(-3px); background: var(--disc-bg-hover); box-shadow: 0 10px 30px rgba(0,0,0,0.4); border-color: var(--disc-purp-light); }
.disc-ic-icon { font-size: 18px; margin-top: 2px; }

/* Achievements */
.disc-ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px; }
.ach-card { background: rgba(0,0,0,0.3); border: 1px solid var(--disc-border-base); border-radius: 16px; padding: 20px 12px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; transition: 0.3s; position: relative; }
.ach-card.locked { opacity: 0.5; filter: grayscale(1); border-style: dashed; }
.ach-card:hover { background: rgba(255,255,255,0.05); transform: translateY(-3px); }
.ach-icon { font-size: 32px; margin-bottom: 4px; }
.ach-card.unlocked .ach-icon { filter: drop-shadow(0 0 10px rgba(255,255,255,0.3)); }
.ach-title { font-size: 11px; font-weight: 800; color: #fff; line-height: 1.3; }
.ach-desc { font-size: 9px; color: var(--disc-white-muted); display: none; position: absolute; bottom: 100%; background: #000; padding: 6px; border-radius: 6px; width: 140px; z-index: 10; border: 1px solid #333; }
.ach-card:hover .ach-desc { display: block; }
.ach-new { position: absolute; top: -8px; right: -8px; background: var(--disc-red); color: #fff; font-size: 8px; font-weight: 900; padding: 2px 6px; border-radius: 10px; animation: pPulse 1s infinite; }

/* Scrollbars */
.custom-scroll::-webkit-scrollbar { width: 4px; height: 4px; }
.custom-scroll::-webkit-scrollbar-track { background: transparent; }
.custom-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }
.custom-scroll::-webkit-scrollbar-thumb:hover { background: var(--disc-purp-light); }