/* Global Styles */
* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #A7D3F5 0%, #1E3A8A 100%);
    min-height: 100vh;
    position: relative;
}

/* Snow Animation */
.snow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.snowflake {
    position: absolute;
    color: #ffffff;
    font-size: 1em;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.8), 0 0 15px rgba(255, 255, 255, 0.6);
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.9));
    user-select: none;
    cursor: default;
    animation: snowfall 8s linear infinite;
}

.snowflake.small {
    font-size: 0.6em;
    opacity: 0.9;
    animation: snowfall-fast 6s linear infinite;
}

.snowflake.medium {
    font-size: 1em;
    opacity: 0.95;
    animation: snowfall-medium 8s linear infinite;
}

.snowflake.large {
    font-size: 1.4em;
    opacity: 1;
    animation: snowfall 10s linear infinite;
}

.snowflake.extra-large {
    font-size: 1.8em;
    opacity: 1;
    animation: snowfall 12s linear infinite;
}

@keyframes snowfall {
    0% {
        transform: translateY(-100vh) rotate(0deg) translateX(0px);
        opacity: 1;
    }
    25% {
        transform: translateY(-75vh) rotate(90deg) translateX(20px);
        opacity: 0.9;
    }
    50% {
        transform: translateY(-50vh) rotate(180deg) translateX(-15px);
        opacity: 0.95;
    }
    75% {
        transform: translateY(-25vh) rotate(270deg) translateX(10px);
        opacity: 0.9;
    }
    100% {
        transform: translateY(100vh) rotate(360deg) translateX(0px);
        opacity: 0;
    }
}

@keyframes snowfall-fast {
    0% {
        transform: translateY(-100vh) rotate(0deg) translateX(0px);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg) translateX(30px);
        opacity: 0;
    }
}

@keyframes snowfall-medium {
    0% {
        transform: translateY(-100vh) rotate(0deg) translateX(0px);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg) translateX(15px);
        opacity: 0;
    }
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
    min-height: 100vh;
    position: relative;
    z-index: 10;
}

/* Search Section */
.search-section {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid #e1e5e9;
    position: relative;
    z-index: 100;
    overflow: visible;
}

.search-title {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
    font-size: 1.5rem;
    font-weight: 600;
}

.search-subtitle {
    text-align: center;
    margin-bottom: 15px;
    color: #666;
    font-size: 1rem;
}

.search-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.search-input-group {
    position: relative;
    width: 100%;
    max-width: 500px;
    z-index: 1000;
}

.search-input-group::after {
    content: '❄️';
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    font-size: 1.2rem;
    opacity: 0.6;
    pointer-events: none;
    animation: snowTwinkle 2s ease-in-out infinite;
}

@keyframes snowTwinkle {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.search-input {
    width: 100%;
    padding: 15px 20px;
    padding-right: 45px;
    font-size: 1.1rem;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    outline: none;
    transition: all 0.3s ease;
    background: white;
    font-family: 'Poppins', sans-serif;
}

.search-input:focus {
    border-color: #1E3A8A;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.search-button {
    background: #1E3A8A;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(30, 58, 138, 0.3);
    font-family: 'Poppins', sans-serif;
}

.search-button:hover {
    background: #2E4A9A;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 58, 138, 0.4);
}

.search-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Autocomplete Dropdown */
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #1E3A8A;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    max-height: 200px;
    overflow-y: auto;
    z-index: 99999;
    margin-top: 5px;
    display: none;
}

.autocomplete-dropdown.show {
    display: block;
}

.autocomplete-item {
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.autocomplete-item:hover {
    background-color: #f8f9fa;
}

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

.autocomplete-item .city {
    font-weight: 600;
    color: #333;
}

.autocomplete-item .details {
    font-size: 0.9rem;
    color: #666;
    margin-top: 2px;
}

/* Calculator Navigation */
.calculator-nav {
    margin-top: 15px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.nav-btn {
    background: rgba(30, 58, 138, 0.1);
    color: #1E3A8A;
    border: 1px solid rgba(30, 58, 138, 0.2);
    padding: 8px 16px;
    border-radius: 16px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0 8px;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
}

.nav-btn:hover,
.nav-btn.active {
    background: rgba(30, 58, 138, 0.2);
    border-color: rgba(30, 58, 138, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(30, 58, 138, 0.2);
}

/* Results Section */
.results-section {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    margin-top: 5px;
    box-shadow: 0 8px 32px rgba(30, 58, 138, 0.15);
    border: 1px solid rgba(167, 211, 245, 0.3);
}

.results-title {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
    font-size: 1.8rem;
    font-weight: 600;
}

/* Results Title */
.results-title {
    text-align: center;
    margin-bottom: 8px;
    color: #333;
    font-size: 1.5rem;
    font-weight: 600;
}

.prediction-subtitle {
    text-align: center;
    margin-bottom: 15px;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Prediction Cards */
.prediction-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}

.prediction-card {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.prediction-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid #E5E7EB;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    background: #F9FAFB;
}

.prediction-card.low .prediction-circle {
    border-color: #93C5FD;
    background: #EFF6FF;
}

.prediction-card.moderate .prediction-circle {
    border-color: #FBBF24;
    background: #FEF3C7;
}

.prediction-card.high .prediction-circle {
    border-color: #F59E0B;
    background: #FEF3C7;
}

.prediction-card.extreme .prediction-circle {
    border-color: #EF4444;
    background: #FEE2E2;
}

.prediction-card.none .prediction-circle {
    border-color: #E5E7EB;
    background: #F9FAFB;
}

.percent {
    font-size: 1.6rem;
    font-weight: 700;
    color: #111827;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.label {
    font-size: 0.8rem;
    color: #6B7280;
    font-weight: 500;
}

.prediction-meta {
    width: 100%;
}

.date {
    font-size: 0.9rem;
    color: #374151;
    margin-bottom: 0.4rem;
    font-weight: 500;
}

.outcome {
    font-weight: 600;
    color: #111827;
    font-size: 0.9rem;
}


/* Prediction Legend Chips */
.prediction-legend-chips {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.legend-chip {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid #E5E7EB;
    background: #F9FAFB;
    color: #4B5563;
}

.legend-chip.none {
    background: #F9FAFB;
    border-color: #E5E7EB;
    color: #4B5563;
}

.legend-chip.low {
    background: #EFF6FF;
    border-color: #BFDBFE;
    color: #1D4ED8;
}

.legend-chip.moderate {
    background: #FEF3C7;
    border-color: #FDE68A;
    color: #B45309;
}

.legend-chip.high {
    background: #FEF3C7;
    border-color: #FCD34D;
    color: #B45309;
}

.legend-chip.extreme {
    background: #FEE2E2;
    border-color: #FCA5A5;
    color: #B91C1C;
}

/* Current Weather Summary */
.current-weather-summary {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.summary-title {
    font-weight: 600;
    color: #1E3A8A;
    margin-bottom: 15px;
    text-align: center;
    font-size: 1.1rem;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: rgba(59, 130, 246, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(59, 130, 246, 0.1);
}

.summary-label {
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
}

.summary-value {
    color: #1E3A8A;
    font-weight: 500;
    font-size: 0.95rem;
}

/* Prediction Legend Table */
.prediction-legend-table {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.legend-table-title {
    font-weight: 600;
    color: #1E3A8A;
    margin-bottom: 15px;
    text-align: center;
    font-size: 1.1rem;
}

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

.legend-table tr {
    border-bottom: 1px solid #E5E7EB;
}

.legend-table tr:last-child {
    border-bottom: none;
}

.legend-table td {
    padding: 12px 15px;
    font-size: 0.95rem;
    color: #374151;
}

.legend-label {
    font-weight: 600;
    color: #1E3A8A;
    width: 120px;
}

/* Footer Info */
.footer-info {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    padding: 20px;
    margin-top: 30px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.footer-location {
    text-align: center;
    margin-bottom: 15px;
    color: #374151;
    font-size: 0.95rem;
    font-weight: 400;
}

.share-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.share-label {
    font-weight: 500;
    color: #374151;
    font-size: 0.95rem;
}

.share-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #F3F4F6;
    border: 1px solid #E5E7EB;
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.share-btn.facebook:hover {
    background: #1877F2;
    border-color: #1877F2;
}

.share-btn.instagram:hover {
    background: #E4405F;
    border-color: #E4405F;
}

.share-btn.twitter:hover {
    background: #000000;
    border-color: #000000;
}

.share-btn.whatsapp:hover {
    background: #25D366;
    border-color: #25D366;
}

.share-btn.telegram:hover {
    background: #0088CC;
    border-color: #0088CC;
}

.share-btn.copy-link:hover {
    background: #6366F1;
    border-color: #6366F1;
}

.data-timestamp {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

.data-timestamp .time {
    color: #374151;
    font-weight: 500;
}

.footer-timestamp {
    text-align: left;
    color: #666;
    font-size: 0.9rem;
    margin-top: 0;
    padding-top: 0;
}

/* Browse Pages Styles */
.sdc-browse-wrapper,
.sdc-browse-state-wrapper,
.sdc-browse-province-wrapper {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    padding-top: 20px;
    padding-bottom: 40px;
}

.breadcrumb {
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #666;
}

.breadcrumb a {
    color: #1E3A8A;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    color: #666;
    margin: 0 5px;
}

.states-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.state-card {
    background: white;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.state-card:hover {
    border-color: #1E3A8A;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(30, 58, 138, 0.2);
}

.state-card h3 {
    color: #1E3A8A;
    margin: 0 0 8px 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.state-card p {
    color: #666;
    font-size: 0.85rem;
    margin: 0;
}

.locations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.location-card {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
}

.location-card:hover {
    border-color: #1E3A8A;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.15);
}

.location-card h3 {
    color: #1E3A8A;
    margin: 0 0 8px 0;
    font-size: 1rem;
    font-weight: 600;
}

.location-details {
    color: #666;
    font-size: 0.75rem;
    margin: 0;
}

.location-count {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #1E3A8A;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 500;
}

@media (max-width: 768px) {
    .states-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .locations-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

@media (max-width: 480px) {
    .locations-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}

/* Refresh Section */
.refresh-section {
    display: flex;
    justify-content: center;
    margin-top: 15px;
    margin-bottom: 15px;
}

.refresh-button {
    background: #A7D3F5;
    color: #1E3A8A;
    font-weight: 600;
    cursor: pointer;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(30, 58, 138, 0.2);
}

.refresh-button:hover {
    background: #B7E3F5;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(30, 58, 138, 0.3);
}

/* Error Message */
.error-message {
    background: rgba(167, 211, 245, 0.1);
    color: #1E3A8A;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    text-align: center;
    border: 1px solid rgba(30, 58, 138, 0.2);
}

/* Weather Day Sections */
.weather-day {
    margin-bottom: 15px;
}

.day-title {
    color: #1E3A8A;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    padding-bottom: 8px;
}

.day-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, #1E3A8A 0%, #A7D3F5 100%);
    border-radius: 2px;
}

.weather-card {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.forecast-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.forecast-item {
    background: white;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #E5E7EB;
    text-align: center;
    transition: all 0.2s ease;
    min-width: 140px;
}

.forecast-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: #CBD5E1;
}

.forecast-icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
    display: block;
}

.forecast-time {
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
    font-size: 0.85rem;
}

.forecast-temp {
    font-size: 1.4rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 6px;
}

.forecast-condition {
    font-size: 0.8rem;
    color: #6B7280;
    line-height: 1.3;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .search-section,
    .results-section {
        padding: 18px;
    }
    
    .prediction-card {
        padding: 1.5rem;
    }
    
    .prediction-cards {
        grid-template-columns: 1fr;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
    }
    
    .forecast-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    @media (max-width: 480px) {
        .forecast-grid {
            grid-template-columns: 1fr;
        }
        
        .forecast-item {
            padding: 10px;
        }
        
        .forecast-temp {
            font-size: 1.2rem;
        }
        
        .forecast-time {
            font-size: 0.75rem;
        }
        
        .forecast-condition {
            font-size: 0.7rem;
        }
    }
    
    .prediction-legend-chips {
        gap: 0.5rem;
    }
    
    .legend-chip {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }
    
    .share-section {
        flex-direction: column;
        gap: 8px;
    }
    
    .share-buttons {
        justify-content: center;
    }
    
    .footer-info {
        padding: 15px;
    }
    
    .legend-table td {
        padding: 10px;
        font-size: 0.85rem;
    }
    
    .legend-label {
        width: 100px;
    }
}

