:root {
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --bg-overlay: rgba(10, 10, 10, 0.2);
    --bg-blur: blur(20px);
    --font-main: 'Inter', sans-serif;
}

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

body {
    background-color: #000;
    color: var(--text-primary);
    font-family: var(--font-main);
    height: 100vh;
    overflow: hidden;
    /* Disable text selection for app feel */
    user-select: none;
    -webkit-user-select: none;
}

/* 3D Canvas Background */
#canvas-container {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
}

/* UI Overlay */
#ui-layer {
    position: absolute;
    inset: 0;
    z-index: 10;
    pointer-events: none;
    /* Let clicks pass through to 3D scene */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px;
}

/* Weather Widget Panel */
.weather-widget {
    background: var(--bg-overlay);
    backdrop-filter: var(--bg-blur);
    -webkit-backdrop-filter: var(--bg-blur);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 32px;
    width: 320px;
    /* Re-enable pointer events if we want buttons inside */
    pointer-events: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.widget-title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1;
}

.widget-subtitle {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 2px;
    margin-top: 4px;
    margin-bottom: 24px;
}

.weather-data {
    margin-bottom: 24px;
}

.data-main {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.temp-text {
    font-size: 64px;
    font-weight: 300;
    line-height: 1;
    letter-spacing: -0.05em;
}

.condition-icon {
    font-size: 48px;
}

.data-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

.detail-val {
    font-size: 14px;
    font-weight: 500;
}

/* Footer Indicator */
.widget-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-top: 8px;
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #00ff88;
}

.dot {
    width: 6px;
    height: 6px;
    background-color: #00ff88;
    border-radius: 50%;
    animation: pulse 2s infinite ease-out;
}

@keyframes pulse {
    0% {
        transform: scale(0.8);
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.7);
    }

    70% {
        transform: scale(1);
        opacity: 0.8;
        box-shadow: 0 0 0 6px rgba(0, 255, 136, 0);
    }

    100% {
        transform: scale(0.8);
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(0, 255, 136, 0);
    }
}

/* Mouse Hint */
.interaction-hint {
    align-self: flex-end;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--text-secondary);
    background: var(--bg-overlay);
    backdrop-filter: var(--bg-blur);
    padding: 12px 20px;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mouse-icon {
    width: 16px;
    height: 16px;
    animation: mouseFloat 2s infinite ease-in-out;
}

@keyframes mouseFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}

/* Render Mode Hamburger Menu */
.menu-container {
    position: absolute;
    top: 40px;
    right: 40px;
    z-index: 20;
    pointer-events: auto;
}

.menu-button {
    background: var(--bg-overlay);
    backdrop-filter: var(--bg-blur);
    -webkit-backdrop-filter: var(--bg-blur);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 14px 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.menu-button:hover {
    background: rgba(255, 255, 255, 0.15);
}

.hamburger-line {
    width: 20px;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-dropdown {
    position: absolute;
    top: 60px;
    right: 0;
    background: rgba(10, 10, 10, 0.4);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 8px 0;
    min-width: 220px;
    display: none;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.menu-dropdown.active {
    display: block;
    animation: fadeIn 0.15s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.menu-item {
    padding: 14px 24px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.menu-item.selected {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
    border-left-color: #00ccff;
}

/* Fullscreen Loading Overlay */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    transition: opacity 1s ease-out, visibility 1s ease-out;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid #00ff88;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.5);
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-text {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 4px;
    color: var(--text-primary);
    animation: pulseText 2s infinite ease-in-out;
}

@keyframes pulseText {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Responsive */
@media (max-width: 768px) {
    #ui-layer {
        padding: 24px;
    }

    .weather-widget {
        width: 100%;
        max-width: 320px;
    }

    .interaction-hint {
        align-self: center;
    }
}