*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-color: #050608;
  --card-bg: #12141b;
  --accent-color: #1dd1a1;
  --accent-soft: #10ac84;
  --text-color: #f5f5f5;
  --muted-text: #a0a4b8;
  --danger: #ff6b6b;
  --warning: #feca57;
}

/* Night mode variables will be applied via .night-mode on body */
body.night-mode {
  --bg-color: #1a0203;
  --card-bg: #240508;
  --accent-color: #ff6b6b;
  --accent-soft: #ff8787;
  --text-color: #ffecec;
  --muted-text: #ffb3b3;
  --warning: #ff9f43;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #1e272e 0, var(--bg-color) 45%, #000 100%);
  color: var(--text-color);
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 2vh 4vw;
  transition: background 0.6s ease, color 0.6s ease;
}

.app-container {
  width: 100%;
  max-width: 1600px;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Header */
.top-bar {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
}

.title {
  font-size: clamp(1.4rem, 2vw, 2.2rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-color);
  text-shadow: 0 0 18px rgba(16, 172, 132, 0.7);
  text-align: center;
  transition: color 0.6s ease, text-shadow 0.6s ease;
}

body.night-mode .title {
  text-shadow: 0 0 18px rgba(255, 107, 107, 0.7);
}

.logo-abs {
  position: absolute;
  right: 0;
  top: 0;
}

.logo {
  max-height: 80px;
  width: auto;
  object-fit: contain;
}

/* Main layout */
.main-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: stretch;
}

.clock-wrapper {
  background: linear-gradient(135deg, rgba(18, 20, 27, 0.96), rgba(5, 6, 8, 0.98));
  border-radius: 32px;
  padding: 4vh 3vw;
  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(255, 255, 255, 0.03),
    0 0 60px rgba(16, 172, 132, 0.2);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  transition: background 0.6s ease, box-shadow 0.6s ease;
}

body.night-mode .clock-wrapper {
  background: linear-gradient(135deg, rgba(36, 5, 8, 0.96), rgba(8, 1, 3, 0.98));
  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 60px rgba(255, 107, 107, 0.3);
}

.clock-wrapper::before {
  content: "";
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at top, rgba(29, 209, 161, 0.12), transparent 60%),
    radial-gradient(circle at bottom, rgba(15, 52, 96, 0.5), transparent 65%);
  opacity: 0.8;
  pointer-events: none;
  transition: opacity 0.6s ease, background 0.6s ease;
}

body.night-mode .clock-wrapper::before {
  background:
    radial-gradient(circle at top, rgba(255, 107, 107, 0.18), transparent 60%),
    radial-gradient(circle at bottom, rgba(194, 54, 22, 0.55), transparent 65%);
}

.clock-display {
  position: relative;
  font-family: "Orbitron", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(6rem, 10vw, 12rem);
  letter-spacing: 0.16em;
  color: #000;
  text-shadow:
    0 0 18px rgba(0, 0, 0, 0.4),
    0 0 40px rgba(29, 209, 161, 0.7);
  background: linear-gradient(145deg, #fafafa, #d7d8df);
  padding: 1.5rem 3.5rem;
  border-radius: 24px;
  box-shadow:
    inset 0 0 0 4px rgba(0, 0, 0, 0.4),
    0 18px 50px rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  width: 100%;
  transition: box-shadow 0.6s ease;
}

body.night-mode .clock-display {
  box-shadow:
    inset 0 0 0 4px rgba(0, 0, 0, 0.6),
    0 18px 60px rgba(0, 0, 0, 1);
}

.date-display {
  position: relative;
  font-size: clamp(1.1rem, 1.5vw, 1.6rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-text);
}

/* Info panel */
.info-panel {
  background: linear-gradient(135deg, rgba(12, 13, 17, 0.95), rgba(6, 9, 14, 0.98));
  border-radius: 24px;
  padding: 2rem;
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transition: background 0.6s ease, box-shadow 0.6s ease;
}

body.night-mode .info-panel {
  background: linear-gradient(135deg, rgba(24, 5, 7, 0.95), rgba(11, 2, 4, 0.98));
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.95),
    0 0 0 1px rgba(255, 255, 255, 0.04);
}

.next-event,
.announcement,
.audio-status {
  border-radius: 16px;
  padding: 1.1rem 1rem;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 1rem;
  line-height: 1.6;
}

.next-event {
  background: radial-gradient(circle at top left, rgba(29, 209, 161, 0.14), transparent 65%);
  color: var(--accent-color);
}

body.night-mode .next-event {
  background: radial-gradient(circle at top left, rgba(255, 107, 107, 0.18), transparent 65%);
}

.next-event .label {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.85rem;
  opacity: 0.9;
  display: block;
  margin-bottom: 0.35rem;
}

.next-event .time {
  font-weight: 600;
}

.announcement {
  background: radial-gradient(circle at top left, rgba(254, 202, 87, 0.18), transparent 60%);
  color: var(--warning);
}

.announcement.active {
  box-shadow: 0 0 25px rgba(254, 202, 87, 0.35);
}

.announcement .label {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.85rem;
  opacity: 0.95;
  display: block;
  margin-bottom: 0.35rem;
}

.announcement .message {
  color: #ffeaa7;
}

.audio-status {
  background: radial-gradient(circle at top left, rgba(255, 107, 107, 0.25), transparent 60%);
  color: var(--danger);
  font-size: 0.95rem;
}

.hidden {
  display: none;
}

/* Responsive tweaks */
@media (max-width: 1024px) {
  body {
    padding: 1.5rem 1rem;
  }

  .logo {
    max-height: 60px;
  }
}

@media (max-width: 768px) {
  .clock-wrapper {
    padding: 1.2rem 0.5rem;
  }

  .clock-display {
    font-size: 13vw;
    padding: 0.8rem 0.6rem;
    letter-spacing: 0.06em;
  }

  .date-display {
    font-size: 0.9rem;
    letter-spacing: 0.14em;
  }
}

@media (max-width: 640px) {
  .title {
    font-size: 1.1rem;
    letter-spacing: 0.06em;
  }
}
