:root {
  --teal: #00796b;
  --gold: #D4AF37;
  --white: #ffffff;
  --bg: linear-gradient(135deg, rgba(0,121,107,0.07), rgba(212,175,55,0.03));
  --glass: rgba(255,255,255,0.8);
  --card-radius: 14px;
  --shadow: 0 6px 20px rgba(0,0,0,0.08);
  --fw-bold: 700;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  --light-bg: #f7f7f7;
  --light-card: rgba(255,255,255,0.86);
  --light-text: #0b2a28;
  --dark-bg: #1a1a1a;
  --dark-card: rgba(30,30,30,0.86);
  --dark-text: #e0e0e0;
}

* {
  box-sizing:border-box;
}

html,body {
  height:100%;
}

body {
  margin: 0;

  background: var(--bg);
  color: #0b2a28;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  padding: 48px 24px;

  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 100vh;
}

/* Container */
.container {
  width: min(1100px, 96%);

  background: rgba(255, 255, 255, 0.48);
  border-radius: 18px;
  padding: 28px;
  box-shadow: var(--shadow);

  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: transform .35s ease, box-shadow .35s ease;

  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.container:hover { 
  transform: translateY(-4px); 
  box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.logo {
  margin:0;
  color:var(--teal);
  font-size:20px;
  letter-spacing:0.2px;
  margin-left: 0%;
}

.subtitle {
  margin:0;
  color: rgba(0,0,0,0.55);
}

/* Grid */
.grid {
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap:18px;
}

/* Cards */
.card {
  position: relative;
  overflow: hidden;
  background: none; /* Remove solid background */
  border-radius: var(--card-radius);
  padding: 18px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0,0,0,0.03);
  transition: transform .28s cubic-bezier(.2,.9,.2,1), box-shadow .28s ease;
  min-height: 130px;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.86); /* Glass overlay for readability */
  z-index: 1;
}

.card > * {
  position: relative;
  z-index: 2; /* Content above overlay */
}

.card:hover { 
  transform: translateY(-6px); 
  box-shadow: 0 18px 50px rgba(0,0,0,0.12);
}

.card h2 {
  margin:0 0 8px 0;
  font-size:14px;
  color: rgba(0,0,0,0.65);
}

/* Clock styles */
.big-time {
  font-weight: var(--fw-bold);
  font-size:36px;
  color: var(--teal);
  letter-spacing:0.6px;
  transition: color .3s ease, transform .3s ease;
}

.small-text { 
  color: rgba(0,0,0,0.55); 
  font-size:13px; 
  margin-top:8px; 
}

/* Weather card layout */
.weather-content { 
  display:flex; 
  flex-direction:column; 
  gap:8px; 
}

.weather-main { 
  display:flex; 
  align-items:center; 
  gap:12px; 
}

.weather-icon { 
  font-size:42px; 
  transform-origin:center; 
  transition: transform .6s ease; 
}

.card:hover .weather-icon { 
  transform: rotate(8deg) scale(1.06); 
}

.weather-meta { 
  display:flex; 
  gap:12px; 
  justify-content:space-between; 
  margin-top:6px; 
}

/* Holidays list */
.holidays-list {
  list-style:none;
  padding:0;
  margin:0;
  display:flex;
  flex-direction:column;
  gap:8px;
}

.holidays-list li {
  padding:8px 10px;
  background: linear-gradient(90deg, rgba(0,121,107,0.04), rgba(212,175,55,0.02));
  border-radius:10px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  transition: background .25s ease, transform .18s ease;
}

.holidays-list li:hover { 
  transform: translateX(6px); 
  background: rgba(0,121,107,0.06);
}

.holiday-banner {
  background: var(--gold);
  color: var(--teal);
  padding: 8px;
  text-align: center;
  border-radius: 8px;
  margin-bottom: 12px;
}

/* Countdown */
.countdown { 
  font-size:28px; 
  font-weight:700; 
  color:var(--teal); 
  margin-top:6px; 
}

/* Footer */
.footer { 
  margin-top:18px; 
  text-align:center; 
  color:rgba(0,0,0,0.45);
}

.gold { 
  color: var(--gold); 
  font-weight:700; 
}

.accent { 
  color:var(--teal); 
  font-weight:600; 
}

/* Responsive */
@media (max-width:860px) {
  .grid { 
    grid-template-columns: 1fr; 
  }

  .header { 
    flex-direction:column; 
    align-items:flex-start; 
    gap:6px; 
  }
}

/* Dark Mode */

body.light { /* Default */
  background-color: var(--light-bg);
  color: var(--light-text);
  --card-bg: var(--light-card);
  background-image: url('background.jpg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  background-attachment: fixed;
}

body.dark {
  background-color: var(--dark-bg);
  color: var(--dark-text);
  --dark-card: rgba(64,64,64,0.86);
  --card-bg: var(--dark-card);
  background-image: url('darkthemebackground.jpg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  background-attachment: fixed;
}

body.dark .container {
  background: rgba(211,211,211,0.48);
}

body.dark .card::before {
  background: var(--dark-card);
}

body.dark .subtitle {
  color: rgba(255,255,255,0.55);
}

body.dark .card h2 {
  color: rgba(255,255,255,0.65);
}

body.dark .small-text {
  color: rgba(255,255,255,0.55);
}

body.dark .footer {
  color: rgba(255,255,255,0.45);
}

body.dark .toggle {
  color: rgba(255,255,255,0.55);
}

.card { background: var(--card-bg); }

.toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: rgba(0,0,0,0.55);
}

.toggle input {
  width: 40px;
  height: 20px;
  appearance: none;
  background: #ccc;
  border-radius: 10px;
  position: relative;
  cursor: pointer;
  transition: background 0.3s;
}

.toggle input:checked {
  background: var(--teal);
}

.toggle input::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  top: 1px;
  left: 1px;
  transition: transform 0.3s;
}

.toggle input:checked::before {
  transform: translateX(20px);
}

.city-form {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.city-form input {
  flex: 1;
  padding: 8px;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 8px;
}

.city-form button {
  background: var(--teal);
  color: var(--white);
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
}

/* Site Icon */
.site-icon {
  width: 40px;
  height: auto;
  margin-right: 5px;
  border-radius: 8px;
  object-fit: contain;
}

/* ===== Additions: forecast, units, long weekends, offline ===== */
[hidden] { display: none !important; }

.offline-banner {
  background: #b3261e;
  color: #fff;
  padding: 8px;
  text-align: center;
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 14px;
}

.weather-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.ghost-btn,
.unit-toggle button {
  font: inherit;
  font-size: 13px;
  color: inherit;
  background: transparent;
  border: 1px solid rgba(0,0,0,0.18);
  padding: 6px 10px;
  cursor: pointer;
}

.ghost-btn { border-radius: 8px; }
.ghost-btn:hover { background: rgba(0,121,107,0.08); }

.unit-toggle { display: inline-flex; }
.unit-toggle button:first-child { border-radius: 8px 0 0 8px; }
.unit-toggle button:last-child { border-radius: 0 8px 8px 0; border-left: none; }
.unit-toggle button.active {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--white);
}

body.dark .ghost-btn,
body.dark .unit-toggle button { border-color: rgba(255,255,255,0.3); }
body.dark .unit-toggle button.active { border-color: var(--teal); }

.forecast-card { grid-column: 1 / -1; }

.forecast-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 10px;
}

.forecast-day {
  padding: 10px 8px;
  text-align: center;
  background: linear-gradient(90deg, rgba(0,121,107,0.04), rgba(212,175,55,0.02));
  border-radius: 10px;
}

.fd-name { font-weight: 600; font-size: 13px; }
.fd-icon { font-size: 28px; margin: 4px 0; }
.fd-temps { font-size: 13px; font-weight: 600; color: var(--teal); }
.fd-rain { font-size: 12px; margin-top: 2px; color: rgba(0,0,0,0.55); }
body.dark .fd-rain { color: rgba(255,255,255,0.6); }

.lw-badge {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
  background: var(--gold);
  color: var(--teal);
}

