/* ==========================================================================
   SASAWA STAFF AWARD - DRAW MODE (RANDOM V11 REVISION)
   Artwork: Cyber/Tech Standard Background
   Layout: 20 Slots Grid (4x5) + Winner Slots
   Flip Mechanic: Scale Collapse (Safari-Safe, No Mirroring/Backface bug)
   ========================================================================== */

/* 1. ROOT & GLOBAL SETTINGS */
:root {
  --neon-gold: #ffd700;
  --neon-blue: #00f3ff;
  --cyber-bg: #030712;
  --glass-bg: rgba(15, 23, 42, 0.75);
  --glass-border: rgba(255, 215, 0, 0.3);
  --card-width: 140px;
  --card-height: 180px;
}

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

body.draw-body {
  background-color: var(--cyber-bg);
  background-image: radial-gradient(circle at 50% 50%, rgba(0, 243, 255, 0.1) 0%, transparent 70%);
  color: #ffffff;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

/* 2. HEADER & TITLE AREA */
.draw-header {
  text-align: center;
  margin: 20px 0 10px;
}

.draw-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--neon-gold);
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5), 0 0 20px rgba(255, 215, 0, 0.3);
}

.draw-subtitle {
  font-size: 1.1rem;
  color: var(--neon-blue);
  letter-spacing: 1px;
}

/* 3. GRID 20 NOMINEE SLOTS (4x5) */
.nominee-grid-container {
  width: 100%;
  max-width: 1200px;
  padding: 10px;
  display: flex;
  justify-content: center;
}

.nominee-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 15px;
  justify-items: center;
}

/* 4. SAFARI-SAFE CARD ANIMATION (SCALE COLLAPSE) */
.card-wrapper {
  width: var(--card-width);
  height: var(--card-height);
  perspective: 1000px;
  position: relative;
}

.card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: flat; /* Fix Safari Backface Mirror Issue */
}

.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.card-front {
  z-index: 2;
  opacity: 1;
  transform: scale(1);
}

.card-back {
  z-index: 1;
  opacity: 0;
  transform: scale(0);
}

/* Safari-Safe Reveal Class */
.card-wrapper.is-revealed .card-front {
  opacity: 0;
  transform: scale(0);
}

.card-wrapper.is-revealed .card-back {
  opacity: 1;
  transform: scale(1);
  z-index: 3;
}

/* 5. WINNER SLOTS AREA */
.winner-section {
  width: 100%;
  max-width: 900px;
  margin-top: 25px;
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.scanner-slot {
  width: 160px;
  height: 200px;
  border: 2px dashed var(--neon-blue);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 243, 255, 0.05);
  transition: all 0.3s ease;
}

.scanner-slot.active {
  border-color: var(--neon-gold);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

/* Media Queries for Responsiveness */
@media (max-width: 900px) {
  :root {
    --card-width: 100px;
    --card-height: 140px;
  }
  .nominee-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
  }
}