:root {
    /* Baby Blue Palette - Light Mode */
    --primary: #90E0EF;
    --primary-dark: #00B4D8;
    --accent: #0077B6;
    --bg-body: #CAF0F8;
    --bg-card: #FFFFFF;
    --text-main: #03045E;
    --text-secondary: #0077B6;
    --gradient-header: linear-gradient(135deg, #ADE8F4 0%, #48CAE4 100%);
    --card-shadow: 0 8px 32px rgba(0, 119, 182, 0.1);
    --hover-transform: translateY(-5px);

    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
}

[data-theme="dark"] {
    /* Baby Blue - Dark Mode (Navy & Glowing Blue) */
    --primary: #48CAE4;
    --primary-dark: #90E0EF;
    --accent: #ADE8F4;
    --bg-body: #02111B;
    /* Very dark navy */
    --bg-card: #0D1B2A;
    /* Dark navy */
    --text-main: #CAF0F8;
    --text-secondary: #90E0EF;
    --gradient-header: linear-gradient(135deg, #0D1B2A 0%, #1B3A4B 100%);
    --card-shadow: 0 8px 32px rgba(72, 202, 228, 0.15);
    /* Blue glow */

    --glass-bg: rgba(13, 27, 42, 0.7);
    --glass-border: rgba(72, 202, 228, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: --bg-body;
    background: var(--bg-body);
    color: var(--text-main);
    min-height: 100vh;
    padding: 2rem;
}

/* Header Sections */
header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    padding: 2rem;
    border-radius: 20px;
    background: var(--gradient-header);
    box-shadow: var(--card-shadow);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
}

header h1 {
    font-weight: 800;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

#current-date {
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

#current-time {
    font-size: 3rem;
    font-weight: 600;
    color: var(--primary-dark);
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 20px rgba(0, 180, 216, 0.2);
}

/* Theme Toggle */
#theme-toggle {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: var(--bg-card);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--primary-dark);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: grid;
    place-items: center;
}

#theme-toggle:hover {
    transform: rotate(15deg) scale(1.1);
}

/* Grid Layout */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Cards */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: var(--hover-transform);
    box-shadow: 0 15px 40px rgba(72, 202, 224, 0.2);
}

/* Highlight today's card */
.card.today {
    border: 2px solid var(--primary-dark);
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(72, 202, 228, 0.1) 100%);
    box-shadow: 0 0 30px rgba(72, 202, 228, 0.3);
    order: -1;
    /* Move to top on mobile flex, or emphasize */
}

.card.today::before {
    content: 'Hari Ini';
    position: absolute;
    top: 10px;
    right: -30px;
    background: var(--primary-dark);
    color: #fff;
    padding: 5px 40px;
    transform: rotate(45deg);
    font-size: 0.8rem;
    font-weight: bold;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.card-header h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary);
    color: var(--primary-dark);
}

/* List Items */
.subject-list {
    list-style: none;
}

.subject-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(144, 224, 239, 0.2);
    font-size: 1.1rem;
}

.subject-list li:last-child {
    border-bottom: none;
}

.time {
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 60px;
}

.subject {
    font-weight: 400;
    color: var(--text-main);
    text-align: right;
}

/* Responsive */
@media (max-width: 600px) {
    header {
        padding: 1.5rem;
    }

    #current-time {
        font-size: 2.2rem;
    }

    header h1 {
        font-size: 1.8rem;
    }

    #theme-toggle {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

/* Highlight active subject row */
li.active-subject {
    background-color: var(--primary);
    color: var(--text-main);
    border-radius: 8px;
    padding-left: 10px;
    padding-right: 10px;
    font-weight: bold;
    box-shadow: 0 0 15px var(--accent);
    transform: scale(1.02);
    border: none;
}

[data-theme="dark"] li.active-subject {
    background-color: var(--accent);
    color: #03045E;
    /* Dark text for contrast on light accent */
    box-shadow: 0 0 20px rgba(173, 232, 244, 0.6);
}