* { margin: 0; padding: 0; box-sizing: border-box; }

    :root {
      --base-100: #eef1f5;
      --base-200: #e4e8ee;
      --base-300: #d9dee6;
      --ink: #33394a;
      --ink-soft: #6b7280;
      --accent: #7c8db5;
      --accent-deep: #576a92;
      --shadow-light: #ffffff;
      --shadow-dark: #bcc3ce;
      --radius-lg: 2.2rem;
      --radius-md: 1.5rem;
      --radius-sm: 1rem;
    }

    body {
      background: linear-gradient(160deg, #f4f6f9 0%, #e6eaf0 45%, #dde2ea 100%);
      font-family: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
      min-height: 100vh;
      display: flex;
      align-items: flex-start;
      justify-content: center;
      padding: 2rem 1.2rem 6.5rem;
      color: var(--ink);
    }

    .weather-dashboard {
      max-width: 480px;
      width: 100%;
      display: flex;
      flex-direction: column;
      gap: 1.4rem;
    }

    /* Neumorphic base: raised surface using dual light/dark shadows on a flat base color */
    .neu-raised {
      background: var(--base-100);
      border-radius: var(--radius-lg);
      box-shadow: 8px 8px 18px var(--shadow-dark), -8px -8px 18px var(--shadow-light);
    }

    .neu-inset {
      background: var(--base-100);
      border-radius: var(--radius-md);
      box-shadow: inset 5px 5px 12px var(--shadow-dark), inset -5px -5px 12px var(--shadow-light);
    }

    /* Glass overlay on top of neumorphic base for a hybrid silver-glass finish */
    .glass {
      background: linear-gradient(135deg, rgba(255,255,255,0.55), rgba(255,255,255,0.15));
      backdrop-filter: blur(18px) saturate(160%);
      -webkit-backdrop-filter: blur(18px) saturate(160%);
      border: 1px solid rgba(255,255,255,0.6);
    }

    .top-bar {
      display: flex;
      align-items: center;
      flex-direction: column;
      gap: 0.9rem;
      padding: 0.9rem 1rem;
    }

    .top-bar-logo-row {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 0.35rem;
    }

    .top-bar-search-row {
      display: flex;
      align-items: center;
      gap: 0.6rem;
      width: 100%;
    }

    .logo-icon {
      font-size: 1.5rem;
      color: var(--accent);
      background: var(--base-100);
      border-radius: 50%;
      width: 2.6rem;
      height: 2.6rem;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light);
      flex-shrink: 0;
    }

    .logo-icon-img {
      width: 3rem;
      height: 3rem;
      object-fit: contain;
      border-radius: 50%;
      background: var(--base-100);
      box-shadow: 4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light);
      padding: 0.35rem;
    }

    .logo-title { font-size: 1.15rem; font-weight: 700; color: var(--ink); display: block; letter-spacing: 0.2px; }
    .logo-sub { font-size: 0.72rem; font-weight: 400; color: var(--ink-soft); display: block; }

    .search-wrapper {
      flex: 1;
      display: flex;
      align-items: center;
      padding: 0.3rem 0.4rem 0.3rem 1.1rem;
      min-width: 0;
    }

    .search-wrapper i { color: var(--ink-soft); font-size: 0.95rem; flex-shrink: 0; }

    .search-wrapper input {
      background: transparent;
      border: none;
      padding: 0.65rem 0.6rem;
      font-size: 0.9rem;
      color: var(--ink);
      outline: none;
      width: 100%;
      min-width: 0;
      font-weight: 400;
    }

    .search-wrapper input::placeholder { color: var(--ink-soft); }

    .search-btn {
      background: var(--base-100);
      border: none;
      border-radius: 50%;
      width: 2.4rem;
      height: 2.4rem;
      color: var(--accent);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light);
      transition: box-shadow 0.15s ease, transform 0.15s ease;
      flex-shrink: 0;
    }

    .search-btn:active {
      box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light);
      transform: scale(0.97);
    }

    .weather-main {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 1.5rem;
      padding: 1.8rem 1.6rem;
    }

    .temperature-block { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }

    .weather-icon-large {
      font-size: 3.2rem;
      color: var(--accent);
      width: 5.2rem;
      height: 5.2rem;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 6px 6px 14px var(--shadow-dark), -6px -6px 14px var(--shadow-light);
      background: var(--base-100);
    }

    .temp-details { display: flex; flex-direction: column; }
    .temp-value { font-size: 3.1rem; font-weight: 700; line-height: 1; color: var(--ink); letter-spacing: -1px; }
    .condition-text { font-size: 1rem; font-weight: 600; color: var(--ink-soft); text-transform: capitalize; margin-top: 0.2rem; }
    .feels-like { font-size: 0.85rem; color: var(--ink-soft); margin-top: 0.15rem; }

    .location-info { text-align: right; display: flex; flex-direction: column; align-items: flex-end; }

    .save-city-btn {
      margin-top: 0.6rem;
      display: flex;
      align-items: center;
      gap: 0.4rem;
      background: var(--base-100);
      border: none;
      border-radius: 1.4rem;
      padding: 0.45rem 0.9rem;
      font-size: 0.72rem;
      font-weight: 600;
      color: var(--accent-deep);
      cursor: pointer;
      box-shadow: 3px 3px 7px var(--shadow-dark), -3px -3px 7px var(--shadow-light);
      transition: box-shadow 0.15s ease, color 0.15s ease;
    }

    .save-city-btn:active {
      box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light);
    }

    .save-city-btn.saved {
      color: #fff;
      background: linear-gradient(135deg, #bcc3ce, #bcc3ce);
      box-shadow: 3px 3px 10px #bcc3ce;
    }

    /* ---- Bottom nav: silver neumorphic pill with floating center FAB ---- */
    .bottom-nav {
      position: fixed;
      bottom: 1.1rem;
      left: 50%;
      transform: translateX(-50%);
      width: auto;
      height: 4rem;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 1.6rem;
      padding: 0 1.3rem;
      border-radius: 2.6rem;
      z-index: 20;
      background: transparent;
      box-shadow: 8px 8px 18px var(--shadow-dark), -8px -8px 18px var(--shadow-light);
    }

    .nav-side-btn {
      background: var(--base-100);
      border: none;
      color: var(--accent);
      width: 2.6rem;
      height: 2.6rem;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1rem;
      cursor: pointer;
      box-shadow: 3px 3px 7px var(--shadow-dark), -3px -3px 7px var(--shadow-light);
      transition: box-shadow 0.15s ease, transform 0.15s ease;
    }

    .nav-side-btn:active {
      transform: scale(0.93);
      box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light);
    }

    .nav-fab {
      position: relative;
      top: -1.5rem;
      width: 3.5rem;
      height: 3.5rem;
      border-radius: 50%;
      border: 4px solid var(--base-100);
      background: radial-gradient(circle at 35% 30%, #bcc3ce, #bcc3ce 55%, #bcc3ce 100%);
      color: #fff;
      font-size: 1.25rem;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      box-shadow: 0 6px 18px ;
      transition: transform 0.15s ease;
    }

    .nav-fab:active { transform: scale(0.93); }

    /* ---- Modal (My Cities / Add City) ---- */
    .modal-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(20, 14, 40, 0.45);
      backdrop-filter: blur(4px);
      z-index: 30;
      align-items: flex-end;
      justify-content: center;
    }

    .modal-overlay.open { display: flex; }

    .modal-panel {
      width: 100%;
      max-width: 480px;
      margin-bottom: 6.5rem;
      padding: 1.3rem;
      max-height: 60vh;
      display: flex;
      flex-direction: column;
      gap: 1rem;
    }

    .modal-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .modal-title { font-size: 1.1rem; font-weight: 700; color: var(--ink); }

    .modal-close {
      background: var(--base-100);
      border: none;
      width: 2rem;
      height: 2rem;
      border-radius: 50%;
      color: var(--ink-soft);
      cursor: pointer;
      box-shadow: 3px 3px 7px var(--shadow-dark), -3px -3px 7px var(--shadow-light);
    }

    .modal-body { overflow-y: auto; display: flex; flex-direction: column; gap: 0.7rem; }

    .saved-cities-list { display: flex; flex-direction: column; gap: 0.6rem; }

    .saved-city-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0.8rem 1rem;
      border-radius: var(--radius-md);
      background: var(--base-100);
      box-shadow: 3px 3px 8px var(--shadow-dark), -3px -3px 8px var(--shadow-light);
      cursor: pointer;
    }

    .saved-city-item span { font-weight: 600; color: var(--ink); }

    .saved-city-remove {
      background: none;
      border: none;
      color: var(--ink-soft);
      font-size: 0.95rem;
      cursor: pointer;
      padding: 0.3rem;
    }

    .empty-state {
      display: none;
      text-align: center;
      color: var(--ink-soft);
      font-size: 0.85rem;
      padding: 1.2rem 0.5rem;
    }

    .empty-state.visible { display: block; }

    .modal-search-wrapper {
      display: flex;
      align-items: center;
      gap: 0.6rem;
      padding: 0.7rem 1rem;
      border-radius: var(--radius-md);
    }

    .modal-search-wrapper i { color: var(--ink-soft); }

    .modal-search-wrapper input {
      background: transparent;
      border: none;
      outline: none;
      font-size: 0.95rem;
      color: var(--ink);
      width: 100%;
    }

    .modal-add-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 0.5rem;
      background: linear-gradient(135deg, #ec4899, #db2777);
      color: #fff;
      border: none;
      border-radius: var(--radius-md);
      padding: 0.85rem;
      font-size: 0.9rem;
      font-weight: 700;
      cursor: pointer;
      box-shadow: 0 6px 16px rgba(219, 39, 119, 0.35);
    }

    .modal-add-btn:active { transform: scale(0.98); }
    .city-name { font-size: 1.35rem; font-weight: 700; display: flex; align-items: center; justify-content: flex-end; gap: 0.4rem; color: var(--ink); }
    .date-time { font-size: 0.8rem; color: var(--ink-soft); margin-top: 0.25rem; }

    .section-label {
      font-size: 0.8rem;
      font-weight: 600;
      color: var(--ink-soft);
      padding: 0 0.3rem;
    }

    .forecast-grid {
      display: grid;
      grid-template-columns: repeat(7, 1fr);
      gap: 0.5rem;
    }

    @media (max-width: 480px) {
      .forecast-grid {
        grid-template-columns: repeat(4, minmax(70px, 1fr));
        overflow-x: auto;
      }
    }

    .forecast-card {
      padding: 0.8rem 0.3rem;
      text-align: center;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.4rem;
      cursor: default;
      transition: box-shadow 0.2s ease;
    }

    .forecast-card:hover {
      box-shadow: inset 4px 4px 10px var(--shadow-dark), inset -4px -4px 10px var(--shadow-light);
    }

    .day-name { font-weight: 700; font-size: 0.85rem; color: var(--ink); }

    .forecast-icon {
      font-size: 1.2rem;
      color: var(--accent);
      width: 2.1rem;
      height: 2.1rem;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      background: var(--base-100);
      box-shadow: 3px 3px 7px var(--shadow-dark), -3px -3px 7px var(--shadow-light);
    }

    .forecast-temp { font-weight: 700; font-size: 0.8rem; color: var(--ink); }
    .forecast-desc { font-size: 0.58rem; color: var(--ink-soft); text-transform: capitalize; display: none; }

    .details-row {
      display: flex;
      flex-wrap: wrap;
      gap: 0.9rem;
    }

    .detail-item {
      padding: 0.9rem 1.1rem;
      display: flex;
      align-items: center;
      gap: 0.7rem;
      flex: 1 1 130px;
    }

    .detail-icon {
      font-size: 1.15rem;
      color: var(--accent);
      background: var(--base-100);
      border-radius: 50%;
      width: 2.2rem;
      height: 2.2rem;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 3px 3px 7px var(--shadow-dark), -3px -3px 7px var(--shadow-light);
      flex-shrink: 0;
    }

    .detail-text { display: flex; flex-direction: column; }
    .detail-label { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.4px; color: var(--ink-soft); }
    .detail-value { font-weight: 700; font-size: 0.95rem; color: var(--ink); }

    .status-line {
      text-align: center;
      font-size: 0.72rem;
      color: var(--ink-soft);
      padding: 0.2rem;
    }

    hr { border: none; border-top: 1px solid rgba(255,255,255,0.6); border-bottom: 1px solid var(--shadow-dark); margin: 0.1rem 0; }

    @media (max-width: 400px) {
      .temp-value { font-size: 2.5rem; }
      .city-name { font-size: 1.1rem; }
      .weather-icon-large { font-size: 2.6rem; width: 4.4rem; height: 4.4rem; }
    }