/* =========================================================
   GOL YA POOCH (گل یا پوچ) - MASTER STYLESHEET
   Persian Traditional Aesthetic + High-End Modern Game UI
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;900&family=Outfit:wght@300;400;500;600;700;800&family=Vazirmatn:wght@400;700&display=swap');

:root {
  --bg-dark: #090b10;
  --bg-surface: #121620;
  --bg-surface-elevated: #1a202e;
  --bg-card: #151a26;
  
  --gold-primary: #d4af37;
  --gold-light: #f7d774;
  --gold-dark: #8c6d1f;
  --gold-glow: rgba(212, 175, 55, 0.45);
  
  --crimson-ember: #e63946;
  --fire-orange: #ff6b35;
  --fire-glow: rgba(255, 107, 53, 0.6);
  
  --persian-turquoise: #00b4d8;
  --persian-emerald: #06d6a0;
  
  --text-main: #f1f3f8;
  --text-muted: #8e9bb0;
  --text-gold: #f5cf68;
  
  --border-gold: rgba(212, 175, 55, 0.35);
  --border-subtle: rgba(255, 255, 255, 0.08);
  
  --font-title: 'Cinzel', serif;
  --font-body: 'Outfit', sans-serif;
  --font-persian: 'Vazirmatn', sans-serif;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-gold: 0 0 25px rgba(212, 175, 55, 0.25);
  --shadow-fire: 0 0 30px rgba(255, 107, 53, 0.4);
  --shadow-deep: 0 16px 36px rgba(0, 0, 0, 0.6);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  background-image: 
    radial-gradient(circle at 50% 10%, rgba(212, 175, 55, 0.08) 0%, transparent 60%),
    radial-gradient(circle at 10% 90%, rgba(230, 57, 70, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 90% 90%, rgba(0, 180, 216, 0.05) 0%, transparent 50%),
    linear-gradient(rgba(9, 11, 16, 0.94), rgba(9, 11, 16, 0.94)),
    repeating-linear-gradient(45deg, rgba(212, 175, 55, 0.015) 0, rgba(212, 175, 55, 0.015) 2px, transparent 0, transparent 8px);
  background-attachment: fixed;
}

/* Persian Carpet Motif Background Borders */
.carpet-pattern-top, .carpet-pattern-bottom {
  position: fixed;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, 
    var(--gold-dark), var(--gold-light), var(--crimson-ember), var(--gold-primary), 
    var(--persian-turquoise), var(--gold-primary), var(--crimson-ember), var(--gold-light), var(--gold-dark)
  );
  z-index: 100;
  box-shadow: 0 0 15px var(--gold-glow);
}
.carpet-pattern-top { top: 0; }
.carpet-pattern-bottom { bottom: 0; }

/* Main App Wrapper */
.app-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 24px 60px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Top Header Bar */
.top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: rgba(18, 22, 32, 0.75);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  box-shadow: var(--shadow-deep);
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-logo-img {
  height: 48px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.4));
  transition: transform 0.3s ease;
}

.brand-logo-img:hover {
  transform: scale(1.08);
  filter: drop-shadow(0 0 16px rgba(212, 175, 55, 0.7));
}

.lobby-logo-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.lobby-center-logo {
  max-width: 220px;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8), 0 0 25px rgba(212, 175, 55, 0.35);
  border: 1.5px solid var(--border-gold);
  background: rgba(0, 0, 0, 0.6);
  padding: 6px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.lobby-center-logo:hover {
  transform: scale(1.04);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.9), 0 0 35px rgba(212, 175, 55, 0.6);
}

.brand-titles h1 {
  font-family: var(--font-title);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 2px;
  background: linear-gradient(135deg, #fff 20%, var(--gold-light) 60%, var(--gold-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-titles .persian-subtitle {
  font-family: var(--font-persian);
  font-size: 13px;
  color: var(--gold-primary);
  letter-spacing: 1px;
}

.room-badge-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.room-code-badge {
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid var(--gold-primary);
  color: var(--gold-light);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 1.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.room-code-badge:hover {
  background: rgba(212, 175, 55, 0.25);
  box-shadow: 0 0 12px var(--gold-glow);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-icon {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--gold-primary);
  color: var(--gold-light);
  transform: scale(1.05);
}

/* =========================================================
   LOBBY / ROOM CREATION MODAL / VIEW
   ========================================================= */
.lobby-card {
  max-width: 620px;
  margin: 40px auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-deep), 0 0 40px rgba(0, 0, 0, 0.8);
  position: relative;
  overflow: hidden;
}

.lobby-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gold-primary), var(--crimson-ember), var(--gold-primary));
}

.lobby-header {
  text-align: center;
  margin-bottom: 28px;
}

.lobby-header h2 {
  font-family: var(--font-title);
  font-size: 26px;
  color: var(--gold-light);
  margin-bottom: 6px;
  letter-spacing: 1px;
}

.lobby-header p {
  color: var(--text-muted);
  font-size: 14px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold-primary);
  margin-bottom: 8px;
}

.input-styled {
  width: 100%;
  background: rgba(9, 11, 16, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: #fff;
  font-size: 15px;
  font-family: var(--font-body);
  transition: all 0.2s;
}

.input-styled:focus {
  outline: none;
  border-color: var(--gold-primary);
  box-shadow: 0 0 15px var(--gold-glow);
}

.card-count-selector {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.card-num-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 10px 0;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.card-num-btn:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--gold-primary);
  color: var(--gold-light);
}

.card-num-btn.active {
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
  color: #090b10;
  border-color: var(--gold-light);
  box-shadow: 0 0 15px var(--gold-glow);
}

.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, #d4af37, #f7d774 50%, #b8860b);
  border: none;
  border-radius: var(--radius-md);
  padding: 16px 24px;
  color: #090b10;
  font-size: 17px;
  font-weight: 800;
  font-family: var(--font-title);
  letter-spacing: 1.5px;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(212, 175, 55, 0.4);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(212, 175, 55, 0.6);
  filter: brightness(1.1);
}

/* =========================================================
   GAME BOARD / TABLE LAYOUT
   ========================================================= */
.game-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex: 1;
}

/* Admin / Host Command Bar */
.admin-control-bar {
  background: linear-gradient(135deg, rgba(26, 32, 46, 0.95), rgba(18, 22, 32, 0.98));
  border: 1px solid var(--gold-primary);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.2);
  animation: slide-down 0.4s ease-out;
}

.admin-title-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-title);
  font-size: 15px;
  font-weight: 700;
  color: var(--gold-light);
  letter-spacing: 1px;
}

.admin-badge-tag {
  background: var(--gold-primary);
  color: #090b10;
  font-size: 11px;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

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

.btn-admin {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 9px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-admin:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--gold-primary);
  color: var(--gold-light);
}

.btn-turn-select.active {
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
  color: #090b10;
  border-color: var(--gold-light);
  font-weight: 800;
  box-shadow: 0 0 15px var(--gold-glow);
}

.btn-winner {
  border-color: var(--gold-dark);
}

.btn-winner:hover {
  background: var(--gold-dark);
  color: #fff;
}

/* =========================================================
   🔥 LAST PLAYED CARD SHOWCASE (TOP SPOTLIGHT - LARGE FORMAT)
   ========================================================= */
.last-played-spotlight {
  background: linear-gradient(135deg, rgba(26, 32, 46, 0.98), rgba(12, 15, 22, 0.98));
  border: 2.5px solid var(--fire-orange);
  border-radius: var(--radius-lg);
  padding: 24px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  box-shadow: 0 0 50px var(--fire-glow), inset 0 0 30px rgba(255, 107, 53, 0.2);
  animation: pop-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  margin-bottom: 8px;
}

.last-played-spotlight::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--fire-orange), var(--gold-light), var(--crimson-ember), transparent);
}

.last-played-badge-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fire-flame-icon {
  font-size: 26px;
  animation: pulse-urgent 1s infinite;
}

.last-played-heading {
  font-family: var(--font-title);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 2.5px;
  color: var(--gold-light);
  text-shadow: 0 0 14px var(--gold-glow);
}

.last-played-team-tag {
  background: linear-gradient(135deg, var(--crimson-ember), var(--fire-orange));
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  letter-spacing: 1.5px;
  box-shadow: 0 0 16px rgba(255, 107, 53, 0.6);
  text-transform: uppercase;
}

.last-played-team-tag.team1-badge {
  background: linear-gradient(135deg, var(--persian-turquoise), #0077b6);
  box-shadow: 0 0 16px rgba(0, 180, 216, 0.6);
}

.last-played-team-tag.team2-badge {
  background: linear-gradient(135deg, var(--crimson-ember), var(--fire-orange));
  box-shadow: 0 0 16px rgba(230, 57, 70, 0.6);
}

.last-played-card-frame {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  background: rgba(0, 0, 0, 0.55);
  padding: 18px 28px;
  border-radius: var(--radius-lg);
  border: 1.5px solid rgba(212, 175, 55, 0.4);
  box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.8);
}

/* BIG LAST PLAYED CARD */
.last-played-img {
  width: 190px;
  height: 266px;
  border-radius: var(--radius-md);
  border: 3px solid var(--gold-primary);
  box-shadow: 
    0 16px 36px rgba(0, 0, 0, 0.9), 
    0 0 35px var(--gold-glow),
    0 0 20px var(--fire-orange);
  object-fit: cover;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.last-played-img:hover {
  transform: scale(1.06) rotate(1deg);
}

.last-played-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.last-played-desc {
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 800;
  color: var(--gold-light);
  letter-spacing: 1px;
}

.last-played-sub {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* =========================================================
   CENTER STAGE: RECEPTION BELL & SYNCHRONIZED TIMER
   ========================================================= */
.center-arena {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: center;
  background: rgba(14, 18, 27, 0.8);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-deep);
  position: relative;
}

/* Turn Status Banners */
.team-status-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all 0.3s;
}

.team-status-box.active-turn {
  background: rgba(212, 175, 55, 0.08);
  border-color: var(--gold-primary);
  box-shadow: 0 0 25px var(--gold-glow);
}

.team-status-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.team-name-title {
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
}

.team-status-box.active-turn .team-name-title {
  color: var(--gold-light);
}

.turn-pill {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.team-status-box.active-turn .turn-pill {
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
  color: #090b10;
  box-shadow: 0 0 10px var(--gold-glow);
  animation: pulse-gentle 1.5s infinite;
}

/* Bell & Timer Core Hub */
.bell-timer-hub {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
}

/* 🛎️ Realistic 3D Brass Reception Bell Button */
.reception-bell-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.reception-bell-btn {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff6cf, #f3ca52 30%, #c99320 60%, #5d4206 95%);
  border: 4px solid #fce89e;
  box-shadow: 
    0 10px 25px rgba(0, 0, 0, 0.8),
    0 0 30px rgba(212, 175, 55, 0.5),
    inset 0 -8px 15px rgba(0, 0, 0, 0.5),
    inset 0 6px 10px rgba(255, 255, 255, 0.8);
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  user-select: none;
}

.reception-bell-btn::before {
  content: '';
  position: absolute;
  top: -12px;
  width: 24px;
  height: 20px;
  background: radial-gradient(circle at 40% 30%, #fff, #e6b830 50%, #7a5405);
  border-radius: 4px 4px 0 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.6);
}

.reception-bell-btn::after {
  content: '';
  position: absolute;
  top: -18px;
  width: 14px;
  height: 8px;
  background: #f7d774;
  border-radius: 50%;
}

.bell-icon-inner {
  font-size: 40px;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5));
  transition: transform 0.1s;
}

.reception-bell-btn:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 
    0 14px 30px rgba(0, 0, 0, 0.9),
    0 0 45px rgba(212, 175, 55, 0.8);
}

.reception-bell-btn:active, .reception-bell-btn.ringing {
  transform: translateY(4px) scale(0.96);
  box-shadow: 
    0 4px 10px rgba(0, 0, 0, 0.8),
    0 0 50px rgba(255, 215, 0, 1);
  animation: bell-shake 0.4s ease-in-out;
}

/* Active Glow for Reception Bell when Unblocked */
.reception-bell-btn.bell-active-glow {
  box-shadow: 
    0 12px 28px rgba(0, 0, 0, 0.8),
    0 0 35px var(--gold-glow),
    inset 0 -6px 12px rgba(0, 0, 0, 0.4),
    inset 0 6px 10px rgba(255, 255, 255, 0.9);
  animation: pulse-gentle 2s infinite ease-in-out;
}

.reception-bell-btn.bell-active-glow:hover {
  transform: translateY(-4px) scale(1.06);
  box-shadow: 
    0 16px 36px rgba(0, 0, 0, 0.9),
    0 0 50px rgba(212, 175, 55, 0.85);
}

/* Locked Bell State when it's opponent's turn */
.reception-bell-btn.bell-locked {
  opacity: 0.35;
  filter: grayscale(0.7) brightness(0.6);
  cursor: not-allowed;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.8);
  animation: none;
}

.reception-bell-btn.bell-locked:hover {
  transform: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.8);
}

.bell-label {
  font-family: var(--font-title);
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-light);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* 3-Ring Turn Quota Indicator */
.bell-rings-quota {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(212, 175, 55, 0.25);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.ring-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gold-light);
  box-shadow: 0 0 8px var(--gold-glow);
  transition: all 0.3s ease;
}

.ring-dot.used {
  background: rgba(255, 255, 255, 0.15);
  box-shadow: none;
}

.ring-quota-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold-primary);
  letter-spacing: 0.5px;
  margin-left: 2px;
}

/* ⏳ Circular Countdown Timer */
.timer-display-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.timer-digits {
  font-family: var(--font-title);
  font-size: 34px;
  font-weight: 900;
  color: var(--text-main);
  letter-spacing: 2px;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
  padding: 4px 16px;
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  transition: all 0.3s ease;
}

.timer-digits.warning {
  color: var(--fire-orange);
  border-color: var(--fire-orange);
  text-shadow: 0 0 20px var(--fire-orange);
  animation: pulse-urgent 0.8s infinite;
}

.timer-digits.expired {
  color: var(--crimson-ember);
  border-color: var(--crimson-ember);
  text-shadow: 0 0 25px var(--crimson-ember);
  background: rgba(230, 57, 70, 0.12);
  animation: pulse-gentle 2s infinite ease-in-out;
}

.timer-subtext {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Subtle, atmospheric timeout screen edge glow (non-aggressive) */
.timeout-vignette {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  box-shadow: inset 0 0 90px rgba(230, 57, 70, 0.4);
  z-index: 999;
  animation: timeout-soft-fade 4.5s forwards ease-out;
}

@keyframes timeout-soft-fade {
  0% { opacity: 0; }
  15% { opacity: 1; }
  75% { opacity: 0.85; }
  100% { opacity: 0; }
}

/* =========================================================
   CARDS STAGE: OPPONENT HAND & YOUR HAND
   ========================================================= */
.hand-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--gold-primary);
  padding: 0 8px;
}

.cards-deck-container {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  align-items: center;
  min-height: 180px;
  padding: 16px;
  background: rgba(18, 22, 32, 0.5);
  border: 1px dashed rgba(212, 175, 55, 0.2);
  border-radius: var(--radius-lg);
}

/* Individual Card Styling */
.game-card {
  width: 120px;
  height: 168px;
  border-radius: var(--radius-md);
  position: relative;
  perspective: 1000px;
  cursor: default;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  user-select: none;
}

.card-inner {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
  border: 2px solid var(--border-gold);
  background: var(--bg-card);
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Interactive Card on YOUR Turn */
.game-card.playable {
  cursor: pointer;
}

.game-card.playable:hover {
  transform: translateY(-12px) scale(1.05);
}

.game-card.playable:hover .card-inner {
  border-color: var(--gold-light);
  box-shadow: 
    0 16px 32px rgba(0, 0, 0, 0.8),
    0 0 25px var(--gold-glow);
}

.game-card.playable::after {
  content: 'CLICK TO BURN';
  position: absolute;
  bottom: -24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--gold-light);
  background: rgba(9, 11, 16, 0.9);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--gold-primary);
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
  white-space: nowrap;
}

.game-card.playable:hover::after {
  opacity: 1;
  bottom: -28px;
}

/* Locked Card on Opponent's Turn */
.game-card.locked {
  opacity: 0.6;
  filter: grayscale(0.2);
}

/* 🔥 Burning Card Flame & Ember Animation */
.game-card.burning {
  animation: card-burn-sequence 1.4s forwards cubic-bezier(0.25, 1, 0.5, 1);
  z-index: 50;
}

@keyframes card-burn-sequence {
  0% {
    transform: scale(1) translateY(0);
    filter: drop-shadow(0 0 0 transparent);
  }
  30% {
    transform: scale(1.15) translateY(-30px) rotate(-3deg);
    filter: drop-shadow(0 0 35px var(--fire-orange)) brightness(1.3);
  }
  60% {
    transform: scale(1.05) translateY(-20px) rotate(4deg);
    filter: drop-shadow(0 0 50px var(--crimson-ember)) brightness(1.6) contrast(1.4);
  }
  100% {
    transform: scale(0.85) translateY(20px);
    opacity: 0;
    filter: brightness(0.2) blur(4px);
  }
}

/* =========================================================
   BURNT CARDS GRAVEYARD TRAY
   ========================================================= */
.burnt-arena {
  background: rgba(14, 18, 27, 0.6);
  border: 1px solid rgba(230, 57, 70, 0.3);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.burnt-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.burnt-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--crimson-ember);
}

.burnt-tray {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  min-height: 180px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: var(--radius-md);
  padding: 16px;
  align-items: center;
  justify-content: center;
}

/* BIG BURNT CARD IN GRAVEYARD */
.burnt-card-mini {
  width: 125px;
  height: 175px;
  border-radius: var(--radius-md);
  border: 2.5px solid var(--crimson-ember);
  overflow: hidden;
  position: relative;
  box-shadow: 0 8px 24px rgba(230, 57, 70, 0.45);
  animation: pop-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s;
}

.burnt-card-mini:hover {
  transform: translateY(-8px) scale(1.08);
  box-shadow: 0 16px 32px rgba(230, 57, 70, 0.7);
}

.burnt-card-mini img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.1) brightness(0.95);
}

.burnt-card-mini::after {
  content: '🔥 BURNT';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, transparent, rgba(230, 57, 70, 0.95) 40%);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
  padding: 6px 0 3px;
  letter-spacing: 1px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.burnt-empty-placeholder {
  color: var(--text-muted);
  font-size: 12px;
  font-style: italic;
  margin: auto;
}

/* =========================================================
   MODALS & OVERLAYS
   ========================================================= */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(5, 7, 10, 0.85);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fade-in 0.3s ease;
}

.modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  max-width: 540px;
  width: 100%;
  padding: 32px;
  box-shadow: var(--shadow-deep), 0 0 50px rgba(212, 175, 55, 0.2);
  position: relative;
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
}

.modal-title {
  font-family: var(--font-title);
  font-size: 22px;
  color: var(--gold-light);
  margin-bottom: 20px;
  text-align: center;
}

/* Share Links Box */
.link-item {
  margin-bottom: 16px;
}

.link-item label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-primary);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.link-copy-row {
  display: flex;
  gap: 8px;
}

.link-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.btn-copy {
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid var(--gold-primary);
  color: var(--gold-light);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-copy:hover {
  background: var(--gold-primary);
  color: #090b10;
}

/* Winner Celebration Overlay */
.winner-modal {
  text-align: center;
}

.trophy-icon {
  font-size: 64px;
  margin-bottom: 16px;
  filter: drop-shadow(0 0 20px var(--gold-light));
  animation: bounce 1.5s infinite;
}

.winner-heading {
  font-family: var(--font-title);
  font-size: 32px;
  color: var(--gold-light);
  margin-bottom: 8px;
  letter-spacing: 2px;
}

/* =========================================================
   ANIMATIONS & KEYFRAMES
   ========================================================= */
@keyframes pulse-gentle {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.85; }
}

@keyframes pulse-urgent {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.08); }
}

@keyframes bell-shake {
  0% { transform: scale(0.96) rotate(0deg); }
  25% { transform: scale(0.96) rotate(-8deg); }
  50% { transform: scale(0.96) rotate(8deg); }
  75% { transform: scale(0.96) rotate(-4deg); }
  100% { transform: scale(0.96) rotate(0deg); }
}

@keyframes pop-in {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slide-down {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* =========================================================
   RESPONSIVE DESIGN (MOBILE / TABLET / DESKTOP)
   ========================================================= */
@media (max-width: 900px) {
  .center-arena {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .burnt-arena {
    grid-template-columns: 1fr;
  }
  
  .game-card {
    width: 96px;
    height: 134px;
  }
  
  .top-header {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
  
  .header-controls {
    width: 100%;
    justify-content: space-between;
  }
}
