/* style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    background-size: cover;
    background-position: center;
    color: var(--text-primary);
    overflow-x: hidden;
}

/* Theme Backgrounds */
body.theme-aurora {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
}

body.theme-ocean {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #7eb8ff 100%);
}

body.theme-sunset {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 50%, #4facfe 100%);
}

body.theme-forest {
    background: linear-gradient(135deg, #134e5e 0%, #71b280 50%, #9bc53d 100%);
}

body.theme-midnight {
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
}

/* Theme Switcher */
.theme-switcher {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 12px 8px;
    display: flex;
    justify-content: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(15px);
}

.theme-btn {
    padding: 8px 14px;
    border-radius: 20px;
    border: none;
    background: var(--glass-bg);
    color: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.theme-btn.active {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

/* Glass Container */
.glass-container {
    margin: 16px;
    padding: 24px;
    border-radius: 28px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

/* Clock Section */
.clock-section {
    text-align: center;
    padding: 30px 20px;
}

#date-display {
    font-size: clamp(14px, 5vw, 18px);
    color: var(--text-secondary);
    margin-bottom: 16px;
    letter-spacing: 1px;
}

.time-display .large-digit {
    display: inline-block;
    font-size: clamp(32px, 10vw, 72px);
    font-weight: 700;
    line-height: 1;
    margin: 0 4px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.time-display {
    margin-bottom: 24px;
}

/* Binary Clock */
.binary-clock {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 16px 0;
}

.binary-group {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 12px 16px;
    min-width: 80px;
}

.binary-group .label {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

#binary-time {
    display: flex;
    gap: 4px;
    font-family: 'Courier New', monospace;
    font-size: clamp(16px, 5vw, 20px);
    font-weight: bold;
}

.binary-digit {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.4);
    transition: all 0.15s ease;
}

.binary-digit.on {
    background: #4ade80;
    color: #000;
    box-shadow: 0 0 20px rgba(74, 222, 128, 0.6);
}

/* Weather Section */
.weather-section {
    padding: 24px;
}

.weather-section h3 {
    font-size: clamp(16px, 5vw, 20px);
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.today-weather {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    margin-bottom: 16px;
}

.weather-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.weather-info {
    flex: 1;
}

.temp-large {
    font-size: clamp(32px, 8vw, 48px);
    font-weight: 700;
}

.temp-small {
    display: block;
    font-size: clamp(13px, 4vw, 16px);
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Forecast List */
.forecast-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.forecast-item {
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: calc((100% - 6 * 8px) / 7);
    transition: transform 0.2s ease, background 0.3s ease;
}

.forecast-item:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.12);
}

.forecast-day {
    font-size: clamp(12px, 3vw, 14px);
    color: var(--text-secondary);
    min-width: 60px;
}

.forecast-icon {
    font-size: 20px;
}

.forecast-temp {
    font-weight: 700;
    font-size: clamp(13px, 4vw, 16px);
}

/* Animations */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

#seconds .large-digit {
    animation: pulse 2s ease-in-out infinite;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .glass-container {
        margin: 10px;
        padding: 18px;
    }

    .theme-switcher {
        padding: 8px 4px;
    }

    .theme-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
}
