/* ==========================================================================
   DASHBOARD KULIAH - PASTEL THEME & SMART HIGHLIGHT
   ========================================================================== */

:root {
    --pink-soft: #ffb6c1;
    --pink-dark: #ff69b4;
    --blue-main: #4b6b8d;
    --blue-soft: #a1b8cc;
    --bg-overlay: rgba(255, 250, 250, 0.95);
    --card-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    --glass-bg: rgba(255, 255, 255, 0.6);
    
    /* Warna Kartu Berdasarkan Hari */
    --color-senin: #e2efda;  /* Sage Green Muda */
    --color-selasa: #fce4ec; /* Baby Pink */
    --color-rabu: #e3f2fd;   /* Blue Sky */
    --color-kamis: #fff3e0;  /* Peach Lembut */
    --color-jumat: #f3e5f5;  /* Lavender Muda */
    --color-sabtu: #e0f2f1;  /* Mint */
}

* { box-sizing: border-box; }

html, body {
    max-width: 100%;
    overflow-x: hidden; /* Ini kuncinya: mengunci scroll horizontal */
    position: relative;
    width: 100vw;
}

body {
    
    font-family: 'Quicksand', sans-serif;
    background: linear-gradient(var(--bg-overlay), var(--bg-overlay)), 
                url('./karakter.png') fixed center top / 100% auto no-repeat;
    margin: 0; padding: 20px 25px; color: var(--blue-main);
    transition: background 1s ease, filter 2s ease-in-out;
    overflow-x: hidden;
}

/* 1. HEADER & UI COMPONENTS (THE CUTE VERSION) */
.header { text-align: center; margin-bottom: 25px; position: relative; z-index: 95; }

.header h1 { 
    color: #ff8fab; 
    font-size: 1.8rem; 
    letter-spacing: -1px;
    text-shadow: 2px 2px 0px #fff, 4px 4px 10px rgba(255, 143, 171, 0.3);
    margin: 0 0 5px 0;
}

.subtitle { 
    color: #a1b8cc; 
    font-size: 0.9rem; 
    font-weight: 700;
    letter-spacing: 0.5px;
    background: rgba(255, 255, 255, 0.5);
    padding: 2px 12px;
    border-radius: 20px;
    display: inline-block;
}

.gacha-text { 
    font-size: 1.1rem; 
    font-style: italic; 
    color: #ff8fab; 
    margin-top: 15px; 
    min-height: 1.5rem; 
    transition: 0.5s;
    background: linear-gradient(to right, transparent, rgba(255,182,193,0.1), transparent);
    padding: 10px;
    border-top: 1px solid rgba(255,182,193,0.2);
}

.weather-status { 
    display: inline-block;
    font-size: 0.65rem; 
    color: #8aacc8; 
    font-weight: 700; 
    margin: 10px 0 10px; 
    text-transform: uppercase; 
    letter-spacing: 1px;
    background: #fff;
    padding: 4px 10px;
    border-radius: 50px;
    border: 1px solid #eef2f5;
}

/* Prayer & Deadlines */
.prayer-times-container { margin: 10px auto; max-width: 450px; z-index: 95; position: relative; }
.prayer-bar { display: flex; justify-content: space-around; background: rgba(255, 255, 255, 0.4); backdrop-filter: blur(5px); border-radius: 15px; padding: 8px; font-size: 0.65rem; border: 1px solid rgba(255, 182, 193, 0.2); }

.prayer-item b {
    color: #4b6b8d;
    font-size: 0.6rem;
    text-transform: lowercase;
    font-variant: small-caps;
}

.active-prayer { 
    color: #ff69b4 !important;
    transform: scale(1.15); 
    font-weight: 800; 
    text-shadow: 0 0 5px var(--pink-soft); 
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#prayer-countdown, #class-countdown { 
    font-family: 'Quicksand', sans-serif;
    font-weight: 800; 
    text-align: center; 
    letter-spacing: 1px; 
    margin-top: 8px; 
    text-transform: uppercase; 
    display: block;
}

#prayer-countdown { color: #ff69b4; font-size: 0.75rem; animation: floating 3s infinite ease-in-out; }
#class-countdown { color: #4b6b8d; font-size: 0.65rem; opacity: 0.9; }

.deadline-container { background: rgba(255, 255, 255, 0.6); backdrop-filter: blur(5px); border-radius: 15px; padding: 12px; margin: 15px auto; max-width: 280px; border: 1px dashed var(--pink-soft); z-index: 95; position: relative; }
.deadline-item { background: white; padding: 8px; border-radius: 10px; margin-bottom: 5px; font-size: 0.7rem; box-shadow: var(--card-shadow); transition: 0.3s; }

/* 2. PLAYER CARD (SYMMETRY FIX) */
.player-card {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border-radius: 30px;
    padding: 25px;
    max-width: 380px;
    margin: 0 auto 25px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 22px;
    z-index: 100;
    position: relative;
}

.music-main-controls {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 12px;
}

.btn-player-main, .btn-player-sub {
    border-radius: 30px !important;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    font-family: 'Quicksand';
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 45px;
}

.btn-player-main {
    background: var(--pink-dark);
    color: white;
    border: none;
    flex: 2;
    padding: 12px 25px;
    box-shadow: 0 4px 15px rgba(255, 105, 180, 0.3);
}

.btn-player-sub {
    background: white;
    color: var(--blue-main);
    border: 1px solid var(--pink-soft);
    flex: 1;
    padding: 12px 18px;
}

.playing { animation: musicPulse 2s infinite; background: var(--pink-soft) !important; color: white !important; }

/* Slider Rows */
.music-progress-row, .volume-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    width: 100%;
}

#progress-bar, #volume-slider {
    flex-grow: 1;
    -webkit-appearance: none;
    height: 6px;
    background: var(--blue-soft);
    border-radius: 10px;
    outline: none;
    cursor: pointer;
}

#progress-bar::-webkit-slider-thumb, 
#volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--pink-dark);
    border: 2px solid white;
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
}

#current-time, #total-duration {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--blue-main);
    min-width: 45px;
    text-align: center;
}

.volume-row span { font-size: 1.1rem; min-width: 20px; }

/* 3. SCHEDULE GRID & SMART CARDS */
.schedule-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 15px; max-width: 1100px; margin: 0 auto; z-index: 96; position: relative; }

.class-card { 
    background: white; 
    border-radius: 20px; 
    padding: 18px; 
    position: relative; 
    border: 2px solid transparent; 
    transition: all 0.4s ease, opacity 0.6s ease;
    opacity: 0; 
    transform: translateY(20px);
    box-shadow: var(--card-shadow);
    color: var(--blue-main);
}

.class-card.show { opacity: 1; transform: translateY(0); }

/* Pewarnaan Hari (Solid Pastel) */
.card-senin { background-color: #e2efda !important; }
.card-selasa { background-color: #fce4ec !important; }
.card-rabu { background-color: #e3f2fd !important; }
.card-kamis { background-color: #fff3e0 !important; }
.card-jumat { background-color: #f3e5f5 !important; }
.card-sabtu { background-color: #e0f2f1 !important; }

.today-highlight { 
    border: 2px solid rgba(0, 0, 0, 0.08); 
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06); 
    transform: scale(1.01);
}

.on-going { border: 2.5px solid var(--pink-dark) !important; transform: scale(1.03) !important; z-index: 10; box-shadow: 0 0 20px rgba(255, 105, 180, 0.2) !important; }

.class-card:hover { transform: translateY(-8px) scale(1.02); box-shadow: 0 15px 30px rgba(255, 182, 193, 0.4); border-color: var(--pink-soft); }

.day-tag { font-size: 0.6rem; font-weight: 800; background: #fff; padding: 4px 10px; border-radius: 10px; display: inline-block; margin-bottom: 8px; color: #8aacc8; }
.course-header h3 { font-size: 0.95rem; margin: 0; }
.detail { display: flex; justify-content: space-between; font-size: 0.75rem; margin-top: 8px; border-top: 1px dashed rgba(0,0,0,0.1); padding-top: 8px; }
.label-msg { position: absolute; top: 10px; right: 10px; font-size: 0.55rem; font-weight: 800; color: var(--pink-dark); background: white; padding: 2px 6px; border-radius: 5px; border: 1px solid var(--pink-soft); }

/* 4. MODES & ATMOSPHERE */
body.night-mode { background: linear-gradient(rgba(20, 24, 82, 0.92), rgba(10, 10, 30, 0.95)), url('./karakter.png') fixed center/cover; color: #f1f7fa; }
body.night-mode .class-card { background: rgba(255, 255, 255, 0.1); border-color: rgba(255,255,255,0.1); }
body.rainy-mood { filter: saturate(0.7) contrast(1.1) brightness(0.9); background-color: #d1d9e6; }
body.sunny-mood { filter: saturate(1.15) brightness(1.05); }

/* 5. FLOATING FOCUS BUTTON */
.focus-section { position: fixed; bottom: 30px; left: 30px; z-index: 999; }
.btn-focus-mode {
    background: white; border: 2px solid var(--pink-soft);
    width: 55px; height: 55px; border-radius: 50% !important;
    font-size: 1.5rem; cursor: pointer;
    box-shadow: 0 8px 20px rgba(255, 182, 193, 0.4);
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex; align-items: center; justify-content: center;
}
.btn-focus-mode:hover { transform: scale(1.2) rotate(15deg); background: var(--pink-soft); }
.btn-focus-mode::after { content: ''; position: absolute; width: 100%; height: 100%; border-radius: 50%; border: 2px solid var(--pink-soft); animation: pulseButton 2s infinite; opacity: 0; }

/* 6. DECORATIONS & KEYFRAMES */
.cloud-wrapper, #rain-container, .sunny-glow {
    max-width: 100%;
    overflow: hidden;
    pointer-events: none; /* Supaya nggak ganggu klik tombol */
}
.cloud { position: absolute; font-size: 4rem; color: white; opacity: 0.5; animation: moveClouds linear infinite; }
.cloud1 { top: 10%; animation-duration: 45s; }
.cloud2 { top: 25%; animation-duration: 35s; animation-delay: -10s; }
.cloud3 { top: 15%; animation-duration: 50s; animation-delay: -20s; }

.emoji-decor { position: absolute; font-size: 1.2rem; opacity: 0.8; pointer-events: none; z-index: 5; }
.pos-tl { top: -10px; left: -5px; animation: floating 3s infinite ease-in-out; }
.pos-tr { top: -10px; right: -5px; animation: wiggle 2.5s infinite ease-in-out; }

.sunny-glow { position: fixed; top: -150px; right: -150px; width: 600px; height: 600px; background: radial-gradient(circle, rgba(255, 255, 190, 0.5) 0%, transparent 70%); z-index: 0; pointer-events: none; animation: sunGlow 8s infinite ease-in-out; }

@keyframes moveClouds { from { transform: translateX(-200px); } to { transform: translateX(110vw); } }
@keyframes floating { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes wiggle { 0%, 100% { transform: rotate(-10deg); } 50% { transform: rotate(15deg) scale(1.1); } }
@keyframes sunGlow { 0%, 100% { opacity: 0.3; transform: scale(1); } 50% { opacity: 0.6; transform: scale(1.1); } }
@keyframes pulseButton { 0% { transform: scale(1); opacity: 0.5; } 100% { transform: scale(1.4); opacity: 0; } }
@keyframes musicPulse { 0% { box-shadow: 0 0 0 0 rgba(255, 182, 193, 0.7); } 70% { box-shadow: 0 0 0 10px rgba(255, 182, 193, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 182, 193, 0); } }
@keyframes urgentGlow { 0%, 100% { box-shadow: 0 0 5px #ff69b4; } 50% { box-shadow: 0 0 15px #ff69b4; } }

/* 7. FOOTER & RESPONSIVE */
.footer { text-align: center; margin-top: 40px; padding: 20px; z-index: 95; position: relative; font-size: 0.8rem; font-weight: 700; color: var(--pink-soft); }

@media (max-width: 768px) {
    body { padding: 15px 10px; }
    .schedule-grid { grid-template-columns: 1fr; }
    .focus-section { bottom: 20px; left: 20px; }
    .player-card { max-width: 92%; padding: 20px; }
    .btn-player-main { font-size: 0.75rem; padding: 10px; }
    .btn-player-sub { font-size: 0.7rem; padding: 10px; }
    #current-time, #total-duration { font-size: 0.65rem; min-width: 35px; }
}

.urgent-task {
    border: 2px solid #ff69b4 !important;
    animation: urgentGlow 1.5s infinite ease-in-out;
}

@keyframes urgentGlow {
    0%, 100% { box-shadow: 0 0 5px rgba(255, 105, 180, 0.4); transform: scale(1); }
    50% { box-shadow: 0 0 15px rgba(255, 105, 180, 0.7); transform: scale(1.02); }
}