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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  min-height: 100vh;
  color: #e0e0e0;
}

.app-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 16px;
  padding-bottom: 100px;
}

/* Header */
.header {
  text-align: center;
  padding: 32px 0 16px;
}

.header h1 {
  font-size: 2rem;
  background: linear-gradient(135deg, #d4af37, #f5e6a3, #d4af37);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 700;
}

.header .subtitle {
  color: #b0b0b0;
  margin-top: 6px;
  font-size: 0.95rem;
}

.oscar-icon {
  font-size: 3rem;
  margin-bottom: 8px;
  display: block;
}

/* Countdown Timer */
.countdown {
  text-align: center;
  padding: 16px;
  margin-bottom: 20px;
  background: rgba(212, 175, 55, 0.06);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 12px;
}

.countdown.locked {
  background: rgba(255, 100, 100, 0.08);
  border-color: rgba(255, 100, 100, 0.3);
}

.countdown-label {
  font-size: 0.75rem;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
  font-weight: 600;
}

.countdown.locked .countdown-label {
  color: #ff6464;
  font-size: 0.9rem;
  letter-spacing: 3px;
}

.countdown-digits {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.countdown-num {
  font-size: 2rem;
  font-weight: 700;
  color: #d4af37;
  font-variant-numeric: tabular-nums;
  min-width: 60px;
  text-align: center;
}

.countdown-sep {
  font-size: 1.8rem;
  color: #d4af37;
  font-weight: 700;
  margin-bottom: 14px;
}

.countdown-sub {
  font-size: 0.6rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 2px;
}

/* Login Screen */
.login-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 40vh;
}

.login-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 16px;
  padding: 40px;
  width: 100%;
  max-width: 420px;
  text-align: center;
  backdrop-filter: blur(10px);
}

.login-box h2 {
  color: #d4af37;
  margin-bottom: 8px;
  font-size: 1.4rem;
}

.login-box p {
  color: #999;
  margin-bottom: 20px;
  font-size: 0.9rem;
}

.login-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.login-tab {
  flex: 1;
  padding: 10px;
  background: transparent;
  color: #999;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
}

.login-tab.active {
  background: rgba(212, 175, 55, 0.15);
  color: #d4af37;
}

.nickname-input {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

.nickname-input:focus {
  border-color: #d4af37;
}

.nickname-input::placeholder {
  color: #666;
}

.login-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #d4af37, #b8941f);
  color: #1a1a2e;
  border: none;
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: opacity 0.2s;
}

.login-btn:hover {
  opacity: 0.9;
}

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

/* User Bar */
.user-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  margin-bottom: 20px;
  border: 1px solid rgba(212, 175, 55, 0.15);
}

.user-bar .welcome {
  color: #d4af37;
  font-weight: 600;
}

.user-bar .pick-count {
  color: #999;
  font-size: 0.85rem;
}

.nav-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.nav-btn {
  padding: 8px 14px;
  border: 1px solid rgba(212, 175, 55, 0.4);
  background: transparent;
  color: #d4af37;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s;
}

.nav-btn:hover, .nav-btn.active {
  background: rgba(212, 175, 55, 0.15);
}

.logout-btn {
  padding: 8px 14px;
  border: 1px solid rgba(255, 100, 100, 0.4);
  background: transparent;
  color: #ff6464;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s;
}

.logout-btn:hover {
  background: rgba(255, 100, 100, 0.15);
}

/* Category Card */
.category-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.category-card.has-pick {
  border-color: rgba(212, 175, 55, 0.3);
}

.category-card.announced {
  border-color: rgba(74, 222, 128, 0.25);
}

.category-header {
  padding: 14px 20px;
  background: rgba(212, 175, 55, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.category-header h3 {
  color: #d4af37;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.winner-badge {
  font-size: 0.6rem;
  background: rgba(74, 222, 128, 0.15);
  color: #4ade80;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  font-weight: 700;
}

.category-header .check {
  color: #4ade80;
  font-size: 1.2rem;
}

.correct-icon {
  color: #4ade80 !important;
  font-weight: 700;
}

.wrong-icon {
  color: #ff6464;
  font-size: 1.2rem;
  font-weight: 700;
}

.category-header .chevron {
  color: #666;
  transition: transform 0.2s;
  font-size: 0.8rem;
}

.category-card.expanded .category-header .chevron {
  transform: rotate(180deg);
}

.nominees-list {
  display: none;
  padding: 8px;
}

.category-card.expanded .nominees-list {
  display: block;
}

.nominee-option {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  border: 2px solid transparent;
}

.nominee-option.locked-nom {
  cursor: default;
  opacity: 0.7;
}

.nominee-option:hover:not(.locked-nom) {
  background: rgba(255, 255, 255, 0.05);
}

.nominee-option.selected {
  background: rgba(212, 175, 55, 0.12);
  border-color: rgba(212, 175, 55, 0.4);
}

.nominee-option.winner-highlight {
  background: rgba(74, 222, 128, 0.1);
  border-color: rgba(74, 222, 128, 0.4);
}

.nominee-option.winner-highlight .nominee-name {
  color: #4ade80;
}

.nominee-radio {
  width: 20px;
  height: 20px;
  border: 2px solid #555;
  border-radius: 50%;
  margin-right: 14px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  font-size: 14px;
}

.trophy-mini {
  font-size: 14px;
}

.nominee-option.winner-highlight .nominee-radio {
  border-color: #4ade80;
  background: transparent;
}

.nominee-option.selected .nominee-radio {
  border-color: #d4af37;
  background: #d4af37;
}

.nominee-option.selected .nominee-radio::after {
  content: '';
  width: 8px;
  height: 8px;
  background: #1a1a2e;
  border-radius: 50%;
}

.nominee-option.winner-highlight.selected .nominee-radio {
  border-color: #4ade80;
  background: #4ade80;
}

.nominee-info {
  flex: 1;
}

.nominee-name {
  font-weight: 600;
  color: #e0e0e0;
  font-size: 0.95rem;
}

.nominee-film {
  color: #888;
  font-size: 0.82rem;
  margin-top: 2px;
}

/* Submit Bar */
.submit-bar {
  position: sticky;
  bottom: 16px;
  background: rgba(26, 26, 46, 0.95);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(10px);
  margin-top: 20px;
}

.submit-bar .progress {
  color: #999;
  font-size: 0.9rem;
}

.submit-bar .progress strong {
  color: #d4af37;
}

.submit-btn {
  padding: 12px 32px;
  background: linear-gradient(135deg, #d4af37, #b8941f);
  color: #1a1a2e;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: opacity 0.2s;
}

.submit-btn:hover {
  opacity: 0.9;
}

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

/* Popular Picks */
.popular-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  margin-bottom: 12px;
  padding: 14px 18px;
}

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

.popular-cat {
  color: #d4af37;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
}

.popular-total {
  color: #666;
  font-size: 0.75rem;
}

.popular-empty {
  color: #555;
  font-size: 0.85rem;
  font-style: italic;
}

.popular-bars {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.popular-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.popular-bar-row.leader .popular-bar-label {
  color: #d4af37;
}

.popular-bar-label {
  color: #ccc;
  font-size: 0.8rem;
  width: 40%;
  min-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.popular-bar-track {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
}

.popular-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #d4af37, #f5e6a3);
  border-radius: 4px;
  transition: width 0.5s ease;
}

.popular-bar-row.leader .popular-bar-fill {
  background: linear-gradient(90deg, #d4af37, #f5e6a3);
}

.popular-bar-pct {
  color: #999;
  font-size: 0.75rem;
  width: 36px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Leaderboard */
.leaderboard {
  margin-top: 8px;
}

.leaderboard-entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  margin-bottom: 4px;
  cursor: pointer;
  transition: all 0.15s;
}

.leaderboard-entry:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(212, 175, 55, 0.2);
}

.leaderboard-entry.top-three {
  border-color: rgba(212, 175, 55, 0.25);
}

.leaderboard-entry .rank {
  color: #d4af37;
  font-weight: 700;
  width: 36px;
  font-size: 1.1rem;
}

.leaderboard-entry .name {
  flex: 1;
  font-weight: 600;
  color: #e0e0e0;
}

.leaderboard-entry .score {
  text-align: right;
}

.leaderboard-detail {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 0 0 10px 10px;
  margin-top: -4px;
  margin-bottom: 8px;
  padding: 8px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 14px;
  border-radius: 4px;
  margin-bottom: 2px;
  font-size: 0.8rem;
}

.detail-row.correct {
  background: rgba(74, 222, 128, 0.08);
}

.detail-row.correct .detail-pick {
  color: #4ade80;
}

.detail-row.wrong {
  background: rgba(255, 100, 100, 0.06);
}

.detail-row.wrong .detail-pick {
  color: #ff6464;
}

.detail-cat {
  color: #999;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-pick {
  color: #ccc;
  text-align: right;
  max-width: 50%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* User Picks View */
.picks-view-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.back-btn {
  padding: 8px 14px;
  border: 1px solid rgba(212, 175, 55, 0.4);
  background: transparent;
  color: #d4af37;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
}

.picks-view-header h2 {
  color: #d4af37;
  font-size: 1.2rem;
}

.pick-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  margin-bottom: 4px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.pick-item.correct {
  background: rgba(74, 222, 128, 0.08);
  border-color: rgba(74, 222, 128, 0.2);
}

.pick-item.correct .nom {
  color: #4ade80;
}

.pick-item.wrong {
  background: rgba(255, 100, 100, 0.05);
  border-color: rgba(255, 100, 100, 0.15);
}

.pick-item.wrong .nom {
  color: #ff6464;
}

.pick-item .cat {
  color: #d4af37;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.pick-item .nom {
  color: #e0e0e0;
  font-size: 0.85rem;
  text-align: right;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: #4ade80;
  color: #1a1a2e;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: 100;
}

.toast.show {
  opacity: 1;
}

/* Responsive */
@media (max-width: 600px) {
  .app-container {
    padding: 10px;
    padding-bottom: 100px;
  }

  .header {
    padding: 20px 0 12px;
  }

  .header h1 {
    font-size: 1.3rem;
    letter-spacing: 2px;
  }

  .countdown-num {
    font-size: 1.6rem;
    min-width: 48px;
  }

  .user-bar {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .nav-buttons {
    justify-content: center;
  }

  .submit-bar {
    flex-direction: column;
    gap: 12px;
  }

  .submit-btn {
    width: 100%;
  }

  .login-box {
    padding: 28px 20px;
  }

  .category-header h3 {
    font-size: 0.8rem;
  }

  .popular-bar-label {
    min-width: 80px;
    width: 35%;
    font-size: 0.72rem;
  }

  .leaderboard-entry .name {
    font-size: 0.9rem;
  }

  .admin-stats {
    flex-direction: row;
  }

  .detail-row {
    flex-direction: column;
    gap: 2px;
  }

  .detail-pick {
    max-width: 100%;
    text-align: left;
  }
}
