/* ================================================
   WILL IT DEMO? — Main Stylesheet
   Rocket League inspired dark UI
   ================================================ */

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --rl-blue: #00aeff;
  --rl-orange: #ff6b00;
  --rl-dark: #0a0e1a;
  --rl-darker: #060910;
  --rl-card: #0f1625;
  --rl-card2: #161f35;
  --rl-border: #1e2d4a;
  --rl-text: #e8eaf0;
  --rl-muted: #7a8aaa;
  --rl-green: #00e676;
  --rl-red: #ff1744;
  --rl-yellow: #ffd600;
  --font-display: 'JetBrains Mono', 'Fira Code', monospace;
  --font-body: 'JetBrains Mono', 'Fira Code', monospace;
  --radius: 8px;
  --radius-lg: 16px;
}

html { scroll-behavior: smooth; }

body {
  background-color: var(--rl-dark);
  color: var(--rl-text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--rl-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* === HEADER === */
.site-header {
  background: var(--rl-darker);
  border-bottom: 2px solid var(--rl-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
.logo:hover { text-decoration: none; }

.logo-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.logo-icon svg {
  width: 36px;
  height: 36px;
  filter: drop-shadow(0 0 6px rgba(255, 107, 0, 0.5));
  transition: filter 0.2s;
}
.logo:hover .logo-icon svg {
  filter: drop-shadow(0 0 10px rgba(255, 107, 0, 0.8));
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  line-height: 1;
  text-transform: uppercase;
}
.logo-will { color: var(--rl-text); }
.logo-it   { color: var(--rl-muted); font-weight: 400; }
.logo-demo { color: var(--rl-orange); }
.logo-question { color: var(--rl-yellow); }

.header-nav { display: flex; align-items: center; gap: 1rem; }

/* === LANGUAGE SWITCHER === */
.lang-switcher {
  display: flex;
  gap: 0.25rem;
}
.lang-btn {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  color: var(--rl-muted);
  border: 1px solid transparent;
  text-decoration: none;
  transition: all 0.15s;
}
.lang-btn:hover { color: var(--rl-text); text-decoration: none; border-color: var(--rl-border); }
.lang-btn-active { color: var(--rl-blue); border-color: var(--rl-blue); background: rgba(0,174,255,0.08); }

/* === FLASH MESSAGES === */
.flash {
  max-width: 900px;
  margin: 1rem auto 0;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  letter-spacing: 0.03em;
}
.flash-notice {
  background: rgba(0, 230, 118, 0.12);
  border: 1px solid var(--rl-green);
  color: var(--rl-green);
}
.flash-alert {
  background: rgba(255, 23, 68, 0.12);
  border: 1px solid var(--rl-red);
  color: var(--rl-red);
}

/* === MAIN & FOOTER === */
main { flex: 1; }

.site-footer {
  text-align: center;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--rl-border);
  color: var(--rl-muted);
  font-size: 0.85rem;
  margin-top: 4rem;
}
.footer-sub { font-size: 0.75rem; margin-top: 0.25rem; opacity: 0.6; }

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--rl-blue);
  color: #000;
}
.btn-primary:hover { background: #33c1ff; color: #000; }

.btn-outline {
  background: transparent;
  color: var(--rl-blue);
  border: 1.5px solid var(--rl-blue);
}
.btn-outline:hover { background: rgba(0,174,255,0.1); }

.btn-ghost {
  background: transparent;
  color: var(--rl-muted);
  border: 1.5px solid var(--rl-border);
}
.btn-ghost:hover { color: var(--rl-text); border-color: var(--rl-muted); }

.btn-danger {
  background: var(--rl-red);
  color: #fff;
}
.btn-danger:hover { background: #ff4569; }

.btn-sm { padding: 0.35rem 0.8rem; font-size: 0.75rem; }
.btn-lg { padding: 0.9rem 2rem; font-size: 1rem; }
.btn-full { width: 100%; justify-content: center; }

/* === HOME PAGE === */
.home-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* === DAILY CHALLENGE === */
.daily-challenge {
  background: var(--rl-card);
  border: 1px solid var(--rl-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 3rem;
}

.challenge-header {
  padding: 2rem 2rem 1.5rem;
  border-bottom: 1px solid var(--rl-border);
  text-align: center;
}

.challenge-date {
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--rl-muted);
  margin-bottom: 0.5rem;
}

.challenge-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--rl-text);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
}

.challenge-hint {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  color: var(--rl-muted);
}
.hint-label {
  color: var(--rl-yellow);
  font-weight: 700;
  margin-right: 0.3rem;
}

/* === VIDEO === */
.video-container {
  background: #000;
  position: relative;
  line-height: 0;
}

.challenge-video {
  width: 100%;
  max-height: 480px;
  object-fit: contain;
  display: block;
}

.video-placeholder {
  width: 100%;
  height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: var(--rl-muted);
  background: #000;
}
.video-placeholder-icon {
  font-size: 3rem;
  opacity: 0.3;
}

.reveal-video-container {
  position: relative;
}

/* === VOTE SECTION === */
.vote-section {
  padding: 2rem 2rem 2.5rem;
  text-align: center;
}

.vote-question {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--rl-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.vote-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.vote-btn {
  flex: 1;
  min-width: 180px;
  max-width: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 1.5rem 1rem;
  border-radius: var(--radius-lg);
  border: 2px solid transparent;
  cursor: pointer;
  font-family: var(--font-display);
  transition: all 0.2s ease;
  background: var(--rl-card2);
}

.vote-yes {
  border-color: var(--rl-orange);
  color: var(--rl-orange);
}
.vote-yes:hover {
  background: rgba(255, 107, 0, 0.15);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(255, 107, 0, 0.25);
}

.vote-no {
  border-color: var(--rl-blue);
  color: var(--rl-blue);
}
.vote-no:hover {
  background: rgba(0, 174, 255, 0.15);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 174, 255, 0.25);
}

.vote-icon { font-size: 2.5rem; }
.vote-label {
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}
.vote-sub { font-size: 0.75rem; opacity: 0.7; letter-spacing: 0.05em; }

/* === ALREADY VOTED === */
.already-voted-section {
  padding: 1.5rem 2rem;
  text-align: center;
  border-top: 1px solid var(--rl-border);
}
.already-voted-msg {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rl-yellow);
}

/* === RESULT SECTION === */
.result-section {
  padding: 2rem 2rem 2.5rem;
  text-align: center;
  border-top: 1px solid var(--rl-border);
}

.result-verdict {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.verdict-correct { color: var(--rl-green); }
.verdict-wrong   { color: var(--rl-red); }

.result-message {
  font-size: 1.05rem;
  color: var(--rl-text);
  margin-bottom: 2rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* === STATS BAR === */
.stats-bar {
  background: var(--rl-card2);
  border: 1px solid var(--rl-border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}

.stats-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
  color: var(--rl-muted);
}

.stats-track {
  width: 100%;
  height: 12px;
  background: var(--rl-border);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  margin-bottom: 0.5rem;
}

.stats-fill {
  height: 100%;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.stats-fill-demo   { background: var(--rl-orange); }
.stats-fill-nodemo { background: var(--rl-blue); }

.stats-numbers {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--rl-text);
}

.stats-total {
  font-size: 0.8rem;
  color: var(--rl-muted);
  margin-top: 0.5rem;
}

/* === NO CHALLENGE === */
.no-challenge {
  display: flex;
  justify-content: center;
  padding: 4rem 1.5rem;
}
.no-challenge-inner {
  text-align: center;
  max-width: 480px;
}
.no-challenge-icon { font-size: 4rem; margin-bottom: 1.5rem; }
.no-challenge h1 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 900;
  margin-bottom: 1rem;
  text-transform: uppercase;
}
.no-challenge p { color: var(--rl-muted); line-height: 1.7; }

/* === PAST CHALLENGES === */
.section-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--rl-muted);
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rl-border);
}

.past-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.past-card {
  background: var(--rl-card);
  border: 1px solid var(--rl-border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  transition: border-color 0.15s;
}
.past-card:hover { border-color: var(--rl-blue); }

.past-card-date {
  font-size: 0.75rem;
  color: var(--rl-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}
.past-card-title {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.6rem;
  color: var(--rl-text);
}
.past-card-result {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 0.4rem;
}
.result-demo   { color: var(--rl-orange); }
.result-nodemo { color: var(--rl-blue); }

.past-card-stats {
  font-size: 0.75rem;
  color: var(--rl-muted);
}

/* === UTILITIES === */
.hidden { display: none !important; }

/* === ADMIN STYLES === */
.admin-body {
  background: #0d1117;
  color: var(--rl-text);
  font-family: var(--font-body);
  min-height: 100vh;
}

.admin-header {
  background: var(--rl-darker);
  border-bottom: 2px solid var(--rl-border);
  padding: 0 2rem;
  height: 56px;
  display: flex;
  align-items: center;
}
.admin-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}
.admin-logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.1rem;
  color: var(--rl-orange);
  text-decoration: none;
  letter-spacing: 0.1em;
}
.admin-header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.admin-user {
  font-size: 0.85rem;
  color: var(--rl-muted);
}

.admin-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.admin-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 1rem;
}
.admin-page-header h1 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Admin login */
.admin-login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
}
.admin-login-card {
  background: var(--rl-card);
  border: 1px solid var(--rl-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 380px;
}
.admin-login-logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.5rem;
  color: var(--rl-orange);
  letter-spacing: 0.1em;
  text-align: center;
  margin-bottom: 1.5rem;
}
.admin-login-card h1 {
  font-size: 1.2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--rl-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Forms */
.form-group {
  margin-bottom: 1.25rem;
}
.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rl-muted);
  margin-bottom: 0.4rem;
}
.form-control {
  width: 100%;
  background: var(--rl-card2);
  border: 1.5px solid var(--rl-border);
  border-radius: var(--radius);
  color: var(--rl-text);
  padding: 0.65rem 0.9rem;
  font-size: 0.95rem;
  font-family: var(--font-body);
  transition: border-color 0.15s;
}
.form-control:focus {
  outline: none;
  border-color: var(--rl-blue);
}
.form-file {
  padding: 0.5rem 0.9rem;
  cursor: pointer;
}
textarea.form-control { resize: vertical; min-height: 72px; }

.form-hint {
  font-size: 0.75rem;
  color: var(--rl-muted);
  margin-top: 0.35rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

.form-group-result .radio-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.radio-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border: 2px solid var(--rl-border);
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.15s;
  flex: 1;
  min-width: 160px;
}
.radio-label input { cursor: pointer; }
.radio-demo:has(input:checked)   { border-color: var(--rl-orange); background: rgba(255,107,0,0.1); color: var(--rl-orange); }
.radio-nodemo:has(input:checked) { border-color: var(--rl-blue); background: rgba(0,174,255,0.1); color: var(--rl-blue); }
.radio-demo:hover   { border-color: var(--rl-orange); }
.radio-nodemo:hover { border-color: var(--rl-blue); }
.radio-icon { font-size: 1.3rem; }

.form-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rl-border);
}

.form-errors {
  background: rgba(255, 23, 68, 0.1);
  border: 1px solid var(--rl-red);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  color: var(--rl-red);
}
.form-errors h3 { font-size: 0.9rem; margin-bottom: 0.5rem; }
.form-errors ul { padding-left: 1.25rem; font-size: 0.875rem; }

.current-video { margin-bottom: 0.75rem; }
.admin-video-preview {
  width: 100%;
  max-height: 200px;
  object-fit: contain;
  background: #000;
  border-radius: var(--radius);
  margin-bottom: 0.4rem;
}
.current-label { font-size: 0.75rem; color: var(--rl-muted); }

/* Admin form wrapper */
.admin-form {
  background: var(--rl-card);
  border: 1px solid var(--rl-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

/* Table */
.admin-table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--rl-border);
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.admin-table th {
  background: var(--rl-card2);
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rl-muted);
  font-weight: 700;
  white-space: nowrap;
  border-bottom: 1px solid var(--rl-border);
}
.admin-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--rl-border);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(255,255,255,0.02); }
.row-today td { background: rgba(0,174,255,0.04); }

.actions-cell { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }

/* Badges */
.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.badge-demo    { background: rgba(255,107,0,0.15); color: var(--rl-orange); border: 1px solid var(--rl-orange); }
.badge-nodemo  { background: rgba(0,174,255,0.15); color: var(--rl-blue);   border: 1px solid var(--rl-blue); }
.badge-today   { background: rgba(0,174,255,0.1);  color: var(--rl-blue);   border: 1px solid var(--rl-blue); margin-left: 0.4rem; }
.badge-ok      { background: rgba(0,230,118,0.1);  color: var(--rl-green);  border: 1px solid var(--rl-green); }
.badge-missing { background: rgba(255,23,68,0.1);  color: var(--rl-red);    border: 1px solid var(--rl-red); }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--rl-muted);
}
.empty-state p { margin-bottom: 1rem; }

/* Responsive */
@media (max-width: 600px) {
  .header-inner { padding: 0 1rem; }
  .logo-text { font-size: 1rem; }
  .logo-icon svg { width: 28px; height: 28px; }
  .challenge-title { font-size: 1.3rem; }
  .vote-buttons { flex-direction: column; }
  .vote-btn { max-width: 100%; }
  .admin-main { padding: 1rem; }
  .admin-page-header { flex-wrap: wrap; }
}
