@import url("https://fonts.googleapis.com/css2?family=Anuphan:wght@300;400;500;600;700&display=swap");

:root {
  --main_1: #00A3FF;
  --main_2: #069bffb1;
  --main_3: #069bff68;
  --main_4: #069bff;
  --main_6: #4d4d4d;
  --font-color: #B0BBCC;
  --bg_hud_1: rgba(77, 77, 77, 0.85);
  --bg_panel: rgba(18, 18, 20, 0.92);
  --bg_panel_inner: rgba(30, 30, 34, 0.95);
  --chip_bg: #1e1e1e;
  --text-white: #ffffff;
  --text-muted: rgba(180, 180, 180, 0.9);
  --radius: 0.72vh;
  --radius-lg: 1vh;
  --status-active: #3DDC84;
  --shadow: 0 0.2vh 0.8vh rgba(0, 0, 0, 0.35);
  --frame-border: rgba(0, 163, 255, 0.45);
  --frame-glow: rgba(0, 163, 255, 0.18);
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Anuphan", sans-serif;
  -webkit-user-select: none;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

html, body {
  width: 100vw;
  min-height: 100vh;
  height: 100vh;
  background: transparent;
  overflow: hidden;
  pointer-events: none;
  font-size: 1.3vh;
  color: var(--text-white);
}

html:has(body.web-page),
body.web-page {
  height: auto;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
}

body.web-page {
  pointer-events: auto;
}

body.preview-mode {
  background:
    radial-gradient(circle at 20% 80%, rgba(0, 163, 255, 0.08), transparent 40%),
    radial-gradient(circle at 80% 20%, rgba(61, 220, 132, 0.05), transparent 35%),
    linear-gradient(160deg, #0a0a0a 0%, #141414 50%, #0d1117 100%);
}

body.home-page.preview-mode {
  background: #0a0a0c;
}

.hidden { display: none !important; }

.hud-chip {
  display: flex;
  align-items: center;
  min-height: 2.3vh;
  padding: 0.42vh 0.72vh;
  gap: 0.34vh;
  background: var(--chip_bg);
  border-radius: var(--radius);
  color: var(--text-white);
  font-size: 1.02vh;
  font-weight: 600;
  box-shadow: var(--shadow);
  border: 0.08vh solid rgba(255, 255, 255, 0.06);
}

.hud-chip .dot {
  width: 0.5vh;
  height: 0.5vh;
  border-radius: 50%;
  background: var(--main_1);
  box-shadow: 0 0 0.32vh rgba(0, 163, 255, 0.8);
  flex-shrink: 0;
}

.icon-accent {
  font-size: 1.25vh;
  color: var(--main_1);
  flex-shrink: 0;
}

.icon-accent-sm {
  font-size: 1.05vh;
}

.icon-accent-success {
  color: var(--status-active);
}

.icon-dot {
  font-size: 1.1vh;
  color: var(--main_1);
  filter: drop-shadow(0 0 0.32vh rgba(0, 163, 255, 0.8));
  flex-shrink: 0;
}

.icon-dot-success {
  color: var(--status-active);
  filter: drop-shadow(0 0 0.32vh rgba(61, 220, 132, 0.8));
}

.hud-chip iconify-icon {
  font-size: 1.25vh;
  color: var(--main_1);
  flex-shrink: 0;
}

.header-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.header-label {
  font-size: 0.75vh;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.header-title {
  font-size: 1.2vh;
  font-weight: 700;
  color: var(--text-white);
  letter-spacing: 0.04em;
}

/* ===== Fullscreen backdrop ===== */
#countdown-ui {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.countdown-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(0, 163, 255, 0.06) 0%, transparent 55%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.72) 100%);
  backdrop-filter: blur(0.35vh);
  -webkit-backdrop-filter: blur(0.35vh);
}

/* ===== Main panel with depth ===== */
.countdown-panel {
  position: relative;
  z-index: 2;
  min-width: 46vh;
  padding: 0.6vh;
}

.panel-glow {
  position: absolute;
  inset: -1.2vh;
  border-radius: calc(var(--radius-lg) + 1vh);
  background: radial-gradient(ellipse at center, var(--frame-glow) 0%, transparent 70%);
  filter: blur(1.2vh);
  pointer-events: none;
  z-index: 0;
}

.panel-frame {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.65vh;
  padding: 1vh 1.1vh 1.05vh;
  background:
    linear-gradient(145deg, rgba(35, 35, 40, 0.98) 0%, rgba(18, 18, 22, 0.98) 100%);
  border: 0.12vh solid var(--frame-border);
  border-radius: var(--radius-lg);
  box-shadow:
    0 0 0 0.08vh rgba(0, 163, 255, 0.12),
    0 0.8vh 2.5vh rgba(0, 0, 0, 0.55),
    0 0 3vh var(--frame-glow),
    inset 0 0.08vh 0 rgba(255, 255, 255, 0.08),
    inset 0 -0.5vh 1.2vh rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.panel-frame::before {
  content: '';
  position: absolute;
  inset: 0.45vh;
  border: 0.06vh solid rgba(0, 163, 255, 0.15);
  border-radius: calc(var(--radius-lg) - 0.3vh);
  pointer-events: none;
}

.panel-frame::after {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 0.12vh;
  background: linear-gradient(90deg, transparent, var(--main_1), transparent);
  opacity: 0.55;
  pointer-events: none;
}

/* ===== Corner brackets ===== */
.frame-corner {
  position: absolute;
  width: 1.6vh;
  height: 1.6vh;
  border-color: var(--main_1);
  border-style: solid;
  opacity: 0.85;
  z-index: 3;
  pointer-events: none;
}

.frame-corner.tl { top: 0.55vh; left: 0.55vh; border-width: 0.14vh 0 0 0.14vh; border-radius: 0.2vh 0 0 0; }
.frame-corner.tr { top: 0.55vh; right: 0.55vh; border-width: 0.14vh 0.14vh 0 0; border-radius: 0 0.2vh 0 0; }
.frame-corner.bl { bottom: 0.55vh; left: 0.55vh; border-width: 0 0 0.14vh 0.14vh; border-radius: 0 0 0 0.2vh; }
.frame-corner.br { bottom: 0.55vh; right: 0.55vh; border-width: 0 0.0vh 0.14vh 0; border-right-width: 0.14vh; border-radius: 0 0 0.2vh 0; }

.countdown-header {
  padding: 0.55vh 0.85vh;
  gap: 0.45vh;
  background: linear-gradient(90deg, rgba(30, 30, 30, 0.95), rgba(24, 24, 28, 0.95));
  border: 0.08vh solid rgba(0, 163, 255, 0.2);
  box-shadow: inset 0 0.06vh 0 rgba(255, 255, 255, 0.05);
}

.countdown-body {
  width: 100%;
  padding: 1.6vh 1.4vh 1.4vh;
  background:
    linear-gradient(180deg, var(--bg_panel_inner) 0%, var(--bg_panel) 100%);
  border-radius: calc(var(--radius) + 0.1vh);
  border: 0.09vh solid rgba(160, 160, 160, 0.12);
  box-shadow:
    inset 0 0.15vh 0.6vh rgba(0, 0, 0, 0.4),
    inset 0 -0.08vh 0 rgba(255, 255, 255, 0.04),
    0 0.3vh 1vh rgba(0, 163, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2vh;
}

.countdown-subtitle {
  display: inline-flex;
  align-items: center;
  gap: 0.4vh;
  font-size: 1.05vh;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.countdown-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6vh;
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35vh;
  min-width: 7vh;
}

.countdown-value {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 6.5vh;
  height: 5.5vh;
  padding: 0 0.5vh;
  background:
    linear-gradient(180deg, #252528 0%, #161618 100%);
  border: 0.1vh solid var(--main_2);
  border-radius: 0.55vh;
  font-size: 3.2vh;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-white);
  text-shadow: 0 0 1.2vh var(--main_3);
  box-shadow:
    inset 0 0.12vh 0 rgba(255, 255, 255, 0.06),
    inset 0 -0.35vh 0.8vh rgba(0, 0, 0, 0.45),
    0 0.25vh 0.8vh rgba(0, 163, 255, 0.15);
}

.countdown-label {
  display: inline-flex;
  align-items: center;
  gap: 0.25vh;
  font-size: 0.85vh;
  font-weight: 600;
  color: var(--main_1);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.countdown-label iconify-icon {
  font-size: 1vh;
}

.countdown-sep {
  font-size: 1.6vh;
  color: var(--main_1);
  filter: drop-shadow(0 0 0.4vh var(--main_2));
  margin-bottom: 1.6vh;
  opacity: 0.75;
}

.countdown-open {
  gap: 0.5vh;
  padding: 0.8vh 1.2vh;
  animation: open-pulse 1.5s ease-in-out infinite;
  border-color: rgba(61, 220, 132, 0.35);
}

.countdown-open iconify-icon {
  font-size: 1.8vh;
  color: var(--status-active);
}

.open-text {
  font-size: 1.4vh;
  font-weight: 700;
  color: var(--status-active);
  letter-spacing: 0.04em;
}

.countdown-open .dot {
  background: var(--status-active);
  box-shadow: 0 0 0.32vh rgba(61, 220, 132, 0.8);
}

@keyframes open-pulse {
  0%, 100% { box-shadow: var(--shadow), 0 0 0.8vh rgba(61, 220, 132, 0.2); }
  50%      { box-shadow: var(--shadow), 0 0 1.6vh rgba(61, 220, 132, 0.45); }
}

.countdown-footer {
  gap: 0.4vh;
  padding: 0.5vh 0.9vh;
  font-size: 0.95vh;
  font-weight: 600;
  color: var(--text-muted);
  background: linear-gradient(90deg, rgba(24, 24, 28, 0.95), rgba(30, 30, 30, 0.95));
  border: 0.08vh solid rgba(0, 163, 255, 0.15);
  flex-wrap: wrap;
  justify-content: center;
}

.countdown-footer iconify-icon {
  font-size: 1.15vh;
}

/* ===== Top nav ===== */
.top-nav {
  position: fixed;
  top: 1.2vh;
  left: 1.2vw;
  right: 1.2vw;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: auto;
}

.nav-brand {
  text-decoration: none;
  color: var(--text-white);
  padding: 0.5vh 0.85vh;
  gap: 0.4vh;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.nav-actions {
  display: flex;
  gap: 0.5vh;
}

.nav-btn {
  text-decoration: none;
  color: var(--text-white);
  padding: 0.5vh 0.85vh;
  gap: 0.4vh;
  cursor: pointer;
  border: none;
  font-family: inherit;
  font-size: inherit;
  transition: background 0.12s ease;
}

.nav-btn:hover {
  background: #252525;
}

.nav-user {
  gap: 0.55vh;
}

.nav-avatar {
  width: 2vh;
  height: 2vh;
  border-radius: 50%;
  object-fit: cover;
  border: 0.08vh solid var(--main_2);
}

/* ===== Auth pages ===== */
.page-overlay {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(0, 163, 255, 0.06) 0%, transparent 55%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.72) 100%);
  backdrop-filter: blur(0.35vh);
  -webkit-backdrop-filter: blur(0.35vh);
  pointer-events: none;
}

.auth-wrap {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6vh 1.2vw 2vh;
  pointer-events: auto;
}

.auth-frame {
  min-width: 38vh;
}

.auth-body {
  width: 100%;
  padding: 1.8vh 1.6vh;
  background: linear-gradient(180deg, var(--bg_panel_inner) 0%, var(--bg_panel) 100%);
  border-radius: calc(var(--radius) + 0.1vh);
  border: 0.09vh solid rgba(160, 160, 160, 0.12);
  box-shadow: inset 0 0.15vh 0.6vh rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2vh;
}

.auth-desc {
  display: inline-flex;
  align-items: center;
  gap: 0.4vh;
  font-size: 1.05vh;
  color: var(--text-muted);
  text-align: center;
}

.auth-error {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4vh;
  width: 100%;
  padding: 0.7vh 0.9vh;
  border-radius: 0.45vh;
  background: rgba(255, 107, 157, 0.12);
  border: 0.08vh solid rgba(255, 107, 157, 0.35);
  color: #ff8fb3;
  font-size: 0.95vh;
  font-weight: 600;
  text-align: center;
}

.auth-error iconify-icon {
  font-size: 1.2vh;
  color: #ff8fb3;
  flex-shrink: 0;
}

.auth-note {
  display: inline-flex;
  align-items: center;
  gap: 0.4vh;
  font-size: 0.88vh;
  color: var(--status-warn, #ffd166);
  text-align: center;
  line-height: 1.45;
}

.auth-note iconify-icon {
  font-size: 1.1vh;
  color: var(--status-warn, #ffd166);
  flex-shrink: 0;
}

.auth-note code {
  color: var(--main_1);
  font-family: Consolas, monospace;
}

.discord-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6vh;
  width: 100%;
  padding: 1vh 1.2vh;
  border-radius: 0.55vh;
  background: #5865F2;
  color: #fff;
  text-decoration: none;
  font-size: 1.15vh;
  font-weight: 700;
  box-shadow: 0 0.3vh 1.2vh rgba(88, 101, 242, 0.35);
  transition: opacity 0.12s ease, transform 0.12s ease;
  cursor: pointer;
}

.discord-btn iconify-icon {
  font-size: 1.8vh;
  color: #fff;
}

.discord-btn:hover {
  opacity: 0.9;
  transform: translateY(-0.05vh);
}

.discord-btn.disabled {
  opacity: 0.45;
  pointer-events: none;
  cursor: not-allowed;
}

.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35vh;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95vh;
  transition: color 0.12s ease;
}

.auth-back:hover {
  color: var(--main_1);
}

.auth-back iconify-icon {
  font-size: 1.15vh;
}

/* ===== Dashboard ===== */
.dashboard-body {
  gap: 1.4vh;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 1vh;
  width: 100%;
  padding: 1vh;
  background: var(--chip_bg);
  border: 0.08vh solid rgba(0, 163, 255, 0.2);
  border-radius: 0.55vh;
}

.profile-avatar {
  width: 6vh;
  height: 6vh;
  border-radius: 50%;
  object-fit: cover;
  border: 0.12vh solid var(--main_2);
  box-shadow: 0 0 1vh var(--main_3);
}

.profile-name,
.profile-id,
.profile-email {
  display: flex;
  align-items: center;
  gap: 0.35vh;
}

.profile-name {
  font-size: 1.35vh;
  font-weight: 700;
  color: var(--text-white);
}

.profile-id {
  font-size: 0.9vh;
  color: var(--text-muted);
  margin-top: 0.2vh;
}

.profile-email {
  font-size: 0.85vh;
  color: var(--main_1);
  margin-top: 0.15vh;
}

.profile-name iconify-icon,
.profile-id iconify-icon,
.profile-email iconify-icon {
  font-size: 1.05vh;
}

.dashboard-status {
  gap: 0.45vh;
  padding: 0.6vh 1vh;
  color: var(--status-active);
  border-color: rgba(61, 220, 132, 0.3);
}

.dashboard-status iconify-icon {
  color: var(--status-active);
}

.dashboard-status .dot {
  background: var(--status-active);
  box-shadow: 0 0 0.32vh rgba(61, 220, 132, 0.8);
}

.dashboard-admin-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 16px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  border: 1px solid rgba(0, 163, 255, 0.35);
  transition: background 0.12s ease;
}

.dashboard-admin-link:hover {
  background: rgba(0, 163, 255, 0.15);
}

.dashboard-admin-link--prominent {
  border-color: rgba(255, 179, 71, 0.5);
  background: rgba(255, 179, 71, 0.15);
  color: #ffb347;
  font-size: 13px;
  padding: 12px 20px;
}

.dashboard-admin-link--prominent:hover {
  background: rgba(255, 179, 71, 0.25);
}

.dt-admin-link {
  border: 1px solid rgba(0, 163, 255, 0.35);
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}

.dt-admin-link:hover {
  background: rgba(0, 163, 255, 0.15);
}

.nav-btn iconify-icon {
  font-size: 1.15vh;
}

.btn-logout:hover {
  color: #ff8fb3;
}
