:root {
    --primary: #00d2ff;
    --secondary: #3a7bd5;
    --accent: #4ade80;
    --bg-dark: #0f172a;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-dim: #94a3b8;
}

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

body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 40px 20px;
    overflow-x: hidden;
    position: relative;
}

.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    filter: blur(100px);
    opacity: 0.15;
    border-radius: 50%;
    animation: move 20s infinite alternate ease-in-out;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    right: -100px;
}

.blob-2 {
    width: 300px;
    height: 300px;
    background: var(--secondary);
    bottom: -50px;
    left: -50px;
}

@keyframes move {
    from {
        transform: translate(0, 0) scale(1);
    }

    to {
        transform: translate(30px, 30px) scale(1.1);
    }
}

.container {
    width: 100%;
    max-width: 800px;
    animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.back-btn {
    color: var(--text-main);
    text-decoration: none;
    background: var(--glass-bg);
    padding: 12px 24px;
    border-radius: 18px;
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-5px);
    border-color: var(--primary);
}

.brand-label {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    letter-spacing: 1px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.2rem;
}

.weather-hero {
    background: var(--glass-bg);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: 40px;
    padding: 60px 40px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.location-info h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 5px;
    letter-spacing: -2px;
}

.location-info p {
    font-size: 1.1rem;
    color: var(--text-dim);
}

.main-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 50px;
    margin: 50px 0;
}

.weather-icon-large {
    font-size: 9rem;
    filter: drop-shadow(0 0 30px rgba(0, 210, 255, 0.3));
    animation: float 4s ease-in-out infinite;
}

@keyframes float {

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

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

.temp-display {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.temp-large {
    font-family: 'Outfit', sans-serif;
    font-size: 7.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 10px;
    background: linear-gradient(to bottom, #fff, #cbd5e1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.feels-like {
    font-size: 1.2rem;
    color: var(--text-dim);
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 16px;
    border-radius: 14px;
    margin-bottom: 10px;
}

.temp-hi-lo {
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    gap: 20px;
}

.hi {
    color: #ff6b6b;
}

.lo {
    color: #60a5fa;
}

.condition-text {
    font-size: 2.2rem;
    font-weight: 700;
    margin-top: 15px;
    color: var(--accent);
}

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

.metric-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    padding: 25px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.metric-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
}

.metric-card i {
    font-size: 1.8rem;
}

.metric-value {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
}

.metric-label {
    font-size: 0.85rem;
    color: var(--text-dim);
    font-weight: 500;
}

.refresh-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 18px 40px;
    border-radius: 22px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 40px auto;
    transition: all 0.3s ease;
    box-shadow: 0 15px 30px rgba(0, 210, 255, 0.2);
}

.refresh-btn:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 20px 40px rgba(0, 210, 255, 0.3);
}

.refresh-btn i {
    transition: transform 0.6s ease;
}

.refresh-btn:active i {
    transform: rotate(360deg);
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    flex-direction: column;
    gap: 20px;
}

.loader {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

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

#error-msg {
    display: none;
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    padding: 20px;
    border-radius: 20px;
    margin-bottom: 25px;
    text-align: center;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

@media (max-width: 600px) {
    .main-display {
        flex-direction: column;
        gap: 20px;
    }

    .temp-large {
        font-size: 6rem;
    }

    .weather-hero {
        padding: 40px 20px;
    }

    .location-info h1 {
        font-size: 2.5rem;
    }

    .weather-icon-large {
        font-size: 7rem;
    }
}

footer {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid var(--glass-border);
    text-align: center;
    color: var(--text-dim);
    font-size: 0.85rem;
    opacity: 0.7;
}

footer .source-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

footer .source-label {
    font-weight: 600;
    color: var(--text-dim);
}

footer .source-text {
    color: var(--text-dim);
    opacity: 0.8;
}

@media (max-width: 768px) {
    footer {
        font-size: 0.8rem;
    }
}