@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-card-bg: 255 255 255 / 0.7; --glassy-card-border: 230 225 220 / 0.8;
    --shadow-soft: 0 10px 30px -10px rgba(90, 80, 70, 0.08);
    --accent-color: #3b82f6;
    --font-main: 'Nunito', sans-serif;
    --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-card-bg: 35 38 55 / 0.6; --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-card-bg: 15 23 42 / 0.4; --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-card-bg: rgba(255, 255, 255, 0.9);
    --glassy-card-border: 4px solid #1D3658;
    --shadow-soft: 6px 6px 0px rgba(29, 54, 88, 0.4);
    
    --accent-color: #0277BD;
    --font-main: 'VT323', monospace;
    --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 h1, html.theme-stardew h2, html.theme-stardew h3 {
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 2px 2px 0px #90CAF9;
}

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 .glassy-card,
html.theme-stardew #mobile-menu {
    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; 
}

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)); 
}

html.theme-blue body {
    background: linear-gradient(180deg, #0f172a 0%, #1e3a8a 50%, #0891b2 100%);
    background-size: 100% 150%;
    background-attachment: fixed;
}
html.theme-blue .floating-nav, html.theme-blue .glassy-card {
    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; font-family: Arial; text-shadow: 0 0 3px rgba(135, 206, 235, 0.8); animation-name: fall, shake; animation-duration: 10s, 3s; animation-timing-function: linear, ease-in-out; animation-iteration-count: infinite, infinite; }
.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-name: rise; animation-timing-function: ease-in; animation-iteration-count: infinite; }
@keyframes fall { 0% { top: -10%; } 100% { top: 100%; } }
@keyframes rise { 0% { bottom: -20px; transform: translateX(0); opacity: 0; } 50% { opacity: 1; } 100% { bottom: 110%; transform: translateX(-20px); opacity: 0; } }
@keyframes shake { 0% { transform: translateX(0px); } 50% { transform: translateX(40px); } 100% { transform: translateX(0px); } }

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