:root {
    --primary-color: #00A3FF;
    /* Vivid Blue for accents */
    --secondary-color: #536dfe;
    /* Deep Blue */
    --bg-color: #F0F4F8;
    /* Very light blue-greyish white for snow feel */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.5);
    --text-main: #2c3e50;
    --text-muted: #64748b;
    --shadow-soft: 0 8px 32px 0 rgba(31, 38, 135, 0.1);

    --snow-white: #ffffff;
    --snow-blue: #e3f2fd;

    --alert-yellow: #f1c40f;
    --alert-red: #e74c3c;
    --success-green: #2ecc71;
}

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

body {
    font-family: 'Zen Kaku Gothic New', 'Outfit', sans-serif;
    background-color: var(--bg-color);
    background-image: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background Animation Effect (Subtle Snow) */
.app-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.8), transparent 60%);
    pointer-events: none;
}

/* Container */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero Section */
.hero-section {
    padding: 60px 0 40px;
    text-align: center;
}

h1 {
    font-family: 'Shippori Mincho', serif;
    font-weight: 700;
    font-size: 3.5rem;
    letter-spacing: 0.15em;
    color: var(--secondary-color);
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.8),
        0 0 20px rgba(255, 255, 255, 0.5);
    background: linear-gradient(to bottom, #536dfe 0%, #293990 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    padding-bottom: 5px;
    /* For descenders */
}

.subtitle {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    color: var(--text-muted);
    font-size: 1rem;
    letter-spacing: 0.1em;
    margin-bottom: 40px;
    font-weight: 500;
}

/* Search Box */
.search-container {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--snow-white);
    border-radius: 50px;
    padding: 10px 20px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.search-box:focus-within {
    box-shadow: 0 8px 24px rgba(0, 163, 255, 0.2);
    transform: translateY(-2px);
}

.search-icon {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-right: 15px;
}

#resort-search {
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
    font-size: 1.1rem;
    color: var(--text-main);
    font-family: inherit;
}

#search-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

#search-btn:hover {
    transform: scale(1.1);
}

/* Search Results Dropdown */
.search-results-dropdown {
    position: absolute;
    top: 110%;
    left: 0;
    width: 100%;
    background: var(--snow-white);
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
    z-index: 100;
    overflow: hidden;
    max-height: 300px;
    overflow-y: auto;
}

.search-result-item {
    padding: 15px 20px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
    text-align: left;
}

.search-result-item:hover {
    background: var(--snow-blue);
}

.search-result-item:last-child {
    border-bottom: none;
}

/* Glass Card Global */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    padding: 20px;
    margin-bottom: 20px;
}

/* Fresh Snow Section */
.fresh-snow-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 10px;
}

.fresh-snow-card {
    background: var(--snow-white);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.fs-label {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.fs-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.fs-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
}

/* Resort Header */
.resort-header {
    text-align: center;
    margin-bottom: 30px;
}

#resort-name {
    font-size: 2rem;
    margin-bottom: 5px;
    color: var(--secondary-color);
}

.resort-meta {
    font-size: 1rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#resort-address {
    font-weight: 500;
}

/* Map Container */
.map-container {
    padding: 10px;
    overflow: hidden;
}

#resort-map {
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

/* Current Weather */
.current-summary {
    text-align: center;
}

.current-summary h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--text-muted);
}

.current-grid {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-item i {
    font-size: 1.5rem;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.stat-item .value {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
}

.stat-item .unit {
    font-size: 1rem;
    color: var(--text-muted);
}

.snow-quality-box .value {
    font-size: 1.5rem;
    padding: 5px 15px;
    border-radius: 50px;
    background: var(--snow-blue);
    color: var(--primary-color);
    white-space: nowrap;
}

.snow-quality-box .label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 5px;
}

/* Forecast Section */
.forecast-section {
    margin-top: 40px;
}

.forecast-section h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-main);
}

/* Hourly Forecast Horizontal Scroll */
.hourly-forecast-container {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding-bottom: 20px;
    /* Space for scrollbar */
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
}

.hourly-card {
    min-width: 140px;
    background: var(--snow-white);
    border-radius: 16px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.5);
    flex-shrink: 0;
    transition: transform 0.2s;
}

.hourly-card:hover {
    transform: translateY(-5px);
}

.hourly-time {
    font-weight: 600;
    margin-bottom: 10px;
    display: block;
    color: var(--text-muted);
}

.hourly-icon {
    font-size: 2rem;
    display: block;
    margin: 10px 0;
    color: var(--primary-color);
}

/* Metric Rows inside cards */
.metric-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    margin-bottom: 5px;
    color: var(--text-muted);
}

.metric-row i {
    width: 20px;
    text-align: center;
}

.highlight-snow {
    color: var(--primary-color);
    font-weight: 700;
}

/* Wind Alerts */
.wind-alert-yellow {
    color: var(--alert-yellow);
    font-weight: bold;
}

.wind-alert-red {
    color: var(--alert-red);
    font-weight: bold;
    animation: pulse 2s infinite;
}

/* Weekly Summary */
.weekly-forecast-container {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding-bottom: 20px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
}

.weekly-forecast-container .glass-card {
    min-width: 180px;
    flex-shrink: 0;
    margin-bottom: 0;
    transition: transform 0.2s;
}

.weekly-forecast-container .glass-card:hover {
    transform: translateY(-5px);
}

/* Utility */
.hidden {
    display: none !important;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }

    100% {
        opacity: 1;
    }
}

/* Loading Overlay */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    z-index: 999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--snow-blue);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

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

@media (max-width: 600px) {
    h1 {
        font-size: 2rem;
    }

    .current-grid {
        gap: 15px;
    }
}