@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Barlow+Condensed:wght@300;400;600;700&display=swap');

:root {
  --bg-dark: #0b0b10;
  --bg-mid: #14141f;
  --accent-red: #e11b3c;
  --accent-pink: #ff4fd8;
  --accent-blue: #4fe3ff;
  --text-light: #f7f2ff;
  --text-muted: rgba(247, 242, 255, 0.7);
  --card-bg: rgba(10, 10, 20, 0.75);
  --glow: 0 0 18px rgba(255, 79, 216, 0.45), 0 0 36px rgba(79, 227, 255, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  color: var(--text-light);
  background: var(--bg-dark);
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle at top, rgba(255, 79, 216, 0.18), transparent 60%),
    radial-gradient(circle at bottom, rgba(79, 227, 255, 0.15), transparent 55%),
    url('../img/draw_background.png');
  background-size: cover;
  background-position: center;
  filter: brightness(0.6) saturate(1.2);
  z-index: -2;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: linear-gradient(120deg, rgba(11, 11, 16, 0.9), rgba(11, 11, 16, 0.4));
  z-index: -1;
}

.stage {
  min-height: 100vh;
  padding: 48px 24px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  text-align: center;
}

.stage-header .badge {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid rgba(255, 79, 216, 0.6);
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 12px;
  background: rgba(255, 79, 216, 0.15);
}

.stage-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  width: 100%;
}

.brand-logo {
  width: min(220px, 60vw);
  height: auto;
  margin-bottom: 4px;
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.35));
}

.brand-logo.corner {
  position: absolute;
  top: 6px;
  right: 24px;
  width: min(160px, 40vw);
  margin: 0;
}

.rock-title {
  width: min(340px, 92vw);
  height: auto;
  margin: 6px 0 8px;
  filter: drop-shadow(0 0 18px rgba(255, 204, 102, 0.4));
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.stage-header h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(36px, 5vw, 72px);
  margin: 12px 0 6px;
  letter-spacing: 4px;
  text-transform: uppercase;
  text-shadow: var(--glow);
}

.subtitle {
  color: var(--text-muted);
  font-size: 18px;
  margin: 0;
}

.stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.stats.is-hidden {
  display: none;
}

.stat {
  background: var(--card-bg);
  border: 1px solid rgba(255, 79, 216, 0.2);
  padding: 16px 26px;
  border-radius: 12px;
  min-width: 120px;
  box-shadow: var(--glow);
}

.stat-label {
  display: block;
  font-size: 14px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
}

.winner-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.winner-card {
  width: min(520px, 90vw);
  padding: 28px 24px 30px;
  background: var(--card-bg);
  border-radius: 20px;
  border: 2px solid rgba(255, 79, 216, 0.35);
  position: relative;
  box-shadow: var(--glow);
  overflow: hidden;
}

.winner-card.rolling {
  animation: pulse 0.8s infinite alternate;
}

.marquee {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  border: 2px dashed rgba(79, 227, 255, 0.6);
  animation: spin 5s linear infinite;
  pointer-events: none;
}

.winner-image {
  width: 200px;
  height: 200px;
  border-radius: 18px;
  object-fit: cover;
  border: 3px solid rgba(255, 79, 216, 0.6);
  margin-bottom: 16px;
  box-shadow: var(--glow);
}

.winner-info h2 {
  margin: 0;
  font-size: 36px;
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 2px;
}

.winner-info p {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 18px;
}

.draw-btn {
  background: linear-gradient(120deg, var(--accent-red), var(--accent-pink));
  color: var(--text-light);
  border: none;
  padding: 14px 34px;
  font-size: 20px;
  letter-spacing: 2px;
  text-transform: uppercase;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: var(--glow);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.draw-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.draw-btn:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.02);
}

.ghost-btn,
.danger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid rgba(255, 79, 216, 0.4);
  background: transparent;
  color: var(--text-light);
  cursor: pointer;
}

.danger-btn {
  border-color: rgba(225, 27, 60, 0.6);
  color: #ffd3da;
}

.message {
  min-height: 20px;
  color: var(--text-muted);
  font-size: 16px;
}

.form-card {
  background: var(--card-bg);
  padding: 28px 32px 32px;
  border-radius: 20px;
  width: min(520px, 92vw);
  box-shadow: var(--glow);
}

.form-card h2 {
  margin-top: 0;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 32px;
  letter-spacing: 2px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  text-align: left;
}

.form-group input {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(7, 7, 12, 0.7);
  color: var(--text-light);
  font-size: 16px;
}

.page-admin .admin-stage {
  padding-top: 36px;
}

.admin-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.admin-nav {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.table-card {
  width: min(1100px, 95vw);
  background: var(--card-bg);
  padding: 20px;
  border-radius: 16px;
  box-shadow: var(--glow);
  overflow-x: auto;
  text-align: left;
}

.table-card h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px;
  margin: 0 0 12px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.admin-table th,
.admin-table td {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-table th {
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.admin-table .empty {
  text-align: center;
  padding: 24px 0;
  color: var(--text-muted);
}

.avatar {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  border: 2px solid rgba(255, 79, 216, 0.5);
}

.drawrate-input {
  width: 70px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(7, 7, 12, 0.7);
  color: var(--text-light);
}

.wide .table-card {
  width: min(1200px, 96vw);
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  from { box-shadow: 0 0 12px rgba(255, 79, 216, 0.4); }
  to { box-shadow: 0 0 24px rgba(79, 227, 255, 0.6); }
}

@media (max-width: 700px) {
  .brand-logo.corner {
    position: static;
    width: min(180px, 60vw);
    margin-bottom: 6px;
  }
  .winner-card { width: 90vw; }
  .winner-image { width: 160px; height: 160px; }
  .stats { gap: 12px; }
  .admin-actions { width: 100%; }
}
