/* ============================================
   STE TRAVEL - FORECAST SYSTEM
   Modern Glassmorphism Design (Fixed & Restored)
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@700;800;900&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,300;1,400;1,500&display=swap');

:root {
    /* Color Palette from Branding Guidelines */
    --color-amber:    #F5A000;
    --color-lava:     #E8440A;
    --color-magenta:  #E8187A;
    --color-purple:   #8B2FC9;
    --color-cyan:     #00B8E8;
    
    /* Wordmark */
    --color-navy:     #2D3165;
    --color-steel:    #3D87B5;
    
    /* Signature Gradient */
    --gradient: linear-gradient(90deg, #F5A000, #E8440A, #E8187A, #8B2FC9, #00B8E8);
    
    /* Theme Neutrals */
    --bg-dark:        #08090F; /* deep background */
    --bg-secondary:   #0E1020; /* base surface */
    --bg-card:        #141628; /* container card */
    --bg-elevated:    #1C2038; /* inputs, header */
    
    --text-primary:   #F0F2FF;
    --text-secondary: rgba(240, 242, 255, 0.70);
    --text-muted:     rgba(240, 242, 255, 0.50);
    --text-faint:     rgba(240, 242, 255, 0.25);
    --text-dark:      #08090F;
    --text-light:     #F0F2FF;
    
    /* Acentuações */
    --accent-primary:   #00B8E8; /* Neve Ciano */
    --accent-secondary: #E8187A; /* Magenta */
    --accent-glow:      rgba(0, 184, 232, 0.4);
    
    /* Glassmorphism */
    --glass-bg:       rgba(20, 22, 40, 0.6);
    --glass-border:   rgba(255, 255, 255, 0.07);
    --glass-shadow:   0 8px 32px 0 rgba(0, 0, 0, 0.5);
    --glass-radius:   16px;
    
    /* Temperature colors updated mapping */
    --temp-cold-deep: #1d4ed8;
    --temp-cold-light:#00B8E8;
    --temp-zero:      #3D87B5;
    --temp-warm:      #F5A000;
    
    /* Fonts */
    --font-display:   'Nunito', sans-serif;
    --font-body:      'DM Sans', sans-serif;
    
    /* Transitions */
    --transition-fast: 0.2s ease-out;
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */

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

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body), sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .header-title, .resort-title-inline, .total-snow-value, .top5-title, .top5-name, .top5-snow .snow-amount {
    font-family: var(--font-display), sans-serif;
    font-weight: 700;
}

/* Emoji styling for proper flag rendering */
.flag-emoji {
    font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', 'Twemoji Mozilla', sans-serif;
    font-size: 1.2em;
    line-height: 1;
}

/* Animated Background */
.gradient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at top left, #1e293b, #0f172a);
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 20s infinite ease-in-out;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--accent-primary);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: var(--accent-secondary);
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
}

.orb-3 {
    width: 250px;
    height: 250px;
    background: #8b5cf6;
    top: 40%;
    left: 40%;
    animation-delay: -10s;
}

@keyframes float {

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

    50% {
        transform: translate(30px, 50px);
    }
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

/* ============================================
   LAYOUT & HEADER
   ============================================ */

.main-container {
    max-width: 1200px;
    text-align: center;
    margin: 4rem auto;
    /* Centered horizontally */
    padding: 0 2rem;
}

header {
    width: 100%;
    border-bottom: 1px solid var(--glass-border);
    padding: 1.5rem 0;
    margin-bottom: 3rem;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    height: 45px;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition-fast);
    color: var(--text-primary);
    text-decoration: none;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-5px);
}

.header-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 1px solid var(--glass-border);
    line-height: 1.2;
}

@media (max-width: 480px) {
    .header-title {
        font-size: 1rem;
        margin-left: 0.5rem;
        padding-left: 0.5rem;
    }

    .header-content {
        padding: 0 1rem;
        flex-wrap: nowrap;
    }

    .header-controls {
        display: flex;
        flex-wrap: nowrap;
        gap: 0.5rem;
    }

    .header-controls .back-button {
        padding: 0.5rem 0.6rem;
        font-size: 0.8rem;
    }

    .header-controls .btn-text {
        display: none;
    }

    .logo {
        height: 28px;
    }
}

h2 {
    font-size: 1.5rem;
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.5rem;
    display: inline-block;
}

/* ============================================
   FORMS & INPUTS
   ============================================ */

.search-container {
    text-align: center;
    margin: 4rem 0;
}

.glass-input-wrapper {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

input[type="text"] {
    width: 100%;
    padding: 1.2rem 1.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    color: white;
    font-size: 1.1rem;
    backdrop-filter: blur(10px);
    transition: var(--transition-smooth);
    box-shadow: var(--glass-shadow);
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px var(--accent-glow);
    background: rgba(255, 255, 255, 0.1);
}

/* ============================================
   TOP 5 SECTION
   ============================================ */

.top5-section {
    margin-bottom: 1.5rem;
    overflow: visible;
}

.top5-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 1rem;
    text-align: center;
}

.top5-cards {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    overflow-y: visible;
    padding: 0.5rem 0;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-primary) transparent;
    flex-wrap: nowrap;
}

.top5-cards::-webkit-scrollbar {
    height: 6px;
}

.top5-cards::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.top5-cards::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 3px;
}

.top5-card {
    flex: 0 0 auto;
    min-width: 140px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(6, 182, 212, 0.1));
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    padding: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.top5-card::before {
    content: attr(data-rank);
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    width: 20px;
    height: 20px;
    background: var(--accent-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-dark);
}

.top5-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-primary);
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.3);
}

.top5-snow {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.snow-icon {
    font-size: 1rem;
    animation: snowfall 2s ease-in-out infinite;
}

@keyframes snowfall {

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

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

.snow-amount {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
}

.snow-unit {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.top5-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.top5-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.top5-country {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* ============================================
   FILTERS ROW
   ============================================ */

.filters-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.filter-group label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.filter-group select {
    padding: 0.8rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: white;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition-fast);
    min-width: 180px;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px var(--accent-glow);
}

.filter-group select option {
    background: var(--bg-secondary);
    color: white;
}

.search-group {
    flex: 1;
}

.search-group input[type="text"] {
    padding: 0.8rem 1rem;
    border-radius: 12px;
    font-size: 0.95rem;
}

@media (max-width: 600px) {
    .filters-row {
        flex-direction: column;
    }

    .filter-group select,
    .search-group input[type="text"] {
        width: 100%;
    }

    .top5-cards {
        margin: 0 -1rem;
        padding: 0 1rem 0.5rem;
    }
}

/* ============================================
   TABLES
   ============================================ */

.table-container {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border-radius: var(--glass-radius);
    border: 1px solid var(--glass-border);
    overflow: hidden;
    box-shadow: var(--glass-shadow);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: rgba(0, 0, 0, 0.2);
}

th {
    padding: 0.65rem 0.8rem;
    text-align: left;
    font-weight: 700;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--glass-border);
    cursor: pointer;
    transition: var(--transition-fast);
}

th:hover {
    color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.02);
}

td {
    padding: 0.55rem 0.8rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--glass-border);
}

tr:last-child td {
    border-bottom: none;
}

tbody tr {
    transition: var(--transition-fast);
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* ============================================
   CARDS & INFO BLOCKS
   ============================================ */

.info-block {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--glass-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--glass-shadow);
    overflow: hidden;
}

/* Header integrado do bloco */
.block-header-integrated {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.resort-title-inline {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.country-tag {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--accent-primary);
    background: rgba(6, 182, 212, 0.15);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.block-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 400;
}

@media (max-width: 500px) {
    .resort-title-inline {
        font-size: 1.4rem;
    }

    .country-tag {
        font-size: 0.8rem;
    }
}

.info-item {
    margin-bottom: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.5rem;
}

.info-item strong {
    color: var(--text-primary);
}

/* ============================================
   WEATHER & SNOW COMPONENTS
   ============================================ */

/* Mountain Visualizer */
.mountain-snow-visualizer {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 2rem auto;
    aspect-ratio: 16/9;
}

.mountain-svg path {
    /* fill controlado por gradientes SVG inline */
}

.snow-label {
    position: absolute;
    background: rgba(15, 23, 42, 0.9);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    font-size: 0.85rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.snow-label.base {
    bottom: 10%;
    left: 0;
}

.snow-label.top {
    top: 0;
    right: 0;
}

.snow-label .value {
    color: var(--accent-primary);
    font-weight: 700;
    font-size: 1.1rem;
}

.snow-label .label-line {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ============================================
   ENHANCED MOUNTAIN - Elevation Line & Animations
   ============================================ */

.mountain-snow-visualizer.enhanced {
    position: relative;
}

/* Linha vertical de desnível */
/* Linha vertical de desnível (Esquerda) */
.elevation-line {
    position: absolute;
    left: 8%;
    top: 15%;
    bottom: 35%;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 5;
}

/* Linha central de posição (Onde fica a bolinha) */
.position-line {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 15%;
    bottom: 35%;
    width: 2px;
    background: rgba(255, 255, 255, 0.1);
    /* Linha sutil no meio */
    z-index: 5;
    pointer-events: none;
}

.elevation-distance {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0.5rem 0;
}

.elevation-distance::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent-primary), rgba(6, 182, 212, 0.3));
    transform: translateX(-50%);
    z-index: -1;
}

.distance-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    background: var(--bg-secondary);
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    border: 1px solid var(--glass-border);
    white-space: nowrap;
}

.distance-label {
    font-size: 0.65rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--bg-secondary);
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
}

/* Labels animadas */
.snow-label.animated {
    animation: labelFadeIn 0.8s ease-out;
    transition: all 0.3s ease;
}

.snow-label.animated:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.4);
    border-color: var(--accent-primary);
}

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

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

.snow-label.base.animated {
    animation-delay: 0.2s;
    animation-fill-mode: backwards;
}

.snow-label.top.animated {
    animation-delay: 0.4s;
    animation-fill-mode: backwards;
}

/* Ajuste SVG montanha melhorada */
.mountain-snow-visualizer.enhanced .mountain-svg {
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
}

@media (max-width: 500px) {
    .elevation-line {
        left: 3%;
        top: 20%;
    }

    .distance-value {
        font-size: 0.85rem;
    }

    .elevation-marker {
        width: 8px;
        height: 8px;
    }
}

/* Forecast Grid - transformado em carrossel horizontal */
.snow-forecast-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1rem;
    margin-top: 2rem;
    padding: 0.5rem 0.25rem 1.5rem 0.25rem;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-primary) rgba(255, 255, 255, 0.05);
    -webkit-overflow-scrolling: touch;
}

.snow-forecast-grid::-webkit-scrollbar {
    height: 8px;
}

.snow-forecast-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 99px;
}

.snow-forecast-grid::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 99px;
}

.snow-forecast-box {
    flex: 0 0 175px; /* largura fixa para cada card no carrossel */
    scroll-snap-align: start;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.snow-forecast-box:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-primary);
}

/* Snow Animation */
.snow-forecast-box .forecast-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.15);
    z-index: 1;
    transition: height 0.6s ease-out;
    height: 0%;
    clip-path: url(#snow-wave-clip);
}

.forecast-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
}

.forecast-date {
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
}

.forecast-snow-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0.5rem 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

.forecast-temp-value {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: auto;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    flex-wrap: nowrap;
}

/* ============================================
   TOTAL SNOW BADGE - Destaque Visual
   ============================================ */

.total-snow-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin: 2rem auto 0;
    padding: 1.5rem 3rem;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.3), rgba(59, 130, 246, 0.2));
    border: 2px solid var(--accent-primary);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    max-width: 400px;
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.3), inset 0 0 20px rgba(255, 255, 255, 0.05);
}

.total-snow-badge::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {

    0%,
    100% {
        transform: translate(-30%, -30%);
    }

    50% {
        transform: translate(30%, 30%);
    }
}

.total-snow-icon {
    font-size: 3rem;
    animation: snowPulse 2s ease-in-out infinite;
    z-index: 1;
}

@keyframes snowPulse {

    0%,
    100% {
        transform: scale(1) rotate(0deg);
    }

    50% {
        transform: scale(1.1) rotate(10deg);
    }
}

.total-snow-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    z-index: 1;
}

.total-snow-label {
    font-size: 0.85rem;
    color: var(--accent-primary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.total-snow-value {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    text-shadow: 0 0 20px rgba(6, 182, 212, 0.5);
}

.total-snow-value small {
    font-size: 1.2rem;
    font-weight: 500;
    margin-left: 0.25rem;
    color: var(--text-secondary);
}

.total-snow-decoration {
    position: absolute;
    right: -30px;
    bottom: -30px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.3), transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

@media (max-width: 500px) {
    .total-snow-badge {
        padding: 1rem 1.5rem;
        gap: 1rem;
        max-width: 100%;
    }

    .total-snow-icon {
        font-size: 2rem;
    }

    .total-snow-value {
        font-size: 2.2rem;
    }
}

/* Temperature Grid - FIXED */
.temperatura-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.temp-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    display: block;
    /* Ensure visibility */
}

.temp-box h3 {
    color: var(--accent-primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.5rem;
}



.temp {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 8px;
    font-weight: 800;
    min-width: 45px;
    text-align: center;
    font-size: 0.95rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

/* Enhanced Weather Display Styles */
.temp-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.temp-values {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.temp-separator {
    color: var(--text-muted);
    margin: 0 0.25rem;
}

/* Sensação Térmica Badge com Cores */
.sensacao-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    min-width: 55px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

/* Wind Display */
.wind-display {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    justify-content: flex-end;
}

.wind-bar-container {
    width: 60px;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.wind-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease, background 0.3s ease;
    background: linear-gradient(90deg, #4ade80, #facc15, #ef4444);
}

/* Humidity Display */
.humidity-display {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    justify-content: flex-end;
}

.humidity-bar-container {
    width: 60px;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.humidity-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease, background 0.3s ease;
}

.humidity-value {
    min-width: 40px;
    text-align: right;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Updated temp-line for better layout */
.temp-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.temp-line:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* ============================================
   RESORT DATA SECTION - Enhanced Design
   ============================================ */

.resort-data-section {
    overflow: visible;
}

/* Stats Grid */
.resort-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 500px) {
    .resort-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Stat Cards */
.resort-stat-card {
    position: relative;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(6, 182, 212, 0.1));
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.resort-stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
    box-shadow: 0 10px 40px rgba(6, 182, 212, 0.2);
}

.resort-stat-card.slopes-card {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(6, 182, 212, 0.1));
    border-color: rgba(34, 197, 94, 0.3);
}

.resort-stat-card.slopes-card:hover {
    border-color: #4ade80;
    box-shadow: 0 10px 40px rgba(34, 197, 94, 0.2);
}

.stat-icon-container {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon {
    font-size: 2rem;
    animation: float-icon 3s ease-in-out infinite;
}

@keyframes float-icon {

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

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

.stat-content {
    display: flex;
    flex-direction: column;
    z-index: 1;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.stat-value small {
    font-size: 1rem;
    font-weight: 500;
    margin-left: 0.25rem;
    color: var(--text-secondary);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.stat-decoration {
    position: absolute;
    right: -20px;
    bottom: -20px;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.2), transparent 70%);
    border-radius: 50%;
}

/* Elevation Visualizer */
.elevation-visualizer {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9));
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.elevation-header {
    margin-bottom: 1.5rem;
}

.elevation-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-primary);
}

.mountain-profile {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 1rem;
    min-height: 150px;
}

.elevation-point {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    min-width: 80px;
}

.elevation-point.summit {
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.2), transparent);
    border-bottom: 2px solid #3b82f6;
}

.elevation-point.base {
    background: linear-gradient(0deg, rgba(34, 197, 94, 0.2), transparent);
    border-top: 2px solid #22c55e;
}

.elevation-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.elevation-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
}

.elevation-marker {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin: 0.5rem 0;
}

.elevation-point.summit .elevation-marker {
    background: #3b82f6;
    box-shadow: 0 0 10px #3b82f6;
}

.elevation-point.base .elevation-marker {
    background: #22c55e;
    box-shadow: 0 0 10px #22c55e;
}

.mountain-body {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mountain-shape {
    width: 100%;
    height: 120px;
}

.vertical-diff-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(6, 182, 212, 0.2);
    border: 1px solid var(--accent-primary);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    backdrop-filter: blur(8px);
}

.diff-arrow {
    font-size: 1.2rem;
    color: var(--accent-primary);
    animation: pulse-arrow 2s ease-in-out infinite;
}

@keyframes pulse-arrow {

    0%,
    100% {
        opacity: 0.7;
    }

    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

.diff-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
}

.diff-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

@media (max-width: 600px) {
    .mountain-profile {
        flex-direction: column;
        align-items: center;
    }

    .mountain-body {
        order: 2;
        width: 100%;
    }

    .elevation-point.summit {
        order: 1;
    }

    .elevation-point.base {
        order: 3;
    }
}

/* ============================================
   MAP & CHART - FIXED
   ============================================ */

#resortMap {
    height: 400px;
    width: 100%;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    margin-top: 1rem;
    z-index: 1;
    /* Ensure map controls are clickable */
}

#tempChart {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem;
    backdrop-filter: blur(12px);
    max-width: 100%;
    width: 100%;
    height: auto;
    box-sizing: border-box;
}

/* Chart container for mobile responsiveness */
.info-block:has(#tempChart) {
    overflow: hidden;
}

@media (max-width: 768px) {
    #tempChart {
        padding: 0.5rem;
        min-height: 280px;
    }
}

/* ============================================
   POPUP
   ============================================ */

#popupOverlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

#popupContent {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    max-width: 400px;
    text-align: center;
    position: relative;
}

#closePopup {
    position: absolute;
    top: 20px;
    right: 20px;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .main-container {
        padding: 0.75rem;
        margin: 2rem auto;
    }

    .info-block {
        padding: 1.25rem 1rem;
        margin-bottom: 1.25rem;
        border-radius: 12px;
    }

    h1 {
        font-size: 2rem;
    }

    /* Reduzir h2 no tablet */
    h2 {
        font-size: 1.2rem !important;
        margin-bottom: 1rem !important;
    }

    .table-container {
        overflow-x: auto;
    }

    .temperatura-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .main-container {
        padding: 0.4rem;
        margin: 1rem auto;
    }

    .info-block {
        padding: 1rem 0.75rem;
        margin-bottom: 1rem;
    }

    /* Reduzir h2 no celular para evitar quebra feia de linha */
    h2 {
        font-size: 1.05rem !important;
        margin-bottom: 0.8rem !important;
        line-height: 1.35 !important;
    }

    /* Grid responsiva de 3 colunas para a altitude sem quebrar linha */
    .altitude-toggle {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.35rem !important;
        width: 100% !important;
        margin-top: 1rem !important;
    }

    .altitude-btn {
        display: inline-flex !important;
        justify-content: center !important;
        align-items: center !important;
        padding: 0.5rem 0.2rem !important;
        font-size: 0.72rem !important;
        gap: 0.2rem !important;
        white-space: nowrap !important;
    }

    .altitude-btn span:last-child {
        font-size: 0.6rem !important;
    }
}

/* Mobile Header Fix */
@media (max-width: 600px) {
    .btn-text {
        display: none;
    }

    .back-button {
        padding: 0.6rem;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        justify-content: center;
    }

    .back-button svg {
        margin: 0;
    }

    .header-title {
        font-size: 0.9rem;
        margin-left: 0.5rem;
        padding-left: 0.5rem;
    }

    .logo {
        height: 35px;
    }

    /* Responsive Text Utilities */
    .desktop-text {
        display: none;
    }

    .mobile-text {
        display: inline;
    }

    /* Compact Table on Mobile */
    th,
    td {
        padding: 0.8rem 0.5rem;
        font-size: 0.9rem;
    }
}

/* Default State (Desktop) */
.mobile-text {
    display: none;
}

/* ============================================
   SNOW ANIMATION
   ============================================ */

@keyframes snowFall {
    0% {
        transform: translateY(-20px) rotate(0deg);
    }

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

/* ============================================
   TOAST ANIMATIONS
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes fadeOutDown {
    from {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    to {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
}

/* Share Button Style */
.share-button {
    margin-right: 10px;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

/* ============================================
   ADVANCED POWDER ALERT BADGE
   ============================================ */
.powder-badge {
    background: linear-gradient(135deg, #eab308, #ca8a04);
    color: #0f172a;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 99px;
    margin-left: 0.5rem;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 0 10px rgba(234, 179, 8, 0.4);
    animation: goldPulse 2s infinite alternate;
    vertical-align: middle;
}

@keyframes goldPulse {
    0% {
        box-shadow: 0 0 5px rgba(234, 179, 8, 0.3);
    }
    100% {
        box-shadow: 0 0 15px rgba(234, 179, 8, 0.7);
        transform: scale(1.03);
    }
}

/* ============================================
   FLOATING COMPARE BAR (GLASSMORPHISM)
   ============================================ */
.compare-bar {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 600px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(6, 182, 212, 0.2);
    border-radius: 16px;
    padding: 1rem 1.5rem;
    z-index: 9999;
    animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.compare-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

#compareCount {
    color: #e2e8f0;
    font-weight: 600;
    font-size: 0.95rem;
}

.compare-bar-buttons {
    display: flex;
    gap: 0.75rem;
}

.clear-compare-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #94a3b8;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.clear-compare-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.open-compare-btn {
    background: linear-gradient(135deg, #06b6d4, #3b82f6);
    border: none;
    color: #fff;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.open-compare-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(6, 182, 212, 0.5);
}

/* ============================================
   COMPARISON MODAL & TABLE
   ============================================ */
.compare-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1.5rem;
    animation: fadeIn 0.3s ease;
}

.compare-modal-content {
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    border-radius: 20px;
    width: 100%;
    max-width: 900px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 2rem;
    animation: scaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.compare-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.compare-modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: #fff;
    font-weight: 700;
}

.close-compare-modal {
    color: #94a3b8;
    font-size: 1.75rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.close-compare-modal:hover {
    color: #fff;
}

.compare-table-wrapper {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(15, 23, 42, 0.3);
}

.compare-table th, .compare-table td {
    padding: 1.25rem 1rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
}

.compare-table th:first-child, .compare-table td:first-child {
    text-align: left;
    background: rgba(0, 0, 0, 0.15);
    font-weight: 600;
    position: sticky;
    left: 0;
    z-index: 10;
}

.compare-table th {
    background: rgba(0, 0, 0, 0.3);
    font-weight: 700;
    color: #38bdf8;
    font-size: 1rem;
}

.compare-highlight {
    font-size: 1.2rem;
    font-weight: 800;
    color: #38bdf8;
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

.compare-action-link {
    display: inline-block;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: #38bdf8;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s;
}

.compare-action-link:hover {
    background: #38bdf8;
    color: #0f172a;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleUp {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* ============================================
   GAUGE WIDGETS
   ============================================ */
.gauges-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.gauge-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.25rem 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gauge-card h4 {
    margin: 0 0 0.75rem;
    color: #94a3b8;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.gauge-wrapper {
    position: relative;
    width: 130px;
    height: 65px;
    overflow: hidden;
}

.gauge-body {
    position: absolute;
    top: 0;
    left: 0;
    width: 130px;
    height: 65px;
    border-radius: 65px 65px 0 0;
    -webkit-mask: radial-gradient(circle at 65px 65px, transparent 52px, #000 53px);
    mask: radial-gradient(circle at 65px 65px, transparent 52px, #000 53px);
}

.gauge-melt {
    background: linear-gradient(to right, #22c55e 0%, #eab308 50%, #ef4444 100%);
}

.gauge-quality {
    background: linear-gradient(to right, #94a3b8 0%, #60a5fa 33%, #a78bfa 66%, #fbbf24 100%);
}

.gauge-comfort {
    background: linear-gradient(to right, #1d4ed8 0%, #60a5fa 33%, #22c55e 66%, #f59e0b 100%);
}

.gauge-wind {
    background: linear-gradient(to right, #22c55e 0%, #eab308 50%, #ef4444 100%);
}

.gauge-needle {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 4px;
    margin-left: -2px;
    height: 52px;
    background: #ef4444;
    border-radius: 2px;
    transform-origin: bottom center;
    transform: rotate(0deg);
    transition: transform 1.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
}

.gauge-center-point {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    background: #f8fafc;
    border-radius: 50%;
    border: 2px solid #ef4444;
    z-index: 11;
}

.gauge-value {
    margin-top: 0.5rem;
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
}

.gauge-desc {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.25rem;
    line-height: 1.4;
}

/* Drag-to-scroll class behavior */
.snow-forecast-grid.active-dragging {
    user-select: none;
    scroll-behavior: auto !important;
}