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

body {
    overflow: hidden;
    background: #0a0a1a;
    font-family: 'Chakra Petch', sans-serif;
    color: #e0e0ff;
}

#scene-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

#scene-container canvas {
    display: block;
}

#hud {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

#hud > * {
    pointer-events: auto;
}

/* Search Bar */
#search-bar {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0;
    z-index: 20;
}

#search-input {
    width: 280px;
    padding: 12px 18px;
    background: rgba(12, 12, 36, 0.85);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-right: none;
    border-radius: 12px 0 0 12px;
    color: #e0e0ff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    outline: none;
    backdrop-filter: blur(12px);
    transition: border-color 0.3s, box-shadow 0.3s;
}

#search-input:focus {
    border-color: rgba(0, 212, 255, 0.7);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.15);
}

#search-input::placeholder {
    color: rgba(160, 170, 200, 0.5);
}

#search-btn {
    padding: 12px 18px;
    background: rgba(0, 212, 255, 0.15);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-left: none;
    border-radius: 0 12px 12px 0;
    color: #00d4ff;
    font-size: 18px;
    cursor: pointer;
    backdrop-filter: blur(12px);
    transition: background 0.3s, box-shadow 0.3s;
}

#search-btn:hover {
    background: rgba(0, 212, 255, 0.3);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
}

/* Loading */
#loading {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: rgba(12, 12, 36, 0.85);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: #00d4ff;
    backdrop-filter: blur(12px);
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0, 212, 255, 0.2);
    border-top-color: #00d4ff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Time Indicator */
#time-indicator {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(12, 12, 36, 0.85);
    border: 1px solid rgba(0, 212, 255, 0.25);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    backdrop-filter: blur(12px);
}

#time-icon {
    font-size: 20px;
}

/* Weather Panel */
#weather-panel {
    position: absolute;
    bottom: 100px;
    left: 20px;
    padding: 20px 24px;
    background: rgba(12, 12, 36, 0.88);
    border: 1px solid rgba(0, 212, 255, 0.25);
    border-radius: 14px;
    min-width: 220px;
    backdrop-filter: blur(14px);
    transition: opacity 0.5s, transform 0.5s;
}

#city-name {
    font-size: 13px;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(0, 212, 255, 0.7);
    margin-bottom: 4px;
}

#temperature {
    font-size: 52px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
    background: linear-gradient(135deg, #fff, #00d4ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#condition-text {
    font-size: 15px;
    color: rgba(200, 210, 240, 0.8);
    margin-bottom: 14px;
}

.weather-stats {
    display: flex;
    gap: 20px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: rgba(180, 190, 220, 0.8);
}

.stat-icon {
    font-size: 15px;
}

/* Forecast Bar */
#forecast-bar {
    position: absolute;
    bottom: 16px;
    left: 0;
    right: 0;
    padding: 0 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

#forecast-bar::-webkit-scrollbar {
    height: 4px;
}

#forecast-bar::-webkit-scrollbar-track {
    background: transparent;
}

#forecast-bar::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.3);
    border-radius: 2px;
}

#forecast-cards {
    display: flex;
    gap: 8px;
    padding-bottom: 4px;
}

.forecast-card {
    flex-shrink: 0;
    padding: 10px 14px;
    background: rgba(12, 12, 36, 0.85);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.3s, transform 0.2s, background 0.3s;
    backdrop-filter: blur(10px);
    min-width: 110px;
    text-align: center;
}

.forecast-card:hover {
    border-color: rgba(0, 212, 255, 0.5);
    transform: translateY(-2px);
}

.forecast-card.active {
    border-color: #00d4ff;
    background: rgba(0, 212, 255, 0.1);
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.15);
}

.fc-period {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(0, 212, 255, 0.6);
    margin-bottom: 4px;
}

.fc-emoji {
    font-size: 22px;
    margin-bottom: 2px;
}

.fc-temp {
    font-family: 'JetBrains Mono', monospace;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.fc-desc {
    font-size: 10px;
    color: rgba(180, 190, 220, 0.6);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
}

/* Footer */
#footer {
    position: absolute;
    bottom: 2px;
    right: 16px;
    z-index: 5;
}

#footer a {
    color: rgba(0, 212, 255, 0.3);
    text-decoration: none;
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    transition: color 0.3s;
}

#footer a:hover {
    color: rgba(0, 212, 255, 0.6);
}

.hidden {
    display: none !important;
}

/* Mobile */
@media (max-width: 640px) {
    #search-input {
        width: 200px;
        font-size: 13px;
        padding: 10px 14px;
    }

    #search-btn {
        padding: 10px 14px;
    }

    #weather-panel {
        bottom: 90px;
        left: 12px;
        padding: 14px 18px;
        min-width: 180px;
    }

    #temperature {
        font-size: 40px;
    }

    #time-indicator {
        top: 20px;
        right: 12px;
        padding: 8px 12px;
        font-size: 12px;
    }

    #forecast-bar {
        padding: 0 12px;
        bottom: 12px;
    }

    .forecast-card {
        min-width: 90px;
        padding: 8px 10px;
    }
}