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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    touch-action: manipulation;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.swipe-guard {
    position: fixed;
    top: 0; left: 0;
    width: 30px;
    height: 100%;
    z-index: 9999;
}

body {
    display: flex;
    flex-direction: column;
    transition: background 0.8s ease;
}

body.weather-default {
    background: linear-gradient(180deg, #87ceeb 0%, #e0f7fa 100%);
}

body.weather-sun {
    background: linear-gradient(180deg, #ffd54f 0%, #ff9800 50%, #ffeb3b 100%);
}

body.weather-rain {
    background: linear-gradient(180deg, #37474f 0%, #546e7a 50%, #78909c 100%);
}

body.weather-snow {
    background: linear-gradient(180deg, #e3f2fd 0%, #bbdefb 50%, #90caf9 100%);
}

body.weather-storm {
    background: linear-gradient(180deg, #263238 0%, #37474f 50%, #455a64 100%);
}

body.weather-rainbow {
    background: linear-gradient(180deg, #f44336 0%, #ff9800 16%, #ffeb3b 33%, #4caf50 50%, #2196f3 66%, #9c27b0 83%, #e91e63 100%);
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(5px);
    z-index: 100;
}

.back-btn, .fullscreen-btn {
    font-size: 28px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    min-width: 48px;
    min-height: 48px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

h1 {
    font-size: 24px;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    text-align: center;
    flex: 1;
}

main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
}

.scene {
    text-align: center;
}

.scene-emoji {
    font-size: 140px;
    transition: transform 0.3s ease;
    filter: drop-shadow(4px 4px 8px rgba(0,0,0,0.2));
}

.scene-emoji.pop {
    animation: emojiPop 0.4s ease;
}

@keyframes emojiPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.scene-label {
    font-size: 32px;
    font-weight: 900;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin-top: 16px;
    opacity: 0.9;
}

.weather-buttons {
    display: flex;
    gap: 8px;
    padding: 10px 8px;
    justify-content: center;
    background: rgba(0,0,0,0.1);
    backdrop-filter: blur(5px);
    z-index: 100;
}

.weather-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    padding: 10px 8px 6px;
    border-radius: 16px;
    border: 3px solid rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.25);
    color: #fff;
    cursor: pointer;
    transition: transform 0.1s ease, background 0.2s ease;
    user-select: none;
    min-width: 64px;
    min-height: 72px;
}

.weather-btn span {
    font-size: 12px;
    font-weight: 700;
    margin-top: 2px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.weather-btn:active {
    transform: scale(0.9);
    background: rgba(255,255,255,0.5);
}

.weather-btn.active {
    background: rgba(255,255,255,0.5);
    border-color: rgba(255,255,255,0.8);
}

/* Particles */
.particles {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50;
    overflow: hidden;
}

/* Rain drops */
.rain-drop {
    position: absolute;
    width: 3px;
    height: 20px;
    background: linear-gradient(180deg, transparent, rgba(174, 213, 240, 0.8));
    border-radius: 2px;
    animation: rainFall linear infinite;
}

@keyframes rainFall {
    0% { transform: translateY(-20px); opacity: 1; }
    100% { transform: translateY(110vh); opacity: 0.3; }
}

/* Snowflakes */
.snowflake {
    position: absolute;
    color: #fff;
    font-size: 20px;
    animation: snowDrift linear infinite;
    text-shadow: 0 0 4px rgba(255,255,255,0.5);
}

@keyframes snowDrift {
    0% { transform: translateY(-20px) translateX(0) rotate(0deg); opacity: 0.9; }
    25% { transform: translateY(25vh) translateX(20px) rotate(90deg); opacity: 1; }
    50% { transform: translateY(50vh) translateX(-15px) rotate(180deg); opacity: 0.9; }
    75% { transform: translateY(75vh) translateX(25px) rotate(270deg); opacity: 0.8; }
    100% { transform: translateY(110vh) translateX(5px) rotate(360deg); opacity: 0.2; }
}

/* Sun rays */
.sun-ray {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 4px;
    background: linear-gradient(90deg, transparent, rgba(255,235,59,0.5), transparent);
    transform-origin: center;
    animation: sunPulse 3s ease-in-out infinite;
    border-radius: 2px;
}

@keyframes sunPulse {
    0%, 100% { opacity: 0.3; transform: translate(-50%, -50%) scaleX(0.8); }
    50% { opacity: 0.6; transform: translate(-50%, -50%) scaleX(1.2); }
}

/* Lightning */
.lightning {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    z-index: 200;
    pointer-events: none;
    animation: lightningFlash 0.15s ease-out forwards;
}

@keyframes lightningFlash {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

/* Rainbow glow */
.rainbow-sparkle {
    position: absolute;
    font-size: 24px;
    animation: sparkleFloat 2s ease-out forwards;
    pointer-events: none;
}

@keyframes sparkleFloat {
    0% { transform: translateY(0) scale(1); opacity: 1; }
    100% { transform: translateY(-60px) scale(0.3); opacity: 0; }
}