:root {
  --primary-color: #17412b;
  --secondary-color: #30805a;
  --accent-color: #519872;
  --text-color: #ffffff;
  --danger-color: #d43131;
  --background-color-lighter: #2b2b2b;
  --background-color: #1a1a1a;
  --card-bg: #232323;
  --border-radius: 5px;
  --hover-danger-color: #f14444;
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
  padding: 20px;
  background-image: linear-gradient(rgba(0, 0, 0, 0.644), rgba(0, 0, 0, 0.534)),
    url('../images/background.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  min-height: 100vh;
}

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

header {
  text-align: center;
  margin-bottom: 30px;
  padding: 20px;
  border-bottom: 2px solid var(--secondary-color);
}

h1 {
  font-size: 2rem;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 0 0 10px var(--accent-color);
}

h2 {
  margin-bottom: 20px;
  color: var(--accent-color);
}

.btn {
  display: inline-block;
  background-color: var(--primary-color);
  color: var(--text-color);
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: background-color 0.3s ease;
  margin: 5px;
}

.btn:hover {
  background-color: var(--secondary-color);
}

.btn-danger {
  background-color: var(--danger-color);
}

.btn-danger:hover {
  background-color: var(--hover-danger-color);
}

.hidden {
  display: none !important;
}

/* Setup Container Styles */
.setup-container {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.setup-box {
  background-color: rgba(35, 35, 35, 0.85);
  border-radius: var(--border-radius);
  padding: 30px;
  width: 100%;
  max-width: 600px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

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

.form-group .btn {
  background-color: var(--background-color-lighter);
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
}

input, select {
  width: 100%;
  padding: 10px;
  border-radius: var(--border-radius);
  border: 1px solid #444;
  background-color: #333;
  color: var(--text-color);
  font-size: 1rem;
}

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

.checkbox-group label {
  margin-right: 15px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
  width: auto;
  margin-right: 5px;
}

/* Maps Container Styles */
.maps-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.map-card {
  width: 200px;
  height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--background-color);
  padding: 10px;
  cursor: pointer;
  transition: background-color 0.3s;
}

/* Updated selected map card styles */
.map-card.selected {
  background-color: var(--secondary-color);
  color: var(--text-color);
  border: 2px solid var(--primary-color);
}

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

.map-info {
  margin-top: 5px;
}

.map-name {
  font-weight: bold;
}

.map-type {
  font-size: 0.9em;
  color: #666;
}

.map-card {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  position: relative;
  cursor: pointer;
}

.map-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.3);
}

.map-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}

.map-info {
  padding: 15px;
}

.map-name {
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 5px;
}

.map-type {
  color: #aaa;
  font-size: 0.9rem;
}

.banned {
  position: relative;
  opacity: 0.6;
  pointer-events: none;
}

.banned::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
}

.banned::before {
  content: attr(data-banned-text);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-30deg);
  color: var(--danger-color);
  font-size: 1.5rem;
  font-weight: bold;
  z-index: 1;
  text-shadow: 0 0 5px black;
}

/* Phase Info Styles */
.phase-info {
  text-align: center;
  margin-bottom: 30px;
  background-color: rgba(35, 35, 35, 0.85);
  padding: 20px;
  border-radius: var(--border-radius);
}

.team-turn {
  font-size: 1.5rem;
  font-weight: bold;
  margin: 10px 0;
  color: var(--accent-color);
}

.phase-description {
  margin-bottom: 10px;
  font-style: italic;
}

.map-counter {
  font-weight: bold;
  font-size: 1.1rem;
}

/* Final Maps Section */
.final-maps {
  margin-top: 40px;
  text-align: center;
}

.final-maps-container {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin: 20px 0;
}

.final-map-card {
  width: 250px;
}

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

.modal.active {
  display: flex;
}

.modal-content {
  background-color: var(--card-bg);
  padding: 30px;
  border-radius: var(--border-radius);
  text-align: center;
  max-width: 500px;
  width: 90%;
}

.button-group {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

/* Updated button-group.fixed styles */
.button-group.fixed {
  position: sticky;
  top: 0;
  background-color: var(--background-color);
  z-index: 10;
  padding: 10px 0;
  border-bottom: 2px solid var(--secondary-color);
  width: 100%;
  left: 0;
}

.button-group {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

/* Footer */
footer {
  margin-top: 50px;
  padding: 20px;
  background-color: rgba(35, 35, 35, 0.8);
  color: #888;
  font-size: 0.9rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
  gap: 10px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .maps-container {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
  
  h1 {
    font-size: 1.8rem;
  }
  
  .setup-box {
    padding: 20px;
  }
}



/* Language Selector Styles */
.language-selector {
  display: flex;
  background-color: rgba(35, 35, 35, 0.85);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.lang-btn {
  background-color: transparent;
  color: var(--text-color);
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background-color 0.3s;
}

.lang-btn:hover {
  background-color: var(--primary-color);
}

.lang-btn.active {
  background-color: var(--secondary-color);
  font-weight: bold;
}

.lang-ru, .lang-en {
  transition: opacity 0.3s ease;
}

.brand {
  margin-bottom: 20px;
  position: relative;
}

.brand h1 {
  color: var(--text-color);
  margin: 0;
  padding: 15px;
  background: rgba(23, 65, 43, 0.5);
  border-radius: var(--border-radius);
  border-left: 5px solid var(--accent-color);
  text-align: center;
  font-weight: bold;
}

/* Add styles for the map pool selection */
.map-filter-container {
  margin-top: 20px;
}

.map-filter-container h3 {
  margin-bottom: 10px;
}

.map-filter {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.map-filter label {
  display: flex;
  align-items: center;
  cursor: pointer;
  background-color: var(--card-bg);
  padding: 10px;
  border-radius: var(--border-radius);
  transition: background-color 0.3s ease;
}

.map-filter label:hover {
  background-color: var(--primary-color);
}

.map-filter input[type="checkbox"] {
  margin-right: 10px;
}

/* Add styles for the random map limit input */
.random-map-limit {
  margin-top: 20px;
}

.random-map-limit label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
}

.random-map-limit input {
  width: 100%;
  padding: 10px;
  border-radius: var(--border-radius);
  border: 1px solid #444;
  background-color: #333;
  color: var(--text-color);
  font-size: 1rem;
}

/* Add styles for the new mode filter modal */
.mode-filter-modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
}

.mode-filter-modal.active {
    display: flex;
}

.mode-filter-modal .modal-content {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: var(--border-radius);
    text-align: center;
    justify-content: center;
    max-width: 500px;
    width: 90%;
}

/* Add styles for scrollable map filter modal */
.map-filter-modal .modal-content {
  max-height: 80vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.map-filter-modal .button-group.fixed {
  position: sticky;
  top: 0;
  background-color: var(--card-bg);
  z-index: 10;
  padding: 10px 0;
  border-bottom: 2px solid var(--secondary-color);
  width: 100%;
  left: 0;
}

.map-filter-modal .maps-container {
  flex: 1;
  overflow-y: auto;
}

.map-filter-modal .modal-content h2 {
  margin: 0;
  padding: 10px;
  background-color: var(--card-bg);
  border-bottom: 2px solid var(--secondary-color);
}

.map-filter-modal .modal-content .button-group {
  padding: 10px;
  background-color: var(--card-bg);
  border-bottom: 2px solid var(--secondary-color);
}

.map-filter-modal .modal-content .maps-container {
  padding: 10px;
}

#mapFilterContainer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  max-height: 50vh;
  overflow-y: auto;
}

#mapFilterContainer .map-card {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  position: relative;
  cursor: pointer;
}

#mapFilterContainer .map-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.3);
}

#mapFilterContainer .map-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}

#mapFilterContainer .map-info {
  padding: 15px;
}

#mapFilterContainer .map-name {
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 5px;
}

#mapFilterContainer .map-type {
  color: #aaa;
  font-size: 0.9rem;
}

#mapFilterContainer .map-card.selected {
  background-color: var(--background-color-lighter);
  color: var(--text-color);
  border: 2px solid var(--secondary-color);
}

#mapFilterModal .modal-content {
  max-width: 50%;
  scrollbar-color: var(--background-color-lighter) var(--background-color) ;
}
@media (max-width: 480px) {
  body {
    padding: 10px;
  }
  
  .maps-container {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
  }
  
  .map-info {
    padding: 10px;
  }
  
  .map-name {
    font-size: 0.9rem;
  }
  #mapFilterModal .modal-content {
    max-width: 100%;
  }
}