/* Default theme: Catppuccin Latte */
:root, [data-theme="catppuccin-latte"] {
    --theme-text: #4c4f69;
    --theme-subtext1: #5c5f77;
    --theme-subtext0: #6c6f85;
    --theme-overlay2: #7c7f93;
    --theme-overlay1: #8c8fa1;
    --theme-overlay0: #9ca0b0;
    --theme-surface2: #acb0be;
    --theme-surface1: #bcc0cc;
    --theme-surface0: #ccd0da;
    --theme-base: #eff1f5;
    --theme-mantle: #e6e9ef;
    --theme-crust: #dce0e8;
    --theme-accent: #7287fd;
    --theme-accent2: #209fb5;
    --theme-accent3: #1e66f5;
    --theme-header-from: #7287fd;
    --theme-header-to: #209fb5;
}

/* Catppuccin Frappé */
[data-theme="catppuccin-frappe"] {
    --theme-text: #c6d0f5;
    --theme-subtext1: #b5bfe2;
    --theme-subtext0: #a5adce;
    --theme-overlay2: #949cbb;
    --theme-overlay1: #838ba7;
    --theme-overlay0: #737994;
    --theme-surface2: #626880;
    --theme-surface1: #51576d;
    --theme-surface0: #414559;
    --theme-base: #303446;
    --theme-mantle: #292c3c;
    --theme-crust: #232634;
    --theme-accent: #babbf1;
    --theme-accent2: #85c1dc;
    --theme-accent3: #8caaee;
    --theme-header-from: #babbf1;
    --theme-header-to: #85c1dc;
}

/* Catppuccin Macchiato */
[data-theme="catppuccin-macchiato"] {
    --theme-text: #cad3f5;
    --theme-subtext1: #b8c0e0;
    --theme-subtext0: #a5adcb;
    --theme-overlay2: #939ab7;
    --theme-overlay1: #8087a2;
    --theme-overlay0: #6e738d;
    --theme-surface2: #5b6078;
    --theme-surface1: #494d64;
    --theme-surface0: #363a4f;
    --theme-base: #24273a;
    --theme-mantle: #1e2030;
    --theme-crust: #181926;
    --theme-accent: #b7bdf8;
    --theme-accent2: #7dc4e4;
    --theme-accent3: #8aadf4;
    --theme-header-from: #b7bdf8;
    --theme-header-to: #7dc4e4;
}

/* Catppuccin Mocha */
[data-theme="catppuccin-mocha"] {
    --theme-text: #cdd6f4;
    --theme-subtext1: #bac2de;
    --theme-subtext0: #a6adc8;
    --theme-overlay2: #9399b2;
    --theme-overlay1: #7f849c;
    --theme-overlay0: #6c7086;
    --theme-surface2: #585b70;
    --theme-surface1: #45475a;
    --theme-surface0: #313244;
    --theme-base: #1e1e2e;
    --theme-mantle: #181825;
    --theme-crust: #11111b;
    --theme-accent: #b4befe;
    --theme-accent2: #74c7ec;
    --theme-accent3: #89b4fa;
    --theme-header-from: #b4befe;
    --theme-header-to: #74c7ec;
}

/* Solarized Light */
[data-theme="solarized-light"] {
    --theme-text: #657b83;
    --theme-subtext1: #586e75;
    --theme-subtext0: #839496;
    --theme-overlay2: #93a1a1;
    --theme-overlay1: #93a1a1;
    --theme-overlay0: #eee8d5;
    --theme-surface2: #eee8d5;
    --theme-surface1: #eee8d5;
    --theme-surface0: #eee8d5;
    --theme-base: #fdf6e3;
    --theme-mantle: #eee8d5;
    --theme-crust: #e4dccb;
    --theme-accent: #268bd2;
    --theme-accent2: #2aa198;
    --theme-accent3: #6c71c4;
    --theme-header-from: #268bd2;
    --theme-header-to: #2aa198;
}

/* Solarized Dark */
[data-theme="solarized-dark"] {
    --theme-text: #839496;
    --theme-subtext1: #93a1a1;
    --theme-subtext0: #657b83;
    --theme-overlay2: #586e75;
    --theme-overlay1: #586e75;
    --theme-overlay0: #073642;
    --theme-surface2: #073642;
    --theme-surface1: #073642;
    --theme-surface0: #073642;
    --theme-base: #002b36;
    --theme-mantle: #073642;
    --theme-crust: #00212b;
    --theme-accent: #268bd2;
    --theme-accent2: #2aa198;
    --theme-accent3: #6c71c4;
    --theme-header-from: #268bd2;
    --theme-header-to: #2aa198;
}

/* Tokyo Night Day */
[data-theme="tokyonight-day"] {
    --theme-text: #3760bf;
    --theme-subtext1: #6172b0;
    --theme-subtext0: #848cb5;
    --theme-overlay2: #9699a3;
    --theme-overlay1: #a8aecb;
    --theme-overlay0: #c4c8da;
    --theme-surface2: #d4d6e4;
    --theme-surface1: #dfe1ec;
    --theme-surface0: #e9e9ed;
    --theme-base: #e1e2e7;
    --theme-mantle: #d0d5e3;
    --theme-crust: #c4c8da;
    --theme-accent: #7847bd;
    --theme-accent2: #007197;
    --theme-accent3: #2e7de9;
    --theme-header-from: #7847bd;
    --theme-header-to: #2e7de9;
}

/* Tokyo Night Storm */
[data-theme="tokyonight-storm"] {
    --theme-text: #c0caf5;
    --theme-subtext1: #a9b1d6;
    --theme-subtext0: #9aa5ce;
    --theme-overlay2: #565f89;
    --theme-overlay1: #414868;
    --theme-overlay0: #3b4261;
    --theme-surface2: #364a82;
    --theme-surface1: #292e42;
    --theme-surface0: #1f2335;
    --theme-base: #24283b;
    --theme-mantle: #1f2335;
    --theme-crust: #1a1b26;
    --theme-accent: #bb9af7;
    --theme-accent2: #7dcfff;
    --theme-accent3: #7aa2f7;
    --theme-header-from: #bb9af7;
    --theme-header-to: #7aa2f7;
}

/* Tokyo Night Night */
[data-theme="tokyonight-night"] {
    --theme-text: #c0caf5;
    --theme-subtext1: #a9b1d6;
    --theme-subtext0: #9aa5ce;
    --theme-overlay2: #565f89;
    --theme-overlay1: #414868;
    --theme-overlay0: #3b4261;
    --theme-surface2: #364a82;
    --theme-surface1: #292e42;
    --theme-surface0: #1f2335;
    --theme-base: #1a1b26;
    --theme-mantle: #16161e;
    --theme-crust: #13131a;
    --theme-accent: #bb9af7;
    --theme-accent2: #7dcfff;
    --theme-accent3: #7aa2f7;
    --theme-header-from: #bb9af7;
    --theme-header-to: #7aa2f7;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--theme-text);
    background: linear-gradient(135deg, var(--theme-base) 0%, var(--theme-crust) 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--theme-base);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
}

.container-with-sidebar {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    background: var(--theme-base);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
    min-height: calc(100vh - 40px);
}

.sidebar {
    width: 250px;
    background: var(--theme-mantle);
    padding: 20px;
    border-right: 2px solid var(--theme-surface0);
    display: flex;
    flex-direction: column;
}

.sidebar h3 {
    color: var(--theme-accent2);
    margin-bottom: 20px;
    font-size: 1.2em;
}

.sidebar .date-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.date-link {
    display: flex;
    flex-direction: column;
    padding: 12px;
    background: var(--theme-base);
    border-radius: 8px;
    text-decoration: none;
    color: var(--theme-text);
    border: 2px solid var(--theme-surface0);
    transition: all 0.3s;
}

.date-link:hover {
    border-color: var(--theme-accent);
    background: var(--theme-surface0);
    transform: translateX(5px);
}

.date-link.active {
    background: var(--theme-accent);
    color: var(--theme-base);
    border-color: var(--theme-accent);
}

.date-link .day-name {
    font-weight: bold;
    font-size: 1.1em;
}

.date-link .date-num {
    font-size: 0.9em;
    opacity: 0.8;
}

.archive-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid var(--theme-surface0);
}

.archive-section summary {
    cursor: pointer;
    padding: 10px;
    background: var(--theme-surface0);
    border-radius: 8px;
    margin-bottom: 10px;
    font-weight: bold;
    color: var(--theme-text);
    transition: background 0.3s;
}

.archive-section summary:hover {
    background: var(--theme-surface1);
}

.archive-section[open] summary {
    margin-bottom: 15px;
}

.date-link.archived {
    opacity: 0.7;
    border-color: var(--theme-surface1);
}

.date-link.archived:hover {
    opacity: 1;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

header {
    background: linear-gradient(135deg, var(--theme-header-from) 0%, var(--theme-header-to) 100%);
    color: var(--theme-base);
    padding: 30px;
    text-align: center;
    position: relative;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

header h2 {
    font-size: 1.5em;
    opacity: 0.9;
}

/* Settings Menu */
.settings-menu {
    position: absolute;
    top: 15px;
    right: 15px;
}

.settings-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    color: var(--theme-base);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(30deg);
}

.settings-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--theme-base);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    min-width: 220px;
    z-index: 1000;
    overflow: hidden;
}

.settings-dropdown.show {
    display: block;
}

.settings-section {
    padding: 15px;
}

.settings-section-title {
    font-weight: bold;
    color: var(--theme-text);
    margin-bottom: 12px;
    font-size: 1.1em;
}

.theme-group {
    margin-bottom: 12px;
}

.theme-group-label {
    font-size: 0.8em;
    color: var(--theme-subtext0);
    margin-bottom: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.theme-option {
    display: block;
    width: 100%;
    padding: 8px 12px;
    margin-bottom: 4px;
    background: var(--theme-surface0);
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    color: var(--theme-text);
    font-size: 0.9em;
    text-align: left;
    transition: all 0.2s;
}

.theme-option:hover {
    background: var(--theme-surface1);
    border-color: var(--theme-accent);
}

.theme-option.active {
    background: var(--theme-accent);
    color: var(--theme-base);
    border-color: var(--theme-accent);
}

.weather-info {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    padding-left: 15px;
}

.weather-mini-icon {
    width: 24px;
    height: 24px;
}

.weather-mini-temp {
    font-size: 0.85em;
    color: var(--theme-accent2);
    font-weight: 600;
}

.sidebar .print-btn {
    display: block;
    margin-top: 20px;
    margin-bottom: 30px;
    padding: 12px 20px;
    background: var(--theme-surface1);
    color: var(--theme-accent2);
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    text-align: center;
    transition: all 0.3s;
    border: 2px solid var(--theme-accent2);
}

.sidebar .print-btn:hover {
    background: var(--theme-accent2);
    color: var(--theme-base);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.schedule {
    padding: 30px;
}

.schedule-item {
    display: flex;
    margin-bottom: 25px;
    padding: 20px;
    background: var(--theme-mantle);
    border-radius: 10px;
    border-left: 5px solid var(--theme-accent);
    transition: transform 0.2s, box-shadow 0.2s;
}

.schedule-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    background: var(--theme-crust);
}

.time {
    width: 150px;
    flex-shrink: 0;
    padding-right: 20px;
}

.time-text {
    font-weight: bold;
    font-size: 1.1em;
    color: var(--theme-accent2);
}

.activity {
    flex: 1;
}

.activity h3 {
    font-size: 1.3em;
    color: var(--theme-text);
    margin-bottom: 8px;
}

.activity .description {
    color: var(--theme-subtext0);
    margin-bottom: 10px;
    font-style: italic;
}

.activity ul {
    margin-left: 25px;
    margin-top: 10px;
}

.activity li {
    margin-bottom: 5px;
    color: var(--theme-subtext1);
}

.links {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.schedule-link {
    display: inline-block;
    padding: 8px 14px;
    background: var(--theme-accent2);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.95em;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.schedule-link:hover {
    background: var(--theme-accent3);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

footer {
    background: var(--theme-surface0);
    color: var(--theme-text);
    text-align: center;
    padding: 20px;
    font-size: 1.2em;
    border-top: 2px solid var(--theme-surface1);
}

/* Responsive design */
@media (max-width: 768px) {
    .container-with-sidebar {
        flex-direction: column;
        margin: 0;
        border-radius: 0;
    }
    
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 2px solid var(--border-color);
        max-height: 200px;
        overflow-y: auto;
    }
    
    .sidebar .date-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .date-link {
        width: calc(50% - 5px);
    }
    
    header h1 {
        font-size: 1.8em;
    }
    
    .schedule-item {
        flex-direction: column;
    }
    
    .time {
        width: 100%;
        margin-bottom: 10px;
        padding-right: 0;
    }
}

@media print {
    body {
        background: white;
        padding: 0;
    }
    
    .container {
        box-shadow: none;
        border-radius: 0;
    }
    
    .date-nav {
        display: none;
    }
    
    footer {
        display: none;
    }
}