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

body {
    font-family: 'Noto Sans KR', sans-serif;
    background: linear-gradient(to bottom, #1e3c72, #2a5298);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

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

header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.date {
    font-size: 1.2rem;
    opacity: 0.9;
}

main {
    display: flex;
    flex-direction: column;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    overflow: hidden;
}

.map-container {
    position: relative;
    padding: 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

#korea-map {
    display: block;
    margin: 0 auto;
    cursor: pointer;
}

.legend {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.legend-icon {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    border-radius: 50%;
}

.sunny {
    background-color: #ffdd00;
    box-shadow: 0 0 8px rgba(255, 221, 0, 0.6);
}

.cloudy {
    background-color: #a0a0a0;
    box-shadow: 0 0 8px rgba(160, 160, 160, 0.6);
}

.rainy {
    background-color: #5dadec;
    box-shadow: 0 0 8px rgba(93, 173, 236, 0.6);
}

.snowy {
    background-color: #ffffff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
    border: 1px solid #e0e0e0;
}

.forecast-container {
    padding: 30px;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #2a5298;
    text-align: center;
}

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

.forecast-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.forecast-table th, 
.forecast-table td {
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid #dee2e6;
}

.forecast-table th {
    background-color: #2a5298;
    color: white;
    font-weight: 500;
}

.forecast-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.forecast-table tr:hover {
    background-color: #e9ecef;
}

.weather-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto;
    display: block;
}

/* City markers on map */
.city-marker {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: red;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.city-marker:hover {
    width: 14px;
    height: 14px;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.7);
}

.city-marker.active {
    width: 16px;
    height: 16px;
    background-color: #ff3300;
    box-shadow: 0 0 15px rgba(255, 51, 0, 0.8);
}

.city-label {
    position: absolute;
    font-size: 12px;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 3px 6px;
    border-radius: 4px;
    transform: translate(-50%, -120%);
    white-space: nowrap;
    transition: all 0.3s ease;
    opacity: 0;
}

.city-marker:hover + .city-label,
.city-marker.active + .city-label {
    opacity: 1;
}

.weather-animation {
    position: absolute;
    width: 30px;
    height: 30px;
    transform: translate(-50%, -50%);
    z-index: 5;
}

footer {
    text-align: center;
    margin-top: 30px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* 반응형 디자인 */
@media (max-width: 992px) {
    #korea-map {
        width: 100%;
        height: auto;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    main {
        flex-direction: column;
    }
    
    .map-container, 
    .forecast-container {
        width: 100%;
    }
}

/* 애니메이션 효과 */
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

.city-marker.active {
    animation: pulse 1.5s infinite;
}

/* 날씨 애니메이션 클래스 */
.sun-animation {
    background: radial-gradient(circle, #ffdd00 30%, transparent 70%);
    animation: pulse 2s infinite;
}

.cloud-animation {
    background: radial-gradient(circle, #a0a0a0 30%, transparent 70%);
    opacity: 0.8;
    animation: float 4s infinite alternate;
}

.rain-animation {
    background: radial-gradient(circle, #5dadec 30%, transparent 70%);
    opacity: 0.8;
    animation: float 3s infinite alternate;
}

.snow-animation {
    background: radial-gradient(circle, #ffffff 30%, transparent 70%);
    opacity: 0.8;
    animation: float 5s infinite alternate;
}

@keyframes float {
    0% { transform: translate(-50%, -50%); }
    100% { transform: translate(-50%, -60%); }
}
