/* CS Strategy Game - Modern UI */
:root {
  --primary-color: #ff9800;
  --secondary-color: #2196F3;
  --dark-bg: #1a1a1a;
  --medium-bg: #2d2d2d;
  --light-bg: #3d3d3d;
  --text-light: #f5f5f5;
  --text-dark: #333;
  --accent-t: #b44335;  /* Terrorist color */
  --accent-ct: #5d79ae; /* Counter-Terrorist color */
  --success: #4CAF50;
  --danger: #f44336;
  --warning: #ff9800;
  --info: #2196F3;
  --border-radius: 4px;
  --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

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

body {
  font-family: 'Roboto', 'Segoe UI', Arial, sans-serif;
  line-height: 1.6;
  background-color: var(--dark-bg);
  color: var(--text-light);
  background-image: url('https://images.unsplash.com/photo-1542751371-adc38448a05e?ixlib=rb-1.2.1&auto=format&fit=crop&w=2850&q=80');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  position: relative;
  min-height: 100vh;
}

body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: -1;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Header Styles */
.game-header {
  text-align: center;
  margin-bottom: 40px;
  padding-top: 20px;
}

.game-header h1 {
  font-size: 3rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 10px;
  color: var(--primary-color);
  text-shadow: 0 0 10px rgba(255, 152, 0, 0.5);
}

.game-header p {
  font-size: 1.2rem;
  color: var(--text-light);
  opacity: 0.8;
}

/* Card Styles */
.card {
  background-color: var(--medium-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 25px;
  margin-bottom: 20px;
  border-left: 4px solid var(--primary-color);
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.card h2, .card h3 {
  color: var(--primary-color);
  margin-bottom: 15px;
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 10px;
}

/* Form Elements */
input, select, textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid var(--light-bg);
  border-radius: var(--border-radius);
  background-color: var(--light-bg);
  color: var(--text-light);
  font-size: 1rem;
  transition: var(--transition);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(255, 152, 0, 0.2);
}

input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

/* Ensure dropdown option text is readable on Windows/Chrome native lists */
select option, select optgroup {
  color: var(--text-dark);
  background-color: #ffffff;
}

/* Button Styles */
button {
  background-color: var(--primary-color);
  color: var(--text-dark);
  padding: 12px 20px;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: var(--transition);
  width: 100%;
  margin-bottom: 15px;
  font-size: 1rem;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

button:hover {
  background-color: #e68a00;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

button:active {
  transform: translateY(0);
}

button.secondary {
  background-color: var(--secondary-color);
  color: var(--text-light);
}

button.secondary:hover {
  background-color: #0b7dda;
}

button.success {
  background-color: var(--success);
  color: var(--text-light);
}

button.danger {
  background-color: var(--danger);
  color: var(--text-light);
}

button.small {
  padding: 8px 15px;
  font-size: 0.9rem;
}

button:disabled {
  background-color: #cccccc;
  color: #666666;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Layout Components */
.actions {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 30px;
}

.create-room, .join-room {
  flex: 1;
}

/* Room List */
.available-rooms {
  margin-bottom: 30px;
}

.rooms-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.room-item {
  background-color: var(--medium-bg);
  border-radius: var(--border-radius);
  padding: 15px;
  display: flex;
  flex-direction: column;
  border-left: 4px solid var(--secondary-color);
  transition: var(--transition);
}

.room-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

.room-info {
  margin-bottom: 15px;
}

.room-code {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 5px;
}

.player-count {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

/* Game Room Styles */
.room-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-left {
  flex: 1;
}

.header-actions {
  margin-left: 15px;
}

.home-btn {
  width: auto;
  margin-bottom: 0;
  background-color: var(--secondary-color);
  color: var(--text-light);
}

.home-btn:hover {
  background-color: #0b7dda;
}

.room-header h2 {
  font-size: 1.8rem;
  color: var(--primary-color);
  margin-bottom: 0;
}

#roomCode {
  color: var(--text-light);
  background-color: var(--light-bg);
  padding: 5px 10px;
  border-radius: var(--border-radius);
  margin-left: 10px;
}

#roomCodeActions {
  display: flex;
  align-items: center;
}

.copy-code-btn {
  width: auto;
  margin-bottom: 0;
  margin-right: 15px;
}

.share-text {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

/* Players List */
#playersContainer {
  margin-bottom: 30px;
}

#playersList {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.player-item {
  background-color: var(--light-bg);
  padding: 10px 15px;
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
}

.player-item.creator {
  border-left: 3px solid var(--primary-color);
}

.creator-badge {
  display: flex;
  align-items: center;
  margin-left: 10px;
  font-size: 0.85rem;
  color: var(--primary-color);
  background-color: rgba(255, 152, 0, 0.1);
  padding: 3px 8px;
  border-radius: var(--border-radius);
}

.creator-badge i {
  margin-right: 5px;
}

.player-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: var(--primary-color);
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 10px;
  font-weight: bold;
}

/* Game Setup */
#gameSetup {
  margin-bottom: 30px;
}

.map-selection {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.map-option {
  background-color: var(--light-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
}

.map-option:hover {
  transform: scale(1.03);
}

.map-option.selected {
  border-color: var(--primary-color);
}

.map-image {
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.map-name {
  padding: 10px;
  text-align: center;
  font-weight: 500;
}

.side-selection {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}

.side-option {
  flex: 1;
  padding: 15px;
  border-radius: var(--border-radius);
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
}

.side-option:hover {
  transform: translateY(-3px);
}

.side-option.t-side {
  background-color: rgba(180, 67, 53, 0.2);
}

.side-option.ct-side {
  background-color: rgba(93, 121, 174, 0.2);
}

.side-option.selected.t-side {
  border-color: var(--accent-t);
}

.side-option.selected.ct-side {
  border-color: var(--accent-ct);
}

.side-icon {
  font-size: 2rem;
  margin-bottom: 10px;
}

.t-side .side-icon {
  color: var(--accent-t);
}

.ct-side .side-icon {
  color: var(--accent-ct);
}

/* Game Area */
#gameArea {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
}

.game-main {
  background-color: var(--medium-bg);
  border-radius: var(--border-radius);
  padding: 20px;
}

.game-sidebar {
  background-color: var(--medium-bg);
  border-radius: var(--border-radius);
  padding: 20px;
}

.game-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.round-info {
  font-size: 1.2rem;
}

.current-round {
  font-weight: bold;
  color: var(--primary-color);
}

.timer {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
  background-color: var(--light-bg);
  padding: 5px 15px;
  border-radius: var(--border-radius);
  transition: all 0.3s ease;
}

.timer-paused {
  color: #888;
  position: relative;
  animation: blink 1.5s infinite;
}

.timer-paused::after {
  content: " (paused)";
  font-size: 0.8rem;
  font-weight: normal;
  opacity: 0.8;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Enhanced Scores Banner */
.scores-banner {
  background: linear-gradient(135deg, #2c1810 0%, #1a1a2e 50%, #16213e 100%);
  border: 2px solid #ff9800;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 25px;
  box-shadow: 0 8px 32px rgba(255, 152, 0, 0.15);
  position: relative;
  overflow: hidden;
}

.scores-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ff9800, transparent);
  animation: shimmer 3s infinite;
}

.scores-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.match-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ff9800;
  font-weight: bold;
  font-size: 0.9rem;
  letter-spacing: 1px;
}

.match-indicator i {
  font-size: 1.2rem;
  animation: pulse 2s infinite;
}

.match-format {
  background: rgba(255, 152, 0, 0.2);
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid #ff9800;
  font-size: 0.8rem;
  font-weight: bold;
  color: #ff9800;
  letter-spacing: 0.5px;
}

.scores-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px 0;
  position: relative;
}

.team-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 140px;
  position: relative;
}

.team-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  margin-bottom: 10px;
}

.team-side i {
  font-size: 1.5rem;
}

.terrorist-score .team-side i {
  color: var(--accent-t);
}

.counter-score .team-side i {
  color: var(--accent-ct);
}

.side-label {
  font-size: 0.8rem;
  font-weight: bold;
  letter-spacing: 1px;
  color: #ffffff;
}

.score-value {
  font-size: 3rem;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  margin-bottom: 10px;
}

.terrorist-score .score-value {
  color: var(--accent-t);
}

.counter-score .score-value {
  color: var(--accent-ct);
}

.score-indicator {
  width: 80px;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.score-bar {
  height: 100%;
  width: 0%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.terrorist-bar {
  background: linear-gradient(90deg, var(--accent-t), #FF6F00);
}

.counter-bar {
  background: linear-gradient(90deg, var(--accent-ct), #2196F3);
}

.score-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  position: relative;
}

.vs-text {
  font-size: 1.2rem;
  font-weight: bold;
  color: #ff9800;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  padding: 8px 16px;
  background: rgba(255, 152, 0, 0.1);
  border: 1px solid rgba(255, 152, 0, 0.3);
  border-radius: 20px;
}

.round-progress {
  font-size: 0.9rem;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.3);
  padding: 5px 12px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.current-round {
  color: #ff9800;
  font-weight: bold;
}

.scores-status {
  display: flex;
  justify-content: center;
  align-items: center;
}

.match-status {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(76, 175, 80, 0.2);
  padding: 8px 16px;
  border-radius: 25px;
  border: 1px solid #4CAF50;
  color: #4CAF50;
  font-weight: bold;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  animation: glow-green 2s ease-in-out infinite alternate;
}

@keyframes glow-green {
  from {
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.3);
  }
  to {
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.6);
  }
}

.match-status i {
  font-size: 1rem;
}

/* Responsive Design for Scores Banner */
@media (max-width: 768px) {
  .scores-banner {
    padding: 15px;
  }
  
  .score-value {
    font-size: 2.5rem;
  }
  
  .scores-main {
    flex-direction: column;
    gap: 15px;
  }
  
  .score-divider {
    order: 2;
    transform: rotate(90deg);
  }
  
  .team-score {
    min-width: auto;
    width: 100%;
  }
  
  .scores-header {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}

/* Strategy Section */
.strategy-section {
  margin-bottom: 20px;
}

/* Enhanced Strategy Banner */
.strategy-banner {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  border: 2px solid var(--primary-color);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 25px;
  box-shadow: 0 8px 32px rgba(255, 165, 0, 0.15);
  position: relative;
  overflow: hidden;
}

.strategy-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

.strategy-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.strategy-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-color);
  font-weight: bold;
  font-size: 0.9rem;
  letter-spacing: 1px;
}

.strategy-indicator i {
  font-size: 1.2rem;
  animation: pulse 2s infinite;
}

.round-type-indicator {
  background: rgba(255, 165, 0, 0.2);
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--primary-color);
  font-size: 0.8rem;
  font-weight: bold;
  color: var(--primary-color);
  letter-spacing: 0.5px;
}

.strategy-main {
  text-align: center;
  margin: 20px 0;
}

.strategy-name {
  font-size: 2.2rem;
  color: #ffffff;
  margin-bottom: 15px;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.strategy-description {
  font-size: 1.1rem;
  color: #e0e0e0;
  line-height: 1.6;
  margin-bottom: 15px;
  padding: 15px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  border-left: 4px solid var(--primary-color);
  font-style: italic;
}

.strategy-status {
  display: flex;
  justify-content: center;
  align-items: center;
}

.strategy-priority {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 99, 71, 0.2);
  padding: 8px 16px;
  border-radius: 25px;
  border: 1px solid #ff6347;
  color: #ff6347;
  font-weight: bold;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
  from {
    box-shadow: 0 0 5px rgba(255, 99, 71, 0.3);
  }
  to {
    box-shadow: 0 0 20px rgba(255, 99, 71, 0.6);
  }
}

.strategy-priority i {
  font-size: 1rem;
}

/* Responsive Design for Strategy Banner */
@media (max-width: 768px) {
  .strategy-banner {
    padding: 15px;
  }
  
  .strategy-name {
    font-size: 1.8rem;
  }
  
  .strategy-description {
    font-size: 1rem;
  }
  
  .strategy-header {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}

.roles-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.role-selection-button {
  margin-bottom: 20px;
}

.role-item {
  background-color: var(--light-bg);
  padding: 15px;
  border-radius: var(--border-radius);
}

.role-name {
  font-weight: bold;
  margin-bottom: 5px;
  color: var(--primary-color);
}

.role-description {
  font-size: 0.9rem;
  opacity: 0.8;
}

.strategy-actions {
  display: flex;
  gap: 10px;
}

/* Manual Role Assignment Message */
.role-manual-assignment {
  background: rgba(76, 175, 80, 0.1);
  border: 1px solid #4CAF50;
  border-radius: 8px;
  padding: 12px;
  margin: 15px 0;
  text-align: center;
}

.manual-assign-message {
  color: #4CAF50;
  font-weight: 500;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.manual-assign-message i {
  font-size: 1.1rem;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.feature-item {
  background-color: var(--light-bg);
  border-radius: var(--border-radius);
  padding: 20px;
  text-align: center;
  transition: var(--transition);
}

.feature-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.feature-item i {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.feature-item h3 {
  color: var(--text-light);
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.feature-item p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

/* Setup Section */
.setup-section {
  margin-bottom: 30px;
}

.setup-section h4 {
  color: var(--text-light);
  margin-bottom: 15px;
  font-size: 1.1rem;
  font-weight: 500;
}

/* Round History */
.round-history {
  max-height: 300px;
  overflow-y: auto;
  background-color: var(--light-bg);
  border-radius: var(--border-radius);
  padding: 10px;
}

.round-item {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
}

.round-item:last-child {
  border-bottom: none;
}

.round-win {
  color: var(--success);
}

.round-loss {
  color: var(--danger);
}

.round-score {
  font-size: 0.8rem;
  color: #888;
  margin-top: 4px;
  font-style: italic;
}

.round-roles {
  margin-top: 8px;
  border-top: 1px dotted rgba(255, 255, 255, 0.1);
  padding-top: 8px;
  transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
  max-height: 200px;
  overflow: hidden;
  opacity: 1;
}

.round-roles.collapsed {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  margin-top: 0;
  border-top: none;
}

.round-roles-toggle {
  font-size: 0.8rem;
  color: var(--primary-color);
  margin-top: 5px;
  cursor: pointer;
  user-select: none;
  display: inline-block;
  transition: var(--transition);
}

.round-roles-toggle:hover {
  color: #ffb74d;
  text-decoration: underline;
}

.round-roles-toggle i {
  margin-right: 4px;
}

.round-roles-title {
  font-size: 0.85rem;
  font-weight: bold;
  color: #888;
  margin-bottom: 4px;
}

.round-roles-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.round-roles-list li {
  font-size: 0.8rem;
  margin-bottom: 2px;
  color: #999;
}

.round-roles-list .player-name {
  color: var(--primary-color);
  font-weight: 500;
}

.round-roles-list .role-name {
  color: #88AAFF;
}

.round-roles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
}

.role-grid-item {
  font-size: 0.8rem;
  color: #999;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Team Chat */
.team-chat {
  display: flex;
  flex-direction: column;
  height: 250px;
  background-color: var(--light-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}

.chat-input {
  display: flex;
  padding: 10px;
  background-color: rgba(0, 0, 0, 0.2);
}

.chat-input input {
  flex: 1;
  margin-bottom: 0;
  background-color: var(--medium-bg);
}

.chat-input button {
  width: auto;
  margin-left: 10px;
  margin-bottom: 0;
}

.message {
  margin-bottom: 10px;
  word-break: break-word;
}

.message-sender {
  font-weight: bold;
  color: var(--primary-color);
}

.message-time {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  margin-left: 5px;
}

.message-content {
  background-color: var(--medium-bg);
  padding: 8px 12px;
  border-radius: var(--border-radius);
  display: inline-block;
  margin-top: 5px;
}

/* Role Player */
.role-player {
  margin-top: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--primary-color);
}

.role-player.assigned {
  color: var(--success);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--medium-bg);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--light-bg);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}

/* Additional Responsive Adjustments */
@media (max-width: 576px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .map-selection {
    grid-template-columns: 1fr 1fr;
  }
  
  .side-selection {
    flex-direction: column;
  }
  
  .strategy-actions {
    flex-direction: column;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .actions {
    flex-direction: column;
  }
  
  #gameArea {
    grid-template-columns: 1fr;
  }
  
  .room-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .header-actions {
    margin-top: 15px;
    margin-left: 0;
  }
  
  #roomCodeActions {
    margin-top: 15px;
  }
}

/* Utility Classes */
.hidden {
  display: none;
}

.text-center {
  text-align: center;
}

.mt-20 {
  margin-top: 20px;
}

.mb-20 {
  margin-bottom: 20px;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.pulse {
  animation: pulse 2s infinite;
}

.start-game-hint {
  font-size: 0.9rem;
  color: #666;
  text-align: center;
  margin-top: 10px;
  font-style: italic;
}

/* Modal Styles */
.modal {
  display: flex;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  align-items: center;
  justify-content: center;
}

.modal.hidden {
  display: none;
}

/* Style for mandatory modal that can't be dismissed */
.modal.mandatory-selection {
  background-color: rgba(0, 0, 0, 0.85);
}

.modal.mandatory-selection .modal-content {
  border: 3px solid #0096ff;
  box-shadow: 0 0 20px rgba(0, 150, 255, 0.5);
}

.modal.mandatory-selection .modal-header {
  background-color: rgba(0, 150, 255, 0.2);
}

.modal.mandatory-selection .modal-header h3 {
  color: #0096ff;
  font-weight: bold;
}

.modal-content {
  background-color: var(--medium-bg);
  border-radius: var(--border-radius);
  max-width: 600px;
  width: 90%;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  padding: 15px 20px;
  border-bottom: 1px solid var(--light-bg);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  color: var(--primary-color);
}

.close-modal {
  font-size: 24px;
  font-weight: bold;
  color: var(--text-light);
  cursor: pointer;
  transition: var(--transition);
}

.close-modal:hover {
  color: var(--primary-color);
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  padding: 15px 20px;
  border-top: 1px solid var(--light-bg);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-footer button {
  width: auto;
  margin: 0;
}

/* Strategy Options */
.strategy-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  max-height: 65vh;
  overflow-y: auto;
  padding-right: 5px;
  
  scrollbar-width: thin;
  scrollbar-color: var(--primary-color) var(--medium-bg);
}

.strategy-options::-webkit-scrollbar {
  width: 8px;
}

.strategy-options::-webkit-scrollbar-track {
  background: var(--medium-bg);
  border-radius: 4px;
}

.strategy-options::-webkit-scrollbar-thumb {
  background-color: var(--primary-color);
  border-radius: 4px;
}

#pistolStrategies::-webkit-scrollbar-thumb {
  background-color: #0096ff;
}

.strategy-option {
  background-color: var(--light-bg);
  border-radius: var(--border-radius);
  padding: 12px;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.strategy-option:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.strategy-option.selected {
  border-color: var(--primary-color);
  background-color: rgba(255, 152, 0, 0.1);
}

/* Pistol round strategy styles */
#pistolStrategies .strategy-option {
  background-color: rgba(0, 150, 255, 0.05);
  border-left: 3px solid #0096ff;
}

#pistolStrategies .strategy-option:hover {
  background-color: rgba(0, 150, 255, 0.1);
}

#pistolStrategies .strategy-option.selected {
  border-color: #0096ff;
  background-color: rgba(0, 150, 255, 0.15);
}

#pistolStrategies .strategy-option h4 {
  color: #0096ff;
}

/* Make the strategy modal larger for the expanded list */
@media (min-width: 768px) {
  .modal-content {
    max-width: 85%;
    width: 85%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
  }
  
  /* Two-column layout for strategies on larger screens */
  .strategy-modal-content .modal-body {
    display: flex;
    flex-direction: column;
  }
  
  /* When showing both pistol and regular strategies, use column layout */
  @media (min-width: 1200px) {
    .strategy-modal-content .modal-body {
      flex-direction: row;
      gap: 20px;
    }
    
    .strategy-modal-content #pistolRoundInfo,
    .strategy-modal-content #regularRoundInfo {
      flex: 1;
      max-width: 100%;
    }
    
    .strategy-modal-content #pistolStrategies,
    .strategy-modal-content #regularStrategies {
      flex: 1;
      max-width: 100%;
    }
  }
  
  .modal-body {
    flex: 1;
    overflow-y: auto;
  }
}

.strategy-option h4 {
  margin-top: 0;
  margin-bottom: 6px;
  color: var(--primary-color);
  font-size: 0.95rem;
}

.strategy-option p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-light);
  opacity: 0.8;
  line-height: 1.3;
}

/* Strategy category headers */
.strategy-category {
  grid-column: 1 / -1;
  margin: 8px 0 4px 0;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.85rem;
  color: var(--text-light);
  background-color: var(--medium-bg);
  padding: 6px 10px;
  border-radius: var(--border-radius);
  border-left: 3px solid var(--primary-color);
  opacity: 0.9;
  position: sticky;
  top: 0;
  z-index: 10;
}

#pistolStrategies .strategy-category {
  border-left-color: #0096ff;
  color: #0096ff;
  background-color: rgba(0, 150, 255, 0.1);
}

/* First category should not have top margin */
.strategy-category:first-child {
  margin-top: 0;
}

/* Strategy info and hints */
.strategy-info {
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius);
  padding: 10px 12px;
  margin-bottom: 12px;
  border-left: 3px solid var(--primary-color);
}

.strategy-info p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-light);
  opacity: 0.9;
}

.strategy-info i {
  margin-right: 5px;
  color: var(--primary-color);
}

#pistolRoundInfo {
  border-left-color: #0096ff;
}

#pistolRoundInfo i {
  color: #0096ff;
}

.strategy-hint {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  margin-right: 20px;
  text-align: left;
  flex: 1;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
  .strategy-options {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    max-height: 55vh;
  }
  
  .strategy-option h4 {
    font-size: 0.9rem;
  }
  
  .strategy-option p {
    font-size: 0.8rem;
  }
}

.strategy-options.hidden, .strategy-info.hidden {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
}


