/* ========================================
   ROMAN BATTLE CHESS - COMPACT OPTIMIZED
   Masters: Maroon + Gold | Club: Maroon + Silver
   Board: White and Maroon
   ======================================== */

:root {
  --roman-gold: #d4af37;
  --roman-silver: #c0c0c0;
  --maroon-costume: #800003;
  --board-white: #B7ADA8;
  --board-maroon: #8b6f47;
  --parchment: #f4e8d0;
  --blood-red: #c41e3a;
}

/* ========================================
   BASE STYLES
   ======================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Cinzel', Georgia, serif;
  background: url('roman.png') center/cover no-repeat fixed;
  position: relative;
  color: var(--parchment);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 12px 20px 12px;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0);
  z-index: 0;
  pointer-events: none;
}

body > * {
  position: relative;
  z-index: 1;
}

/* ========================================
   HOME BUTTON - GLOBAL
   ======================================== */

.home-button {
  position: fixed;
  top: 15px;
  left: 15px;
  background: linear-gradient(135deg, var(--maroon-costume), #600002);
  color: #fff;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 3px 8px rgba(0,0,0,0.4);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: 'Cinzel', serif;
  text-transform: uppercase;
}

.home-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(0,0,0,0.5);
}

/* ========================================
   AUTH SECTION - FIXED TOP RIGHT
   ======================================== */

.auth-section-fixed {
  position: fixed;
  top: 15px;
  right: 15px;
  z-index: 1000;
  background: rgba(20,10,5,0.9);
  padding: 8px 12px;
  border-radius: 8px;
  border: 2px solid rgba(212,175,55,0.3);
  box-shadow: 0 3px 8px rgba(0,0,0,0.4);
}

.auth-btn {
  background: #fff;
  color: #333;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  font-family: 'Cinzel', serif;
}

.auth-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.user-info {
  color: var(--roman-gold);
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-info button {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.65rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Cinzel', serif;
}

.user-info button:hover {
  background: rgba(255,255,255,0.2);
}

/* ========================================
   CHESS BOARD - FIXED SIZE & WHITE/MAROON
   ======================================== */

.board-wrapper {
  /* Core layout & size - must stay stable */
  width: 100%;
  max-width: 500px;
  aspect-ratio: 1 / 1;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  
  /* Visual appearance */
  border: 6px solid var(--maroon-costume);
  border-radius: 4px;
  background: #1a1410;
  
  /* Shadow stays the same */
  box-shadow: 0 15px 40px rgba(0,0,0,0.8);
  
  /* Critical fixes for size stability */
  outline: none !important;
  outline-offset: 0 !important;
  box-sizing: border-box;           /* ← very important with thick border */
  
  /* Positioning & centering */
  align-self: center;
  margin: 0 auto;
  position: relative;
  
  /* Keep your animation if desired */
  animation: fadeInUp 0.6s ease-out 0.2s both;
}

/* Block ALL possible focus indicators on this element */
.board-wrapper:focus,
.board-wrapper:focus-visible,
.board-wrapper:focus-within,
.board-wrapper:active {
  outline: none !important;
  outline-width: 0 !important;
  outline-offset: 0 !important;
  box-shadow: 0 15px 40px rgba(0,0,0,0.8) !important; /* keep original only */
}

/* Extra safety: also block inherited/children focus outlines that might bubble */
.board-wrapper *:focus,
.board-wrapper *:focus-visible {
  outline: none !important;
}


/* Squares - Hardware Accelerated */
.square {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: filter 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  border: 2px solid transparent; /* Changed from 1px to 2px and made transparent by default */
  overflow: hidden;
  will-change: transform;
  transform: translateZ(0);
  outline: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}
/* ADD THIS NEW RULE AFTER .square */
.square:focus-visible {
  outline: 2px solid var(--roman-gold);
  outline-offset: -2px;
  z-index: 20;
}

/* Light squares - White */
.square.light {
  background: var(--board-white);
}

/* Dark squares - Maroon */
.square.dark {
  background: var(--board-maroon);
}

/* Hover */
.square:hover:not(.disabled) {
  filter: brightness(1.15);
  z-index: 10;
}

.square.light:hover:not(.disabled) {
  background: #f5f5f5;
}

.square.dark:hover:not(.disabled) {
  background: #a00000;
}

/* Selected Square */
.square.selected {
  background: radial-gradient(circle at center, #ffd700 0%, #d4af37 100%) !important;
  box-shadow: inset 0 0 15px rgba(212,175,55,0.7), 0 0 25px rgba(212,175,55,0.5);
  border: 2px solid #8b6914;
}

/* Last Move */
.square.last-move {
  box-shadow: inset 0 0 12px rgba(212,175,55,0.4);
  filter: brightness(1.1);
}

/* ========================================
   PIECES - OPTIMIZED
   ======================================== */

.piece {
  width: 85%;
  height: 85%;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.85));
  pointer-events: none;
  position: relative;
  z-index: 5;
}

.square:hover:not(.disabled) .piece {
  filter: 
    drop-shadow(0 8px 16px rgba(0,0,0,0.9))
    drop-shadow(0 3px 6px rgba(212,175,55,0.3))
    brightness(1.08);
}

.square.selected .piece {
  filter: 
    drop-shadow(0 8px 16px rgba(212,175,55,0.5))
    brightness(1.15);
}

.square.last-move .piece {
  animation: none;
}

@keyframes pieceLanded {
  0% { opacity: 0.8; }
  100% { opacity: 1; }
}

/* ========================================
   MENU CONTAINER - SIMPLIFIED HOME
   

.menu {
  max-width: 900px;
  margin: auto;
  padding: 20px 18px;
  background: 
    linear-gradient(180deg, rgba(20,10,5,0.75) 0%, rgba(10,5,2,0.80) 100%),
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(212,175,55,0.03) 2px, rgba(212,175,55,0.03) 4px);
  border: 2px solid var(--roman-gold);
  border-radius: 12px;
  box-shadow: 
    0 20px 50px rgba(0,0,0,0.8),
    inset 0 1px 0 rgba(212,175,55,0.3),
    0 0 30px rgba(212,175,55,0.2);
  position: relative;
  animation: fadeInUp 0.8s ease-out;
  z-index: 1;
}
======================================== */

/* --- UPDATED MENU CODE --- */
.menu {
  max-width: 900px;
  margin: auto;
  padding: 20px 18px;
  background: 
    /* Changed 0.75 -> 0.4 and 0.80 -> 0.45 for much better transparency */
    linear-gradient(180deg, rgba(20,10,5,0.4) 0%, rgba(10,5,2,0.45) 100%),
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(212,175,55,0.03) 2px, rgba(212,175,55,0.03) 4px);
  
  /* ADDED: Glass effect to make text readable over the background image */
  backdrop-filter: blur(0.5px);
  -webkit-backdrop-filter: blur(0.5px); 

  border: 2px solid var(--roman-gold);
  border-radius: 12px;
  box-shadow: 
    0 20px 50px rgba(0,0,0,0.8),
    inset 0 1px 0 rgba(212,175,55,0.3),
    0 0 30px rgba(212,175,55,0.2);
  position: relative;
  animation: fadeInUp 0.8s ease-out;
  z-index: 1;
}

.menu-home {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

@media (max-width: 768px) {
  .menu-home {
    grid-template-columns: 1fr;
  }
}

.menu-campaigns {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.menu-rules {
  background: rgba(15,10,5,0.6);
  border: 1px solid rgba(212,175,55,0.3);
  border-radius: 8px;
  padding: 15px;
}

.rules-toggle {
  width: 100%;
  background: none;
  border: none;
  color: var(--roman-gold);
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0;
  margin-bottom: 10px;
}

.rules-toggle:hover {
  color: #ffd700;
}

.rules-content {
  font-size: 0.7rem;
  line-height: 1.5;
  color: #bbb;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 5px;
}

.rules-content h4 {
  color: var(--roman-gold);
  font-size: 0.75rem;
  margin-top: 10px;
  margin-bottom: 5px;
}

.rules-content ul {
  padding-left: 16px;
  margin: 5px 0;
}

.rules-content table {
  width: 100%;
  font-size: 0.65rem;
  border-collapse: collapse;
  margin: 8px 0;
  background: rgba(0,0,0,0.3);
}

.rules-content th,
.rules-content td {
  padding: 4px 6px;
  border: 1px solid rgba(255,255,255,0.2);
  text-align: left;
}

.rules-content th {
  background: rgba(212,175,55,0.2);
  color: var(--roman-gold);
}

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@700&display=swap');

.menu-title {
  font-family: 'Cinzel', serif;
  font-size: 1.8rem;
  text-align: center;
  letter-spacing: 3px;
  margin-bottom: 8px;
  background: linear-gradient(to bottom, #f6e27a 0%, #ffd700 30%, #cb9b51 60%, #b8860b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.6), 0 4px 8px rgba(0,0,0,0.5);
  position: relative;
}

.menu-subtitle {
  font-style: italic;
  font-size: 0.55rem;
  font-family: 'Cinzel', serif;
  color: #ffffff;
  text-align: center;
  margin-bottom: 20px;
  background: linear-gradient(to right, #a0a0a0 0%, #ffffff 30%, #e8e8e8 50%, #ffffff 70%, #a0a0a0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.menu-btn {
  width: 100%;
  padding: 10px 12px;
  margin: 5px 0;
  background: linear-gradient(135deg, var(--maroon-costume), #600002);
  color: #fff;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: 'Cinzel', serif;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 0 #4a0001, 0 6px 12px rgba(0,0,0,0.4);
}

.menu-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #4a0001, 0 10px 20px rgba(0,0,0,0.5);
}

/* Game Description Section */
.game-description {
  background: rgba(20,10,5,0.65);
  border: 2px solid rgba(212,175,55,0.5);
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 20px;
  font-size: 0.7rem;
  line-height: 1.5;
  color: var(--parchment);
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.game-description p {
  margin: 0 0 12px 0;
  text-align: justify;
}

.game-description p:last-child {
  margin-bottom: 0;
  text-align: center;
  font-style: italic;
  color: var(--roman-gold);
  font-size: 0.75rem;
  margin-top: 10px;
}

.game-description strong {
  color: var(--roman-gold);
  font-weight: 700;
}

.game-description em {
  color: #fff;
  font-style: italic;
}

/* Legion Cards */
.legion-card {
  margin: 10px auto;
  padding: 12px 16px;
  border-radius: 8px;
  background: rgba(15,10,5,0.9);
  border: 2px solid var(--stone-gray);
  width: 100%;
  max-width: 680px;
  position: relative;
  transition: all 0.3s ease;
  animation: slideInFromLeft 0.6s ease-out;
}

.legion-card.masters {
  border: 2px solid var(--roman-gold);
  background: 
    linear-gradient(135deg, rgba(212,175,55,0.12) 0%, rgba(128,0,3,0.15) 100%),
    rgba(20,15,10,0.95);
  box-shadow: 0 3px 8px rgba(0,0,0,0.5);
}

.legion-card.club {
  border: 2px solid var(--roman-silver);
  background: 
    linear-gradient(135deg, rgba(192,192,192,0.12) 0%, rgba(128,0,3,0.15) 100%),
    rgba(15,20,15,0.95);
  box-shadow: 0 3px 8px rgba(0,0,0,0.5);
}

.legion-header {
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.legion-card.masters .legion-header {
  color: var(--roman-gold);
  text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.legion-card.club .legion-header {
  color: var(--roman-silver);
  text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.legion-status {
  font-size: 0.8rem;
  margin: 4px 0;
}

.legion-next {
  font-size: 0.7rem;
  margin: 4px 0;
  color: #aaa;
}

.safety-net-display {
  font-size: 0.68rem;
  color: #bbb;
  text-align: center;
  margin: 4px 0 6px 0;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 5px;
  font-weight: normal;
}

.rank-progress {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 8px 0 6px 0;
}

.rank-step {
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(30,30,30,0.7);
  font-size: 0.7rem;
  border: 1px solid #333;
  transition: all 0.3s ease;
}

.rank-step.active {
  background: linear-gradient(135deg, var(--maroon-costume), #600002);
  color: #fff;
  font-weight: bold;
  border-color: var(--maroon-costume);
  box-shadow: 0 0 15px rgba(128,0,3,0.6);
  transform: scale(1.1);
}

/* Battle History */
.battle-history {
  padding: 8px 10px;
  background: rgba(20,10,5,0.8);
  border-radius: 6px;
  font-size: 0.7rem;
  border: 2px solid rgba(255,255,255,0.3);
  margin-top: 8px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  overflow: visible;
}

.battle-history-title {
  font-size: 0.7rem;
  margin-bottom: 4px;
}

.battle-history-row {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.tooltip-container {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.tooltip-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--roman-gold);
  color: #000;
  font-size: 0.7rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: help;
  border: 2px solid rgba(255,255,255,0.3);
  transition: all 0.3s ease;
}

.tooltip-icon:hover {
  background: #ffd700;
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(212,175,55,0.6);
}

.tooltip-content {
  position: absolute;
  top: 50%;
  left: calc(100% + 12px);
  transform: translateY(-50%);
  padding: 10px;
  background: rgba(10,5,2,0.98);
  border: 2px solid var(--roman-gold);
  border-radius: 8px;
  box-shadow:
    0 8px 20px rgba(0,0,0,0.8),
    0 0 30px rgba(212,175,55,0.3);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 9999;
  min-width: 320px;
  max-width: 360px;
}

.tooltip-container:hover .tooltip-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(4px);
}

.tooltip-content::after {
  content: '';
  position: absolute;
  top: 50%;
  left: -8px;
  transform: translateY(-50%);
  border: 8px solid transparent;
  border-right-color: var(--roman-gold);
}

@media (max-width: 768px) {
  .tooltip-content {
    left: 50%;
    top: auto;
    bottom: calc(100% + 12px);
    transform: translateX(-50%);
    min-width: 280px;
    max-width: 90vw;
  }
  
  .tooltip-container:hover .tooltip-content {
    transform: translateX(-50%) translateY(-4px);
  }
  
  .tooltip-content::after {
    top: auto;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-right-color: transparent;
    border-top-color: var(--roman-gold);
  }
  
  .board-wrapper {
    max-width: 95vw;
  }
  
  .game-container {
    max-width: 98vw;
  }
}

.tooltip-title {
  font-size: 0.85rem;
  font-weight: bold;
  color: var(--roman-gold);
  text-align: center;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.demotion-table {
  width: 100%;
  font-size: 0.6rem;
  border-collapse: collapse;
  color: var(--parchment);
}

.demotion-table th {
  background: rgba(212,175,55,0.2);
  padding: 3px 4px;
  font-weight: bold;
  border: 1px solid rgba(212,175,55,0.3);
  text-align: left;
  font-size: 0.55rem;
  line-height: 1.2;
}

.demotion-table td {
  padding: 3px 4px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(0,0,0,0.3);
  line-height: 1.3;
  word-wrap: break-word;
}

.demotion-table tr:hover td {
  background: rgba(212,175,55,0.1);
}

.battle-badges {
  display: flex;
  gap: 3px;
  justify-content: center;
  flex-wrap: wrap;
}

.battle-badge {
  padding: 3px 6px;
  border-radius: 5px;
  font-weight: bold;
  font-size: 0.68rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.4);
  transition: transform 0.2s;
}

.battle-badge:hover {
  transform: scale(1.08);
}

.battle-badge.levy { 
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  color: #fff; 
}
.battle-badge.hastatus { 
  background: linear-gradient(135deg, #ecf0f1, #bdc3c7);
  color: #000;
  font-weight: 800;
}
.battle-badge.principes { 
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: #fff; 
}
.battle-badge.triarius { 
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: #fff; 
}
.battle-badge.imperator { 
  background: linear-gradient(135deg, #9b59b6, #8e44ad);
  color: #fff;
  font-weight: 900;
}

.warning-message {
  font-size: 0.68rem;
  color: #e74c3c;
  margin-top: 6px;
  padding: 6px;
  background: rgba(231,76,60,0.15);
  border-radius: 4px;
  border: 1px solid rgba(231,76,60,0.3);
}

/* ========================================
   GAME CONTAINER - FIXED SIZE
   ======================================== */

.game-container {
  max-width: 600px;
  width: 100%;
  background: rgba(15,10,5,0.75);
  border: 2px solid var(--roman-gold);
  border-radius: 12px;
  padding: 8px;
  margin: 10px auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 
    0 20px 50px rgba(0,0,0,0.8),
    0 0 30px rgba(212,175,55,0.2);
  animation: marchIn 0.8s ease-out;
}

.btn {
  padding: 8px 14px;
  background: linear-gradient(135deg, var(--maroon-costume), #600002);
  color: #fff;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.8rem;
  font-family: 'Cinzel', serif;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 3px 8px rgba(0,0,0,0.4);
  text-transform: uppercase;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(0,0,0,0.5);
  background: linear-gradient(135deg, #a00004, #800003);
}

.btn:disabled {
  background: #444;
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.info-line {
  font-size: 0.75rem;
  color: #ffffff;
  text-align: center;
  margin: 4px 0;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.action-buttons {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.end-summary {
  background: rgba(20,10,5,0.98);
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.8rem;
  line-height: 1.5;
  border: 2px solid rgba(255,255,255,0.4);
  box-shadow: 0 6px 16px rgba(0,0,0,0.6);
}

.end-summary h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--maroon-costume);
  text-align: center;
  text-transform: uppercase;
  text-shadow: 
    2px 2px 4px rgba(0,0,0,0.8),
    0 0 15px rgba(128,0,3,0.5);
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  text-align: center;
  margin: 10px 0;
  font-size: 0.8rem;
}

.stats-grid div {
  padding: 8px;
  background: rgba(0,0,0,0.4);
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.3);
}

.stats-grid div strong {
  display: block;
  color: var(--maroon-costume);
  font-size: 1.1rem;
  margin-top: 3px;
  font-weight: bold;
  text-shadow: 0 0 8px rgba(128,0,3,0.4);
}

.promotion-message {
  background: linear-gradient(135deg, rgba(39,174,96,0.9), rgba(27,143,78,0.9));
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 12px;
  font-weight: bold;
  text-align: center;
  border: 2px solid #27ae60;
  color: #fff;
  font-size: 0.85rem;
  box-shadow: 0 6px 16px rgba(39,174,96,0.5);
  max-width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

.theory-message {
  background: rgba(20,10,5,0.95);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.75rem;
  border: 2px solid rgba(212,175,55,0.4);
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  max-width: 100%;
}

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInFromLeft {
  from { opacity: 0; transform: translateX(-50px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes marchIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}overflow-wrap: break-word;
  hyphens: auto;
}

.demotion-message {
  background: linear-gradient(135deg, rgba(231,76,60,0.9), rgba(192,57,43,0.9));
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 12px;
  font-weight: bold;
  text-align: center;
  border: 2px solid var(--blood-red);
  color: #fff;
  font-size: 0.85rem;
  box-shadow: 0 6px 16px rgba(231,76,60,0.5);
  max-width: 100%;
  word-wrap: break-word;