/* Modern Reset & Dynamic Neon Palette */
:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --accent: #06b6d4;
    --text-main: #0f172a;
    --text-muted: #475569;
    --border-navy: #000080;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.08);
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    margin: 0;
    padding: 60px 20px 120px 20px;
    background: linear-gradient(135deg, #e0e7ff 0%, #f1f5f9 50%, #ecfeff 100%);
    background-attachment: fixed;
    color: var(--text-main);
    text-align: center;
}

/* Typography Enhancements */
header h1 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    margin-bottom: 40px;
    color: #1e1b4b;
}

header h1 span {
    background: linear-gradient(to right, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Premium Glassmorphic Cards */
.weather-box {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 35px;
    border-radius: 24px;
    max-width: 550px;
    margin: 0 auto 60px auto;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: var(--glass-shadow);
}

.weather-box h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 25px;
    color: #1e293b;
}

/* Sleek Dashboard Forms & Interactive Controls */
.weather-inputs {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.weather-inputs input {
    flex: 1;
    padding: 14px 18px;
    font-size: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    outline: none;
    font-family: inherit;
    font-weight: 600;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.9);
}

.weather-inputs input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
}

.divider {
    position: relative;
    margin: 20px 0;
    text-align: center;
}

.divider::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: #cbd5e1;
    z-index: 1;
}

.divider span {
    background: #f1f5f9;
    padding: 0 15px;
    position: relative;
    z-index: 2;
    font-weight: 700;
    color: var(--text-muted);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

button {
    background: linear-gradient(135deg, var(--primary) 0%, #4338ca 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 14px;
    cursor: pointer;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

#city-btn {
    width: auto;
    padding: 14px 24px;
    background: #0f172a;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

#city-btn:hover { background: #1e293b; transform: translateY(-1px); }
button:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(79, 70, 229, 0.3); }
button:active { transform: translateY(0); }

/* Weather Output Display Units */
.info-label {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    margin: 25px 0 15px 0;
    background: rgba(79, 70, 229, 0.08);
    padding: 8px 16px;
    border-radius: 30px;
    display: inline-block;
}

.weather-stats {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 10px;
}

.stat-pill {
    background: white;
    padding: 14px 22px;
    border-radius: 16px;
    font-size: 1.2rem;
    font-weight: 800;
    color: #334155;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    border: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hidden { display: none !important; }
.animate-fade-in { animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1); }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Gallery Controls & Layout Configurations */
.gallery {
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 35px;
}

@media (min-width: 768px) {
    .gallery-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.gallery-header h2 { font-size: 1.8rem; font-weight: 800; color: #1e293b; margin: 0; }

.gallery-controls {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-muted);
    background: white;
    padding: 8px 16px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.gallery-controls select {
    padding: 6px 12px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    border-radius: 8px;
    border: 2px solid #cbd5e1;
    outline: none;
    cursor: pointer;
    margin: 0 4px;
    color: var(--text-main);
}

.gallery-controls select:focus { border-color: var(--primary); }

/* Layout Grid Setup */
.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 992px) {
    .grid { grid-template-columns: repeat(4, 1fr); }
}

/* Image Frames with Thick Navy Blue Borders */
.gallery-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 16px;
    border: 6px solid var(--border-navy); /* Custom Navy Border Frame */
    box-shadow: 0 10px 25px -5px rgba(0,0,128, 0.15), 0 8px 10px -6px rgba(0,0,128, 0.15);
    box-sizing: border-box;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-img:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 35px -5px rgba(0,0,128, 0.25);
}

/* Pagination Control Buttons */
.pagination-nav {
    margin-top: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
}

.nav-btn {
    background: #0f172a;
    font-size: 15px;
    padding: 12px 24px;
    width: auto;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.15);
}

.nav-btn:disabled {
    background: #cbd5e1;
    color: #94a3b8;
    box-shadow: none;
    cursor: not-allowed;
    transform: none !important;
}

#page-info {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
}

/* Image Viewer Lightbox Modal Component */
.lightbox {
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.25s ease-out;
}

.lightbox-content {
    max-width: 92%;
    max-height: 85%;
    border-radius: 16px;
    object-fit: contain;
    border: 4px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 32px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 44px;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.lightbox-close:hover { color: white; }

/* Sticky bottom floating badge for courtesy credit text */
.courtesy-tag {
    position: fixed;
    bottom: 16px;
    left: 20px;
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 8px 16px;
    border-radius: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.5);
}
