@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&family=VT323&display=swap');
body { font-family: 'Nunito', sans-serif; }

:root {
    --bg-primary: 253 251 247; --bg-secondary: 255 255 255; --bg-tertiary: 243 240 235; --bg-nav: 253 251 247;
    --text-primary: 60 55 50; --text-secondary: 90 85 80; --text-tertiary: 120 115 110; --text-headings: 45 40 35;
    --border-primary: 220 215 210; --border-secondary: 235 230 225;
    --glassy-bg: 255 255 255 / 0.6; --glassy-border: 255 255 255 / 0.8;
    --glassy-card-bg: 255 255 255 / 0.7; --glassy-card-hover-bg: 255 255 255 / 0.9; --glassy-card-border: 230 225 220 / 0.8;
    --shadow-soft: 0 10px 30px -10px rgba(90, 80, 70, 0.08);
    --accent-color: #3b82f6;
    --border-radius-main: 1.25rem;
}

html.dark {
    --bg-primary: 22 24 35; --bg-secondary: 30 33 48; --bg-tertiary: 45 48 65; --bg-nav: 22 24 35;
    --text-primary: 220 225 235; --text-secondary: 170 180 200; --text-tertiary: 120 130 150; --text-headings: 240 245 255;
    --border-primary: 60 65 85; --border-secondary: 45 50 70;
    --glassy-bg: 30 33 48 / 0.6; --glassy-border: 255 255 255 / 0.1;
    --glassy-card-bg: 35 38 55 / 0.6; --glassy-card-hover-bg: 45 48 65 / 0.8; --glassy-card-border: 255 255 255 / 0.15;
    --shadow-soft: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
}

html.theme-blue {
    --bg-primary: 3 7 18; --bg-secondary: 15 23 42; --bg-tertiary: 30 41 59; --bg-nav: 3 7 18;
    --text-primary: 224 242 254; --text-secondary: 186 230 253; --text-tertiary: 125 211 252; --text-headings: 204 251 241;
    --border-primary: 56 189 248; --border-secondary: 14 165 233;
    --glassy-bg: 15 23 42 / 0.7; --glassy-border: 56 189 248 / 0.3;
    --glassy-card-bg: 15 23 42 / 0.4; --glassy-card-hover-bg: 23 37 84 / 0.6; --glassy-card-border: 56 189 248 / 0.4;
    --accent-color: #2dd4bf; --shadow-soft: 0 0 20px rgba(45, 212, 191, 0.15);
}

html.theme-stardew {
    --bg-primary: #E3F2FD; --bg-secondary: #1D3658; --bg-tertiary: #B3D9FF; --bg-nav: #FF9800;
    --text-primary: #3d2e23; --text-secondary: #5d4037; --text-tertiary: #1D3658; --text-headings: #1a237e;
    --border-primary: #FFD54F; --border-secondary: #1D3658;
    --glassy-bg: 255 255 255 / 0.6; --glassy-border: 255 255 255 / 0.9;
    --glassy-card-bg: rgba(255, 255, 255, 0.9); --glassy-card-hover-bg: 255 255 255 / 1;
    --glassy-card-border: 4px solid #1D3658; --shadow-soft: 6px 6px 0px rgba(29, 54, 88, 0.4);
    --accent-color: #0277BD; --border-radius-main: 4px;
}

html.theme-stardew body {
    font-family: 'VT323', monospace; font-size: 1.25rem;
    background-color: #E3F2FD;
    background-image: linear-gradient(rgba(255, 255, 255, 0.5) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.5) 1px, transparent 1px);
    background-size: 20px 20px;
}

html.theme-stardew .glassy-card, html.theme-stardew .timeline-content, html.theme-stardew .floating-nav {
    border: 2px solid #90CAF9; border-radius: 8px; box-shadow: 4px 4px 0px rgba(144, 202, 249, 0.8); backdrop-filter: blur(6px);
}
html.theme-stardew .floating-nav {
    background: linear-gradient(180deg, #8D6E63 0%, #6D4C41 50%, #5D4037 100%) !important;
    border: 4px solid #3E2723 !important; box-shadow: 0 6px 0 #3E2723 !important; border-radius: 4px;
}
html.theme-stardew .floating-nav a { color: #FFECB3 !important; text-shadow: 2px 2px 0px #3E2723; }
html.theme-stardew .floating-nav a:hover, html.theme-stardew .floating-nav a.text-blue-600 { color: #FFD54F !important; }
html.theme-stardew .timeline-content {
    background-color: #E3F2FD; border: 3px solid #1565C0; box-shadow: inset 0 0 0 2px #90CAF9, 4px 4px 0px rgba(21, 101, 192, 0.4); border-radius: 0px;
}
html.theme-stardew .timeline-icon {
    background-color: #FFD54F; border: 3px solid #3E2723; color: #3E2723; box-shadow: 2px 2px 0px rgba(0,0,0,0.3);
}

body { background-color: rgb(var(--bg-primary)); color: rgb(var(--text-secondary)); transition: all 0.5s ease; }
.gradient-text { background: linear-gradient(90deg, var(--accent-color), #10b981); -webkit-background-clip: text; background-clip: text; color: transparent; }

.floating-nav {
    background-color: rgba(var(--bg-nav), 0.85); backdrop-filter: blur(12px);
    border: 1px solid rgba(var(--border-primary), 0.4); box-shadow: var(--shadow-soft); border-radius: var(--border-radius-main);
}

.glassy-card { 
    background: rgba(var(--glassy-card-bg)); backdrop-filter: blur(12px);
    border: 1px solid rgba(var(--glassy-card-border)); border-radius: var(--border-radius-main); 
    transition: all 0.3s ease; box-shadow: var(--shadow-soft);
}
.glassy-card:hover { transform: translateY(-4px); background: rgba(var(--glassy-card-hover-bg)); }

.timeline-container { position: relative; padding-left: 2.5rem; }
.timeline-container::before { content: ''; position: absolute; left: 1.25rem; top: 0.5rem; bottom: 0.5rem; width: 3px; background-color: rgba(var(--border-primary), 0.5); border-radius: 2px; }
.timeline-item { position: relative; margin-bottom: 1.5rem; }
.timeline-icon { 
    position: absolute; left: -2.5rem; top: 0; display: flex; align-items: center; justify-content: center; 
    width: 2.5rem; height: 2.5rem; border-radius: 9999px; 
    background-color: rgb(var(--bg-secondary)); border: 2px solid rgba(var(--border-primary), 1); 
    color: var(--accent-color); z-index: 10; 
}
.timeline-content { 
    background-color: rgba(var(--bg-primary), 0.4); padding: 1rem 1.25rem; 
    border-radius: var(--border-radius-main); border: 1px solid rgba(var(--border-primary), 0.4); 
    transition: transform 0.2s ease-out; 
}
.timeline-content:hover { transform: translateX(5px); background-color: rgba(var(--bg-secondary), 0.6); }

html.theme-blue body { background: linear-gradient(180deg, #0f172a 0%, #1e3a8a 50%, #0891b2 100%); background-attachment: fixed; }
html.theme-blue .floating-nav, html.theme-blue .glassy-card, html.theme-blue .timeline-content {
    backdrop-filter: blur(10px); border: 1px solid rgba(56, 189, 248, 0.3); box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

#snow-container, #bubbles-container { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 9999; display: none; }
.snowflake { position: absolute; top: -10px; color: #fff; font-size: 1em; animation: fall 10s linear infinite; text-shadow: 0 0 3px #87CEEB; }
.bubble { position: absolute; bottom: -20px; background-color: rgba(255, 255, 255, 0.1); border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.3); animation: rise 10s ease-in infinite; }
@keyframes fall { 100% { top: 100%; } }
@keyframes rise { 0% { bottom: -20px; opacity: 0; } 50% { opacity: 1; } 100% { bottom: 110%; opacity: 0; } }

.theme-btn.active { background-color: var(--accent-color); color: white; }