:root {
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.8);
}

body.theme-arctic {
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.8);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    --text-primary: #1a365d;
    --text-secondary: rgba(26, 54, 93, 0.7);
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-primary);
    min-height: 100vh;
    transition: background 0.5s ease;
}

/* Theme Backgrounds */
body.theme-ocean {
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460, #533483);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

body.theme-sunset {
    background: linear-gradient(135deg, #2b1055, #7597de, #ff6a88, #fdcb6e);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

body.theme-forest {
    background: linear-gradient(135deg, #134e5e, #71b280, #0f3443, #2c7a7b);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

body.theme-arctic {
    background: linear-gradient(135deg, #89dfcf, #66d9e8, #3abfe0, #2ba1cc);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

body.theme-ruby {
    background: linear-gradient(135deg, #231557, #443183, #764ba2, #667eea);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.app-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    padding: 20px 15px;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    padding: 25px;
    margin-bottom: 10px;
}

/* Theme Switcher */
.theme-switcher {
    text-align: center;
}

.theme-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
}

.theme-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.theme-btn.active {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
}

/* Clock Card */
.clock-card {
    text-align: center;
}

.main-time {
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: 4px;
    margin: 15px 0;
    text-shadow: 0 0 20px rgba(255,255,255,0.3);
}

#date-display {
    font-size: 1.3rem;
    opacity: var(--text-secondary);
    margin-bottom: 5px;
}

.binary-clock {
    margin-top: 25px;
    text-align: left;
}

.binary-clock h3 {
    text-align: center;
    margin-bottom: 15px;
    font-weight: 300;
    letter-spacing: 2px;
    opacity: var(--text-secondary);
}

.binary-row {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.binary-row .label {
    width: 80px;
    font-size: 0.9rem;
    opacity: var(--text-secondary);
}

.bits {
    display: flex;
    gap: 10px;
}

.bit {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

body.theme-arctic .bit {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.bit.on {
    background: #00d2ff;
    box-shadow: 0 0 12px #00d2ff, 0 0 24px #00d2ff;
    border-color: #fff;
}

.bit.on-min {
    background: #9d4edd;
    box-shadow: 0 0 12px #9d4edd, 0 0 24px #9d4edd;
    border-color: #fff;
}

.bit.on-sec {
    background: #ff6b6b;
    box-shadow: 0 0 12px #ff6b6b, 0 0 24px #ff6b6b;
    border-color: #fff;
}

/* Weather Card */
.weather-card h2 {
    margin-top: 0;
    text-align: center;
}

.current-temp {
    font-size: 3rem;
    font-weight: 700;
}

.forecast-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}

.forecast-day {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 12px 10px;
    text-align: center;
    min-width: 85px;
    border: 1px solid var(--glass-border);
}

body.theme-arctic .forecast-day {
    background: rgba(255, 255, 255, 0.4);
}

.forecast-day .day-name {
    font-size: 0.85rem;
    opacity: var(--text-secondary);
    margin-bottom: 6px;
}

.forecast-day .temp {
    font-size: 1rem;
    font-weight: 600;
}

/* Name Day Card */
.name-day-card {
    text-align: center;
}

.name-day-card h3 {
    margin-top: 0;
    opacity: var(--text-secondary);
    font-weight: 300;
    letter-spacing: 1px;
}

#name-day-display {
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 10px;
}

.name-day-card .no-name {
    opacity: 0.5;
    font-style: italic;
    font-weight: 300;
}
