:root {
    --font-main: 'SF Pro Display', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-main: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.6);
    --accent-glow: rgba(255, 255, 255, 0.8);
}

/* --- TEMA --- */
.theme-aurora-blue { background: linear-gradient(135deg, #0f2027, #203a43, #2c5364); }
.theme-sunset-glow { background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 99%, #fecfef 100%); --text-main: #333; --glass-bg: rgba(255,255,255,0.4); }
.theme-forest-mist { background: linear-gradient(135deg, #134e5e, #71b280); }
.theme-cyber-neon { background: linear-gradient(135deg, #0f0c29, #302b63, #24243e); --accent-glow: #00ffcc; }
.theme-pure-minimal { background: linear-gradient(135deg, #e0e0e0, #ffffff); --text-main: #222; --glass-bg: rgba(0,0,0,0.05); --glass-border: rgba(0,0,0,0.1); }

/* --- GLOBALT --- */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

body {
    font-family: var(--font-main);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden; /* Förhindra scroll */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* --- BAKGRUND ANIMATION --- */
.ambient-bg {
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.1), transparent 60%),
                radial-gradient(circle at 80% 20%, rgba(255,255,255,0.15), transparent 40%);
    animation: rotateBg 30s linear infinite;
    z-index: -1;
}

@keyframes rotateBg { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* --- APP LAYOUT --- */
#app {
    width: 94%;
    max-width: 500px;
    height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px 0;
}

/* --- GLAS-TEKNIK --- */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 35px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* --- KLOCKA --- */
.clock-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px 20px;
    position: relative;
}

.date-display {
    font-size: clamp(0.9rem, 4vw, 1.2rem);
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.time-wrapper {
    display: flex;
    align-items: baseline;
    font-size: clamp(4.5rem, 20vw, 7rem);
    font-weight: 700;
    letter-spacing: -3px;
    line-height: 1;
}

.digit-group { transition: transform 0.2s ease; }
.colon { margin: 0 5px; opacity: 0.5; animation: blink 1s infinite; }

@keyframes blink { 50% { opacity: 0.2; } }

/* --- BINÄR KLOCKA (Pärlor) --- */
.binary-strip {
    display: flex;
    gap: 8px;
    margin-top: 30px;
    padding: 10px 20px;
    background: rgba(0,0,0,0.1);
    border-radius: 50px;
}

.bit-dot {
    width: 14px; height: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bit-dot.active {
    background: var(--accent-glow);
    box-shadow: 0 0 15px var(--accent-glow), inset 0 0 5px rgba(255,255,255,0.8);
    transform: scale(1.2);
}

/* --- INFO PANEL (Väder/Namn) --- */
.info-panel {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.weather-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 15px;
}

.temp-wrapper { font-size: 2.5rem; font-weight: 600; }
.weather-icon { width: 48px; height: 48px; filter: drop-shadow(0 0 5px rgba(255,255,255,0.3)); }

.forecast-row {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.forecast-item { text-align: center; font-size: 0.8rem; color: var(--text-muted); }
.forecast-item img { width: 24px; height: 24px; display: block; margin: 5px auto; }

/* --- NAMNSDAGAR --- */
.name-day-section {
    text-align: center;
    padding-top: 10px;
}
.name-day-section.hidden { display: none; }
.label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 2px; opacity: 0.6; display: block; margin-bottom: 4px;}
.names-text { font-weight: 600; font-size: 1.1rem; color: var(--text-main); }

/* --- TEMA KNAPP --- */
.glass-fab {
    position: fixed;
    bottom: 30px; right: 20px;
    width: 50px; height: 50px;
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.2s;
}
.glass-fab:active { transform: scale(0.9); }

/* Animationer */
.fade-in { animation: fadeIn 0.5s ease-out forwards; opacity: 0; }
@keyframes fadeIn { to { opacity: 1; } }
