:root {
  --card-bg: rgba(255, 255, 255, 0.72);
  --card-border: 1px solid rgba(255, 255, 255, 0.58);
  --text-main: #102033;
  --text-muted: #64748b;
  --accent: #10b981;
  --accent-2: #38bdf8;
  --danger: #ef4444;
  --search-bg: rgba(255, 255, 255, 0.82);
  --inner-bg: rgba(255, 255, 255, 0.58);
  --shadow: 0 20px 60px rgba(15, 23, 42, 0.10);
  --radius: 30px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Poppins, sans-serif;
}

html {
  width: 100%;
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  width: 100%;
  min-height: 100vh;
  padding: clamp(12px, 2vw, 32px);
  background: #f8fafc;
  color: var(--text-main);
  overflow-x: hidden;
}

.bg-orb {
  position: fixed;
  width: 55vw;
  height: 55vw;
  border-radius: 50%;
  filter: blur(90px);
  z-index: -3;
  animation: float 18s ease-in-out infinite alternate;
}

.orb-one {
  top: -18%;
  left: -12%;
  background: rgba(56, 189, 248, 0.38);
}

.orb-two {
  right: -12%;
  bottom: -20%;
  background: rgba(167, 139, 250, 0.34);
  animation-delay: -7s;
}

.weather-scene {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  opacity: 0.45;
}

.weather-scene.rain {
  background-image: linear-gradient(
    115deg,
    transparent 0 70%,
    rgba(59, 130, 246, 0.25) 72%,
    transparent 75%
  );
  background-size: 70px 70px;
  animation: rainMove 0.7s linear infinite;
}

.weather-scene.clouds::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.55), transparent 18%),
    radial-gradient(circle at 70% 12%, rgba(255, 255, 255, 0.35), transparent 20%);
  animation: cloudMove 24s linear infinite;
}

.weather-scene.night {
  background-image: radial-gradient(#fff 1px, transparent 1px);
  background-size: 55px 55px;
}

.weather-scene.sunny {
  background: radial-gradient(circle at 75% 15%, rgba(250, 204, 21, 0.35), transparent 20%);
}

@keyframes float {
  to {
    transform: translate(8%, 10%) scale(1.08);
  }
}

@keyframes rainMove {
  to {
    background-position: -70px 70px;
  }
}

@keyframes cloudMove {
  to {
    transform: translateX(90px);
  }
}

.app-shell {
  width: min(100%, 1500px);
  margin: auto;
}

.top-bar-wrapper {
  margin-bottom: 24px;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.brand-icon {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  box-shadow: 0 16px 34px rgba(16, 185, 129, 0.25);
  font-size: 24px;
  flex: 0 0 auto;
}

.brand-block h1 {
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1;
}

.brand-block p {
  color: var(--text-muted);
  font-size: clamp(12px, 1.3vw, 15px);
}

.top-bar {
  display: flex;
  align-items: center;
  gap: 14px;
}

.round-btn,
.mini-btn,
.favorite-btn {
  border: var(--card-border);
  background: var(--search-bg);
  color: var(--text-main);
  cursor: pointer;
  backdrop-filter: blur(14px);
  transition: 0.25s;
}

.round-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  font-size: 20px;
  flex: 0 0 auto;
}

.round-btn:hover,
.favorite-btn:hover {
  transform: translateY(-2px);
}

.search-wrap {
  position: relative;
  flex: 1;
  min-width: 180px;
}

.search-box {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px 0 22px;
  border-radius: 999px;
  background: var(--search-bg);
  border: var(--card-border);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text-main);
  font-size: 16px;
  font-weight: 500;
  flex: 1;
}

.mini-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 15px;
  flex: 0 0 auto;
}

.mini-btn.listening {
  background: var(--danger);
  color: white;
}

.action-btn {
  min-height: 54px;
  border: 0;
  border-radius: 999px;
  padding: 0 24px;
  background: var(--accent);
  color: white;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  box-shadow: 0 15px 28px rgba(16, 185, 129, 0.25);
  white-space: nowrap;
}

.action-btn:hover {
  filter: brightness(0.95);
}

.suggestions {
  position: absolute;
  left: 15px;
  right: 15px;
  top: 64px;
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  overflow: hidden;
  z-index: 50;
  display: none;
}

.suggestion-item {
  padding: 12px 18px;
  cursor: pointer;
  color: var(--text-main);
}

.suggestion-item:hover {
  background: var(--inner-bg);
}

.chips-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-left: 70px;
}

.city-chip-wrap,
.mobile-quick-cities {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.city-chip {
  border: var(--card-border);
  background: var(--search-bg);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: 0.25s;
  user-select: none;
}

.city-chip:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-2px);
}

.favorite-wrap .city-chip {
  color: #b45309;
}

.loader-card,
.error-card {
  display: none;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  border-radius: 24px;
  background: var(--card-bg);
  border: var(--card-border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  margin-bottom: 20px;
}

.loader-card p {
  color: var(--text-muted);
  font-size: 13px;
}

.spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 4px solid rgba(16, 185, 129, 0.18);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
  flex: 0 0 auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.error-card {
  color: #b91c1c;
}

.weather-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(420px, 1.6fr) minmax(260px, 1fr);
  gap: clamp(14px, 1.8vw, 24px);
  align-items: stretch;
}

.card {
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: var(--radius);
  padding: clamp(18px, 2vw, 28px);
  box-shadow: var(--shadow);
  backdrop-filter: blur(26px);
  transition: 0.28s;
  min-width: 0;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
}

.time-card {
  min-height: 255px;
  display: flex;
  flex-direction: column;
}

.city-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.city-head h2 {
  font-size: clamp(22px, 2vw, 30px);
  word-break: break-word;
}

.city-head p,
.mini-status {
  color: var(--text-muted);
  font-size: 13px;
}

.favorite-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 18px;
  flex: 0 0 auto;
}

.favorite-btn.active {
  background: #f59e0b;
  color: white;
}

.time-card h1 {
  font-size: clamp(48px, 6vw, 82px);
  line-height: 1;
  margin-top: 28px;
}

.time-card > p {
  color: var(--text-muted);
}

.mini-status {
  margin-top: auto;
  padding-top: 20px;
}

.current-weather-card {
  grid-column: span 2;
  display: grid;
  grid-template-columns: minmax(300px, 1.45fr) minmax(250px, 1fr);
  padding: 0;
}

.weather-info-primary {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(24px, 3vw, 38px);
  color: white;
  min-width: 0;
}

.weather-info-primary::after {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.20), transparent 32%);
  animation: pulseGlow 7s ease infinite;
  z-index: 0;
}

.weather-info-primary > * {
  position: relative;
  z-index: 1;
}

.label {
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 1.5px;
  opacity: 0.8;
}

.main-details h1 {
  font-size: clamp(58px, 7vw, 96px);
  line-height: 1;
}

.feels-like {
  opacity: 0.9;
  margin: 6px 0 22px;
}

.sun-times-inline {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.sun-times-inline p {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 14px;
}

.large-weather-icon-block {
  text-align: center;
  min-width: 140px;
}

.large-icon-container i {
  font-size: clamp(74px, 8vw, 112px);
  color: white;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.35));
  animation: gentleFloat 3s ease-in-out infinite;
}

.large-weather-icon-block h3 {
  text-align: center;
  margin-top: 8px;
  font-weight: 600;
  text-transform: capitalize;
}

.split-metrics {
  padding: clamp(18px, 2vw, 28px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.metric-item {
  background: var(--inner-bg);
  border: var(--card-border);
  border-radius: 22px;
  padding: 18px;
  min-width: 0;
}

.modern-icon {
  font-size: 21px;
  color: var(--accent);
  margin-bottom: 10px;
}

.metric-item p {
  font-size: clamp(18px, 1.8vw, 24px);
  font-weight: 800;
  word-break: break-word;
}

.metric-item span {
  font-size: 12px;
  color: var(--text-muted);
}

.bg-rainy {
  background: linear-gradient(135deg, #475569, #0f172a);
}

.bg-snowy {
  background: linear-gradient(135deg, #94a3b8, #e2e8f0);
}

.bg-sunny {
  background: linear-gradient(135deg, #38bdf8, #2563eb);
}

.bg-clear-night {
  background: linear-gradient(135deg, #1e293b, #020617);
}

.bg-cloudy {
  background: linear-gradient(135deg, #94a3b8, #475569);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.section-head h3,
.forecast-card h3,
.hourly-card h3 {
  font-size: 17px;
}

.section-head span {
  font-size: 12px;
  color: var(--text-muted);
}

.ai-card {
  grid-column: span 2;
}

#ai-summary {
  font-size: 16px;
  line-height: 1.7;
}

.ai-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.ai-tag {
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--inner-bg);
  border: var(--card-border);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

.aqi-card {
  grid-column: span 1;
}

.aqi-card #aqi-badge {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--inner-bg);
  font-weight: 800;
}

.aqi-meter {
  height: 12px;
  border-radius: 99px;
  background: linear-gradient(90deg, #10b981, #84cc16, #f59e0b, #f97316, #ef4444);
  overflow: hidden;
  margin: 12px 0;
}

.aqi-meter div {
  height: 100%;
  width: 0;
  background: rgba(255, 255, 255, 0.8);
  border-right: 3px solid var(--text-main);
  transition: 0.6s;
}

.aqi-card p {
  color: var(--text-muted);
  line-height: 1.5;
}

.pollutant-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 18px;
}

.pollutant-grid div {
  border: var(--card-border);
  background: var(--inner-bg);
  border-radius: 16px;
  padding: 12px;
  text-align: center;
}

.pollutant-grid strong {
  display: block;
  font-size: 17px;
}

.pollutant-grid span {
  font-size: 11px;
  color: var(--text-muted);
}

.forecast-card {
  max-height: none;
}

.forecast-list{
  display:flex;
  flex-direction:column;
  gap:14px;
  flex:1;
  justify-content:space-between;
  margin-top:14px;
}

.forecast-item{
  display:grid;
  grid-template-columns:44px 1fr auto;
  align-items:center;
  column-gap:16px;
  padding:8px 4px;
  border-bottom:var(--card-border);
}

.forecast-item:last-child {
  border-bottom: 0;
}

.forecast-item i,
.forecast-item .animated-weather-icon {
  font-size: 21px;
}

.forecast-item span {
  font-size: 14px;
}

.forecast-item strong {
  font-size: 16px;
}

.forecast-item small {
  font-size: 12px;
}

.hourly-card {
  grid-column: span 2;
}

.hourly-list {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x mandatory;
}

.hourly-list::-webkit-scrollbar {
  height: 8px;
}

.hourly-list::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.35);
  border-radius: 99px;
}

.hourly-item {
  min-width: 96px;
  padding: 17px 10px;
  border-radius: 34px;
  border: var(--card-border);
  background: var(--inner-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  transition: 0.25s;
  scroll-snap-align: start;
}

.hourly-item:hover {
  transform: translateY(-7px);
}

.sun-tracker-container {
  margin-top: 24px;
  width: 100%;
  min-height: 260px;
  overflow-x: auto;
  overflow-y: hidden;
}

.sun-tracker-container svg {
  min-width: 720px;
}

.dynamic-fill {
  clip-path: inset(0 100% 0 0);
}

.sun-icon-svg {
  offset-path: path("M 50,180 Q 225,30 400,180 T 750,180");
  offset-distance: 0;
}

.svg-text-title {
  font-size: 12px;
  font-weight: 700;
  fill: var(--text-muted);
  letter-spacing: 1px;
}

.svg-text-time {
  font-size: 18px;
  font-weight: 700;
  fill: var(--text-main);
}

.svg-line {
  stroke: rgba(15, 23, 42, 0.18);
}

.svg-dot {
  fill: #fff;
  stroke: #cbd5e1;
  stroke-width: 2;
}

.svg-dot-small {
  fill: #fff;
  stroke: #94a3b8;
  stroke-width: 1.5;
}

.chart-card {
  grid-column: span 1;
  min-height: 300px;
}

.chart-box {
  position: relative;
  width: 100%;
  height: clamp(220px, 26vw, 340px);
}

.chart-box canvas {
  width: 100% !important;
  height: 100% !important;
}

.icon-sunny {
  color: #facc15;
}

.icon-moon {
  color: #94a3b8;
}

.icon-cloudy {
  color: #cbd5e1;
}

.icon-rainy {
  color: #60a5fa;
}

.icon-thunder {
  color: #a78bfa;
}

.icon-snowy {
  color: #e2e8f0;
}

@keyframes gentleFloat {
  50% {
    transform: translateY(-6px);
  }
}

@keyframes pulseGlow {
  50% {
    transform: translate(10%, 5%);
  }
}

body.dark-mode {
  background: #020617;
  --card-bg: rgba(15, 23, 42, 0.72);
  --card-border: 1px solid rgba(255, 255, 255, 0.10);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --search-bg: rgba(15, 23, 42, 0.72);
  --inner-bg: rgba(30, 41, 59, 0.58);
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.42);
}

body.dark-mode .orb-one {
  background: rgba(30, 64, 175, 0.35);
}

body.dark-mode .orb-two {
  background: rgba(88, 28, 135, 0.32);
}

body.dark-mode .svg-line {
  stroke: rgba(255, 255, 255, 0.22);
}

body.dark-mode .svg-dot,
body.dark-mode .svg-dot-small {
  fill: #1e293b;
}

.animate-in .card {
  animation: reveal 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Large laptop / desktop */
@media (max-width: 1200px) {
  .weather-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .current-weather-card,
  .ai-card,
  .hourly-card {
    grid-column: span 2;
  }

  .chart-card,
  .humidity-chart-card,
  .aqi-card,
  .forecast-card,
  .time-card {
    grid-column: span 1;
  }
}

/* Tablet */
@media (max-width: 900px) {
  body {
    padding: 18px 14px;
  }

  .top-bar {
    flex-wrap: wrap;
  }

  .round-btn {
    order: 1;
  }

  .action-btn {
    order: 2;
    flex: 1;
  }

  .search-wrap {
    order: 3;
    flex: 0 0 100%;
  }

  .chips-row {
    padding-left: 0;
  }

  .current-weather-card {
    grid-template-columns: 1fr;
  }

  .weather-info-primary {
    min-height: 320px;
  }

  .split-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Mobile */
@media (max-width: 700px) {
  :root {
    --radius: 22px;
  }

  body {
    padding: 14px 10px;
  }

  .brand-block {
    align-items: flex-start;
  }

  .brand-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
  }

  .brand-block h1 {
    font-size: 22px;
  }

  .brand-block p {
    font-size: 12px;
  }

  .top-bar {
    gap: 10px;
  }

  .round-btn {
    width: 48px;
    height: 48px;
  }

  .action-btn {
    min-height: 48px;
    padding: 0 16px;
  }

  .search-box {
    min-height: 50px;
    padding: 0 12px 0 16px;
  }

  .search-box input {
    font-size: 14px;
  }

  .chips-row {
    gap: 10px;
  }

  .city-chip {
    font-size: 12px;
    padding: 7px 12px;
  }

  .weather-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .time-card,
  .current-weather-card,
  .ai-card,
  .aqi-card,
  .forecast-card,
  .hourly-card,
  .chart-card,
  .humidity-chart-card {
    grid-column: span 1;
  }

  .card {
    padding: 18px;
  }

  .time-card {
    min-height: 220px;
  }

  .time-card h1 {
    font-size: 52px;
  }

  .weather-info-primary {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    gap: 20px;
    min-height: 340px;
  }

  .sun-times-inline {
    justify-content: center;
  }

  .split-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 14px;
  }

  .metric-item {
    padding: 14px;
  }

  .metric-item p {
    font-size: 18px;
  }

  .pollutant-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hourly-item {
    min-width: 82px;
    padding: 14px 8px;
  }

  .sun-tracker-container {
    min-height: 230px;
  }

  .chart-box {
    height: 230px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Small mobile */
@media (max-width: 420px) {
  .brand-block {
    gap: 10px;
  }

  .brand-icon {
    width: 42px;
    height: 42px;
    font-size: 20px;
  }

  .brand-block h1 {
    font-size: 20px;
  }

  .brand-block p {
    font-size: 11px;
  }

  .action-btn {
    font-size: 13px;
  }

  .split-metrics {
    grid-template-columns: 1fr;
  }

  .main-details h1 {
    font-size: 56px;
  }

  .large-icon-container i {
    font-size: 74px;
  }

  .pollutant-grid {
    gap: 8px;
  }

  .forecast-item {
    grid-template-columns: 30px 1fr auto;
    gap: 9px;
  }

  .chart-box {
    height: 210px;
  }
}

/* TV / very large screen */
@media (min-width: 1600px) {
  .app-shell {
    max-width: 1700px;
  }

  .weather-grid {
    grid-template-columns: 1fr 1.7fr 1fr;
  }

  .card {
    padding: 34px;
  }

  .brand-block h1 {
    font-size: 40px;
  }

  .brand-block p {
    font-size: 17px;
  }

  .time-card h1 {
    font-size: 96px;
  }

  .main-details h1 {
    font-size: 110px;
  }

  .chart-box {
    height: 360px;
  }
}

/* Touch devices */
@media (hover: none) {
  .card:hover,
  .city-chip:hover,
  .hourly-item:hover,
  .round-btn:hover,
  .favorite-btn:hover {
    transform: none;
  }
}

/* Final chart position and size fix */

.humidity-chart-card {
  grid-column: span 1;
}

.temp-chart-card {
  grid-column: span 2;
  min-height: auto;
}

.temp-chart-card .chart-box {
  height: 300px;
}

.humidity-chart-card .chart-box {
  height: 260px;
}

@media (max-width: 1200px) {
  .temp-chart-card {
    grid-column: span 2;
  }

  .humidity-chart-card {
    grid-column: span 1;
  }
}

@media (max-width: 700px) {
  .temp-chart-card,
  .humidity-chart-card {
    grid-column: span 1;
  }

  .temp-chart-card .chart-box,
  .humidity-chart-card .chart-box {
    height: 230px;
  }
}
.recent-fav-chip {
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.12);
}

/* FINAL LIVE LAYOUT FIX */
.current-weather-card {
  grid-column: span 2;
  display: grid;
  grid-template-columns: minmax(360px, 1.25fr) minmax(260px, 0.85fr);
  padding: 0;
  overflow: hidden;
  min-height: 320px;
}

.weather-info-primary {
  min-height: 320px;
  border-radius: var(--radius) 0 0 var(--radius);
  padding: 42px 46px;
}

.split-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(130px, 1fr));
  gap: 18px;
  align-content: center;
  padding: 34px;
  background: rgba(255, 255, 255, 0.24);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.metric-item {
  min-height: 130px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.metric-item p {
  font-size: 26px;
}

.time-card {
  min-height: 320px;
}

.time-card h1 {
  font-size: clamp(54px, 6vw, 82px);
}

.ai-card {
  min-height: 260px;
}

.weather-grid {
  align-items: stretch;
}

/* Tablet fix */
@media (max-width: 1200px) {
  .weather-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .current-weather-card,
  .ai-card,
  .hourly-card,
  .temp-chart-card {
    grid-column: span 2;
  }

  .time-card,
  .aqi-card,
  .forecast-card,
  .humidity-chart-card {
    grid-column: span 1;
  }
}

/* Small tablet / mobile fix */
@media (max-width: 900px) {
  .weather-grid {
    grid-template-columns: 1fr;
  }

  .time-card,
  .current-weather-card,
  .ai-card,
  .aqi-card,
  .forecast-card,
  .hourly-card,
  .temp-chart-card,
  .humidity-chart-card {
    grid-column: span 1;
  }

  .current-weather-card {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .weather-info-primary {
    border-radius: var(--radius) var(--radius) 0 0;
    min-height: 320px;
    padding: 30px 24px;
  }

  .split-metrics {
    border-radius: 0 0 var(--radius) var(--radius);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 20px;
  }
}

/* Mobile proper spacing */
@media (max-width: 560px) {
  body {
    padding: 12px 10px;
  }

  .brand-block {
    margin-bottom: 16px;
  }

  .top-bar {
    gap: 10px;
  }

  .search-wrap {
    flex: 1 1 100%;
    order: 3;
  }

  .action-btn {
    flex: 1;
  }

  .chips-row {
    padding-left: 0;
  }

  .weather-info-primary {
    text-align: center;
    flex-direction: column;
    justify-content: center;
  }

  .main-details h1 {
    font-size: 60px;
  }

  .split-metrics {
    grid-template-columns: 1fr;
  }

  .metric-item {
    min-height: 105px;
  }

  .time-card {
    min-height: 230px;
  }

  .ai-card {
    min-height: auto;
  }
}

/* Time + location premium update */

.time-card #current-time {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

time-ampm {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-muted);
  margin-bottom: 10px;
  letter-spacing: 0.2px;
}

.time-card #current-time,
.time-card #current-date,
.time-card #sunrise,
.time-card #sunset,
.svg-text-time,
#last-updated {
  font-family: "Poppins", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.time-card #current-date {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 10px;
}

.city-head p {
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 600;
  margin-top: 6px;
}

.mini-status {
  display: none;
}

/* Social buttons */
.social-btn {
  text-decoration: none;
  border: var(--card-border);
  background: var(--search-bg);
  color: var(--text-main);
  cursor: pointer;
  backdrop-filter: blur(14px);
  transition: 0.25s;
  border-radius: 999px;
  padding: 0 16px;
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.social-btn i {
  font-size: 18px;
}

.social-btn:hover {
  transform: translateY(-2px);
  filter: brightness(0.98);
}

.social-btn.instagram i {
  color: #e1306c;
}

.social-btn.linkedin i {
  color: #0a66c2;
}

@media (max-width: 900px) {
  .social-btn {
    order: 3;
    flex: 1;
    justify-content: center;
    min-height: 48px;
    padding: 0 12px;
  }
}

