/* ===================================================================
   GLOBAL & ROOT VARIABLES
   =================================================================== */
:root {
  --accent: #6b9080;
  --accent-dark: #567568;
  --bg-light: #f5f5f5;
  --text-dark: #222;
  --radius: 6px;
  --shadow: 0 4px 14px rgba(0, 0, 0, 0.1);

  --swiper-navigation-color: var(--accent);
  --swiper-pagination-color: var(--accent);
  --swiper-theme-color: var(--accent);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: sans-serif;
  color: var(--text-dark);
  background: #ffffff;
}

/* ===================================================================
   GLOBAL UTILITY CLASSES
   =================================================================== */
.hidden {
  display: none !important;
}

.m-1 { margin: 1px; }
.mt-4 { margin-top: 4px; }
.mt-10 { margin-top: 10px; }
.mb-10 { margin-bottom: 10px; }

.center {
  text-align: center;
}

.card {
  background: var(--bg-light);
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

button {
  padding: 10px 20px;
  background-color: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  width: auto;
}

button:hover:not(:disabled) {
  background: var(--accent-dark);
}

button:active:not(:disabled) {
  transform: scale(0.97);
}

button:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* ===================================================================
   INDEX PAGE (City Selector)
   =================================================================== */
.index-page {
  padding: 40px 20px;
  text-align: center;
  max-width: 900px;
  margin: auto;
}

.index-title {
  font-size: 2.6rem;
  margin-bottom: 10px;
  font-weight: 700;
}

.index-subtitle {
  font-size: 1.2rem;
  margin-bottom: 25px;
}

.city-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.city-card {
  background: var(--bg-light);
  padding: 30px 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

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

.city-card.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* ===================================================================
   GAME PAGE
   =================================================================== */
.page {
  display: flex;
  flex-direction: column;
}

#topContainer {
  height: 60px;
  background: #ffffff;
  display: flex;
  align-items: center;
  padding: 0 15px;
  border-bottom: 1px solid #ddd;
}

.gameTitle {
  color: white;
  background: var(--accent);
  padding: 5px 15px;
  border-radius: 6px;
  text-decoration: none;
}

#counterContainer {
  margin-left: auto;
  font-size: 1.3em;
  font-weight: bold;
}

#mainContentContainer {
  display: flex;
  height: calc(100vh - 60px - 235px);
  width: 100%;
  min-width: 0;
  background: #fff;
}

.swiper {
  width: 100%;
  height: 100%;
  min-width: 0;
}

.swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#mapContainer {
  flex: 0 0 30%;
  height: 100%;
}

#bottomContainer {
  display: flex;
  gap: 20px;
  padding: 20px;
}

.bottom-col {
  flex: 1;
  background: var(--bg-light);
  border-radius: var(--radius);
  padding: 20px;
}

.material-symbols-outlined {
  vertical-align: -6px;
}

.subheading {
  font-weight: bold;
  font-size: 1.4em;
}

/* Price Input */
.price-input-container {
  position: relative;
  width: 250px;
  margin: 20px 0;
}

.price-input-container span {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: bold;
  pointer-events: none;
  color: #555;
}

.price-input {
  width: 85%;
  padding: 10px 10px 10px 25px;
  font-size: 16px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.price-input:focus {
  border-color: var(--accent);
}

/* Domain Logo */
.domain-logo {
  height: 25px;
  position: fixed;
  right: 40px;
  bottom: 40px;
  z-index: 1000;
}

.rate-limit {
  color: red;
}
/* ===================================================================
   RESULTS PAGE
   =================================================================== */
.results-page {
  height: 100vh;
  background: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
}

.results-card {
  background: var(--bg-light);
  padding: 40px;
  border-radius: 20px;
  box-shadow: var(--shadow);
  width: 90%;
  max-width: 400px;
  text-align: center;
  animation: fadeIn 0.5s ease;
}

.results-card h1 {
  margin-bottom: 20px;
  font-size: 2rem;
}

.results-card p {
  font-size: 1.3rem;
  margin: 10px 0;
}

/* Animation */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* ===================================================================
   RESPONSIVE
   =================================================================== */
@media (max-width: 1200px) {
  #mainContentContainer {
    flex-direction: column;
    height: auto;
  }
  #mapContainer {
    width: 100%;
    min-height: 600px;
  }
}

@media (max-width: 600px) {
  .index-title {
    font-size: 2rem;
  }
  .index-subtitle {
    font-size: 1rem;
  }
}
