@font-face {
  font-family: 'CrashTeamRacing';
  src: url('fonts/CrashTeamRacing.ttf') format('truetype');
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'CrashTeamRacing', 'Impact';
  background: #111 url('img/flag-bg.png') center / cover no-repeat fixed;
  display: flex;
  min-height: 100vh;
}

/* --- Left panel: Crash image --- */
.crash-panel {
  flex: 0 0 45%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0 0 32px;
}

.crash-img {
  max-height: 88vh;
  max-width: 100%;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.75));
}

/* --- Right panel: content --- */
.content-panel {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 56px;
  background: rgba(6, 12, 30, 0.86);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  overflow: hidden;
}

/* --- Headings --- */
.woah-heading {
  font-size: clamp(4.5rem, 9vw, 8.5rem);
  background: linear-gradient(to bottom, #ffc800, #ff0000);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: .05vw black;

  /* Firefox support */
  background-clip: text;
  color: transparent;
  line-height: 0.9;
  letter-spacing: 5px;
  margin-bottom: 14px;
}

.maintenance-text {
  font-size: clamp(1.4rem, 2.6vw, 2.3rem);
  color: #fff;
  text-shadow: 2px 2px 0 #000, -1px -1px 0 #000;
  letter-spacing: 2px;
  line-height: 1.25;
  margin-bottom: 36px;
}

/* Orange -> gold -> transparent rule */
.divider {
  width: 80%;
  height: 4px;
  background: linear-gradient(to right, #ffc800, #ff0000 50%, transparent);
  border-radius: 4px;
  margin-bottom: 34px;
}

/* --- Countdown block --- */
.back-label {
  font-size: clamp(1rem, 1.7vw, 1.35rem);
  color: #aaa;
  letter-spacing: 4px;
  text-shadow: 1px 1px 0 #000;
  margin-bottom: 10px;
}

.timer-display {
  font-size: clamp(3rem, 7vw, 5.5rem);
  color: #fff;
  text-shadow: 5px 5px 0 rgba(0, 0, 0, 0.55);
  line-height: 1;
  margin-bottom: 14px;
  font-variant-numeric: tabular-nums;
}

.timer-subtext {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  color: #ccc;
  letter-spacing: 2px;
  text-shadow: 1px 1px 0 #000;
}

/* --- Overdue block --- */
#overdue-section {
  display: none;
}

.overdue-text {
  font-size: clamp(1.4rem, 2.5vw, 2.1rem);
  color: #aaa;
  text-shadow: 2px 2px 0 #000, -1px -1px 0 #000;
  letter-spacing: 2px;
  line-height: 1.6;
}

/* --- Discord link --- */
.discord-link-block {
  margin-top: 28px;
}

.discord-link-block p {
  font-size: clamp(0.85rem, 1.3vw, 1.05rem);
  color: #aaa;
  letter-spacing: 2px;
  text-shadow: 1px 1px 0 #000;
  margin-bottom: 8px;
}

.discord-link-block a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  background: #5865F2;
  text-decoration: none;
  font-size: clamp(0.9rem, 1.4vw, 1.1rem);
  letter-spacing: 2px;
  padding: 8px 18px;
  border-radius: 6px;
  transition: background 0.2s;
}

.discord-link-block a:hover {
  background: #4752c4;
}

/* --- Mobile --- */
@media (max-width: 700px) {

  html,
  body {
    height: auto;
    overflow: auto;
    align-items: center;
    text-align: center;
  }

  body {
    flex-direction: column;
    background-attachment: scroll; /* fixes iOS Safari fixed-bg bug */
  }

  .crash-panel {
    flex: 0 0 auto;
    padding: 24px 16px 0;
    align-items: center;
  }

  .crash-img {
    max-height: 36vh;
  }

  .content-panel {
    flex: 1;
    padding: 28px 24px 40px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }

  .divider {
    width: 100%;
  }
}

/* --- BigWoah overlay --- */
#bigwoah-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0;
}

#bigwoah-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

#bigwoah-overlay img {
  position: absolute;
  object-fit: contain;
  filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.75));
}

/* --- Crash image float-up return animation --- */
@keyframes floatUp {
  from {
    transform: translateY(110vh);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.crash-img.float-up {
  animation: floatUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
