@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:ital,wght@0,400;0,600;0,700;1,700&family=Rajdhani:wght@500;600;700&family=Russo+One&display=swap');

:root {
  --bg-main: #0B0E14;
  --bg-card: #131A26;
  --bg-card-hover: #1B2436;
  --border-tactical: #2A364F;
  --border-gold: #E5A93C;
  --color-gold: #F5B743;
  --color-green: #10B981;
  --color-red: #EF4444;
  --color-blue: #38BDF8;
  --color-voice: #8B5CF6;
  --text-primary: #F1F5F9;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
}

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

body {
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(circle at 50% 20%, rgba(30, 41, 59, 0.4) 0%, transparent 60%),
    linear-gradient(rgba(11, 14, 20, 0.95), rgba(11, 14, 20, 0.98));
  color: var(--text-primary);
  font-family: 'Rajdhani', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

h1, h2, h3, .font-heading {
  font-family: 'Chakra Petch', sans-serif;
  letter-spacing: 0.5px;
}

.font-russo {
  font-family: 'Russo One', sans-serif;
}

/* Tactical Corner Brackets */
.tactical-box {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-tactical);
  border-radius: 4px;
}

.tactical-box::before,
.tactical-box::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  border-color: var(--border-gold);
  pointer-events: none;
}

.tactical-box::before {
  top: -1px;
  left: -1px;
  border-top: 2px solid var(--border-gold);
  border-left: 2px solid var(--border-gold);
}

.tactical-box::after {
  bottom: -1px;
  right: -1px;
  border-bottom: 2px solid var(--border-gold);
  border-right: 2px solid var(--border-gold);
}

/* Player Score Cards */
.player-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.player-card.active-turn {
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.25);
  border-color: var(--color-blue);
}

.player-card.active-turn-p2 {
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.25);
  border-color: var(--color-red);
}

.player-card.damaged {
  animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
  10%, 90% { transform: translate3d(-2px, 0, 0); }
  20%, 80% { transform: translate3d(3px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-5px, 0, 0); }
  40%, 60% { transform: translate3d(5px, 0, 0); }
}

/* Life Plate Chevron */
.life-plate {
  width: 24px;
  height: 10px;
  background: var(--color-green);
  clip-path: polygon(15% 0, 100% 0, 85% 100%, 0 100%);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
  transition: all 0.3s ease;
}

.life-plate.lost {
  background: #334155;
  box-shadow: none;
  opacity: 0.4;
}

/* Big Buzzer Button */
.buzzer-btn {
  background: radial-gradient(circle at 50% 30%, #EF4444, #991B1B);
  border: 4px solid #FCA5A5;
  box-shadow: 
    0 10px 0 #7F1D1D,
    0 15px 30px rgba(239, 68, 68, 0.4),
    inset 0 2px 4px rgba(255, 255, 255, 0.4);
  color: #FFFFFF;
  font-family: 'Russo One', sans-serif;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  user-select: none;
  transition: all 0.1s ease;
  position: relative;
  overflow: hidden;
}

.buzzer-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 
    0 12px 0 #7F1D1D,
    0 20px 40px rgba(239, 68, 68, 0.6),
    inset 0 2px 6px rgba(255, 255, 255, 0.6);
}

.buzzer-btn:active:not(:disabled) {
  transform: translateY(8px);
  box-shadow: 
    0 2px 0 #7F1D1D,
    0 5px 15px rgba(239, 68, 68, 0.4);
}

.buzzer-btn:disabled {
  background: #334155;
  border-color: #475569;
  box-shadow: 0 4px 0 #1E293B;
  color: #94A3B8;
  cursor: not-allowed;
  opacity: 0.6;
}

/* 4 Options Grid (Millionaire style) */
.option-btn {
  background: #151D2A;
  border: 1.5px solid #2B3A52;
  color: #F1F5F9;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  font-size: 1.1rem;
  text-align: left;
}

.option-btn:hover:not(:disabled) {
  background: #1E2A3E;
  border-color: var(--color-gold);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(229, 169, 60, 0.15);
}

.option-btn.selected {
  background: #23344D;
  border-color: var(--color-gold);
  box-shadow: 0 0 20px rgba(229, 169, 60, 0.35);
  color: #FFFFFF;
}

.option-btn.fifty-hidden {
  opacity: 0.15;
  pointer-events: none;
  border-style: dashed;
}

.option-btn.revealed-correct {
  background: rgba(16, 185, 129, 0.25) !important;
  border-color: var(--color-green) !important;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.5) !important;
}

.option-btn.revealed-wrong {
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: var(--color-red) !important;
}

.option-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: #0B0E14;
  border: 1px solid var(--border-gold);
  color: var(--color-gold);
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 700;
  margin-right: 12px;
  border-radius: 2px;
}

/* Lifelines buttons */
.lifeline-btn {
  background: #111827;
  border: 1px solid #374151;
  color: #E5E7EB;
  transition: all 0.2s ease;
}

.lifeline-btn:hover:not(:disabled) {
  border-color: var(--color-gold);
  background: #1F2937;
  color: var(--color-gold);
}

.lifeline-btn.used {
  opacity: 0.35;
  background: #111827;
  border-color: #1F2937;
  color: #6B7280;
  text-decoration: line-through;
  cursor: not-allowed;
}

.lifeline-btn.active-shield {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--color-green);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

/* Voice Answer Button */
.voice-btn {
  background: linear-gradient(135deg, #7C3AED, #5B21B6);
  border: 1px solid #A78BFA;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
  transition: all 0.2s ease;
}

.voice-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #8B5CF6, #6D28D9);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.5);
  transform: translateY(-2px);
}

.voice-btn.pulsing {
  animation: pulse-voice 1.5s infinite;
}

@keyframes pulse-voice {
  0% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.7); }
  70% { box-shadow: 0 0 0 15px rgba(139, 92, 246, 0); }
  100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0); }
}

/* Countdown Circular Timer */
.timer-circle-svg {
  transform: rotate(-90deg);
}

.timer-circle-bg {
  stroke: #1E293B;
}

.timer-circle-progress {
  stroke-dasharray: 283;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.5s linear, stroke 0.5s ease;
}

/* Image Zoom & Modal */
.image-preview-container {
  position: relative;
  cursor: zoom-in;
  overflow: hidden;
  border-radius: 4px;
}

.image-preview-container img {
  transition: transform 0.3s ease;
}

.image-preview-container:hover img {
  transform: scale(1.03);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #0B0E14;
}
::-webkit-scrollbar-thumb {
  background: #2A364F;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #3B4D70;
}
