:root {
  /* Brand Palette */
  --bg-gradient-start: #080910;
  --bg-gradient-end: #0E121F;
  --nav-gradient: linear-gradient(90deg, rgba(235,255,249,1), rgba(169,242,232,1), rgba(62,232,187,1), rgba(36,175,156,1));
  --alert-bg: #F2A9A9;
  --alert-text: #5a1a1a;
  --card-bg: rgba(14, 18, 31, 0.65);
  --card-border: rgba(169, 242, 232, 0.2);
  --text-main: #F5F7FA;
}

body {
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    min-height: 100vh;
    background-image: radial-gradient(circle at center, var(--bg-gradient-start), var(--bg-gradient-end));
    display: flex;
    flex-direction: column;
    color: var(--text-main);
}

.transition-container {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
}

.swipe {
    position: absolute;
    top: 0;
    width: 25%;
    height: 100%;
    transform: translateY(-100%);
}

.s1 {
    left: 0%;
    background: #EBFFF9;
    transition: transform 0.4s;
}

.s2 {
    left: 25%;
    background: #A9F2E8;
    transition: transform 0.5s;
}

.s3 {
    left: 50%;
    background: #3EE8BB;
    transition: transform 0.6s;
}

.s4 {
    left: 75%;
    background: #24AF9C;
    transition: transform 0.7s;
}

.transition-container.active .swipe {
    transform: translateY(0);
}

.swipe {
    transform: translateY(0);
}

.loaded .swipe {
    transform: translateY(-100%);
}
/* NAVIGATION */

.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;

    width: 100%;
    box-sizing: border-box;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 16px 5%;

    background: rgba(8, 9, 16, 0.78);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    border-bottom: 1px solid rgba(169, 242, 232, 0.12);
}

/* LOGO */

.logo {
    display: flex;
    align-items: center;
    gap: 12px;

    text-decoration: none;
    color: var(--text-main);
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 38px;
    height: 38px;

    border-radius: 12px;

    background: var(--nav-gradient);
    color: #080910;

    font-size: 21px;
    font-weight: 800;
}

.logo-text {
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* NAVIGATION */

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;

    width: min(95%, 1050px);
    box-sizing: border-box;
    margin: 20px auto;
    padding: 16px 24px;

    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);

    border: 1px solid var(--card-border);
    border-radius: 24px;

    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* LOGO */

.logo h1 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.5px;

    background: var(--nav-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* NAV LINKS */

.nav-links {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-links a {
    text-decoration: none;
    color: rgba(245, 247, 250, 0.8);

    padding: 11px 20px;
    border-radius: 14px;

    font-size: 0.9rem;
    font-weight: 600;

    transition: all 0.25s ease;
}

.nav-links a:hover {
    background: rgba(62, 232, 187, 0.12);
    color: #3EE8BB;
    transform: translateY(-2px);
}

/* MOBILE MENU BUTTON */

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;

    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 14px;

    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 6px;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    background: var(--text-main);
    border-radius: 10px;
    transition: 0.3s ease;
}

/* MOBILE NAVIGATION */

@media (max-width: 650px) {

    .navbar {
        width: 92%;
        margin: 14px auto;
        padding: 12px 16px;
        border-radius: 20px;
    }

    .logo h1 {
        font-size: 1.15rem;
    }

    .menu-toggle {
        display: flex;
        position: relative;
        z-index: 1002;
    }

    .nav-links {
        position: fixed;
        inset: 0;
        z-index: 1001;

        width: 100%;
        height: 100vh;
        height: 100dvh;
        box-sizing: border-box;

        background: rgba(8, 9, 16, 0.97);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);

        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 16px;

        opacity: 0;
        visibility: hidden;
        pointer-events: none;

        transition: opacity 0.3s ease,
                    visibility 0.3s ease;
    }

    .nav-links.open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .nav-links a {
        width: 70%;
        text-align: center;
        padding: 18px;
        font-size: 1.3rem;
        border-radius: 16px;
    }

    /* Hamburger animation */

    .menu-toggle.open span:first-child {
        transform: translateY(4px) rotate(45deg);
    }

    .menu-toggle.open span:last-child {
        transform: translateY(-4px) rotate(-45deg);
    }
}


.alert {
  background: var(--alert-bg);
  color: var(--alert-text);
  padding: 8px 16px;
  margin: 0;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 500;
  width: 100%;
  box-sizing: border-box;
}

/* Optimized PC Dashboard Layout (2 Columns) */
.weather-dashboard {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 24px;
  width: min(95%, 1050px);
  margin: 32px auto;
  align-items: stretch;
}


/* Update left-column to space-between so both cards match the height of the right column */
.left-column {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}

/* Ensure both cards take equal share of the height */
.left-column .current-conditions,
.left-column .sun-container {
  flex: 1;
}

/* Shared Card Styling */
.current-conditions,
.hourly-container,
.sun-container {
  width: 100%;
  box-sizing: border-box;
  padding: 28px 32px;
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hourly-container {
  height: 100%;
}

/* Responsive fallback for mobile screens */
@media (max-width: 768px) {
  .weather-dashboard {
    grid-template-columns: 1fr;
    width: 90%;
  }
}
/* Sun Card Details */
.sun-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: center;
  height: 100%;
}

.sun-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  padding: 14px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.sun-label {
  font-size: 0.9rem;
  color: rgba(245, 247, 250, 0.75);
  font-weight: 600;
}

.sun-time {
  font-size: 1.15rem;
  font-weight: 700;
  color: #a9f2e8;
}

.sun-container h2 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.3;
}

.current-conditions h2, 
.current-conditions .title,
.hourly-container h2,
.hourly-container h3 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.3;
}

/* Current Conditions Content */
.data {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 20px;
}

.weather-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.temperature {
  font-size: 2.5rem;
  font-weight: 700;
}

.condition-text {
  font-size: 0.95rem;
  color: rgba(245, 247, 250, 0.75);
}

#weatherIcon {
  height: 80px;
  width: auto;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.3));
}

/* Hourly Forecast Content */
.hourly-slots {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  height: 100%;
}

.hourly-slot-item {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  padding: 16px 10px;
  border-radius: 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Use grid layout internally within each slot for absolute vertical consistency */
  justify-content: space-between;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.hourly-time {
  font-size: 0.85rem;
  color: rgba(245, 247, 250, 0.6);
  font-weight: 600;
}

.hourly-icon {
  width: 65%;
  object-fit: contain;
  margin: 8px 0;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.hourly-temp {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 4px 0;
}

/* Fixed container for pop to prevent shifting when present/absent */
.hourly-pop {
  font-size: 1rem;
  color: #a9f2e8;
  font-weight: 600;
  height: 1.2rem; /* Reserves exact vertical space even if empty */
  display: flex;
  align-items: center;
  justify-content: center;
}

.hourly-desc {
  font-size: 0.9rem;
  color: rgba(245, 247, 250, 0.8);
  line-height: 1.2;
  margin-top: 4px;
}