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

:root {
  --bg: #0e0e10;
  --surface: #18181b;
  --surface-2: #2d2d35;
  --text: #efeff1;
  --text-muted: #adadb8;
  --purple: #9147ff;
  --purple-dark: #6c35c1;
  --green: #00b26f;
  --red: #e91916;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  height: 58px;
  background: var(--surface);
  border-bottom: 1px solid var(--surface-2);
  position: sticky;
  top: 0;
  z-index: 50;
}

.page-hero .navbar {
  background:
    radial-gradient(ellipse 55% 120% at 8% 50%,  rgba(145,71,255,0.18) 0%, transparent 70%),
    radial-gradient(ellipse 40% 120% at 92% 50%, rgba(255,110,180,0.13) 0%, transparent 70%),
    radial-gradient(ellipse 30% 120% at 50% 50%, rgba(60,120,255,0.08) 0%, transparent 70%),
    rgba(12,12,18,0.82);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid rgba(145,71,255,0.18);
  animation: nebulaShift 10s ease-in-out infinite alternate;
}

@keyframes nebulaShift {
  0%   { background-position: 0% 50%, 100% 50%, 50% 50%; }
  50%  { background-position: 10% 60%, 88% 40%, 52% 50%; }
  100% { background-position: 5% 45%, 95% 55%, 48% 50%; }
}

@media (max-width: 680px) {
  .page-hero .navbar-actions {
    border-top-color: transparent;
    width: auto;
    margin-top: 0;
    padding-top: 0;
  }
}

.navbar-sorteos-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}
.navbar-sorteos-link:hover {
  color: var(--text);
  background: var(--surface-2);
}

.navbar-brand {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.navbar-logo {
  height: 28px;
  width: auto;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.navbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  padding-right: 6px;
}

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--surface-2);
}

.navbar-twitch {
  font-size: 14px;
  font-weight: 600;
  color: var(--purple);
}

.navbar-identity { position: relative; }

.navbar-identity-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  cursor: default;
  padding: 0;
}

.identity-chevron {
  display: none;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.navbar-identity-toggle.open .identity-chevron { transform: rotate(180deg); }

.navbar-identity-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  background: var(--surface);
  border: 1px solid var(--surface-2);
  border-radius: 12px;
  padding: 6px;
  min-width: 210px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.5);
  z-index: 200;
}

.navbar-identity-dropdown.open { display: block; }

.identity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 8px;
  gap: 12px;
}

.identity-row:hover { background: var(--surface-2); }

.identity-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.identity-value { font-size: 13px; }

/* Admin dropdown */
.admin-dropdown { position: relative; }

.admin-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 5px;
}

.admin-dropdown-toggle svg {
  transition: transform 0.2s;
}

.admin-dropdown-toggle.open svg { transform: rotate(180deg); }

.admin-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--surface-2);
  border-radius: 12px;
  padding: 6px;
  min-width: 160px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.5);
  z-index: 200;
}

.admin-dropdown-menu.open { display: block; }

.admin-dropdown-item {
  display: block;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.15s;
}

.admin-dropdown-item:hover { background: var(--surface-2); }

.navbar-balance {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--surface-2);
  border-radius: 20px;
  padding: 4px 12px;
}

.navbar-balance strong {
  color: var(--purple);
  font-weight: 700;
  font-size: 14px;
}

.navbar-kick {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  color: #53fc18;
  background: rgba(83,252,24,0.08);
  border: 1px solid rgba(83,252,24,0.2);
  border-radius: 20px;
  padding: 4px 12px;
}

.btn-kick { background: #53fc18; color: #000; font-weight: 700; }
.btn-kick:hover { background: #3fd410; }

.flash {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 28px;
  padding: 12px 18px;
  font-size: 14px;
  line-height: 1.5;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 500;
}

.flash::before {
  font-size: 16px;
  flex-shrink: 0;
}

.flash-notice {
  background: rgba(0, 178, 111, 0.08);
  color: var(--green);
  border-color: rgba(0, 178, 111, 0.2);
}

.flash-notice::before { content: "✓"; }

.flash-alert {
  background: rgba(233, 25, 22, 0.08);
  color: var(--red);
  border-color: rgba(233, 25, 22, 0.2);
}

.flash-alert::before { content: "!"; }

main { padding: 36px 28px; max-width: 1100px; margin: 0 auto; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  background: var(--surface-2);
  color: var(--text);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
  line-height: 1;
  letter-spacing: 0.01em;
  font-family: inherit;
}

.btn:hover { background: #3a3a46; }
.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-lg { padding: 13px 28px; font-size: 15px; }
.btn-primary { background: var(--purple); color: white; border-color: transparent; }
.btn-primary:hover { background: var(--purple-dark); }
.btn-success { background: var(--green); color: white; }
.btn-success:hover { background: #009960; }
.btn-danger { background: var(--red); color: white; }
.btn-danger:hover { background: #c51513; }
.btn-twitch { background: var(--purple); color: white; }
.btn-twitch:hover { background: var(--purple-dark); }
.btn-outline {
  background: transparent;
  border-color: rgba(255,255,255,0.12);
  color: var(--text-muted);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.22);
  color: var(--text);
}
.btn-disabled, button:disabled {
  background: var(--surface-2);
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.6;
  border-color: transparent;
}

.hero {
  position: relative;
  text-align: center;
  padding: 0 20px;
  overflow: hidden;
  border-radius: 0;
  background: #0a0a0f;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-top: -36px;
  margin-bottom: -36px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.18;
  transition: transform 0.1s ease-out;
}
.hero-glow-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #9147ff, transparent 70%);
  top: -120px; left: -100px;
  animation-duration: 9s;
}
.hero-glow-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #4a9eff, transparent 70%);
  bottom: -100px; right: -80px;
  animation-duration: 11s;
  animation-delay: -4s;
}
.hero-glow-3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, #bf5fff, transparent 70%);
  top: 40%; left: 50%;
  transform: translate(-50%, -50%);
  animation-duration: 13s;
  animation-delay: -2s;
  opacity: 0.10;
}
.hero-glow-4 {
  width: 380px; height: 380px;
  background: radial-gradient(circle, #ff6eb4, transparent 70%);
  top: -60px; right: -60px;
  opacity: 0.12;
}

@keyframes heroGlowDrift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(30px, 20px) scale(1.08); }
  100% { transform: translate(-20px, 40px) scale(0.95); }
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero h1 { font-size: 36px; margin-bottom: 16px; font-weight: 900; }
.hero p { font-size: 18px; color: var(--text-muted); margin-bottom: 32px; }

.home-header { margin-bottom: 32px; }
.home-header h1 { font-size: 28px; }
.balance-display { font-size: 18px; color: var(--text-muted); margin-top: 8px; }
.balance-display strong { color: var(--purple); font-size: 24px; }

h2 { font-size: 20px; margin-bottom: 16px; }

.rewards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

.reward-card {
  background: var(--surface);
  border: 1px solid var(--surface-2);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.15s;
}

.reward-card:hover { border-color: #3d3d4e; }

.reward-icon { font-size: 32px; }
.reward-info h3 { font-size: 16px; margin-bottom: 4px; }
.reward-info p { font-size: 13px; color: var(--text-muted); }
.reward-cost {
  font-size: 13px;
  font-weight: 700;
  color: var(--purple);
  background: #1f1b2e;
  padding: 3px 10px;
  border-radius: 20px;
  display: inline-block;
}

.info-box {
  background: var(--surface);
  border: 1px solid var(--surface-2);
  border-radius: 12px;
  padding: 24px;
}

.info-box h3 { font-size: 16px; margin-bottom: 12px; }
.info-box ol { padding-left: 20px; }
.info-box li { font-size: 14px; color: var(--text-muted); margin-bottom: 8px; line-height: 1.5; }
.conversion-note { font-size: 13px; color: var(--muted); margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--surface-2); line-height: 1.6; }

.home-section-header { display: flex; align-items: center; justify-content: space-between; margin: 32px 0 16px; }
.home-section-header h2 { margin: 0; }
.home-section-link { font-size: 14px; color: var(--accent); text-decoration: none; }
.home-section-link:hover { text-decoration: underline; }

.info-box-support { margin-bottom: 16px; }
.info-box-support-content { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.info-box-support-content h3 { margin-bottom: 6px; }
.info-box-support-content p { font-size: 14px; color: var(--text-muted); margin: 0; }

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.admin-header h1 { font-size: 24px; }

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

.admin-table th {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 2px solid var(--surface-2);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--surface-2);
}

.admin-table tr:hover td { background: rgba(255,255,255,0.02); }

.table-actions { display: flex; align-items: center; gap: 8px; }
.table-actions form { margin: 0; }

.admin-form { max-width: 500px; }
.admin-form h1 { margin-bottom: 8px; }
.admin-form > p { margin-bottom: 24px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.form-group { margin-bottom: 20px; }
.form-actions { display: flex; gap: 12px; align-items: center; margin-top: 8px; }
.field-error { display: block; color: var(--red); font-size: 12px; margin-top: 4px; }

.field-error ~ .form-control,
.form-control.field-invalid {
  border-color: var(--red);
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}
.form-group label { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 6px; font-weight: 500; }
.form-control {
  width: 100%;
  padding: 9px 14px;
  background: var(--surface);
  border: 1px solid var(--surface-2);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.15s;
}

.form-control:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(145,71,255,0.15); }
.form-check { display: flex; align-items: center; gap: 8px; }
.form-check label { margin-bottom: 0; }

.form-errors {
  background: #2e1a1a;
  border: 1px solid var(--red);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--red);
}

.empty-state { color: var(--text-muted); font-size: 15px; padding: 40px 0; text-align: center; }

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.points-toast {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 14px;
  background: var(--purple);
  color: white;
  font-size: 16px;
  font-weight: 700;
  border-radius: 20px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.points-toast-show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 680px) {
  .navbar {
    height: auto;
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 0;
  }

  .navbar-brand { flex: 1; }

  .navbar-actions {
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--surface-2);
    justify-content: flex-start;
  }

  .navbar-actions > form { margin-left: auto; }

  .navbar-kick-desktop { display: none; }

  .navbar-identity-toggle {
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 8px;
    border: 1px solid var(--surface-2);
    background: var(--bg);
    transition: background 0.15s;
  }

  .navbar-identity-toggle:hover,
  .navbar-identity-toggle.open { background: var(--surface-2); }

  .identity-chevron { display: block; }

  main { padding: 20px 16px; }

  .home-header h1 { font-size: 22px; }
  .balance-display { font-size: 16px; }
  .balance-display strong { font-size: 20px; }
  h2 { font-size: 17px; margin-bottom: 12px; }

  .rewards-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .reward-card .btn,
  .reward-card .btn-disabled {
    width: 100%;
  }

  .hero { padding: 0 16px; margin-top: -20px; margin-bottom: -20px; }
  .hero-glow-1 { width: 280px; height: 280px; }
  .hero-glow-2 { width: 220px; height: 220px; }
  .hero h1 { font-size: 24px; }
  .hero p { font-size: 15px; margin-bottom: 24px; }

  .info-box { padding: 18px; }

  .admin-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .admin-header .btn { width: 100%; justify-content: center; }

  .admin-table { min-width: 480px; }

  .flash { padding: 10px 16px; }

  .admin-form { max-width: 100%; }
}

/* ── Tickets ── */
.ticket-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e53e3e;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  margin-left: 2px;
}

.ticket-status {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.ticket-status-open { background: rgba(237,137,54,0.15); color: #ed8936; }
.ticket-status-in_progress { background: rgba(66,153,225,0.15); color: #4299e1; }
.ticket-status-resolved { background: rgba(72,187,120,0.15); color: #48bb78; }

.ticket-detail {
  max-width: 700px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ticket-info-box {
  background: var(--surface);
  border: 1px solid var(--surface-2);
  border-radius: 10px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ticket-info-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

.ticket-info-label {
  color: var(--muted);
  font-weight: 500;
}

.ticket-message-box {
  background: var(--surface);
  border: 1px solid var(--surface-2);
  border-radius: 10px;
  padding: 16px 20px;
}

.ticket-message-box h3 {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 8px;
  font-weight: 500;
}

.ticket-message-box p {
  font-size: 15px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-check input { width: auto; }

.form-info {
  background: var(--surface);
  border: 1px solid var(--surface-2);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 4px;
}

/* ── Stream floating widget ── */
.stream-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 200px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  text-decoration: none;
  z-index: 1000;
  border: 2px solid var(--surface-2);
  background: var(--surface);
  transition: transform 0.2s, box-shadow 0.2s;
  display: block;
}

.stream-widget:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
  border-color: #53fc18;
}

.stream-widget-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #000;
}

.stream-widget-iframe {
  width: 100%;
  height: 100%;
  border: none;
  pointer-events: none;
}

.stream-widget-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stream-widget-live {
  background: #53fc18;
  color: #000;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.03em;
}

.stream-widget-label {
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

/* ── Live page ── */
.live-page {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 16px;
  height: calc(100vh - 58px);
  padding: 16px;
  box-sizing: border-box;
}

.live-player-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
}

.live-player {
  width: 100%;
  height: 100%;
  border: none;
}

.live-chat-wrap {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--surface-2);
}

.live-chat {
  width: 100%;
  height: 100%;
  border: none;
}

@media (max-width: 768px) {
  .live-page {
    grid-template-columns: 1fr;
    grid-template-rows: auto 400px;
    height: auto;
  }

  .live-player-wrap {
    aspect-ratio: 16/9;
    height: auto;
  }

  .stream-widget {
    width: 150px;
    bottom: 16px;
    right: 16px;
  }
}

/* ── Static pages (FAQ, Privacy) ── */
.static-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 24px;
}

.static-page-header {
  margin-bottom: 36px;
}

.static-page-header h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.static-page-subtitle {
  color: var(--muted);
  font-size: 15px;
}

/* FAQ accordion */
.faq-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--surface-2);
  border-radius: 10px;
  overflow: hidden;
}

.faq-item {
  border-bottom: 1px solid var(--surface-2);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background 0.15s;
}

.faq-question::-webkit-details-marker { display: none; }

.faq-question::before {
  content: "›";
  font-size: 18px;
  color: var(--muted);
  transition: transform 0.2s;
  display: inline-block;
  width: 16px;
}

.faq-item[open] > .faq-question::before {
  transform: rotate(90deg);
}

.faq-question:hover {
  background: var(--surface);
}

.faq-answer {
  padding: 4px 20px 20px 48px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.faq-answer p { margin-bottom: 8px; }
.faq-answer p:last-child { margin-bottom: 0; }

/* Privacy sections */
.privacy-content {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.privacy-section h2 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text);
}

.privacy-section p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 8px;
}

.privacy-section p:last-child { margin-bottom: 0; }

.privacy-section ul {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
  padding-left: 20px;
}

/* Site footer */
.page-hero .site-footer { margin-top: 0; }

.site-footer {
  text-align: center;
  padding: 24px;
  margin-top: 48px;
  border-top: 1px solid var(--surface-2);
  font-size: 13px;
  color: var(--muted);
  display: flex;
  justify-content: center;
  gap: 20px;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover { color: var(--text); }

/* ── Raffles ── */
.raffle-card {
  background: var(--surface);
  border: 1px solid var(--surface-2);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.raffle-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 36px rgba(0,0,0,0.4);
  border-color: rgba(145,71,255,0.4);
}

.raffle-card-ended { opacity: 0.7; }
.raffle-card-ended:hover { transform: none; box-shadow: none; border-color: var(--surface-2); }

/* Full-bleed image area */
.raffle-card-img {
  width: 100%;
  aspect-ratio: 3/4;
  background: var(--surface-2) center/cover no-repeat;
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  flex-shrink: 0;
}

.raffle-card-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}

.raffle-card-countdown {
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 0 0 0 10px;
  letter-spacing: 0.03em;
}

.raffle-card-ended-badge {
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 0 0 0 10px;
  letter-spacing: 0.03em;
}

/* Text area below image */
.raffle-card-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.raffle-card-title { font-size: 14px; font-weight: 700; line-height: 1.3; }
.raffle-card-desc { font-size: 12px; color: var(--text-muted); line-height: 1.5; }

.raffle-card-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}

.raffle-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.raffle-card-participants { font-size: 12px; color: var(--text-muted); }

.raffle-card-footer .btn,
.raffle-card-footer .btn-disabled,
.raffle-entered-btn { width: 100%; justify-content: center; }

.raffle-winner {
  font-size: 13px;
  color: var(--green);
  padding: 6px 10px;
  background: rgba(0, 178, 111, 0.08);
  border-radius: 8px;
  border: 1px solid rgba(0, 178, 111, 0.2);
}

/* Date presets */
.raffle-winner-row td { background: rgba(0, 178, 111, 0.05) !important; }

.date-presets {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.date-preset {
  border: 1px solid var(--surface-2);
  color: var(--text-muted);
  font-size: 11px;
  padding: 4px 10px;
}

.date-preset:hover { border-color: var(--purple); color: var(--text); }
.date-preset.active { background: var(--purple); color: #fff; border-color: var(--purple); }

.raffle-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 500;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.raffle-modal-backdrop.open { opacity: 1; }

.raffle-modal {
  background: var(--surface);
  border: 1px solid var(--surface-2);
  border-radius: 16px;
  padding: 32px 28px 24px;
  max-width: 380px;
  width: calc(100% - 40px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  transform: translateY(16px);
  transition: transform 0.2s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.raffle-modal-backdrop.open .raffle-modal { transform: translateY(0); }

.raffle-modal-title { font-size: 17px; font-weight: 700; }
.raffle-modal-body { font-size: 14px; color: var(--text-muted); line-height: 1.6; }

.raffle-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  width: 100%;
  justify-content: center;
}

/* Leaderboard */
.leaderboard-header {
  margin-bottom: 24px;
}
.leaderboard-subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 4px;
}
.leaderboard-my-rank {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--purple);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 20px;
}
.leaderboard-my-rank-label {
  font-size: 13px;
  color: var(--text-muted);
  flex: 1;
}
.leaderboard-my-rank-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--purple);
}
.leaderboard-my-rank-pts {
  font-size: 14px;
  color: var(--text-muted);
}
.leaderboard-table {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.leaderboard-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--surface-2);
  border-radius: 10px;
  padding: 12px 16px;
  transition: border-color 0.15s;
}
.leaderboard-row:hover {
  border-color: var(--surface-2);
  background: var(--surface-2);
}
.leaderboard-row--me {
  border-color: var(--purple) !important;
}
.leaderboard-rank {
  font-size: 15px;
  font-weight: 700;
  min-width: 32px;
  color: var(--text-muted);
  text-align: center;
}
.leaderboard-avatar {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}
.leaderboard-name {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.leaderboard-pts {
  font-size: 14px;
  font-weight: 700;
  color: var(--purple);
  white-space: nowrap;
}

.raffle-modal-actions .btn { flex: 1; }
