@charset "utf-8";

:root {
    --sky-50: #f0f7ff;
    --sky-100: #e0efff;
    --sky-200: #b9ddff;
    --sky-300: #7cc4ff;
    --sky-400: #36a9ff;
    --sky-500: #0090f0;
    --sky-600: #0070cc;
    --sky-700: #0058a6;
    --sky-800: #004b89;
    --sky-900: #003f71;
    --rain-400: #6b7fb5;
    --rain-500: #4a5a8a;
    --rain-600: #364270;
    --rain-700: #2a3355;
    --rain-800: #1e2540;
    --rain-900: #141a2e;
    --sun-300: #fde68a;
    --sun-400: #fbbf24;
    --sun-500: #f59e0b;
    --green-400: #4ade80;
    --green-500: #22c55e;
    --red-400: #f87171;
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 4px 24px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
}

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

a, button, input[type="submit"] {
    min-height: 44px;
}

html { touch-action: manipulation; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: linear-gradient(160deg, var(--sky-100) 0%, var(--sky-200) 40%, var(--sky-300) 100%);
    min-height: 100vh;
    color: var(--gray-800);
    line-height: 1.6;
}

/* -- NAV -- */
.nav {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.5);
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-logo {
    font-size: 20px;
    font-weight: 700;
    color: var(--rain-700);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}
.nav-logo svg { flex-shrink: 0; }

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    margin: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--rain-700);
    flex-shrink: 0;
    flex-direction: column;
    gap: 5px;
}
.nav-toggle-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
    transition: transform 0.25s, opacity 0.25s;
}
.nav.is-open .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav.is-open .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}
.nav.is-open .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.nav-links { display: flex; gap: 8px; }
.nav-links a {
    color: var(--gray-600);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
}
.nav-links a:hover {
    background: var(--sky-100);
    color: var(--sky-700);
}

/* -- MAIN LAYOUT -- */
.page {
    max-width: 640px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

/* -- HERO / HOME -- */
.hero {
    text-align: center;
    padding: 20px 0 0;
}
.hero-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
    animation: float 3s ease-in-out infinite;
}
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}
.hero h1 {
    font-size: 32px;
    font-weight: 800;
    color: var(--rain-800);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}
.hero p {
    font-size: 16px;
    color: var(--gray-500);
    margin-bottom: 32px;
}

/* -- SEARCH CARD -- */
.search-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow-lg);
    text-align: center;
}
.search-card label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 12px;
}
.search-input-group {
    display: flex;
    gap: 12px;
    max-width: 360px;
    margin: 0 auto;
}
.search-input {
    flex: 1;
    height: 56px;
    font-size: 24px;
    text-align: center;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    background: var(--gray-50);
    color: var(--gray-800);
    font-weight: 600;
    letter-spacing: 8px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.search-input::placeholder {
    color: var(--gray-300);
    letter-spacing: 4px;
    font-weight: 400;
    font-size: 16px;
}
.search-input:focus {
    border-color: var(--sky-400);
    box-shadow: 0 0 0 4px rgba(54, 169, 255, 0.15);
}
.search-btn {
    height: 56px;
    padding: 0 28px;
    background: linear-gradient(135deg, var(--sky-500), var(--sky-600));
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s;
    white-space: nowrap;
}
.search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 144, 240, 0.35);
}
.search-btn:active { transform: translateY(0); }

/* -- RESULT CARD -- */
.result-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px 32px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    overflow: hidden;
}
.result-card.has-bar {
    padding-top: 0;
}
.result-card-inner {
    padding: 32px 0 0;
}
.result-icon {
    width: 140px;
    height: 140px;
    margin: 0 auto 20px;
}
.result-card h2 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 4px;
}
.result-card h2.yes { color: var(--sky-600); }
.result-card h2.no { color: var(--green-500); }
.result-card .subtitle {
    font-size: 16px;
    color: var(--gray-500);
    margin-bottom: 24px;
}

/* -- WEATHER DETAILS -- */
.weather-details {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.weather-stat {
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    padding: 16px 24px;
    min-width: 130px;
}
.weather-stat .label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-500);
    margin-bottom: 4px;
}
.weather-stat .value {
    font-size: 22px;
    font-weight: 700;
    color: var(--gray-800);
}
.weather-stat .value img {
    height: 40px;
    vertical-align: middle;
}
.result-location {
    font-size: 14px;
    color: var(--gray-500);
    margin-bottom: 20px;
}
.back-btn {
    display: inline-block;
    padding: 12px 28px;
    background: var(--gray-100);
    color: var(--gray-700);
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.2s;
}
.back-btn:hover { background: var(--gray-200); }

/* -- CONTENT CARD (about, contact, etc.) -- */
.content-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px 36px;
    box-shadow: var(--shadow-lg);
}
.content-card h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--rain-800);
    margin-bottom: 16px;
}
.content-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--rain-700);
    margin: 20px 0 8px;
}
.content-card p {
    font-size: 15px;
    color: var(--gray-600);
    margin-bottom: 14px;
    line-height: 1.7;
}
.content-card a {
    color: var(--sky-600);
    text-decoration: none;
    font-weight: 500;
}
.content-card a:hover { text-decoration: underline; }

/* -- CONTACT FORM -- */
.form-group {
    margin-bottom: 16px;
    text-align: left;
}
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 6px;
}
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    background: var(--gray-50);
    color: var(--gray-800);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}
.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--sky-400);
    box-shadow: 0 0 0 4px rgba(54, 169, 255, 0.15);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--sky-500), var(--sky-600));
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s;
    margin-top: 8px;
}
.form-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 144, 240, 0.35);
}

/* -- TOP 50 LIST -- */
.top-list {
    list-style: none;
}
.top-list li {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-100);
    transition: background 0.15s;
}
.top-list li:hover { background: var(--sky-50); }
.top-list li:last-child { border-bottom: none; }
.top-rank {
    width: 32px;
    height: 32px;
    background: var(--sky-100);
    color: var(--sky-700);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    margin-right: 14px;
    flex-shrink: 0;
}
.top-list li:nth-child(1) .top-rank { background: var(--sun-300); color: var(--gray-800); }
.top-list li:nth-child(2) .top-rank { background: var(--gray-200); color: var(--gray-700); }
.top-list li:nth-child(3) .top-rank { background: #f4c08a; color: var(--gray-800); }
.top-name {
    flex: 1;
    font-weight: 500;
    color: var(--gray-800);
}
.top-name a {
    color: inherit;
    text-decoration: none;
}
.top-name a:hover { color: var(--sky-600); }
.top-hits {
    font-size: 13px;
    color: var(--gray-500);
    font-weight: 500;
}

/* -- FOOTER -- */
.footer {
    text-align: center;
    padding: 32px 20px 40px;
    max-width: 640px;
    margin: 0 auto;
}
.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 16px;
}
.footer-links a {
    color: var(--rain-600);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
}
.footer-links a:hover { text-decoration: underline; }
.footer-copy {
    font-size: 13px;
    color: var(--gray-500);
    line-height: 1.8;
}
.footer-copy a {
    color: var(--gray-500);
    text-decoration: none;
}
.footer-copy a:hover { text-decoration: underline; }

/* -- RAIN ANIMATION BAR -- */
.rain-container {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius) var(--radius) 0 0;
    height: 8px;
    background: linear-gradient(90deg, var(--sky-300), var(--sky-400), var(--sky-300));
    background-size: 200% 100%;
    animation: shimmer 2s ease-in-out infinite;
}
@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
.sun-bar {
    height: 8px;
    border-radius: var(--radius) var(--radius) 0 0;
    background: linear-gradient(90deg, var(--sun-300), var(--sun-400), var(--sun-300));
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

/* -- RESPONSIVE: Tablet -- */
@media (max-width: 768px) {
    .nav {
        padding: 0 16px;
        flex-wrap: wrap;
    }
    .nav-toggle {
        display: flex;
        order: 2;
    }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        padding: 12px 16px 20px;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--gray-100);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    }
    .nav.is-open .nav-links {
        display: flex;
    }
    .nav-links a {
        padding: 14px 12px;
        font-size: 16px;
        border-radius: 8px;
    }
    .page { padding: 28px 16px 48px; }
    .hero h1 { font-size: 28px; }
    .hero p { font-size: 15px; }
    .content-card { padding: 32px 24px; }
    .search-card { padding: 28px 24px; }
    .result-card-inner { padding: 28px 16px 0; }
}

/* -- RESPONSIVE: Mobile -- */
@media (max-width: 480px) {
    .nav {
        height: 56px;
        padding: 0 12px;
    }
    .nav-logo {
        font-size: 16px;
        gap: 6px;
    }
    .nav-logo svg { width: 22px; height: 22px; }
    .nav-links a {
        padding: 14px 12px;
        font-size: 16px;
    }

    .page { padding: 20px 12px 40px; }

    .hero { padding-top: 10px; }
    .hero-icon { width: 90px; height: 90px; margin-bottom: 18px; }
    .hero h1 { font-size: 24px; }
    .hero p { font-size: 14px; margin-bottom: 24px; }

    .search-card { padding: 24px 16px; }
    .search-card label { font-size: 14px; }
    .search-input-group { flex-direction: column; }
    .search-input {
        height: 64px;
        font-size: 28px;
        letter-spacing: 8px;
    }
    .search-btn {
        height: 60px;
        font-size: 16px;
    }

    .result-card { padding: 0; }
    .result-card-inner { padding: 24px 16px 0; }
    .result-icon { width: 100px; height: 100px; margin-bottom: 16px; }
    .result-card h2 { font-size: 22px; }
    .result-card .subtitle { font-size: 14px; margin-bottom: 18px; }
    .result-location { font-size: 13px; }
    .weather-details {
        gap: 10px;
        margin-bottom: 22px;
    }
    .weather-stat {
        min-width: 0;
        flex: 1;
        padding: 12px 14px;
    }
    .weather-stat .value { font-size: 18px; }
    .back-btn {
        display: block;
        text-align: center;
        padding: 14px 24px;
        font-size: 15px;
        margin-bottom: 8px;
    }

    .content-card { padding: 24px 18px; }
    .content-card h2 { font-size: 20px; }
    .content-card p { font-size: 14px; }

    .form-group label { font-size: 13px; }
    .form-group input,
    .form-group textarea {
        padding: 12px;
        font-size: 16px;
    }
    .form-submit {
        padding: 16px;
        font-size: 16px;
    }

    .top-list li { padding: 10px 12px; }
    .top-rank {
        width: 28px;
        height: 28px;
        font-size: 12px;
        margin-right: 10px;
    }
    .top-name { font-size: 14px; }
    .top-hits { font-size: 11px; white-space: nowrap; }

    .footer { padding: 24px 12px 32px; }
    .footer-links {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 20px;
    }
    .footer-links a { font-size: 15px; }
    .footer-copy { font-size: 12px; }
}

/* -- RESPONSIVE: Very small screens -- */
@media (max-width: 360px) {
    .nav-logo { font-size: 14px; }
    .nav-links a { font-size: 15px; padding: 12px; }
    .hero h1 { font-size: 21px; }
    .search-input {
        font-size: 26px;
        letter-spacing: 6px;
        height: 60px;
    }
    .result-card h2 { font-size: 20px; }
    .weather-stat .label { font-size: 11px; }
    .weather-stat .value { font-size: 16px; }
}

