/* ==========================================================================
   STUDIFLOW - PREMIUM CSS DESIGN SYSTEM
   ========================================================================== */

/* Design Tokens & Theme Variables */
:root {
    --bg-dark: #090a0f;
    --card-bg: rgba(17, 20, 32, 0.65);
    --card-border: rgba(255, 255, 255, 0.08);
    --card-hover-border: rgba(255, 255, 255, 0.18);
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-dim: #6b7280;
    
    /* Subject Themed Colors (Harmonious & Vibrant) */
    --color-mmo: hsl(217, 91%, 60%);       /* Sapphire Blue */
    --color-mmo-rgb: 59, 130, 246;
    
    --color-mikro: hsl(150, 84%, 44%);     /* Emerald Green */
    --color-mikro-rgb: 16, 185, 129;
    
    --color-wpr: hsl(263, 90%, 65%);       /* Amethyst Purple */
    --color-wpr-rgb: 139, 92, 246;
    
    --color-math: hsl(350, 89%, 60%);      /* Ruby Red */
    --color-math-rgb: 239, 68, 68;
    
    --color-klr: hsl(35, 92%, 52%);        /* Amber Orange */
    --color-klr-rgb: 245, 158, 11;
    
    --color-english: hsl(325, 83%, 60%);   /* Rose Pink */
    --color-english-rgb: 236, 72, 153;
    
    /* Standard UI Colors */
    --color-primary: #6366f1;              /* Indigo Accent */
    --color-primary-rgb: 99, 102, 241;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --color-info: #06b6d4;

    /* Shadows & Glows */
    --glow-shadow: 0 0 20px rgba(99, 102, 241, 0.15);
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --transition-smooth: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
    padding-bottom: 2rem;
}

/* Dynamic Ambient Glows */
.background-glows {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.15;
    animation: pulseGlow 15s infinite alternate ease-in-out;
}

.glow-1 {
    top: -10%;
    right: 10%;
    width: 45vw;
    height: 45vw;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.4) 0%, rgba(0, 0, 0, 0) 70%);
}

.glow-2 {
    bottom: -15%;
    left: 10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.35) 0%, rgba(0, 0, 0, 0) 70%);
    animation-delay: -5s;
}

.glow-3 {
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.2) 0%, rgba(0, 0, 0, 0) 70%);
    animation-delay: -10s;
}

@keyframes pulseGlow {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 0.12;
    }
    50% {
        transform: translate(3%, 5%) scale(1.1);
        opacity: 0.2;
    }
    100% {
        transform: translate(-2%, -3%) scale(0.95);
        opacity: 0.12;
    }
}

/* App Container Layout */
.app-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Typography Elements */
h1, h2, h3, h4, .time-num {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

h2 {
    font-size: 1.75rem;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 0.25rem;
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    padding: 1.75rem;
    transition: var(--transition-smooth);
}

.glass-card:hover {
    border-color: var(--card-hover-border);
}

/* Header Component */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    background: rgba(15, 18, 36, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    padding: 1.25rem 2rem;
    border-radius: 24px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-wpr));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.logo-text h1 {
    font-size: 1.5rem;
    letter-spacing: -0.01em;
    background: linear-gradient(to right, #ffffff, #dedeff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-text .subtext {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Header Countdown Widget */
.header-countdown {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.6rem 1.25rem;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.countdown-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.2rem;
}

.countdown-timer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.time-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 32px;
}

.time-num {
    font-size: 1.3rem;
    color: #ffffff;
    font-weight: 700;
    line-height: 1;
    background: linear-gradient(to bottom, #ffffff, #dcdcdc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.time-label {
    font-size: 0.65rem;
    color: var(--text-dim);
    margin-top: 0.1rem;
}

.time-divider {
    font-size: 1.2rem;
    color: var(--color-primary);
    font-weight: 700;
    animation: flash 1s infinite alternate;
}

@keyframes flash {
    0% { opacity: 0.3; }
    100% { opacity: 1; }
}

.quick-status-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--color-success);
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    border-radius: 12px;
}

/* Stats Dashboard Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.25rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    position: relative;
    overflow: hidden;
}

.stat-icon {
    width: 54px;
    height: 54px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: white;
}

.purple-glow {
    background: linear-gradient(135deg, var(--color-wpr), var(--color-primary));
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.25);
}

.blue-glow {
    background: linear-gradient(135deg, var(--color-mmo), #06b6d4);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.25);
}

.yellow-glow {
    background: linear-gradient(135deg, var(--color-klr), #eab308);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.25);
}

.orange-glow {
    background: linear-gradient(135deg, #f97316, var(--color-klr));
    box-shadow: 0 0 20px rgba(249, 115, 22, 0.25);
}

.stat-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-info h3 {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.stat-value-container {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: #ffffff;
    font-family: 'Outfit', sans-serif;
}

.stat-sub {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.progress-bar-container {
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    width: 100%;
    margin-top: 0.35rem;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(to right, var(--color-primary), var(--color-wpr));
    width: 0%;
    transition: width 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.progress-bar.bg-blue {
    background: linear-gradient(to right, var(--color-mmo), #06b6d4);
}

.progress-bar.bg-yellow {
    background: linear-gradient(to right, var(--color-klr), #eab308);
}

.progress-bar.bg-orange {
    background: linear-gradient(to right, #f97316, var(--color-klr));
}

/* Block Learning Pipeline Section */
.block-pipeline-section {
    position: relative;
}

.section-title {
    margin-bottom: 1.75rem;
}

.pipeline-flow {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    overflow-x: auto;
    padding: 0.5rem 0.25rem 1.25rem 0.25rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) rgba(0, 0, 0, 0);
}

.pipeline-flow::-webkit-scrollbar {
    height: 6px;
}

.pipeline-flow::-webkit-scrollbar-track {
    background: transparent;
}

.pipeline-flow::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.pipeline-item {
    flex: 1;
    min-width: 200px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: relative;
    transition: var(--transition-smooth);
}

.pipeline-item.active {
    background: rgba(var(--subject-color-rgb), 0.06);
    border-color: rgba(var(--subject-color-rgb), 0.35);
    box-shadow: 0 0 15px rgba(var(--subject-color-rgb), 0.12);
    transform: translateY(-4px);
}

.pipeline-item.completed {
    background: rgba(16, 185, 129, 0.04);
    border-color: rgba(16, 185, 129, 0.25);
    opacity: 0.85;
}

.pipeline-item.locked {
    opacity: 0.45;
}

.pipeline-badge {
    align-self: flex-start;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.6rem;
    border-radius: 8px;
    font-weight: 600;
    color: #ffffff;
}

.pipeline-item.active .pipeline-badge {
    background: rgba(var(--subject-color-rgb), 0.25);
    border: 1px solid rgba(var(--subject-color-rgb), 0.4);
    color: var(--subject-color);
}

.pipeline-item.completed .pipeline-badge {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--color-success);
}

.pipeline-item.locked .pipeline-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
}

.pipeline-title {
    font-size: 1.1rem;
    color: #ffffff;
    font-weight: 600;
}

.pipeline-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.pipeline-connector {
    font-size: 1.25rem;
    color: var(--text-dim);
    flex-shrink: 0;
    animation: pulseIndicator 2s infinite alternate;
}

@keyframes pulseIndicator {
    0% { transform: translateX(0); opacity: 0.4; }
    100% { transform: translateX(4px); opacity: 0.9; }
}

/* Dashboard Grid Layout (Timer & Calendar) */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 992px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Daily Planner Column styling */
.daily-planner {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.planner-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.planner-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.badge {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #a5b4fc;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.75rem;
    border-radius: 99px;
}

.date-navigation {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 0.25rem;
}

.current-date-display {
    padding: 0 1rem;
    font-weight: 500;
    font-size: 0.9rem;
    min-width: 180px;
    text-align: center;
}

.nav-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: transparent;
    border: none;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.day-info-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1.15rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.day-type-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.day-type-badge {
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff;
    background: var(--color-primary);
    padding: 0.35rem 0.85rem;
    border-radius: 10px;
}

.day-hours-badge {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Cheat button */
.cheat-toggle-btn {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--color-warning);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-smooth);
}

.cheat-toggle-btn:hover {
    background: var(--color-warning);
    color: #000000;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.3);
}

.cheat-toggle-btn.active {
    background: var(--color-danger);
    border-color: var(--color-danger);
    color: white;
}

.section-subtitle {
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.85rem;
}

/* Daily Task List */
.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    min-height: 120px;
    margin-bottom: 1.5rem;
}

.task-item {
    background: rgba(var(--subject-color-rgb), 0.03);
    border: 1px solid rgba(var(--subject-color-rgb), 0.12);
    border-radius: 16px;
    padding: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.task-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: var(--subject-color);
}

.task-item:hover {
    border-color: rgba(var(--subject-color-rgb), 0.3);
    transform: translateX(4px);
    box-shadow: 0 4px 15px rgba(var(--subject-color-rgb), 0.05);
}

.task-main {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-grow: 1;
}

/* Custom Checkbox Design */
.custom-checkbox-container {
    display: block;
    position: relative;
    width: 24px;
    height: 24px;
    cursor: pointer;
    user-select: none;
    flex-shrink: 0;
}

.custom-checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 24px;
    width: 24px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    transition: var(--transition-smooth);
}

.custom-checkbox-container:hover input ~ .checkmark {
    border-color: var(--subject-color);
    background-color: rgba(var(--subject-color-rgb), 0.05);
}

.custom-checkbox-container input:checked ~ .checkmark {
    background-color: var(--subject-color);
    border-color: var(--subject-color);
    box-shadow: 0 0 10px rgba(var(--subject-color-rgb), 0.4);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.custom-checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.custom-checkbox-container .checkmark:after {
    left: 7px;
    top: 3px;
    width: 6px;
    height: 11px;
    border: solid white;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}

.task-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.task-subject-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    color: var(--subject-color);
}

.task-title {
    font-size: 1rem;
    color: #ffffff;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.task-item.checked {
    opacity: 0.55;
    background: rgba(255, 255, 255, 0.01) !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
}

.task-item.checked .task-title {
    text-decoration: line-through;
    color: var(--text-muted);
}

.task-item.checked::before {
    background: var(--text-dim);
}

.task-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.6rem;
    border-radius: 8px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.task-actions {
    display: flex;
    gap: 0.5rem;
}

.task-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.task-action-btn:hover {
    background: rgba(var(--subject-color-rgb), 0.15);
    border-color: rgba(var(--subject-color-rgb), 0.3);
    color: #ffffff;
}

/* Empty State / Rest State */
.rest-day-card {
    background: rgba(255, 255, 255, 0.01);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 3rem 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.rest-icon {
    font-size: 3rem;
    color: var(--color-warning);
    animation: floatRest 3s infinite ease-in-out alternate;
}

@keyframes floatRest {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(-8px) rotate(5deg); }
}

.rest-title {
    font-size: 1.25rem;
    color: #ffffff;
    font-weight: 600;
}

.rest-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    max-width: 320px;
    line-height: 1.4;
}

/* Week Mini Glance Row */
.week-days-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.week-day-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 0.6rem 0.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.week-day-box:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

.week-day-box.active {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--color-primary);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.15);
}

.week-day-name {
    font-size: 0.65rem;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--text-dim);
}

.week-day-box.active .week-day-name {
    color: #ffffff;
}

.week-day-number {
    font-size: 1rem;
    font-weight: 700;
}

.week-day-hours {
    font-size: 0.6rem;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    font-weight: 600;
}

.week-day-hours.study {
    background: rgba(16, 185, 129, 0.15);
    color: var(--color-success);
}

.week-day-hours.rest {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-dim);
}

.week-day-hours.cheat {
    background: rgba(245, 158, 11, 0.15);
    color: var(--color-warning);
}

/* Focus Timer Column styling */
.focus-timer-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

.focus-timer-section .timer-header {
    text-align: center;
    width: 100%;
}

.timer-circular-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 1rem 0;
}

.timer-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.timer-track {
    fill: none;
    stroke: rgba(255, 255, 255, 0.03);
    stroke-width: 5;
}

.timer-progress {
    fill: none;
    stroke: url(#timer-gradient);
    stroke-width: 5;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s linear;
}

/* Radial Gradient Definition injected by JS inside SVG or styling */
.timer-progress {
    stroke: var(--color-primary);
    filter: drop-shadow(0px 0px 8px rgba(99, 102, 241, 0.5));
}

.timer-text-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 90%;
}

.timer-time {
    font-size: 2.25rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    color: #ffffff;
    line-height: 1;
    letter-spacing: -0.02em;
}

.timer-state {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.timer-quick-selects {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
}

.timer-preset-btn {
    flex: 1;
    min-width: 70px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.5rem;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.timer-preset-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.timer-preset-btn.active {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--color-primary);
    color: #a5b4fc;
}

.timer-controls {
    display: flex;
    gap: 0.75rem;
    width: 100%;
    margin-top: 0.5rem;
}

.timer-ctrl-btn {
    flex: 1;
    padding: 0.75rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition-smooth);
}

.play-pause-btn {
    background: var(--color-primary);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.play-pause-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

.play-pause-btn.timer-running {
    background: var(--color-warning);
    color: #000000;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.play-pause-btn.timer-running:hover {
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.45);
}

.reset-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
}

.reset-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

/* Sound Machine Controls */
.sound-machine {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1.25rem;
    width: 100%;
    margin-top: 0.75rem;
}

.sound-title {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.sound-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.sound-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 0.55rem;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition-smooth);
}

.sound-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

.sound-btn.active {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--color-success);
    color: #34d399;
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
    color: var(--text-dim);
    font-size: 0.8rem;
}

.volume-container input[type="range"] {
    flex-grow: 1;
    accent-color: var(--color-success);
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    cursor: pointer;
}

/* Master Curriculum Section styling */
.master-curriculum {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.curriculum-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 1.25rem;
}

.curriculum-toggles {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.03);
    padding: 0.35rem;
    border-radius: 14px;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.45rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.tab-btn:hover {
    color: #ffffff;
}

.tab-btn.active {
    background: rgba(255, 255, 255, 0.07);
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

/* Curriculum Subject Cards & Sections */
.subject-panels {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.subject-panel-card {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 20px;
    padding: 1.5rem;
    transition: var(--transition-smooth);
    border-left: 5px solid var(--subject-color);
}

.subject-panel-card:hover {
    border-color: rgba(var(--subject-color-rgb), 0.25);
    background: rgba(var(--subject-color-rgb), 0.015);
}

.subject-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.subject-card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.subject-icon-box {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(var(--subject-color-rgb), 0.15);
    border: 1px solid rgba(var(--subject-color-rgb), 0.3);
    color: var(--subject-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.subject-card-text h3 {
    font-size: 1.25rem;
    color: #ffffff;
    font-weight: 600;
}

.subject-card-text .subject-card-hours {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.subject-card-progress {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 180px;
}

.subject-progress-percentage {
    font-size: 0.9rem;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    color: var(--subject-color);
}

.subject-progress-bar-container {
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    flex-grow: 1;
    overflow: hidden;
}

.subject-progress-bar {
    height: 100%;
    border-radius: 3px;
    background: var(--subject-color);
    width: 0%;
    transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Chapter & Topic Lists inside Subject panel */
.chapter-accordion {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.curriculum-topic-item {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 0.85rem 1.15rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    transition: var(--transition-smooth);
}

.curriculum-topic-item:hover {
    background: rgba(255, 255, 255, 0.025);
    border-color: rgba(255, 255, 255, 0.08);
}

.curriculum-topic-item.completed {
    background: rgba(16, 185, 129, 0.015);
    border-color: rgba(16, 185, 129, 0.1);
}

.curriculum-topic-left {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-grow: 1;
}

.topic-bullet {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--subject-color);
    flex-shrink: 0;
}

.curriculum-topic-item.completed .topic-bullet {
    background: var(--color-success);
    box-shadow: 0 0 8px var(--color-success);
}

.topic-desc {
    font-size: 0.95rem;
    color: var(--text-main);
    font-weight: 500;
}

.curriculum-topic-item.completed .topic-desc {
    text-decoration: line-through;
    color: var(--text-muted);
}

.curriculum-topic-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.topic-badge {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.difficulty-badge {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
}

.difficulty-easy {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.difficulty-medium {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.difficulty-hard {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

/* Footer Section */
.app-footer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.app-footer p {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.footer-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.btn {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.15);
}

.btn-sm {
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    font-size: 0.75rem;
}

/* Celebration Canvas */
.celebration-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
}

/* Utility Helpers */
.text-center { text-align: center; }
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }
.text-danger { color: var(--color-danger); }
.bg-blue { --subject-color: var(--color-mmo); --subject-color-rgb: var(--color-mmo-rgb); }

/* Animation keyframes */
@keyframes float {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-10px); }
}
