/* AppColors parity with lib/theme/app_colors.dart + login screen */

:root,
html.ioi-light {
  --bg: #fdfaff;
  --text: #000000;
  --text-inactive: rgba(0, 0, 0, 0.54);
  --theme-color: #fdfaff;
}

html.ioi-dark {
  --bg: #121212;
  --text: #ffffff;
  --text-inactive: rgba(255, 255, 255, 0.7);
  --theme-color: #121212;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: 'Varela Round', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
}

.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 8px 12px;
  z-index: 10;
  pointer-events: none;
}

.theme-toggle {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  cursor: default;
  -webkit-tap-highlight-color: transparent;
}

.theme-toggle:focus {
  outline: none;
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.theme-toggle .icon {
  display: none;
  line-height: 0;
}

html.ioi-light .theme-toggle .icon-dark-mode {
  display: block;
}

html.ioi-dark .theme-toggle .icon-light-mode {
  display: block;
}

.center {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 72px 24px 48px;
  text-align: center;
}

.brand {
  margin: 0;
}

.logo {
  margin: 0;
  font-size: 48px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
  letter-spacing: 0;
}

.tagline {
  margin: 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--text-inactive);
}

.countdown-block {
  margin-top: 48px;
  max-width: 420px;
  width: 100%;
}

.countdown-label {
  margin: 0 0 20px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-inactive);
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  min-width: 2ch;
}

.unit-label {
  font-size: 12px;
  line-height: 1.3;
  color: var(--text-inactive);
}

.countdown-note {
  margin: 20px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-inactive);
}

.countdown-note[hidden] {
  display: none;
}

@media (max-width: 400px) {
  .value {
    font-size: 22px;
  }

  .unit-label {
    font-size: 11px;
  }
}
