:root {
    --bg: #080202;
    --accent: #E11D48;
    --white: #ffffff;
    --glass: rgba(255, 255, 255, 0.03);
    --glass-heavy: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.12);
    --font: 'Outfit', sans-serif;
}

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

body {
    font-family: var(--font);
    color: var(--white);
    background: var(--bg);
    min-height: 100vh;
}

/* --- Common Effects --- */
.aurora-container { position: fixed; inset: 0; z-index: -2; background: #080202; transition: background 1.5s ease; }
.aurora-orb { position: absolute; filter: blur(140px); border-radius: 50%; opacity: 0.25; transition: 2s ease; }

.theme-sunny .aurora-1 { width: 900px; height: 900px; background: #9f1239; top: -30%; left: -20%; animation: pulse 15s infinite alternate; }
.theme-sunny .aurora-2 { width: 700px; height: 700px; background: #4c0519; bottom: -10%; right: -10%; animation: pulse 20s infinite alternate-reverse; }
.theme-sunny .aurora-3 { width: 500px; height: 500px; background: #e11d48; top: 30%; left: 30%; animation: pulse 12s infinite; }

.theme-rainy .aurora-1 { width: 900px; height: 900px; background: #4c0519; top: -10%; left: -10%; }
.theme-rainy .aurora-2 { width: 700px; height: 700px; background: #1e1b4b; bottom: -10%; right: -10%; }
.theme-rainy .aurora-3 { width: 500px; height: 500px; background: #881337; top: 30%; left: 30%; }

/* Snowy Theme (Icy White/Silver) */
.theme-snowy .aurora-1 { width: 900px; height: 900px; background: #f8fafc; top: -10%; left: -10%; opacity: 0.15; }
.theme-snowy .aurora-2 { width: 700px; height: 700px; background: #cbd5e1; bottom: -10%; right: -10%; opacity: 0.15; }
.theme-snowy .aurora-3 { width: 500px; height: 500px; background: #e11d48; top: 30%; left: 30%; opacity: 0.1; }

/* Cloudy Theme (Muted Gray/Red) */
.theme-cloudy .aurora-1 { width: 900px; height: 900px; background: #334155; top: -10%; left: -10%; }
.theme-cloudy .aurora-2 { width: 700px; height: 700px; background: #4c0519; bottom: -10%; right: -10%; }
.theme-cloudy .aurora-3 { width: 500px; height: 500px; background: #94a3b8; top: 30%; left: 30%; }

@keyframes pulse { from { transform: scale(1); } to { transform: scale(1.1); } }

.noise-overlay { position: fixed; inset: 0; background: url('https://grainy-gradients.vercel.app/noise.svg'); opacity: 0.08; z-index: -1; pointer-events: none; }
.weather-effects { position: fixed; inset: 0; pointer-events: none; z-index: -1; overflow: hidden; }

.particle { position: absolute; background: white; opacity: 0.3; pointer-events: none; }
.particle.rain { background: rgba(255, 255, 255, 0.15); animation: rainDrop linear infinite; }
.particle.snow { border-radius: 50%; animation: snowFall linear infinite; }
@keyframes rainDrop { from { transform: translateY(-100px); } to { transform: translateY(110vh); } }
@keyframes snowFall { 0% { transform: translateY(-100px) translateX(0); } 50% { transform: translateY(50vh) translateX(10px); } 100% { transform: translateY(110vh) translateX(-10px); } }

/* --- SHARED CARD STYLE (Ultra Rounded) --- */
.glass { 
    background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01));
    backdrop-filter: blur(40px); 
    border: 1px solid rgba(255,255,255,0.1); 
    border-radius: 45px; /* Softer corners */
    box-shadow: inset 0 0 20px rgba(255,255,255,0.02);
}

.glass-heavy { 
    background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
    backdrop-filter: blur(50px); 
    border: 1px solid rgba(255,255,255,0.2); 
    border-radius: 50px; 
    box-shadow: 0 20px 50px rgba(0,0,0,0.3), inset 0 0 30px rgba(255,255,255,0.03);
}

/* Thermal States */
.state-frozen .glass, .state-frozen .glass-heavy {
    border-color: rgba(200, 240, 255, 0.8);
    box-shadow: inset 0 0 40px rgba(186, 230, 253, 0.4);
}
.state-frozen .glass::before, .state-frozen .glass-heavy::before {
    content: ''; position: absolute; inset: 0;
    background-image: url('https://www.transparenttextures.com/patterns/frozen-wall.png');
    opacity: 0.2; pointer-events: none; mix-blend-mode: overlay; z-index: 5; border-radius: inherit;
}

/* --- DESKTOP VIEW --- */
@media (min-width: 769px) {
    .mobile-only { display: none; }
    body { height: 100vh; overflow: hidden; }
    
    .hub-container { position: relative; width: 100vw; height: 100vh; perspective: 1500px; overflow: hidden; }
    .desktop-scene { position: relative; width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; overflow: hidden; }

    .float-island { position: absolute; padding: 40px; transition: 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }
    
    .profile-card { top: 6%; left: 6%; width: 400px; }
    .profile-header-main { display: flex; align-items: center; gap: 25px; }
    .avatar-desktop { width: 80px; height: 80px; border-radius: 25px; object-fit: cover; border: 2px solid rgba(255,255,255,0.2); }

    .hero-stage { width: 65%; max-width: 1100px; z-index: 2; }
    .main-visual { width: 100%; aspect-ratio: 16/9; position: relative; overflow: hidden; box-shadow: 0 40px 100px rgba(0,0,0,0.6); }
    .main-visual img { width: 100%; height: 100%; object-fit: cover; }
    .visual-overlay { position: absolute; bottom: 0; left: 0; padding: 80px; width: 100%; background: linear-gradient(to top, rgba(0,0,0,0.9), transparent); }
    .visual-overlay h2 { font-size: 4rem; font-weight: 800; line-height: 1; text-shadow: 0 10px 30px rgba(0,0,0,0.5); }

    .weather-card { top: 6%; right: 6%; width: 280px; text-align: center; }
    .weather-row { display: flex; align-items: center; justify-content: center; gap: 20px; margin-bottom: 15px; }
    .weather-icon img { width: 60px; }
    .temp { font-size: 2.5rem; font-weight: 800; }
    .digital-clock { font-size: 3rem; font-weight: 200; letter-spacing: -2px; }

    .music-card { bottom: 6%; left: 6%; width: 450px; }
    .side-menu { bottom: 6%; right: 6%; display: flex; flex-direction: column; gap: 20px; padding: 30px 50px; }
    .menu-item { color: white; text-decoration: none; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 5px; opacity: 0.4; transition: 0.4s; }
    .menu-item:hover { opacity: 1; transform: translateX(-15px); text-shadow: 0 0 20px var(--accent); }
}

/* --- MOBILE VIEW --- */
@media (max-width: 768px) {
    .desktop-only { display: none; }
    .mobile-hub-wrapper { 
        height: 100vh; 
        display: flex; 
        flex-direction: column; 
        padding: 20px 20px 130px; 
        overflow: hidden; 
    }
    
    .hub-header { 
        display: flex; 
        justify-content: space-between; 
        align-items: center; 
        margin-bottom: 20px; 
        flex-shrink: 0;
    }
    .header-info h1 { font-size: 1.4rem; }
    .header-avatar { width: 50px; height: 50px; border-radius: 15px; border: 1px solid rgba(255,255,255,0.2); overflow: hidden; }
    .header-avatar img { width: 100%; height: 100%; object-fit: cover; }

    .bento-grid { 
        display: grid; 
        grid-template-columns: repeat(2, 1fr); 
        grid-template-rows: repeat(4, 1fr);
        gap: 12px; 
        flex: 1;
        overflow: hidden;
    }
    .bento-item { 
        padding: 20px; 
        display: flex; 
        flex-direction: column; 
        justify-content: center; 
        align-items: center;
        text-align: center;
        text-decoration: none; 
        color: white; 
        position: relative; 
        overflow: hidden; 
        border-radius: 35px; 
    }
    
    .hero-card { grid-column: span 2; grid-row: span 2; padding: 0; display: block; }
    .hero-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
    .hero-content { position: relative; z-index: 1; padding: 25px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; text-align: left; background: linear-gradient(to top, rgba(0,0,0,0.85), transparent); }
    .hero-content h2 { font-size: 1.5rem; font-weight: 800; line-height: 1.1; }

    .weather-visual { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
    .weather-visual .temp { font-size: 1.6rem; font-weight: 800; }
    .weather-icon img { width: 40px; height: 40px; }
    .clock-bento #digitalClock { font-size: 1.8rem; font-weight: 300; margin-bottom: 5px; }

    .music-header { margin-bottom: 5px; }
    .music-waves { display: flex; align-items: flex-end; gap: 4px; height: 25px; margin-bottom: 5px; }
    .music-waves span { width: 4px; background: #1DB954; border-radius: 10px; animation: wave 1s infinite alternate; }

    .link-bento img { width: 35px; margin-bottom: 5px; }
    .bento-label { font-size: 0.65rem; font-weight: 700; opacity: 0.4; text-transform: uppercase; letter-spacing: 1px; }

    /* Modern Dynamic Nav */
    .dynamic-island-nav { 
        position: fixed; 
        bottom: 15px; 
        left: 50%; 
        transform: translateX(-50%); 
        width: 90%; 
        max-width: 400px;
        height: 75px; 
        background: rgba(20, 20, 20, 0.6); 
        backdrop-filter: blur(50px); 
        border: 1px solid rgba(255,255,255,0.15);
        border-radius: 100px; /* Fully rounded */
        display: flex; 
        justify-content: space-around; 
        align-items: center; 
        z-index: 2000; 
        box-shadow: 0 30px 60px rgba(0,0,0,0.5);
    }
    .nav-item { color: white; text-decoration: none; font-size: 0.8rem; font-weight: 700; opacity: 0.3; transition: 0.3s; padding: 12px 20px; }
    .nav-item.active { opacity: 1; background: rgba(255,255,255,0.1); border-radius: 100px; box-shadow: 0 0 20px rgba(255,255,255,0.05); }
}

/* Gallery Page (Separate Tab Feel) */
.gallery-page {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: none; /* Controlled by JS */
    flex-direction: column;
    padding: 30px;
    overflow-y: auto;
    background: var(--bg);
}

.gallery-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
}

.gallery-header h1 {
    font-size: 1.5rem;
    font-weight: 800;
}

.back-btn {
    background: rgba(255,255,255,0.1);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 100px;
    font-weight: 700;
    cursor: pointer;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.gallery-item {
    aspect-ratio: 1/1;
    overflow: hidden;
    border-radius: 35px;
    cursor: pointer;
    transition: 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.gallery-item.expanded {
    position: fixed;
    inset: 20px;
    z-index: 6000;
    aspect-ratio: auto;
    background: rgba(0,0,0,0.9);
}

.gallery-item.expanded img {
    object-fit: contain;
}

