/**
 * C-Suite Game Styles
 */

/* ============================================
   Variables
   ============================================ */
:root {
  --color-employee: #3498db;
  --color-saboteur: #e74c3c;
  --color-success: #27ae60;
  --color-warning: #f39c12;
  --color-danger: #e74c3c;
  --color-text: #ecf0f1;
  --color-text-muted: #95a5a6;
  --color-bg-dark: rgba(0, 0, 0, 0.7);
  --color-bg-card: rgba(30, 30, 30, 0.9);
  --color-border: rgba(255, 255, 255, 0.1);
  --font-title: 'crayon', sans-serif;
  --font-body: 'Verdana', sans-serif;
  --panel-left-width: 200px;
  --panel-right-width: 250px;
}

/* ============================================
   Three-Panel Layout (No Scroll)
   ============================================ */
.game-layout {
  display: flex;
  height: 100%;
  width: 100%;
  overflow: hidden;
  color: var(--color-text);
}

.panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-left {
  width: var(--panel-left-width);
  min-width: var(--panel-left-width);
  background: rgba(20, 20, 20, 0.95);
  border-right: 1px solid var(--color-border);
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.panel-center {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.panel-right {
  width: var(--panel-right-width);
  min-width: var(--panel-right-width);
  background: rgba(20, 20, 20, 0.95);
  border-left: 1px solid var(--color-border);
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}

/* Panel sections */
.panel-section {
  background: var(--color-bg-card);
  border-radius: 8px;
  padding: 12px;
}

.panel-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-text-muted);
  margin-bottom: 10px;
  font-weight: bold;
}

/* Vote warning section */
.vote-warning-section {
  background: rgba(231, 76, 60, 0.2);
  border: 1px solid rgba(231, 76, 60, 0.4);
}

.vote-warning-section .warning-text {
  text-align: center;
  font-size: 12px;
  color: var(--color-warning);
  font-weight: bold;
}

/* ============================================
   Left Panel Components
   ============================================ */

/* Timer in left panel */
.timer-section {
  text-align: center;
  padding: 15px 10px;
}

.timer-section .timer {
  font-size: 36px;
  font-weight: bold;
  font-family: var(--font-title);
  letter-spacing: 3px;
}

.timer-section .timer-label {
  font-size: 10px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.timer-section .round-badge {
  display: inline-block;
  background: var(--color-bg-dark);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  margin-top: 8px;
  color: var(--color-text-muted);
}

/* Your role/faction in left panel */
.my-identity {
  text-align: center;
}

.my-identity .role-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 8px;
  color: white;
  font-weight: bold;
}

.my-identity .role-icon {
  font-size: 24px;
}

.my-identity .role-name {
  font-size: 14px;
}

.my-identity .faction-display {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: bold;
}

.my-identity .faction-display.employee {
  background: var(--color-employee);
  color: white;
}

.my-identity .faction-display.saboteur {
  background: var(--color-saboteur);
  color: white;
}

.saboteur-allies {
  font-size: 11px;
  color: var(--color-saboteur);
  margin-top: 8px;
  padding: 8px;
  background: rgba(231, 76, 60, 0.15);
  border-radius: 6px;
}

/* ============================================
   Deployments Panel (Features & Bugs Tracking)
   ============================================ */
.deployments-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.deployment-track {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.deployment-track .track-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.deployment-track .track-name {
  font-size: 12px;
  font-weight: bold;
  color: var(--color-text);
}

.deployment-track .track-count {
  font-size: 11px;
  color: var(--color-text-muted);
}

.deployment-track .track-slots.horizontal {
  display: flex;
  flex-direction: row;
  gap: 4px;
  flex-wrap: wrap;
}

.deployment-track .track-slot {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.deployment-track .track-slot.filled.feature {
  background: rgba(39, 174, 96, 0.3);
  border-color: var(--color-success);
}

.deployment-track .track-slot.filled.bug {
  background: rgba(231, 76, 60, 0.3);
  border-color: var(--color-saboteur);
}

.deployment-track .track-slot.cto-unlock {
  border-color: var(--color-warning);
  border-style: dashed;
}

.deployment-track .cto-warning {
  font-size: 10px;
  color: var(--color-saboteur);
  padding: 6px;
  background: rgba(231, 76, 60, 0.15);
  border-radius: 4px;
  text-align: center;
  margin-top: 4px;
}

.deployment-track .cto-hint {
  font-size: 9px;
  color: var(--color-text-muted);
  text-align: center;
  margin-top: 4px;
}

/* Feature track specific */
.feature-track .track-name {
  color: var(--color-success);
}

/* Bug track specific */
.bug-track .track-name {
  color: var(--color-saboteur);
}

/* Players list in right panel */
.players-list-panel {
  flex-shrink: 0;
  overflow: hidden;
}

.player-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border-radius: 4px;
  margin-bottom: 2px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 11px;
}

.player-row.is-me {
  border: 1px solid var(--color-success);
}

.player-row.has-gavel {
  background: rgba(241, 196, 15, 0.15);
  border: 1px solid #f1c40f;
}

.player-row.is-blocked {
  opacity: 0.5;
}

.player-row .role-icon-small {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
}

.player-row .player-info {
  flex: 1;
  min-width: 0;
}

.player-row .player-name {
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-row .player-role-name {
  font-size: 10px;
  color: var(--color-text-muted);
}

.player-row .gavel-indicator {
  font-size: 14px;
}

.player-row .saboteur-mark {
  color: var(--color-saboteur);
  font-size: 12px;
}

/* Meeting organizer section */
.meeting-organizer-section {
  text-align: center;
  border: 2px solid #f1c40f;
  background: rgba(241, 196, 15, 0.1);
}

.meeting-organizer-section .organizer-icon {
  font-size: 24px;
}

.meeting-organizer-section .organizer-name {
  font-weight: bold;
  font-size: 14px;
  margin-top: 5px;
}

.meeting-organizer-section .organizer-label {
  font-size: 10px;
  color: #f1c40f;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ============================================
   Right Panel Components
   ============================================ */

/* Active effects */
.effects-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.effect-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  font-size: 11px;
}

.effect-item .effect-icon {
  font-size: 16px;
}

.effect-item .effect-timer {
  margin-left: auto;
  color: var(--color-warning);
  font-weight: bold;
}

.effect-item.blocked-action {
  border-left: 3px solid var(--color-danger);
}

.effect-item.blocked-player {
  border-left: 3px solid var(--color-warning);
}

.no-effects {
  color: var(--color-text-muted);
  font-size: 11px;
  text-align: center;
  padding: 10px;
}

/* Active effects panel - compact */
.active-effects-panel {
  flex-shrink: 0;
}

/* Turn log - scrollable, takes remaining space */
.turn-log {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.log-entry {
  display: flex;
  gap: 8px;
  padding: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 11px;
}

.log-entry:last-child {
  border-bottom: none;
}

.log-entry .log-round {
  color: var(--color-text-muted);
  font-weight: bold;
  flex-shrink: 0;
}

.log-entry .log-text {
  flex: 1;
}

.log-entry .log-deploy-card {
  width: 14px;
  height: 18px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 1px;
}

.log-entry .log-deploy-card.feature {
  background: var(--color-success);
}

.log-entry .log-deploy-card.bug {
  background: var(--color-danger);
}

.log-entry .log-result {
  font-weight: bold;
}

.log-entry .log-result.success {
  color: var(--color-success);
}

.log-entry .log-result.fail {
  color: var(--color-danger);
}

.log-entry .log-time {
  color: var(--color-text-muted);
}

/* Sprint event entries in log */
.log-entry.sprint-event {
  background: rgba(52, 152, 219, 0.1);
  border-left: 2px solid #3498db;
  margin-left: -2px;
}

.log-entry.sprint-event .log-round {
  color: #3498db;
}

/* New entry animation */
.log-entry.new-entry {
  animation: highlight-entry 1s ease;
}

@keyframes highlight-entry {
  0% { background: rgba(52, 152, 219, 0.4); }
  100% { background: rgba(52, 152, 219, 0.1); }
}

.no-log {
  color: var(--color-text-muted);
  font-size: 11px;
  text-align: center;
  padding: 10px;
}

/* ============================================
   Center Panel (Action Area)
   ============================================ */
.center-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 700px;
  margin: 0 auto;
  width: 100%;
}

/* ============================================
   Legacy Game Container (Fallback)
   ============================================ */
.game-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
  color: var(--color-text);
}

/* ============================================
   Game Header
   ============================================ */
.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: var(--color-bg-dark);
  border-radius: 10px;
  margin-bottom: 20px;
}

.timer-container {
  text-align: center;
}

.timer-label {
  font-size: 12px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.timer {
  font-size: 48px;
  font-weight: bold;
  font-family: var(--font-title);
  letter-spacing: 5px;
}

.timer.warning {
  color: var(--color-warning);
  animation: pulse 1s infinite;
}

.timer.critical {
  color: var(--color-danger);
  animation: pulse 0.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.round-info {
  font-size: 18px;
  color: var(--color-text-muted);
}

/* ============================================
   Player Info Panel
   ============================================ */
.player-info-panel {
  display: flex;
  gap: 15px;
  align-items: center;
  padding: 15px;
  background: var(--color-bg-card);
  border-radius: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.role-badge,
.faction-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px;
  border-radius: 20px;
  font-weight: bold;
}

.role-badge {
  color: white;
}

.role-icon,
.faction-icon {
  font-size: 20px;
}

.faction-badge.employee {
  background: var(--color-employee);
  color: white;
}

.faction-badge.saboteur {
  background: var(--color-saboteur);
  color: white;
}

.saboteur-info {
  font-size: 14px;
  color: var(--color-saboteur);
  padding: 8px 15px;
  background: rgba(231, 76, 60, 0.2);
  border-radius: 10px;
}

/* ============================================
   Sprint Timer Bar
   ============================================ */
.sprint-timer-bar {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 20px;
  margin-bottom: 15px;
  background: linear-gradient(145deg, rgba(41, 128, 185, 0.3), rgba(52, 73, 94, 0.4));
  border-radius: 10px;
  border-left: 4px solid #3498db;
  transition: all 0.3s ease;
}

.sprint-timer-info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 100px;
}

.sprint-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--color-text-muted);
  font-weight: bold;
}

.sprint-number {
  font-size: 18px;
  font-weight: bold;
  color: #3498db;
  background: rgba(52, 152, 219, 0.2);
  padding: 2px 10px;
  border-radius: 6px;
  min-width: 30px;
  text-align: center;
}

.sprint-timer-progress {
  flex: 1;
  min-width: 0;
}

.sprint-progress-track {
  height: 8px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 4px;
  overflow: hidden;
}

.sprint-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3498db, #2ecc71);
  border-radius: 4px;
  transition: width 0.3s linear;
}

.sprint-timer-countdown {
  min-width: 60px;
  text-align: right;
}

.countdown-time {
  font-size: 20px;
  font-weight: bold;
  color: #2ecc71;
  font-family: 'Courier New', monospace;
}

/* Retrospective Mode */
.sprint-timer-bar.retrospective {
  background: linear-gradient(145deg, rgba(155, 89, 182, 0.3), rgba(142, 68, 173, 0.4));
  border-left-color: #9b59b6;
}

.sprint-timer-bar.retrospective .sprint-number {
  color: #9b59b6;
  background: rgba(155, 89, 182, 0.2);
}

.sprint-timer-bar.retrospective .sprint-progress-fill {
  background: linear-gradient(90deg, #9b59b6, #8e44ad);
}

.sprint-timer-bar.retrospective .countdown-time {
  color: #9b59b6;
}

/* Warning Mode (< 30 seconds) */
.sprint-timer-bar.warning {
  border-left-color: #f39c12;
}

.sprint-timer-bar.warning .sprint-progress-fill {
  background: linear-gradient(90deg, #f39c12, #e67e22);
}

.sprint-timer-bar.warning .countdown-time {
  color: #f39c12;
}

/* Critical Mode (< 10 seconds) */
.sprint-timer-bar.critical {
  border-left-color: #e74c3c;
  animation: pulse-critical 0.5s ease-in-out infinite alternate;
}

.sprint-timer-bar.critical .sprint-progress-fill {
  background: linear-gradient(90deg, #e74c3c, #c0392b);
}

.sprint-timer-bar.critical .countdown-time {
  color: #e74c3c;
  animation: blink 0.5s ease-in-out infinite alternate;
}

@keyframes pulse-critical {
  from { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.4); }
  to { box-shadow: 0 0 10px 2px rgba(231, 76, 60, 0.6); }
}

@keyframes blink {
  from { opacity: 1; }
  to { opacity: 0.6; }
}

/* Sprint transition effects */
.sprint-timer-bar.sprint-ending {
  animation: flash-purple 0.5s ease;
}

.sprint-timer-bar.sprint-starting {
  animation: flash-green 0.5s ease;
}

@keyframes flash-purple {
  0% { background: rgba(155, 89, 182, 0.6); }
  100% { background: linear-gradient(145deg, rgba(41, 128, 185, 0.3), rgba(52, 73, 94, 0.4)); }
}

@keyframes flash-green {
  0% { background: rgba(46, 204, 113, 0.6); }
  100% { background: linear-gradient(145deg, rgba(41, 128, 185, 0.3), rgba(52, 73, 94, 0.4)); }
}

/* ============================================
   Company Clock Bar
   ============================================ */
.company-clock-bar {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 10px 20px;
  margin-bottom: 8px;
  background: linear-gradient(145deg, rgba(39, 174, 96, 0.25), rgba(46, 204, 113, 0.15));
  border-radius: 10px;
  border-left: 4px solid #27ae60;
  transition: all 0.3s ease;
}

.company-clock-info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 100px;
}

.company-clock-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--color-text-muted);
  font-weight: bold;
}

.company-clock-icon {
  font-size: 16px;
  color: #27ae60;
}

.company-clock-progress {
  flex: 1;
  min-width: 0;
}

.company-progress-track {
  height: 6px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 3px;
  overflow: hidden;
}

.company-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #27ae60, #2ecc71);
  border-radius: 3px;
  transition: width 0.3s linear;
}

.company-clock-countdown {
  min-width: 70px;
  text-align: right;
}

.company-clock-time {
  font-size: 16px;
  font-weight: bold;
  color: #2ecc71;
  font-family: 'Courier New', monospace;
}

/* Company Clock Warning States */
.company-clock-bar.warning {
  border-left-color: #f39c12;
  background: linear-gradient(145deg, rgba(243, 156, 18, 0.25), rgba(230, 126, 34, 0.15));
}

.company-clock-bar.warning .company-progress-fill {
  background: linear-gradient(90deg, #f39c12, #e67e22);
}

.company-clock-bar.warning .company-clock-time,
.company-clock-bar.warning .company-clock-icon {
  color: #f39c12;
}

.company-clock-bar.critical {
  border-left-color: #e74c3c;
  background: linear-gradient(145deg, rgba(231, 76, 60, 0.25), rgba(192, 57, 43, 0.15));
  animation: pulse-critical 0.5s ease-in-out infinite alternate;
}

.company-clock-bar.critical .company-progress-fill {
  background: linear-gradient(90deg, #e74c3c, #c0392b);
}

.company-clock-bar.critical .company-clock-time,
.company-clock-bar.critical .company-clock-icon {
  color: #e74c3c;
}

/* Paused Timer States */
.sprint-timer-bar.paused,
.company-clock-bar.paused {
  opacity: 0.5;
  filter: grayscale(70%);
}

.sprint-timer-bar.paused .sprint-progress-fill,
.company-clock-bar.paused .company-progress-fill {
  background: linear-gradient(90deg, #7f8c8d, #95a5a6);
}

.sprint-timer-bar.paused .countdown-time,
.sprint-timer-bar.paused .sprint-number {
  color: #95a5a6;
}

.company-clock-bar.paused .company-clock-time,
.company-clock-bar.paused .company-clock-icon {
  color: #95a5a6;
}

/* ============================================
   Sabotage Panel (Saboteurs during Retrospective)
   ============================================ */
.sabotage-panel {
  background: linear-gradient(145deg, rgba(192, 57, 43, 0.3), rgba(142, 68, 173, 0.2));
  border: 2px solid var(--color-saboteur);
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
  text-align: center;
  animation: sabotage-pulse 1.5s ease-in-out infinite;
  box-shadow: 0 0 20px rgba(231, 76, 60, 0.4);
}

.sabotage-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 15px;
}

.sabotage-icon {
  font-size: 24px;
  animation: shake 0.5s ease-in-out infinite;
}

.sabotage-title {
  font-size: 18px;
  font-weight: bold;
  color: var(--color-saboteur);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.sabotage-description {
  color: var(--color-text-muted);
  font-size: 14px;
  margin-bottom: 15px;
}

.sabotage-description p {
  margin: 0;
}

.sabotage-button {
  background: linear-gradient(145deg, var(--color-saboteur), #c0392b);
  color: white;
  border: none;
  padding: 15px 30px;
  font-size: 16px;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

.sabotage-button:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 25px rgba(231, 76, 60, 0.6);
  background: linear-gradient(145deg, #c0392b, var(--color-saboteur));
}

.sabotage-button:active {
  transform: scale(0.98);
}

@keyframes sabotage-pulse {
  0%, 100% { 
    box-shadow: 0 0 20px rgba(231, 76, 60, 0.4);
    border-color: var(--color-saboteur);
  }
  50% { 
    box-shadow: 0 0 35px rgba(231, 76, 60, 0.6);
    border-color: #c0392b;
  }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-2px); }
  75% { transform: translateX(2px); }
}

/* ============================================
   Executive Action Cards (Saboteur Retrospective)
   ============================================ */
.executive-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.executive-action-card {
  background: rgba(30, 30, 30, 0.9);
  border: 2px solid rgba(100, 100, 100, 0.3);
  border-radius: 10px;
  padding: 15px;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
}

.executive-action-card.unlocked {
  border-color: var(--color-saboteur);
  cursor: pointer;
}

.executive-action-card.unlocked:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 20px rgba(231, 76, 60, 0.3);
  border-color: #c0392b;
}

.executive-action-card.locked {
  opacity: 0.5;
  cursor: not-allowed;
}

.executive-action-card.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.executive-action-card.disabled .action-card-btn {
  background: rgba(100, 100, 100, 0.5);
  cursor: not-allowed;
}

.sabotage-panel.action-used .sabotage-header .sabotage-icon {
  opacity: 0.5;
}

.action-card-icon {
  font-size: 32px;
  margin-bottom: 10px;
}

.action-card-name {
  font-size: 14px;
  font-weight: bold;
  color: var(--color-text);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.action-card-description {
  font-size: 12px;
  color: var(--color-text-muted);
  line-height: 1.4;
  margin-bottom: 12px;
}

.action-card-lock {
  font-size: 11px;
  color: #888;
  padding: 8px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 5px;
}

.action-card-btn {
  background: linear-gradient(145deg, var(--color-saboteur), #c0392b);
  color: white;
  border: none;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  width: 100%;
}

.action-card-btn:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

/* Executive Action Target Modal */
.executive-action-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.executive-action-modal .modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
}

.executive-action-modal .modal-content {
  position: relative;
  background: linear-gradient(145deg, rgba(30, 30, 30, 0.98), rgba(20, 20, 20, 0.98));
  border: 2px solid var(--color-saboteur);
  border-radius: 15px;
  padding: 30px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 0 40px rgba(231, 76, 60, 0.3);
}

.executive-action-modal .modal-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.executive-action-modal .modal-icon {
  font-size: 28px;
}

.executive-action-modal .modal-title {
  font-size: 20px;
  font-weight: bold;
  color: var(--color-saboteur);
  text-transform: uppercase;
}

.executive-action-modal .modal-description {
  color: var(--color-text-muted);
  margin-bottom: 20px;
}

.target-players-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.target-player-btn {
  background: rgba(50, 50, 50, 0.9);
  border: 2px solid rgba(100, 100, 100, 0.5);
  color: var(--color-text);
  padding: 12px 20px;
  font-size: 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.target-player-btn:hover {
  background: rgba(231, 76, 60, 0.3);
  border-color: var(--color-saboteur);
  transform: scale(1.02);
}

.modal-cancel-btn {
  background: rgba(100, 100, 100, 0.5);
  border: none;
  color: var(--color-text-muted);
  padding: 10px 30px;
  font-size: 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modal-cancel-btn:hover {
  background: rgba(100, 100, 100, 0.8);
  color: var(--color-text);
}

/* Mandatory Training Modal */
.mandatory-training-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mandatory-training-modal .modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
}

.mandatory-training-modal .modal-content {
  position: relative;
  width: min(92vw, 640px);
  background: linear-gradient(145deg, rgba(18, 18, 18, 0.98), rgba(34, 34, 34, 0.98));
  border: 2px solid var(--color-warning);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 0 40px rgba(243, 156, 18, 0.25);
  text-align: center;
}

.mandatory-training-modal .modal-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
}

.mandatory-training-modal .modal-icon {
  font-size: 30px;
}

.mandatory-training-modal .modal-title {
  font-size: 26px;
  font-weight: bold;
  color: var(--color-warning);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.mandatory-training-modal .modal-flavor {
  color: var(--color-text-muted);
  margin-bottom: 18px;
  font-size: 14px;
}

.training-ad-box,
.training-wait-box {
  background: rgba(0, 0, 0, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 18px;
}

.ad-mock-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

.ad-mock-video {
  min-height: 220px;
  border-radius: 14px;
  background: radial-gradient(circle at top, rgba(52, 152, 219, 0.18), rgba(0, 0, 0, 0.75)),
              linear-gradient(145deg, rgba(27, 27, 27, 0.95), rgba(10, 10, 10, 0.95));
  border: 1px solid rgba(52, 152, 219, 0.45);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--color-text);
}

.ad-mock-play {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(52, 152, 219, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: 0 0 24px rgba(52, 152, 219, 0.35);
}

.ad-mock-copy {
  font-size: 16px;
  font-weight: bold;
}

.ad-mock-reward {
  margin-top: 12px;
  color: #2ecc71;
  font-size: 13px;
}

.training-wait-box .wait-icon {
  font-size: 38px;
  margin-bottom: 10px;
}

.training-wait-box .wait-copy {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 6px;
}

.training-wait-box .wait-subcopy {
  font-size: 13px;
  color: var(--color-text-muted);
}

.training-countdown {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}

.training-countdown-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-text-muted);
}

.training-countdown-time {
  font-family: var(--font-title);
  font-size: 42px;
  color: var(--color-warning);
  letter-spacing: 2px;
}

/* ============================================
   Status Bar - Three Column Header
   ============================================ */
.status-bar {
  display: flex;
  gap: 2px;
  margin-bottom: 20px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  overflow: hidden;
}

.status-column {
  flex: 1;
  padding: 15px 20px;
  text-align: center;
  position: relative;
  background: rgba(30, 30, 30, 0.9);
}

.status-column:first-child {
  border-radius: 12px 0 0 12px;
}

.status-column:last-child {
  border-radius: 0 12px 12px 0;
}

.status-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--color-text-muted);
  margin-bottom: 6px;
  font-weight: bold;
}

.status-value {
  font-size: 16px;
  font-weight: bold;
  color: var(--color-text);
  line-height: 1.3;
}

.status-round {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-top: 4px;
}

.status-icon {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 14px;
  opacity: 0.6;
}

/* Phase Column Styling */
.phase-column {
  background: linear-gradient(145deg, rgba(52, 73, 94, 0.9), rgba(44, 62, 80, 0.9));
  border-left: 3px solid #3498db;
}

.phase-column .status-value {
  color: #3498db;
}

/* Meeting Organizer Column */
.mo-column {
  background: linear-gradient(145deg, rgba(39, 55, 70, 0.9), rgba(30, 45, 55, 0.9));
  border-left: 3px solid #f39c12;
}

.mo-column .status-icon {
  color: #f39c12;
}

.mo-column.is-you {
  background: linear-gradient(145deg, rgba(243, 156, 18, 0.2), rgba(211, 132, 12, 0.15));
  border-left: 3px solid #f39c12;
}

.mo-column.is-you .status-value {
  color: #f39c12;
}

/* CTO Column */
.cto-column {
  background: linear-gradient(145deg, rgba(39, 55, 70, 0.9), rgba(30, 45, 55, 0.9));
  border-left: 3px solid #9b59b6;
}

.cto-column .status-icon {
  color: #9b59b6;
}

.cto-column.is-you {
  background: linear-gradient(145deg, rgba(155, 89, 182, 0.2), rgba(142, 68, 173, 0.15));
  border-left: 3px solid #9b59b6;
}

.cto-column.is-you .status-value {
  color: #9b59b6;
}

.cto-column.pending .status-value {
  color: var(--color-text-muted);
}

.cto-column .awaiting {
  font-style: italic;
  opacity: 0.6;
  font-weight: normal;
}

.cto-column .nominated-tag {
  display: inline-block;
  font-size: 9px;
  background: rgba(155, 89, 182, 0.3);
  color: #9b59b6;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  vertical-align: middle;
}

.cto-column .cto-term {
  font-size: 10px;
  color: #9b59b6;
  font-weight: normal;
}

/* ============================================
   Action Area
   ============================================ */
.action-area {
  background: var(--color-bg-card);
  border-radius: 10px;
  padding: 25px;
  margin-bottom: 20px;
}

.action-area h3 {
  margin-top: 0;
  font-family: var(--font-title);
}

.action-description {
  color: var(--color-text-muted);
  margin-bottom: 20px;
}

.waiting-for-action {
  text-align: center;
  padding: 30px;
}

.my-action {
  border: 2px solid var(--color-success);
  border-radius: 10px;
  padding: 20px;
  background: rgba(39, 174, 96, 0.1);
}

/* ============================================
   Action Forms
   ============================================ */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 10px;
  font-weight: bold;
}

.action-options,
.prediction-options,
.policy-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.action-option,
.prediction-option,
.policy-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: var(--color-bg-dark);
  border: 2px solid var(--color-border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.action-option:hover:not(.blocked),
.prediction-option:hover,
.policy-option:hover:not(.already-blocked) {
  border-color: var(--color-text);
}

.action-option.blocked,
.policy-option.already-blocked {
  opacity: 0.5;
  cursor: not-allowed;
}

.action-option input,
.prediction-option input,
.policy-option input {
  display: none;
}

.action-option:has(input:checked),
.prediction-option:has(input:checked),
.policy-option:has(input:checked) {
  border-color: var(--color-success);
  background: rgba(39, 174, 96, 0.2);
}

.prediction-option .pass {
  color: var(--color-success);
}

.prediction-option .fail {
  color: var(--color-danger);
}

.blocked-badge {
  font-size: 11px;
  padding: 2px 6px;
  background: var(--color-danger);
  border-radius: 4px;
  margin-left: 5px;
}

/* ============================================
   Player Selection
   ============================================ */
.player-selection {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 15px 0;
}

.player-select-item {
  padding: 12px 20px;
  background: var(--color-bg-dark);
  border: 2px solid var(--color-border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.player-select-item:hover {
  border-color: var(--color-text);
}

.player-select-item.selected {
  border-color: var(--color-success);
  background: rgba(39, 174, 96, 0.2);
}

.player-select-item.blocked {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============================================
   Voting Phase
   ============================================ */
.voting-phase {
  text-align: center;
  padding: 30px;
}

.voting-phase h3 {
  margin-bottom: 10px;
}

.vote-description {
  font-size: 18px;
  margin-bottom: 20px;
}

.vote-count {
  color: var(--color-text-muted);
  margin-bottom: 25px;
}

.vote-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.vote-buttons .btn {
  min-width: 120px;
  padding: 15px 30px;
  font-size: 18px;
}

.nominee-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.nominee-btn {
  min-height: 44px;
  width: 100%;
}

/* Vote Submitted State */
.vote-submitted {
  text-align: center;
  padding: 20px;
}

.vote-submitted-label {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.vote-submitted-value {
  font-size: 24px;
  font-weight: bold;
  padding: 15px 30px;
  border-radius: 8px;
  display: inline-block;
  margin-bottom: 15px;
}

.vote-submitted-value.vote-yes {
  background: rgba(46, 204, 113, 0.2);
  color: var(--color-employee);
  border: 2px solid var(--color-employee);
}

.vote-submitted-value.vote-no {
  background: rgba(231, 76, 60, 0.2);
  color: var(--color-saboteur);
  border: 2px solid var(--color-saboteur);
}

.vote-waiting {
  font-size: 14px;
  color: var(--color-text-muted);
  font-style: italic;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* ============================================
   Saboteur Guess Phase
   ============================================ */
.saboteur-guess-phase {
  text-align: center;
  padding: 30px;
  max-width: 600px;
  margin: 0 auto;
}

.saboteur-guess-phase h3 {
  margin-bottom: 10px;
  color: var(--color-warning);
}

.saboteur-guess-phase .guess-warning {
  background: rgba(231, 76, 60, 0.2);
  border: 1px solid rgba(231, 76, 60, 0.4);
  padding: 10px 15px;
  border-radius: 8px;
  margin: 15px 0;
  color: var(--color-saboteur);
  font-weight: bold;
}

.saboteur-guess-phase .guess-progress {
  margin: 20px 0;
}

.saboteur-guess-phase .progress-bar {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 10px;
}

.saboteur-guess-phase .progress-fill {
  height: 100%;
  background: var(--color-employee);
  transition: width 0.3s ease;
}

.player-guess-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin: 20px 0;
}

.player-guess-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.player-guess-option:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.player-guess-option:has(input:checked) {
  background: rgba(231, 76, 60, 0.2);
  border-color: var(--color-saboteur);
}

.player-guess-option input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--color-saboteur);
}

.player-guess-name {
  font-size: 14px;
  font-weight: 500;
}

.guess-selection-info {
  margin: 15px 0;
  font-size: 16px;
  color: var(--color-text-muted);
}

.guess-selection-info #guess-count {
  color: var(--color-saboteur);
  font-weight: bold;
}

.submit-guess-btn {
  margin-top: 15px;
  padding: 15px 40px;
  font-size: 18px;
  background: var(--color-employee);
  border: none;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  transition: all 0.2s;
}

.submit-guess-btn:disabled {
  background: rgba(255, 255, 255, 0.2);
  cursor: not-allowed;
  opacity: 0.5;
}

.submit-guess-btn:not(:disabled):hover {
  background: var(--color-success);
  transform: scale(1.05);
}

.saboteur-guess-phase.waiting {
  color: var(--color-text-muted);
}

/* Compact Saboteur Guess Phase */
.saboteur-guess-phase.compact {
  padding: 15px 20px;
}

.saboteur-guess-phase.compact h3 {
  margin-bottom: 6px;
  font-size: 1.1em;
}

.saboteur-guess-phase.compact p {
  margin: 4px 0;
  font-size: 0.9em;
}

.saboteur-guess-phase.compact .guess-warning {
  padding: 6px 10px;
  margin: 8px 0;
  font-size: 0.85em;
}

.saboteur-guess-phase.compact .guess-progress {
  margin: 10px 0;
}

.saboteur-guess-phase.compact .progress-bar {
  height: 6px;
  margin-bottom: 5px;
}

.player-guess-grid.compact {
  gap: 6px;
  margin: 10px 0;
}

.player-guess-grid.compact .player-guess-option {
  padding: 8px 10px;
}

.saboteur-guess-phase.compact .guess-selection-info {
  margin: 8px 0;
  font-size: 14px;
}

.saboteur-guess-phase.compact .submit-guess-btn {
  margin-top: 8px;
  padding: 10px 30px;
  font-size: 15px;
}

/* Vote Submitted Display */
.vote-submitted-display {
  background: rgba(52, 152, 219, 0.15);
  border: 1px solid rgba(52, 152, 219, 0.4);
  padding: 12px 18px;
  border-radius: 8px;
  margin: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vote-submitted-display .voted-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-text-muted);
}

.vote-submitted-display .voted-names {
  font-size: 16px;
  font-weight: bold;
  color: var(--color-saboteur);
}

/* ============================================
   Players Board
   ============================================ */
.players-board {
  background: var(--color-bg-card);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
}

.players-board h3 {
  margin-top: 0;
  font-family: var(--font-title);
}

.players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 15px;
}

.player-card {
  background: var(--color-bg-dark);
  border-radius: 10px;
  padding: 15px;
  text-align: center;
  border: 2px solid transparent;
  transition: all 0.2s;
}

.player-card.is-me {
  border-color: var(--color-success);
}

.player-card.blocked {
  opacity: 0.6;
}

.player-card.is-saboteur .player-name {
  color: var(--color-saboteur);
}

.player-role-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin: 0 auto 10px;
}

.player-card .player-name {
  font-weight: bold;
  margin-bottom: 5px;
}

.player-card .player-role {
  font-size: 12px;
  color: var(--color-text-muted);
}

.blocked-indicator {
  font-size: 11px;
  color: var(--color-danger);
  margin-top: 5px;
}

.saboteur-indicator {
  position: absolute;
  top: 5px;
  right: 5px;
  font-size: 16px;
}

/* ============================================
   Blocked Info
   ============================================ */
.blocked-info {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.blocked-actions,
.blocked-players {
  flex: 1;
  background: rgba(231, 76, 60, 0.1);
  border: 1px solid var(--color-danger);
  border-radius: 10px;
  padding: 15px;
}

.blocked-info h4 {
  margin: 0 0 10px;
  font-size: 14px;
}

.blocked-info ul {
  margin: 0;
  padding-left: 20px;
  font-size: 13px;
}

/* ============================================
   Action History
   ============================================ */
.action-history {
  background: var(--color-bg-card);
  border-radius: 10px;
  padding: 15px;
}

.action-history h4 {
  margin: 0 0 10px;
  font-family: var(--font-title);
}

.history-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--color-bg-dark);
  border-radius: 5px;
  margin-bottom: 5px;
  font-size: 13px;
}

.history-item.success {
  border-left: 3px solid var(--color-success);
}

.history-item.fail {
  border-left: 3px solid var(--color-danger);
}

.history-item .round {
  color: var(--color-text-muted);
  font-weight: bold;
}

.history-item .result {
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 11px;
  text-transform: uppercase;
}

.history-item.success .result {
  background: var(--color-success);
}

.history-item.fail .result {
  background: var(--color-danger);
}

.history-item .time-change {
  margin-left: auto;
  font-weight: bold;
}

/* ============================================
   Lobby
   ============================================ */
.lobby-container {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
  height: calc(100vh - 120px);
}

.lobby-column {
  display: flex;
  flex-direction: column;
}

.room-code-column {
  flex: 1;
  max-width: 280px;
}

.players-column {
  flex: 1.2;
  max-width: 320px;
}

.actions-column {
  flex: 1;
  max-width: 250px;
  display: flex;
  align-items: center;
}

.room-code-display {
  background: var(--color-bg-card);
  border-radius: 15px;
  padding: 25px;
  text-align: center;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.room-code-display h2 {
  margin: 0 0 10px;
  font-family: var(--font-title);
}

.room-code {
  font-size: 48px;
  font-weight: bold;
  letter-spacing: 8px;
  font-family: var(--font-title);
  color: var(--color-success);
}

.copy-code {
  margin-top: 15px;
}

.players-section {
  background: var(--color-bg-card);
  border-radius: 15px;
  padding: 20px;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.players-section h3 {
  margin: 0 0 15px;
  font-family: var(--font-title);
  text-align: center;
}

.player-list {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  overflow-y: auto;
}

.player-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px;
  border-bottom: 1px solid var(--color-border);
}

.player-item:last-child {
  border-bottom: none;
}

.player-item.is-me {
  background: rgba(39, 174, 96, 0.1);
}

.player-item.disconnected {
  opacity: 0.5;
}

.badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
}

.badge-host {
  background: var(--color-warning);
  color: black;
}

.badge-me {
  background: var(--color-success);
}

.badge-disconnected {
  background: transparent;
}

.waiting-text {
  color: var(--color-text-muted);
  font-style: italic;
  text-align: center;
  font-size: 13px;
}

.lobby-actions {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
  text-align: center;
}

.lobby-actions .btn {
  width: 100%;
}

.action-hint {
  color: var(--color-text-muted);
  font-size: 12px;
  margin: 0;
}

/* Responsive: stack on smaller screens */
@media (max-width: 800px) {
  .lobby-container {
    flex-direction: column;
    align-items: center;
    height: auto;
    overflow-y: auto;
  }
  .lobby-column {
    max-width: 100%;
    width: 100%;
  }
  .room-code-column,
  .players-column,
  .actions-column {
    max-width: 400px;
  }
  .players-section {
    max-height: 200px;
  }
}

/* ============================================
   Game Over
   ============================================ */
.game-over {
  max-width: 600px;
  margin: 0 auto;
  padding: 40px;
  text-align: center;
}

.game-over-title {
  font-size: 48px;
  font-family: var(--font-title);
  margin-bottom: 10px;
}

.game-over.employees .game-over-title {
  color: var(--color-success);
}

.game-over.saboteurs .game-over-title {
  color: var(--color-danger);
}

.game-over h2.victory {
  color: var(--color-success);
}

.game-over h2.defeat {
  color: var(--color-danger);
}

.final-results {
  background: var(--color-bg-card);
  border-radius: 15px;
  padding: 25px;
  margin: 30px 0;
  text-align: left;
}

.final-results h3 {
  margin-top: 0;
}

.saboteur-reveal,
.accusations-list {
  list-style: none;
  padding: 0;
}

.saboteur-reveal li,
.accusations-list li {
  padding: 8px 15px;
  background: var(--color-bg-dark);
  border-radius: 5px;
  margin-bottom: 5px;
}

.accusations-list li.was-saboteur {
  border-left: 3px solid var(--color-saboteur);
  color: var(--color-saboteur);
}

/* Investigation Results (Saboteur Guess End Game) */
.investigation-results {
  background: var(--color-bg-card);
  border-radius: 15px;
  padding: 25px;
  margin: 30px 0;
}

.investigation-results h3 {
  margin-top: 0;
  margin-bottom: 20px;
  color: var(--color-warning);
}

.identified-vs-actual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.result-column h4 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-text-muted);
}

.identified-list,
.actual-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.identified-list li,
.actual-list li {
  padding: 10px 15px;
  background: var(--color-bg-dark);
  border-radius: 5px;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.identified-list li.correct {
  background: rgba(39, 174, 96, 0.2);
  border-left: 3px solid var(--color-success);
}

.identified-list li.incorrect {
  background: rgba(231, 76, 60, 0.2);
  border-left: 3px solid var(--color-saboteur);
}

.actual-list li.found {
  background: rgba(39, 174, 96, 0.2);
  border-left: 3px solid var(--color-success);
}

.actual-list li.hidden {
  background: rgba(155, 89, 182, 0.2);
  border-left: 3px solid #9b59b6;
  color: #9b59b6;
}

/* ============================================
   Modals
   ============================================ */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  z-index: 1000;
}

.modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--color-bg-card);
  border-radius: 15px;
  padding: 30px;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  text-align: center;
}

.modal-content h2 {
  margin-top: 0;
  font-family: var(--font-title);
}

.role-reveal {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin: 25px 0;
}

.role-card,
.faction-card {
  padding: 25px;
  border-radius: 15px;
  width: 180px;
}

.role-card {
  color: white;
}

.faction-card.employee {
  background: var(--color-employee);
  color: white;
}

.faction-card.saboteur {
  background: var(--color-saboteur);
  color: white;
}

.role-card .icon,
.faction-card .icon {
  font-size: 48px;
  display: block;
  margin-bottom: 10px;
}

.role-card .name,
.faction-card .name {
  font-size: 20px;
  font-weight: bold;
  display: block;
  margin-bottom: 10px;
}

.role-card .description,
.faction-card .description {
  font-size: 12px;
  opacity: 0.9;
}

.fellow-saboteurs {
  background: rgba(231, 76, 60, 0.2);
  border: 1px solid var(--color-saboteur);
  border-radius: 10px;
  padding: 15px;
  margin: 20px 0;
}

.modal-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
}

@media (max-width: 768px), (max-height: 700px) {
  .modal-content,
  .executive-action-modal .modal-content,
  .mandatory-training-modal .modal-content {
    position: fixed;
    top: max(12px, env(safe-area-inset-top));
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    left: 12px;
    width: auto;
    max-width: none;
    max-height: none;
    transform: none;
    overflow-y: auto;
    border-radius: 14px;
    padding: 20px 16px;
  }
}

/* ============================================
   Toasts
   ============================================ */
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 15px 25px;
  border-radius: 10px;
  background: var(--color-bg-card);
  color: var(--color-text);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: all 0.3s;
  z-index: 1100;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast.error {
  background: var(--color-danger);
}

.toast.vote-result.passed {
  background: var(--color-success);
}

.toast.vote-result.failed {
  background: var(--color-danger);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--color-success);
  color: white;
}

.btn-primary:hover {
  background: #229954;
}

.btn-danger {
  background: var(--color-danger);
  color: white;
}

.btn-danger:hover {
  background: #c0392b;
}

.btn-default {
  background: var(--color-text-muted);
  color: white;
}

.btn-default:hover {
  background: #7f8c8d;
}

.btn-success {
  background: var(--color-success);
  color: white;
}

.btn.disabled,
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-lg {
  padding: 15px 30px;
  font-size: 18px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 14px;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  .game-header {
    flex-direction: column;
    gap: 10px;
  }

  .timer {
    font-size: 36px;
  }

  .player-info-panel {
    flex-direction: column;
    text-align: center;
  }

  .players-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .blocked-info {
    flex-direction: column;
  }

  .role-reveal {
    flex-direction: column;
    align-items: center;
  }

  .role-card,
  .faction-card {
    width: 100%;
    max-width: 250px;
  }

  .vote-buttons {
    flex-direction: column;
  }

  .vote-buttons .btn {
    width: 100%;
    min-height: 48px;
  }

  .nominee-list {
    grid-template-columns: 1fr;
  }

  .nominee-btn {
    min-height: 48px;
  }
}

/* ============================================
   Gavel System
   ============================================ */
.gavel-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  background: var(--color-bg-dark);
  border-radius: 10px;
  margin-bottom: 15px;
  font-size: 16px;
  transition: all 0.3s ease;
}

.gavel-indicator.has-gavel {
  background: linear-gradient(135deg, #f39c12, #d68910);
  animation: gavelPulse 2s infinite;
}

.gavel-icon {
  font-size: 24px;
}

@keyframes gavelPulse {
  0%, 100% { box-shadow: 0 0 10px rgba(243, 156, 18, 0.5); }
  50% { box-shadow: 0 0 25px rgba(243, 156, 18, 0.8); }
}

.player-card.has-gavel {
  border: 2px solid #f39c12;
  position: relative;
}

.player-card .gavel-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  font-size: 20px;
  background: #f39c12;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: gavelBounce 1s infinite;
}

@keyframes gavelBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* ============================================
   Budget Authorization
   ============================================ */
.budget-authorization-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #27ae60, #1e8449);
  border-radius: 10px;
  margin-bottom: 15px;
  font-size: 14px;
}

.budget-icon {
  font-size: 20px;
}

.budget-hint {
  font-size: 12px;
  opacity: 0.8;
  margin-left: 10px;
}

/* ============================================
   Pass Gavel Phase
   ============================================ */
.pass-gavel-phase {
  text-align: center;
  padding: 20px;
  background: var(--color-bg-card);
  border-radius: 10px;
}

.pass-gavel-phase h3 {
  color: #f39c12;
  margin-bottom: 15px;
}

.pass-gavel-selection {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.skip-action {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid var(--color-border);
}

.skip-action p {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}

.skip-to-pass {
  opacity: 0.8;
}

.skip-to-pass:hover {
  opacity: 1;
}

/* ============================================
   Reorganization Status
   ============================================ */
.reorganization-used {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 15px;
  background: rgba(149, 165, 166, 0.3);
  border-radius: 8px;
  margin-bottom: 15px;
  font-size: 13px;
  color: var(--color-text-muted);
}

/* ============================================
   Action Hints
   ============================================ */
.action-hint {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 15px;
  font-style: italic;
}

.action-card {
  background: var(--color-bg-card);
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 15px;
}

.action-card h4 {
  color: var(--color-text);
  margin-bottom: 10px;
}

.action-blocked,
.blocked-warning {
  color: var(--color-danger);
  padding: 10px;
  background: rgba(231, 76, 60, 0.2);
  border-radius: 5px;
  margin-bottom: 15px;
}

.waiting-for-gavel {
  text-align: center;
  padding: 30px;
  background: var(--color-bg-card);
  border-radius: 10px;
}

.waiting-hint {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-top: 10px;
}

/* ============================================
   THE PARADIGM SHIFT - Saboteur Mechanics
   ============================================ */

/* Saboteur Control Panel */
.paradigm-shift-panel {
  background: linear-gradient(135deg, rgba(44, 62, 80, 0.9), rgba(52, 73, 94, 0.9));
  border: 2px solid #8e44ad;
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.paradigm-shift-panel.charged {
  border-color: #e74c3c;
  animation: shiftPulse 1.5s infinite;
  box-shadow: 0 0 20px rgba(231, 76, 60, 0.5);
}

@keyframes shiftPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(231, 76, 60, 0.5); }
  50% { box-shadow: 0 0 40px rgba(231, 76, 60, 0.8); }
}

.shift-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.shift-icon {
  font-size: 24px;
}

.shift-title {
  font-size: 16px;
  font-weight: bold;
  color: #e74c3c;
}

.shift-ready {
  text-align: center;
}

.shift-flavor {
  font-style: italic;
  color: var(--color-text-muted);
  margin-bottom: 15px;
}

.paradigm-shift-btn {
  animation: glowButton 1s infinite alternate;
}

@keyframes glowButton {
  from { box-shadow: 0 0 10px rgba(231, 76, 60, 0.5); }
  to { box-shadow: 0 0 25px rgba(231, 76, 60, 0.9); }
}

/* Stagnation Meter */
.stagnation-meter {
  margin-bottom: 10px;
}

.meter-label {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 5px;
}

.meter-bar {
  height: 12px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 6px;
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  background: linear-gradient(90deg, #8e44ad, #e74c3c);
  border-radius: 6px;
  transition: width 0.5s ease;
}

.meter-text {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-top: 5px;
  text-align: center;
}

.shift-hint {
  font-size: 12px;
  color: var(--color-text-muted);
}

/* Transformation Modal */
.paradigm-shift-modal .modal-content {
  max-width: 600px;
  background: linear-gradient(135deg, #2c3e50, #34495e);
}

.transformation-modal h2 {
  color: #e74c3c;
  text-align: center;
}

.modal-flavor {
  text-align: center;
  font-style: italic;
  color: var(--color-text-muted);
  margin-bottom: 20px;
}

.transformation-step {
  margin-bottom: 25px;
}

.transformation-step h3 {
  color: var(--color-text);
  margin-bottom: 10px;
  font-size: 14px;
}

/* Target Selection */
.target-selection {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.target-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.target-option:hover {
  background: rgba(0, 0, 0, 0.5);
  border-color: #8e44ad;
}

.target-option.selected {
  background: rgba(142, 68, 173, 0.3);
  border-color: #e74c3c;
}

.target-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 5px;
}

.target-name {
  font-size: 12px;
  font-weight: bold;
}

.target-role {
  font-size: 10px;
  color: var(--color-text-muted);
}

/* Transformation Options */
.transformation-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.transformation-option {
  padding: 15px;
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.transformation-option:hover {
  background: rgba(0, 0, 0, 0.5);
  border-color: #8e44ad;
}

.transformation-option.selected {
  background: rgba(142, 68, 173, 0.3);
  border-color: #e74c3c;
}

.trans-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 5px;
}

.trans-icon {
  font-size: 24px;
}

.trans-name {
  font-weight: bold;
  color: var(--color-text);
}

.trans-flavor {
  font-size: 12px;
  font-style: italic;
  color: var(--color-text-muted);
  margin-bottom: 5px;
}

.trans-desc {
  font-size: 11px;
  color: var(--color-text-muted);
}

/* Active Transformation Warning */
.transformation-warning {
  background: linear-gradient(135deg, rgba(231, 76, 60, 0.2), rgba(192, 57, 43, 0.2));
  border: 2px solid #e74c3c;
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 20px;
  animation: warningPulse 2s infinite;
}

@keyframes warningPulse {
  0%, 100% { box-shadow: 0 0 10px rgba(231, 76, 60, 0.3); }
  50% { box-shadow: 0 0 20px rgba(231, 76, 60, 0.6); }
}

.warning-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.warning-icon {
  font-size: 24px;
}

.warning-title {
  font-weight: bold;
  color: #e74c3c;
}

.warning-flavor {
  font-style: italic;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}

.transformation-action {
  color: var(--color-warning);
}

/* 2FA Authorization Requests */
.twofa-requests {
  background: rgba(52, 152, 219, 0.2);
  border: 1px solid #3498db;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
}

.twofa-requests h4 {
  color: #3498db;
  margin-bottom: 10px;
}

.twofa-request {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 5px;
  margin-bottom: 5px;
}

.twofa-request:last-child {
  margin-bottom: 0;
}

/* Compliance Training Modal */
.compliance-training-modal .modal-content {
  max-width: 400px;
  text-align: center;
}

.compliance-instruction {
  margin-bottom: 10px;
}

.compliance-timer {
  color: var(--color-warning);
  font-weight: bold;
  margin-bottom: 15px;
}

.captcha-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-bottom: 20px;
}

.captcha-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.captcha-cell:hover {
  background: rgba(0, 0, 0, 0.5);
  border-color: #3498db;
}

.captcha-cell.selected {
  background: rgba(39, 174, 96, 0.3);
  border-color: #27ae60;
}

/* UI Refresh Effect */
.ui-refresh-active .btn {
  animation: buttonWobble 0.5s infinite;
}

@keyframes buttonWobble {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-2deg); }
  75% { transform: rotate(2deg); }
}

.ui-refresh-active .action-options,
.ui-refresh-active .vote-buttons {
  animation: containerShake 3s infinite;
}

@keyframes containerShake {
  0%, 100% { transform: translateX(0); }
  10% { transform: translateX(-5px); }
  20% { transform: translateX(5px); }
  30% { transform: translateX(0); }
}

/* ============================================
   Final Vote Popup
   ============================================ */
.final-vote-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.final-vote-popup {
  background: linear-gradient(145deg, #1a1a2e, #16213e);
  border: 2px solid var(--color-danger);
  border-radius: 20px;
  padding: 30px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 0 50px rgba(231, 76, 60, 0.3);
  animation: popIn 0.4s ease;
}

@keyframes popIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.final-vote-header {
  text-align: center;
  margin-bottom: 25px;
}

.final-vote-header h2 {
  font-family: var(--font-title);
  font-size: 36px;
  color: var(--color-danger);
  margin: 0 0 10px 0;
  animation: pulse 1s infinite;
}

.final-vote-header h3 {
  font-family: var(--font-title);
  font-size: 24px;
  color: var(--color-text);
  margin: 0 0 15px 0;
}

.final-vote-instructions {
  color: var(--color-text-muted);
  font-size: 14px;
  margin: 0;
}

.final-vote-instructions strong {
  color: var(--color-warning);
  font-size: 18px;
}

.final-vote-players {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.final-vote-player {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 15px;
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.final-vote-player:hover:not(.is-me) {
  background: rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.2);
}

.final-vote-player.is-me {
  opacity: 0.5;
  cursor: not-allowed;
}

.final-vote-player:has(.saboteur-vote-checkbox:checked) {
  background: rgba(231, 76, 60, 0.2);
  border-color: var(--color-danger);
}

.player-checkbox {
  position: relative;
}

.player-checkbox input[type="checkbox"] {
  width: 24px;
  height: 24px;
  cursor: pointer;
  accent-color: var(--color-danger);
}

.player-checkbox input[type="checkbox"]:disabled {
  cursor: not-allowed;
  opacity: 0.3;
}

.final-vote-player .player-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.final-vote-player .role-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 18px;
}

.final-vote-player .player-name {
  font-weight: bold;
  color: var(--color-text);
  flex: 1;
}

.final-vote-player .role-name {
  color: var(--color-text-muted);
  font-size: 12px;
}

.final-vote-selection-count {
  text-align: center;
  padding: 15px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 18px;
  color: var(--color-text);
}

.final-vote-selection-count #selected-count {
  font-weight: bold;
  color: var(--color-warning);
  font-size: 24px;
}

.final-vote-submit {
  text-align: center;
}

.final-vote-submit .btn {
  font-size: 18px;
  padding: 15px 40px;
}

.final-vote-submit .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.final-vote-waiting {
  text-align: center;
  padding: 30px;
}

.final-vote-waiting h4 {
  color: var(--color-success);
  font-size: 24px;
  margin: 0 0 15px 0;
}

.final-vote-waiting p {
  color: var(--color-text-muted);
  margin: 0 0 20px 0;
}

.final-vote-waiting .vote-count {
  font-size: 18px;
  color: var(--color-text);
}

/* ============================================
   CTO Election Panel (Saboteur Only)
   ============================================ */
.cto-election-panel {
  background: linear-gradient(145deg, #1a1a2e, #16213e);
  border: 2px solid #f39c12;
  border-radius: 12px;
  padding: 12px 15px;
  margin-bottom: 15px;
}

.cto-election-panel.window-active {
  border-color: #e74c3c;
  animation: ctoWindowPulse 1s infinite;
}

@keyframes ctoWindowPulse {
  0%, 100% { box-shadow: 0 0 10px rgba(231, 76, 60, 0.3); }
  50% { box-shadow: 0 0 25px rgba(231, 76, 60, 0.6); }
}

.cto-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.cto-icon {
  font-size: 18px;
}

.cto-title {
  font-family: var(--font-title);
  font-size: 16px;
  color: #f39c12;
}

.cto-ready {
  text-align: center;
}

.cto-flavor {
  color: var(--color-text-muted);
  font-style: italic;
  margin-bottom: 10px;
  font-size: 12px;
}

.window-timer {
  margin-bottom: 10px;
}

.timer-warning {
  color: #e74c3c;
  font-weight: bold;
  font-size: 14px;
  animation: pulse 0.5s infinite;
}

.call-cto-election-btn {
  display: block;
  width: 100%;
  margin-bottom: 10px;
}

.cto-warning {
  color: #f39c12;
  font-size: 12px;
  margin: 0;
}

.cto-waiting {
  text-align: center;
}

.next-window-timer {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 8px;
}

.next-window-timer .timer-label {
  color: var(--color-text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.next-window-timer .timer-value {
  font-family: var(--font-title);
  font-size: 24px;
  color: #f39c12;
}

.cto-hint {
  color: var(--color-text-muted);
  font-size: 11px;
  margin: 0;
}

.current-cto-info {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--color-success);
  font-size: 14px;
}

/* Current CTO Badge (visible to all) */
.current-cto-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 20px;
  background: linear-gradient(145deg, #27ae60, #1e8449);
  border-radius: 10px;
  margin-bottom: 20px;
}

.current-cto-badge .badge-icon {
  font-size: 24px;
}

.current-cto-badge .badge-text {
  font-weight: bold;
  color: white;
  flex: 1;
}

.current-cto-badge .badge-status {
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
}

/* CTO Election Vote */
.voting-phase.cto-election-vote {
  border: 2px solid #f39c12;
}

.cto-vote-warning {
  color: #e74c3c;
  font-weight: bold;
  font-size: 14px;
  margin-bottom: 15px;
  padding: 10px;
  background: rgba(231, 76, 60, 0.1);
  border-radius: 8px;
}

.cto-tie-warning {
  color: #f39c12;
  font-size: 12px;
  margin-top: 15px;
  font-style: italic;
}

.cto-candidate-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 15px 0;
  max-height: 300px;
  overflow-y: auto;
}

.cto-candidate-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border: 2px solid var(--color-border);
  background: var(--color-bg-secondary);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cto-candidate-btn:hover:not(:disabled) {
  border-color: #f39c12;
  background: rgba(243, 156, 18, 0.1);
}

.cto-candidate-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.cto-candidate-btn.is-me {
  border-color: #3498db;
}

.cto-candidate-btn.is-cto {
  border-color: #f39c12;
  background: rgba(243, 156, 18, 0.15);
}

.cto-candidate-btn .candidate-name {
  font-weight: bold;
  color: var(--color-text);
}

.cto-candidate-btn .candidate-role {
  font-size: 12px;
  color: var(--color-text-muted);
}

/* CTO Election Modal */
.cto-election-modal .modal-content {
  max-width: 500px;
}

.cto-election-modal h2 {
  text-align: center;
  color: #f39c12;
  margin: 0 0 10px 0;
}

.cto-election-modal .modal-flavor {
  text-align: center;
  color: var(--color-text-muted);
  font-style: italic;
  margin-bottom: 25px;
}

.nomination-step h3 {
  color: var(--color-text);
  margin: 0 0 10px 0;
  font-size: 18px;
}

.nomination-step p {
  color: var(--color-text-muted);
  margin: 0 0 15px 0;
  font-size: 14px;
}

.candidate-selection {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.candidate-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.candidate-option:hover:not(.is-cto) {
  background: rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.2);
}

.candidate-option.selected {
  background: rgba(243, 156, 18, 0.2);
  border-color: #f39c12;
}

.candidate-option.is-cto {
  opacity: 0.5;
  cursor: not-allowed;
}

.candidate-option.is-me {
  background: rgba(52, 152, 219, 0.1);
}

.candidate-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 18px;
}

.candidate-name {
  font-weight: bold;
  color: var(--color-text);
  flex: 1;
}

.candidate-role {
  color: var(--color-text-muted);
  font-size: 12px;
}

.cto-badge {
  background: rgba(39, 174, 96, 0.3);
  color: #27ae60;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: bold;
}

/* ============================================
   Three-Panel Responsive
   ============================================ */
@media (max-width: 900px) {
  .game-layout {
    flex-direction: column;
    height: auto;
    min-height: calc(100dvh - 60px);
  }
  
  .panel-left,
  .panel-right {
    width: 100%;
    min-width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    border: none;
    border-bottom: 1px solid var(--color-border);
    max-height: none;
  }
  
  .panel-left {
    order: 1;
  }
  
  .panel-center {
    order: 2;
    overflow-y: auto;
    min-height: 0;
  }
  
  .panel-right {
    order: 3;
    border-bottom: none;
    border-top: 1px solid var(--color-border);
  }
  
  .panel-section {
    flex: 1;
    min-width: 150px;
  }
  
  .players-list-panel {
    width: 100%;
    max-height: 200px;
  }
  
  .timer-section .timer {
    font-size: 28px;
  }
}

@media (max-width: 600px) {
  .panel-left,
  .panel-right {
    flex-direction: column;
    padding: 10px;
    gap: 10px;
  }
  
  .panel-section {
    min-width: 100%;
  }
  
  .player-row {
    padding: 6px;
    font-size: 11px;
  }
  
  .timer-section .timer {
    font-size: 24px;
  }

  .action-area {
    padding: 16px;
    margin-bottom: 12px;
  }

  .status-column {
    padding: 10px 12px;
  }
}

@media (max-width: 900px) and (max-height: 760px) {
  .panel-right .turn-log {
    display: none;
  }

  .players-list-panel {
    max-height: none;
  }
}

/* ============================================
   Policy Cards - Legislative Session
   ============================================ */

.card-hand {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 25px 0;
  flex-wrap: wrap;
}

.policy-card {
  width: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.policy-card:hover {
  transform: translateY(-8px);
}

.policy-card .card-inner {
  width: 140px;
  height: 200px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  box-shadow: 
    0 4px 15px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border: 3px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
}

/* Feature Card - Teal */
.policy-card.feature .card-inner {
  background: linear-gradient(145deg, #1abc9c, #16a085);
  border-color: rgba(26, 188, 156, 0.6);
}

.policy-card.feature:hover .card-inner {
  box-shadow: 
    0 8px 25px rgba(26, 188, 156, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Bug Card - Red */
.policy-card.bug .card-inner {
  background: linear-gradient(145deg, #e74c3c, #c0392b);
  border-color: rgba(231, 76, 60, 0.6);
}

.policy-card.bug:hover .card-inner {
  box-shadow: 
    0 8px 25px rgba(231, 76, 60, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.policy-card .card-icon {
  font-size: 48px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.policy-card .card-name {
  font-size: 20px;
  font-weight: bold;
  color: white;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.policy-card .card-flavor {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  font-style: italic;
}

.policy-card .discard-card-btn {
  margin-top: 12px;
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.3);
/* Clickable cards (no separate button) */
.policy-card.clickable-card {
  cursor: pointer;
}

.policy-card.clickable-card .card-inner {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.policy-card.clickable-card:hover .card-inner {
  transform: scale(1.05);
}

.policy-card.clickable-card:active .card-inner {
  transform: scale(0.98);
}

.policy-card .card-action-label {
  margin-top: 12px;
  font-size: 12px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.7;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.policy-card.clickable-card:hover .card-action-label {
  opacity: 1;
  color: var(--color-text);
}

/* Discard card hover effect (MO) */
.policy-card.discard-card-btn:hover .card-action-label {
  color: var(--color-danger);
}

/* Deploy card hover effect (CTO) */
.policy-card.deploy-card-btn:hover .card-action-label {
  color: var(--color-success);
}

.legislative-mo-action,
.legislative-cto-action {
  text-align: center;
}

.legislative-mo-action h3,
.legislative-cto-action h3 {
  margin-bottom: 10px;
}

.legislative-mo-action > p,
.legislative-cto-action > p {
  color: var(--color-text-muted);
  margin-bottom: 5px;
}

/* Mobile responsive cards */
@media (max-width: 500px) {
  .card-hand {
    gap: 12px;
  }
  
  .policy-card {
    width: 100px;
  }
  
  .policy-card .card-inner {
    width: 100px;
    height: 150px;
  }
  
  .policy-card .card-icon {
    font-size: 32px;
  }
  
  .policy-card .card-name {
    font-size: 14px;
  }
  
  .policy-card .card-flavor {
    font-size: 10px;
  }
  
  .policy-card .card-action-label {
    font-size: 10px;
  }
  
  /* Status bar mobile */
  .status-bar {
    flex-direction: column;
    gap: 1px;
  }
  
  .status-column {
    padding: 10px 15px;
  }
  
  .status-column:first-child {
    border-radius: 12px 12px 0 0;
  }
  
  .status-column:last-child {
    border-radius: 0 0 12px 12px;
  }
  
  .status-icon {
    display: none;
  }
  
  .status-value {
    font-size: 14px;
  }
}
