/* Background */
body {
    min-height: 100vh;
    background: linear-gradient(135deg, #74ebd5 0%, #ACB6E5 100%);
    background-attachment: fixed;
}

/* Frosted glass effect for cards and navbar */
.frosted,
.weather-main-card {
    max-width: 1000px;
    width: 100%;
    padding: 3rem 2.5rem;
    font-size: 1.2rem;
    background: rgba(255, 255, 255, 0.92); /* Less transparent */
    /* More transparent */
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    border: 1px solid rgba(255, 255, 255, 0.18);
    margin-left: auto;
    margin-right: auto;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Glassmorphism Navbar */
.glass-navbar {
    background: rgba(255,255,255,0.75) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 0 0 18px 18px;
    box-shadow: 0 4px 24px 0 rgba(31,38,135,0.10);
    transition: background 0.3s, box-shadow 0.3s;
}
.dark-mode .glass-navbar {
    background: rgba(34,34,34,0.85) !important;
}

/* Navbar and WeatherHub brand */
.weather-navbar {
    background: #eaeaea !important;
    box-shadow: none;
    border-bottom: none;
}

.weather-navbar .navbar-brand,
.weather-navbar .navbar-brand i {
    color: #42a5f5 !important;
    font-weight: bold;
    font-size: 2rem;
    letter-spacing: 1px;
    background: none !important;
    -webkit-text-fill-color: #42a5f5 !important;
    text-shadow: none !important;
}

.navbar-nav .nav-link.active {
    font-weight: bold;
    color: #42a5f5 !important;
    background: #f4f4f4;
    border-radius: 8px 8px 0 0;
    border-bottom: 2px solid #42a5f5;
    text-decoration: none;
}

.navbar-nav .nav-link {
    color: #5a5a5a !important;
    font-weight: 500;
    margin-right: 0.5rem;
    transition: background 0.2s, color 0.2s;
    border-radius: 8px;
    padding: 0.5rem 1rem;
}

.navbar-nav .nav-link:hover {
    background: #f4f4f4;
    color: #42a5f5 !important;
    text-decoration: none;
}

/* Profile icon */
.navbar-nav .dropdown-toggle .bi-person {
    font-size: 1.5rem;
    line-height: 32px;
}

/* Language select styling (optional for consistency) */
#languageSelect {
    background: #fff;
    border-radius: 8px;
    border: none;
    padding: 0.25rem 1rem;
    font-weight: 500;
    color: #5a5a5a;
}

/* Map page specific */
#map {
    width: 100%;
    height: 500px;
    border-radius: 16px;
    margin-bottom: 1rem;
}

.weather-popup {
    min-width: 200px;
}

/* Footer */
.footer {
    background: #f8f9fa;
    color: #6c757d;
    font-size: 1rem;
}

/* Card styling */
.card {
    border-radius: 1.5rem;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.18);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(90deg, #74ebd5 0%, #ACB6E5 100%);
    border: none;
    color: #222;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: linear-gradient(90deg, #ACB6E5 0%, #74ebd5 100%);
    color: #222;
}

/* Profile Card */
.profile-card {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 24px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.18);
    padding: 2.5rem 2rem 2rem 2rem;
    max-width: 440px;
    width: 100%;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.profile-card .welcome {
    font-size: 1.2rem;
    font-weight: 500;
    color: #3b3b3b;
    margin-bottom: 1.2rem;
    background: linear-gradient(90deg, #74ebd5 0%, #ACB6E5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.profile-card .edit-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 2;
}

/* Profile Picture */
.profile-pic {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #74ebd5 0%, #ACB6E5 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem auto;
    font-size: 3rem;
    color: #fff;
    box-shadow: 0 2px 12px rgba(31, 38, 135, 0.18);
    border: 3px solid #fff;
    position: relative;
    overflow: hidden;
}

.profile-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

/* Fun Fact & Tips Cards */
.tips-card {
    background: rgba(255, 255, 255, 0.96);
    border-radius: 18px;
    box-shadow: 0 2px 8px rgba(31, 38, 135, 0.10);
    padding: 1.2rem 1.5rem;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    justify-content: center;
}

.tips-card h5 {
    font-weight: 600;
    color: #3b3b3b;
}

/* Weather button */
.btn-weather {
    background: linear-gradient(90deg, #74ebd5 0%, #ACB6E5 100%);
    color: #fff;
    border: none;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-weather:hover {
    background: linear-gradient(90deg, #ACB6E5 0%, #74ebd5 100%);
    color: #222;
}

/* Responsive container */
.container {
    max-width: 900px;
}

/* Footer links */
.footer a {
    text-decoration: none;
    color: #6c757d;
}

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

/* Nearby places card styling */
#nearbyPlaces .card {
    background: rgba(255, 255, 255, 0.96);
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(31, 38, 135, 0.10);
    padding: 1rem;
    min-height: 200px;
    /* or higher if needed */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Make the world capitals weather card wider and more transparent */
#nearbyPlaces .card,
#nearbyPlaces .weather-card {
    min-width: 200px;
    max-width: 260px;
    width: 100%;
    min-height: 180px;
    font-size: 1rem;
    padding: 1.2rem 0.8rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 2px 8px rgba(31, 38, 135, 0.09);
    margin: 0 8px 16px 8px;
}

/* Additional styles for specific card instance */
#nearbyPlaces .card.lome-togo {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 123, 255, 0.2);
}

#nearbyPlaces .card.lome-togo strong {
    font-size: 1.2rem;
    color: #007bff;
}

#nearbyPlaces .card.lome-togo .btn {
    background-color: #28a745;
    color: white;
    border-radius: 0.5rem;
    transition: background-color 0.3s;
}

#nearbyPlaces .card.lome-togo .btn:hover {
    background-color: #218838;
}

#nearbyPlaces .row {
    /* display: flex; */
    /* flex-wrap: wrap; */
}

#nearbyPlaces .col-12,
#nearbyPlaces .col-sm-6,
#nearbyPlaces .col-lg-4 {
    /* display: flex; */
    /* height: 100%; */
}

@media (max-width: 991px) {
    .frosted {
        max-width: 98vw;
        padding: 2rem 1rem;
    }

    #nearbyPlaces .card,
    #nearbyPlaces .weather-card {
        max-width: 98vw;
        min-width: 90vw;
        padding: 1.2rem 0.7rem;
    }

    .glass-navbar {
        border-radius: 0 0 12px 12px;
        padding: 0.5rem 0.5rem;
    }
    .navbar-nav {
        gap: 0.5rem;
        background: rgba(255,255,255,0.95);
        border-radius: 0 0 16px 16px;
        margin-top: 0.5rem;
        padding: 0.5rem 0.5rem;
    }
    .dark-mode .navbar-nav {
        background: rgba(34,34,34,0.95);
    }
    .navbar-logo {
        width: 32px;
        height: 32px;
        font-size: 1.1rem;
    }
}

@media (max-width: 767px) {
    .frosted {
        padding: 1.2rem 0.7rem;
        max-width: 98vw;
        font-size: 1rem;
    }

    #nearbyPlaces .card,
    #nearbyPlaces .weather-card {
        max-width: 98vw;
        min-width: 98vw;
        padding: 1rem 0.5rem;
        font-size: 1rem;
    }
}

/* --- Dark Mode Styles --- */
body.dark-mode {
    background: linear-gradient(135deg, #232526 0%, #414345 100%);
    color: #e0e0e0;
}
.dark-mode .frosted,
.dark-mode .weather-main-card,
.dark-mode .profile-card,
.dark-mode .tips-card,
.dark-mode #nearbyPlaces .card,
.dark-mode #nearbyPlaces .weather-card {
    background: rgba(34, 34, 34, 0.92) !important;
    color: #e0e0e0;
    box-shadow: 0 8px 32px 0 rgba(0,0,0,0.37);
    border: 1px solid rgba(255,255,255,0.08);
}
.dark-mode .weather-navbar {
    background: #232526 !important;
}
.dark-mode .weather-navbar .navbar-brand,
.dark-mode .weather-navbar .navbar-brand i {
    color: #90caf9 !important;
    -webkit-text-fill-color: #90caf9 !important;
}
.dark-mode .navbar-nav .nav-link.active {
    background: #333;
    color: #90caf9 !important;
    border-bottom: 2px solid #90caf9;
}
.dark-mode .navbar-nav .nav-link {
    color: #e0e0e0 !important;
}
.dark-mode .navbar-nav .nav-link:hover {
    background: #333;
    color: #90caf9 !important;
}
.dark-mode #languageSelect {
    background: #232526;
    color: #e0e0e0;
}

/* --- Loader Overlay --- */
#loaderOverlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(34,34,34,0.6);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}
#loaderOverlay.active {
    display: flex;
}

/* --- Toast Notification --- */
#toastContainer {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 3000;
}
.toast {
    min-width: 220px;
    background: #fff;
    color: #222;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(31,38,135,0.10);
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    opacity: 0.95;
    transition: opacity 0.3s, transform 0.3s;
}
.dark-mode .toast {
    background: #232526;
    color: #e0e0e0;
}

/* --- Animated Weather Icon Placeholder --- */
#animatedWeatherIcon {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80px;
    margin-bottom: 1rem;
}

/* --- Card Hover Effects --- */
.frosted, .card, .tips-card, #nearbyPlaces .card, #nearbyPlaces .weather-card {
    transition: box-shadow 0.3s, transform 0.3s, background 0.3s;
}
.frosted:hover, .card:hover, .tips-card:hover, #nearbyPlaces .card:hover, #nearbyPlaces .weather-card:hover {
    box-shadow: 0 12px 32px 0 rgba(31,38,135,0.25);
    transform: translateY(-4px) scale(1.03);
    background: rgba(255,255,255,0.97);
}
.dark-mode .frosted:hover, .dark-mode .card:hover, .dark-mode .tips-card:hover, .dark-mode #nearbyPlaces .card:hover, .dark-mode #nearbyPlaces .weather-card:hover {
    background: rgba(34,34,34,0.97) !important;
}

/* --- Smooth Theme Transition --- */
body, .frosted, .weather-main-card, .profile-card, .tips-card, #nearbyPlaces .card, #nearbyPlaces .weather-card, .weather-navbar, .toast {
    transition: background 0.3s, color 0.3s, box-shadow 0.3s;
}

/* Custom styles for modern navbar, logo, and hamburger */
.navbar-logo {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #74ebd5 0%, #42a5f5 100%);
    color: #fff;
    font-size: 1.5rem;
    box-shadow: 0 2px 8px rgba(31,38,135,0.10);
}

.profile-avatar {
    width: 32px;
    height: 32px;
    background: #6d6464;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    border-radius: 50%;
}

/* Custom Hamburger Animation */
.custom-toggler .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(66,165,245,0.8)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    border-radius: 6px;
    transition: background 0.3s;
}
.custom-toggler:focus {
    outline: none;
    box-shadow: 0 0 0 2px #42a5f5;
}

/* Navbar link spacing and mobile improvements */
.navbar-nav {
    gap: 0.2rem;
}

/* Increase touch target for nav links and buttons */
.nav-link, .btn, .form-select {
    min-height: 40px;
    min-width: 40px;
    font-size: 1rem;
}

/* Homepage Modern Grid */
.homepage-grid {
    margin-top: 1.5rem;
    margin-bottom: 2rem;
}
@media (max-width: 991px) {
    .homepage-grid .row {
        flex-direction: column;
    }
}

/* Main Weather Card */
.weather-main-card {
    min-height: 320px;
    box-shadow: 0 8px 32px 0 rgba(31,38,135,0.13);
    border-radius: 24px;
    position: relative;
    overflow: visible;
}
.btn-refresh {
    z-index: 2;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(31,38,135,0.10);
    transition: background 0.2s;
}
.btn-refresh:hover {
    background: #e3f2fd;
}

/* Fun Fact Card */
.tips-card {
    background: rgba(255, 255, 255, 0.96);
    border-radius: 18px;
    box-shadow: 0 2px 8px rgba(31, 38, 135, 0.10);
    padding: 1.2rem 1.5rem;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    justify-content: center;
}
.dark-mode .tips-card {
    background: rgba(34,34,34,0.96);
}

/* World Capitals Card - Horizontal Scroll */
.world-capitals-card {
    overflow-x: auto;
    padding-bottom: 0.5rem;
}
.horizontal-scroll {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 1rem;
    padding-bottom: 0.5rem;
}
.horizontal-scroll .card, .horizontal-scroll .frosted, .horizontal-scroll .nearby-card {
    min-width: 220px;
    max-width: 260px;
    flex: 0 0 auto;
}

/* Air Quality Card (future) */
.air-quality-card {
    background: linear-gradient(90deg, #e3f2fd 0%, #b3e5fc 100%);
    color: #222;
    border-radius: 18px;
    box-shadow: 0 2px 8px rgba(31, 38, 135, 0.10);
    padding: 1.2rem 1.5rem;
    font-size: 1.1rem;
}
.dark-mode .air-quality-card {
    background: linear-gradient(90deg, #232526 0%, #414345 100%);
    color: #e0e0e0;
}

/* Auth Pages Professional Redesign */
.auth-bg {
    min-height: 100vh;
    background: linear-gradient(135deg, #e3eafc 0%, #cfd8dc 100%);
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
}
.glass-card {
    background: rgba(255,255,255,0.98);
    border-radius: 18px;
    box-shadow: 0 8px 32px 0 rgba(44,62,80,0.13);
    max-width: 400px;
    width: 100%;
    margin: 2rem auto;
    transition: box-shadow 0.3s;
    border: 1px solid #e3eafc;
}
.glass-card:hover {
    box-shadow: 0 12px 32px 0 rgba(44,62,80,0.18);
}
.auth-logo {
    width: 54px;
    height: 54px;
    background: linear-gradient(135deg, #3a506b 0%, #5bc0be 100%);
    color: #fff;
    font-size: 2rem;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(44,62,80,0.10);
    margin-bottom: 0.5rem;
}
.form-floating > .form-control:focus {
    border-color: #3a506b;
    box-shadow: 0 0 0 2px #3a506b33;
}
.btn-primary {
    background: linear-gradient(90deg, #3a506b 0%, #5bc0be 100%);
    border: none;
    color: #fff;
    font-weight: 600;
    transition: background 0.3s, box-shadow 0.3s;
    box-shadow: 0 2px 8px rgba(44,62,80,0.10);
}
.btn-primary:hover {
    background: linear-gradient(90deg, #5bc0be 0%, #3a506b 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(44,62,80,0.13);
}
.back-btn {
    font-weight: 500;
    color: #3a506b;
    background: none;
    border: none;
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.2s;
    z-index: 10;
}
.back-btn:hover {
    color: #5bc0be;
    text-decoration: underline;
}
@media (max-width: 600px) {
    .glass-card {
        padding: 1.5rem 0.7rem;
        max-width: 98vw;
    }
}

/* Weather Alert Card */
.weather-alert-card {
    background: linear-gradient(90deg, #fffbe7 0%, #ffe0b2 100%);
    border-left: 6px solid #ff9800;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.08);
    padding: 1.2rem 1.5rem;
    color: #7c4700;
    font-size: 1.08rem;
    margin-bottom: 1.5rem;
    transition: box-shadow 0.2s;
}
.dark-mode .weather-alert-card {
    background: linear-gradient(90deg, #2d2d2d 0%, #4e342e 100%);
    color: #ffd54f;
    border-left: 6px solid #ffb300;
}