/* =========================
   GLOBAL RESET
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* =========================
   BASE STYLES
========================= */
body {
  font-family: Arial, sans-serif;
  background: #0f172a;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px;
  min-height: 100vh;
}

/* =========================
   NAVIGATION BAR
========================= */
nav {
  width: 100%;
  padding: 15px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  top: 0;
}

nav a {
  color: #38bdf8;
  text-decoration: none;
  font-weight: bold;
  padding: 6px 12px;
  border-radius: 8px;
  background: #0f172a;
  border: 1px solid #334155;
}

nav a:hover {
  text-decoration: none;
  background: #1e293b;
}

/* =========================
   PAGE TITLE
========================= */
h1 {
  margin: 30px 0 20px;
  font-size: 2rem;
  letter-spacing: 1px;
  text-align: center;
}

/* =========================
   MAIN CONTAINER
========================= */
.container {
  width: 100%;
  max-width: 1000px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
}

/* =========================
   GRID / CARD LAYOUT
========================= */
.grid {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Card component */
.card {
  background: #1e293b;
  padding: 20px;
  border-radius: 12px;
  width: 280px;
  text-align: center;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease;
}

.card:hover {
  transform: translateY(-5px);
}

.card h2 {
  margin-bottom: 8px;
  font-size: 1rem;
  font-weight: 600;
}

/* =========================
   TIME DISPLAY
========================= */
.time {
  font-size: 18px;
  margin-top: 8px;
  font-weight: bold;
}

/* =========================
   FORM ELEMENTS
========================= */
select {
  padding: 12px;
  border-radius: 8px;
  width: 100%;
  max-width: 400px;
  border: none;
  outline: none;
  font-size: 1rem;
  background: #1e293b;
  color: white;
  cursor: pointer;
}

/* =========================
   TIME DISPLAY BOX
========================= */
#timeDisplay {
  background: #1e293b;
  padding: 20px;
  border-radius: 12px;
  width: 100%;
  max-width: 500px;
  text-align: center;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

#timeDisplay p {
  margin: 10px 0;
  font-size: 1rem;
}

#localTime,
#selectedTime {
  font-weight: bold;
  color: #38bdf8;
}

/* =========================
   CONTROLS / BUTTON AREA
========================= */
.controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}

button {
  background: #1e293b;
  color: white;
  border: 1px solid #334155;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  margin: 5px;
}

button:hover {
  background: #334155;
  transform: translateY(-2px);
}

body > button {
  position: relative;
  z-index: 10;
}

/* =========================
   FOOTER
========================= */
footer {
  margin-top: 40px;
  text-align: center;
  font-size: 0.9rem;
  color: #cbd5e1;
  max-width: 800px;
}

footer a {
  color: #38bdf8;
  text-decoration: none;
}

footer a:hover {
  text-decoration: none;
}

/* =========================
   EVENT PANEL
========================= */
.event-card {
  width: 100%;
  max-width: 500px;
  text-align: left;
}

.event-card h2 {
  margin-bottom: 15px;
  font-size: 1.1rem;
}

.event-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.event {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #0f172a;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #334155;
  font-size: 0.95rem;
}

.event-name {
  font-weight: 500;
}

.event-time {
  font-weight: bold;
  color: #38bdf8;
}

/* =========================
   SKYLINE IMAGE
========================= */
.skyline {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 10px;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.skyline:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
}

/* =========================
   FLIGHT BLOCK
========================= */
.flight-block {
  margin-top: 20px;
  padding: 15px;
  border-radius: 12px;
  border: 1px solid #334155;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: center;
}

.flight-block select,
.flight-block input,
.flight-block input[type="datetime-local"] {
  padding: 10px;
  border-radius: 8px;
  border: none;
  background: #1e293b;
  color: white;
}

.flight-result {
  margin-top: 10px;
  font-size: 0.95rem;
  color: #38bdf8;
}

/* =========================
   FACTS & QUIZ BLOCKS
========================= */
.facts-block,
.quiz-block {
  margin-top: 15px;
  padding: 15px;
  border-radius: 12px;
  border: 1px solid #334155;
  text-align: center;
}

.facts-block button {
  margin-top: 10px;
  width: 100%;
  max-width: 200px;
}

#quizOptions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

#quizOptions button {
  width: 100%;
}

/* =========================
   UTILITY CLASSES
========================= */
.hidden {
  display: none;
}

/* =========================
   LIGHT THEME
========================= */
body.light {
  background: #f8fafc;
  color: #0f172a;
}

/* NAV LIGHT */
body.light nav {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
}

body.light nav a {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #0f172a;
}

body.light nav a:hover {
  background: #e2e8f0;
}

/* CARDS LIGHT */
body.light .card,
body.light #timeDisplay,
body.light .facts-block,
body.light .quiz-block {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

/* FORM LIGHT */
body.light select {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #e2e8f0;
}

/* BUTTON LIGHT */
body.light button {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #e2e8f0;
}

body.light button:hover {
  background: #f1f5f9;
}

/* FOOTER LIGHT */
body.light footer {
  color: #64748b;
}

body.light footer a {
  color: #2563eb;
}

/* DAY/NIGHT LABEL */
.daynight {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  opacity: 0.9;
}

/* DIFFERENCE CONTROLS */
.diff-controls {
  margin-top: 10px;
  width: 100%;
  max-width: 400px;
  display: flex;
  justify-content: center;
}

#compareSelect {
  margin-top: 10px;
}