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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: 
        radial-gradient(ellipse at top, rgba(138, 43, 226, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at bottom, rgba(75, 0, 130, 0.3) 0%, transparent 50%),
        linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 30%, #16213e 60%, #0f3460 100%);
    min-height: 100vh;
    color: #e0e6ed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    touch-action: manipulation;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(138, 43, 226, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(147, 51, 234, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
}

.ld-logo {
    position: absolute;
    top: 20px;
    left: 20px;
    opacity: 0.15;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: rgba(224, 230, 237, 0.6);
    letter-spacing: -0.05em;
    z-index: 1;
    transition: opacity 0.3s ease;
    text-decoration: none;
    cursor: pointer;
}

.ld-logo:hover {
    opacity: 0.3;
}

.github-icon {
    position: absolute;
    top: 20px;
    right: 60px;
    opacity: 0.2;
    color: rgba(224, 230, 237, 0.5);
    z-index: 1;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 24px;
}

.github-icon:hover {
    opacity: 0.4;
}

.hamburger-menu {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 30px;
    height: 24px;
    cursor: pointer;
    z-index: 1;
    opacity: 0.2;
    transition: opacity 0.3s ease;
}

.hamburger-menu:hover {
    opacity: 0.4;
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background-color: rgba(224, 230, 237, 0.5);
    margin-bottom: 6px;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-line:last-child {
    margin-bottom: 0;
}

.ld-highlight {
    color: #000;
    font-weight: 900;
    font-size: 1em;
    text-shadow: none;
}

.muted-text {
    opacity: 0.6;
    font-weight: 400;
}

.location-display {
    font-size: 1rem;
    opacity: 0.8;
    font-weight: 400;
    margin-top: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.location-display:hover {
    opacity: 1;
}

.location-edit {
    display: none;
    margin-top: 8px;
}

.location-search {
    background: rgba(26, 26, 46, 0.8);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 12px;
    padding: 8px 12px;
    color: #e0e6ed;
    font-size: 1rem;
    width: 250px;
    backdrop-filter: blur(10px);
}

.location-search:focus {
    outline: none;
    border-color: rgba(168, 85, 247, 0.6);
    box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.2);
}

header {
    text-align: center;
    margin-bottom: 60px;
    color: white;
    position: relative;
}

header h1 {
    font-size: 3.5rem;
    margin-bottom: 16px;
    font-weight: 700;
    color: white;
    -webkit-text-stroke: 2px;
    -webkit-text-stroke-image: linear-gradient(135deg, rgba(168, 85, 247, 0.6) 0%, rgba(59, 130, 246, 0.6) 50%, rgba(6, 182, 212, 0.6) 100%);
    text-shadow: 0 4px 8px rgba(168, 85, 247, 0.2);
    letter-spacing: -0.02em;
    opacity: 0.8;
}

header p {
    font-size: 1.3rem;
    opacity: 0.95;
    font-weight: 400;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    letter-spacing: 0.01em;
}

.loading {
    text-align: center;
    background: rgba(26, 26, 46, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 50px;
    border-radius: 24px;
    border: 1px solid rgba(168, 85, 247, 0.3);
    box-shadow: 
        0 25px 50px rgba(0,0,0,0.5),
        0 0 0 1px rgba(168, 85, 247, 0.2) inset,
        0 0 20px rgba(168, 85, 247, 0.1);
    color: #e0e6ed;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(168, 85, 247, 0.2);
    border-top: 4px solid #a855f7;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 24px;
}

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

.error {
    text-align: center;
    background: rgba(244, 67, 54, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(244, 67, 54, 0.3);
    padding: 40px;
    border-radius: 24px;
    color: white;
    box-shadow: 
        0 25px 50px rgba(244, 67, 54, 0.1),
        0 0 0 1px rgba(244, 67, 54, 0.1) inset;
}

.error button {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(244, 67, 54, 0.3);
}

.error button:hover {
    background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(244, 67, 54, 0.4);
}

.location-info {
    text-align: center;
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 24px;
    border-radius: 18px;
    margin-bottom: 40px;
    border: 1px solid rgba(59, 130, 246, 0.3);
    box-shadow: 
        0 20px 40px rgba(0,0,0,0.3),
        0 0 0 1px rgba(59, 130, 246, 0.2) inset,
        0 0 15px rgba(59, 130, 246, 0.1);
    color: #e0e6ed;
    font-weight: 500;
}

.forecast {
    background: rgba(26, 26, 46, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 40px;
    border-radius: 24px;
    border: 1px solid rgba(147, 51, 234, 0.3);
    box-shadow: 
        0 25px 50px rgba(0,0,0,0.4),
        0 0 0 1px rgba(147, 51, 234, 0.2) inset,
        0 0 20px rgba(147, 51, 234, 0.1);
}

.forecast h2 {
    text-align: center;
    margin-bottom: 40px;
    color: #e0e6ed;
    font-weight: 700;
    font-size: 2rem;
    letter-spacing: -0.01em;
}

.best-day {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.8) 0%, rgba(5, 150, 105, 0.8) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #e0e6ed;
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 30px;
    text-align: center;
    border: 1px solid rgba(16, 185, 129, 0.4);
    box-shadow: 
        0 15px 30px rgba(16, 185, 129, 0.3),
        0 0 0 1px rgba(16, 185, 129, 0.3) inset,
        0 0 20px rgba(16, 185, 129, 0.15);
    position: relative;
    overflow: hidden;
}

.best-day::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
}

.best-day h3 {
    margin-bottom: 12px;
    font-size: 1.3rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.weather-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
}

.day-card {
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 24px;
    border-radius: 18px;
    text-align: center;
    border: 1px solid rgba(59, 130, 246, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #e0e6ed;
    position: relative;
    overflow: hidden;
}

.day-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, transparent 50%);
    pointer-events: none;
}

.day-card:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 20px 40px rgba(0,0,0,0.3),
        0 0 0 1px rgba(59, 130, 246, 0.4) inset,
        0 0 15px rgba(59, 130, 246, 0.2);
}

.day-card.best {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.5);
    transform: scale(1.05);
    box-shadow: 
        0 25px 50px rgba(16, 185, 129, 0.4),
        0 0 0 1px rgba(16, 185, 129, 0.4) inset,
        0 0 20px rgba(16, 185, 129, 0.2);
    padding-top: 40px;
}

.day-card.best:hover {
    transform: scale(1.05) translateY(-5px);
}

.day-card.second-best {
    background: rgba(156, 163, 175, 0.15);
    border-color: rgba(156, 163, 175, 0.4);
    transform: scale(1.02);
    box-shadow: 
        0 20px 40px rgba(156, 163, 175, 0.3),
        0 0 0 1px rgba(156, 163, 175, 0.3) inset,
        0 0 15px rgba(156, 163, 175, 0.1);
    padding-top: 40px;
}

.day-card.second-best:hover {
    transform: scale(1.02) translateY(-5px);
}

.day-card-medal {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.day-card-medal.gold::after {
    content: '🥇';
}

.day-card-medal.silver::after {
    content: '🥈';
}


.day-card.no-skate {
    background: rgba(75, 85, 99, 0.3);
    border-color: rgba(75, 85, 99, 0.4);
    opacity: 0.7;
}

.day-name {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 6px;
    color: #e0e6ed;
    position: relative;
    z-index: 1;
}

.day-date {
    font-size: 0.9rem;
    color: rgba(224, 230, 237, 0.8);
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.weather-icon {
    font-size: 2.2rem;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.temp {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #e0e6ed;
    position: relative;
    z-index: 1;
}

.conditions {
    font-size: 0.85rem;
    color: rgba(224, 230, 237, 0.9);
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

.metrics {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 12px 0;
    position: relative;
    z-index: 1;
}

.metric {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
}

.metric-icon {
    font-size: 0.9rem;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

.metric-bar {
    flex: 1;
    height: 4px;
    background: rgba(75, 85, 99, 0.4);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.metric-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.metric-fill.wind {
    background: linear-gradient(90deg, #10b981 0%, #f59e0b 70%, #ef4444 100%);
}

.metric-fill.uv {
    background: linear-gradient(90deg, #10b981 0%, #f59e0b 50%, #ef4444 100%);
}

.metric-fill.sun {
    background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%);
}

.metric-fill.score {
    background: linear-gradient(90deg, #ef4444 0%, #f59e0b 50%, #10b981 100%);
}

.metric-value {
    font-size: 0.7rem;
    min-width: 32px;
    text-align: right;
    color: rgba(224, 230, 237, 0.8);
    flex-shrink: 0;
}

.skate-score {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.8) 0%, rgba(147, 51, 234, 0.8) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #e0e6ed;
    padding: 8px 14px;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 12px;
    display: inline-block;
    border: 1px solid rgba(59, 130, 246, 0.3);
    position: relative;
    z-index: 1;
}

.skate-score.excellent {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.9) 0%, rgba(5, 150, 105, 0.9) 100%);
    border-color: rgba(16, 185, 129, 0.4);
}

.skate-score.good {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.9) 0%, rgba(217, 119, 6, 0.9) 100%);
    border-color: rgba(245, 158, 11, 0.4);
}

.skate-score.poor {
    background: linear-gradient(135deg, rgba(75, 85, 99, 0.8) 0%, rgba(55, 65, 81, 0.8) 100%);
    border-color: rgba(75, 85, 99, 0.4);
}

footer {
    text-align: center;
    margin-top: 60px;
    color: rgba(224, 230, 237, 0.7);
    opacity: 0.85;
    font-size: 0.8rem;
    font-weight: 400;
    padding: 15px;
    background: rgba(26, 26, 46, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(75, 85, 99, 0.2);
}

footer a {
    color: rgba(168, 85, 247, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: rgba(168, 85, 247, 1);
}

.hidden {
    display: none;
}

.time-block {
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    border: 1px solid rgba(59, 130, 246, 0.3);
    position: relative;
    overflow: hidden;
}

.time-block.best {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.4);
    font-weight: 600;
}

.time-block-score {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.time-block-score .metric-icon {
    font-size: 0.7rem;
    width: 12px;
}

.time-block-score .metric-bar {
    height: 3px;
    flex: 1;
}

.time-block-score .metric-value {
    font-size: 0.65rem;
    min-width: 24px;
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 1.6rem;
        font-weight: 500;
    }
    
    .weather-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .day-card {
        padding: 15px;
    }
    
    .forecast {
        padding: 20px;
    }
    
    .best-day {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1rem;
        font-weight: 300;
    }
    
    header p {
        font-size: 1rem;
    }
    
    .container {
        padding: 10px;
    }
    
    .weather-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 8px;
    }
    
    .day-card {
        padding: 12px;
    }
    
    .forecast {
        padding: 15px;
    }
    
    .best-day {
        padding: 15px;
    }
    
    .loading {
        padding: 30px;
    }
}