/*
 * Weather App 스타일
 */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    min-height: 100vh;
    padding: 20px;
}

.app {
    max-width: 500px;
    margin: 0 auto;
}

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

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.header .subtitle {
    opacity: 0.8;
    font-size: 1rem;
}

/* Search Section */
.search-section {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.search-section input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
    outline: none;
    transition: box-shadow 0.3s;
}

.search-section input:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.5);
}

.search-section button {
    padding: 15px 25px;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.search-section button:hover {
    background: #ee5a5a;
    transform: scale(1.05);
}

/* Quick Cities */
.quick-cities {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 25px;
}

.city-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.city-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Loading */
.loading {
    text-align: center;
    color: white;
    padding: 40px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Error */
.error {
    background: rgba(220, 53, 69, 0.9);
    color: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 20px;
}

/* Weather Display */
.weather-display {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.weather-main {
    text-align: center;
    margin-bottom: 30px;
}

.location h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 5px;
}

.location p {
    color: #666;
    font-size: 1rem;
}

.temperature {
    font-size: 5rem;
    font-weight: 300;
    color: #333;
    margin: 20px 0;
}

.temperature .unit {
    font-size: 2rem;
    vertical-align: top;
}

.weather-icon img {
    width: 100px;
    height: 100px;
}

.description {
    font-size: 1.2rem;
    color: #666;
    text-transform: capitalize;
}

/* Weather Details */
.weather-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.detail-item {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
}

.detail-item .label {
    display: block;
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 5px;
}

.detail-item .value {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

/* Sun Times */
.sun-times {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 20px;
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    border-radius: 12px;
    margin-bottom: 20px;
}

.sun-item {
    text-align: center;
}

.sun-label {
    display: block;
    font-size: 0.9rem;
    color: rgba(0, 0, 0, 0.6);
    margin-bottom: 5px;
}

.sun-value {
    display: block;
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
}

/* Update Info */
.update-info {
    text-align: center;
    color: #999;
    font-size: 0.85rem;
}

/* Footer */
.footer {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 30px;
    font-size: 0.85rem;
}

.footer a {
    color: white;
    text-decoration: none;
}

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

.footer .note {
    margin-top: 10px;
    font-size: 0.75rem;
    opacity: 0.7;
}

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

/* Responsive */
@media (max-width: 480px) {
    .header h1 {
        font-size: 2rem;
    }

    .temperature {
        font-size: 4rem;
    }

    .weather-details {
        grid-template-columns: repeat(2, 1fr);
    }

    .search-section {
        flex-direction: column;
    }

    .search-section button {
        width: 100%;
    }
}

/* Weather-based backgrounds (optional enhancement) */
.app.sunny {
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
}

.app.cloudy {
    background: linear-gradient(135deg, #bdc3c7 0%, #2c3e50 100%);
}

.app.rainy {
    background: linear-gradient(135deg, #373b44 0%, #4286f4 100%);
}

.app.snowy {
    background: linear-gradient(135deg, #e6dada 0%, #274046 100%);
}
