/* ============================================ */
/* FULLSCREEN OVERLAYS & MENU SCREENS */
/* ============================================ */
.fullscreen-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(26, 26, 46, 0.98);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #1A1A2E 0%, #3D3460 100%);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
}

/* ============================================ */
/* TITLE SCREEN */
/* ============================================ */
.title-content {
  text-align: center;
  max-width: 90%;
}

.title-logo {
  font-size: 4em;
  color: #6C5CE7;
  text-shadow: 0 0 40px rgba(108, 92, 231, 0.9);
  margin-bottom: 0.2em;
  letter-spacing: 0.1em;
  animation: titleGlow 2s infinite alternate;
}

@keyframes titleGlow {
  from { text-shadow: 0 0 40px rgba(108, 92, 231, 0.9); }
  to { text-shadow: 0 0 60px rgba(108, 92, 231, 1); }
}

.title-subtitle {
  font-size: 1.5em;
  color: #F9CA24;
  margin-bottom: 3em;
  letter-spacing: 0.2em;
}

.title-menu {
  display: flex;
  flex-direction: column;
  gap: 1em;
  margin-bottom: 3em;
}

.title-footer {
  color: #A0A0B8;
  font-size: 0.9em;
}

/* ============================================ */
/* MENU BUTTONS */
/* ============================================ */
.menu-btn {
  width: 100%;
  max-width: 300px;
  padding: 1em 2em;
  font-size: 1.2em;
  background: #3D3460;
  color: #EAEAEA;
  border: 2px solid #6C5CE7;
  border-radius: 0.5em;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.menu-btn:hover,
.menu-btn:focus {
  background: #6C5CE7;
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(108, 92, 231, 0.6);
}

.menu-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.menu-btn-primary {
  background: #6C5CE7;
  border-color: #A29BFE;
}

.menu-btn-primary:hover {
  background: #A29BFE;
}

.menu-btn-danger {
  border-color: #ff4757;
  color: #ff4757;
}

.menu-btn-danger:hover {
  background: #ff4757;
  color: #EAEAEA;
}

/* ============================================ */
/* PAUSE MENU */
/* ============================================ */
.pause-content {
  text-align: center;
  max-width: 90%;
}

.pause-title {
  font-size: 3em;
  color: #A29BFE;
  margin-bottom: 2em;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  text-shadow: 0 0 30px rgba(162, 155, 254, 0.8);
}

.pause-menu-items {
  display: flex;
  flex-direction: column;
  gap: 1em;
}

/* ============================================ */
/* SETTINGS SCREEN */
/* ============================================ */
.settings-content {
  max-width: 600px;
  width: 90%;
  padding: 2em;
}

.settings-title {
  font-size: 2.5em;
  color: #6C5CE7;
  margin-bottom: 2em;
  text-align: center;
}

.settings-section {
  margin-bottom: 2em;
  padding: 1.5em;
  background: rgba(61, 52, 96, 0.5);
  border-radius: 0.5em;
  border: 2px solid #3D3460;
}

.settings-section h3 {
  color: #F9CA24;
  margin-bottom: 1em;
  font-size: 1.3em;
}

.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1em;
  padding: 0.5em 0;
}

.setting-item label {
  font-size: 1.1em;
  color: #EAEAEA;
}

.slider-container {
  display: flex;
  align-items: center;
  gap: 1em;
  width: 60%;
}

input[type="range"] {
  flex: 1;
  height: 6px;
  background: #3D3460;
  border-radius: 5px;
  outline: none;
  -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: #6C5CE7;
  cursor: pointer;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(108, 92, 231, 0.6);
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: #6C5CE7;
  cursor: pointer;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(108, 92, 231, 0.6);
}

.slider-value {
  min-width: 50px;
  text-align: right;
  color: #F9CA24;
  font-weight: bold;
}

input[type="checkbox"] {
  width: 50px;
  height: 25px;
  -webkit-appearance: none;
  background: #3D3460;
  border-radius: 25px;
  position: relative;
  cursor: pointer;
  outline: none;
  transition: background 0.3s;
}

input[type="checkbox"]:checked {
  background: #6C5CE7;
}

input[type="checkbox"]::before {
  content: '';
  position: absolute;
  width: 21px;
  height: 21px;
  background: #EAEAEA;
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: transform 0.3s;
}

input[type="checkbox"]:checked::before {
  transform: translateX(25px);
}

/* ============================================ */
/* DOMAIN SELECT */
/* ============================================ */
.domain-content {
  max-width: 900px;
  width: 90%;
  padding: 2em;
}

.domain-title {
  font-size: 2.5em;
  color: #6C5CE7;
  text-align: center;
  margin-bottom: 2em;
}

.domain-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5em;
  margin-bottom: 2em;
}

.domain-card {
  background: rgba(61, 52, 96, 0.7);
  border: 3px solid #6C5CE7;
  border-radius: 0.5em;
  padding: 1.5em;
  cursor: pointer;
  transition: all 0.3s;
  text-align: center;
}

.domain-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(108, 92, 231, 0.6);
  border-color: #A29BFE;
}

.domain-card h3 {
  color: #F9CA24;
  font-size: 1.5em;
  margin-bottom: 0.5em;
}

.domain-card p {
  color: #EAEAEA;
  margin-bottom: 1em;
}

.domain-cost {
  color: #00d2d3;
  font-weight: bold;
  font-size: 1.1em;
}

/* ============================================ */
/* INVENTORY SCREEN */
/* ============================================ */
.inventory-content {
  max-width: 1000px;
  width: 90%;
  height: 90vh;
  padding: 2em;
  display: flex;
  flex-direction: column;
}

.inventory-title {
  font-size: 2.5em;
  color: #6C5CE7;
  text-align: center;
  margin-bottom: 1.5em;
}

.rune-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1em;
  overflow-y: auto;
  margin-bottom: 1.5em;
  padding: 1em;
}

.rune-card {
  background: rgba(61, 52, 96, 0.7);
  border: 3px solid #6C5CE7;
  border-radius: 0.5em;
  padding: 1em;
  transition: all 0.3s;
}

.rune-card.equipped {
  border-color: #F9CA24;
  box-shadow: 0 0 20px rgba(249, 202, 36, 0.6);
}

.rune-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(108, 92, 231, 0.5);
}

.rune-card-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5em;
}

.rune-element {
  font-weight: bold;
  font-size: 1.2em;
}

.rune-rarity {
  font-size: 1em;
  font-weight: bold;
}

.rune-card-stats {
  font-size: 0.9em;
  margin-bottom: 1em;
  min-height: 60px;
}

.rune-card-actions {
  display: flex;
  gap: 0.5em;
}

.rune-card-actions button {
  flex: 1;
  padding: 0.5em;
  font-size: 0.8em;
  background: #3D3460;
  border: 1px solid #6C5CE7;
  color: #EAEAEA;
  border-radius: 0.3em;
  cursor: pointer;
  transition: all 0.2s;
}

.rune-card-actions button:hover {
  background: #6C5CE7;
}

/* ============================================ */
/* ERROR SCREEN */
/* ============================================ */
.error-container {
  max-width: 500px;
  width: 90%;
  text-align: center;
  background: rgba(61, 52, 96, 0.9);
  border: 3px solid #ff4757;
  border-radius: 1em;
  padding: 2em;
}

.error-title {
  font-size: 2.5em;
  color: #ff4757;
  margin-bottom: 1em;
}

.error-message {
  font-size: 1.2em;
  color: #EAEAEA;
  margin-bottom: 2em;
  line-height: 1.6;
  white-space: pre-line;
}

/* ============================================ */
/* RESPONSIVE */
/* ============================================ */
@media (max-width: 768px) {
  .title-logo {
    font-size: 3em;
  }
  
  .title-subtitle {
    font-size: 1.2em;
  }
  
  .menu-btn {
    font-size: 1em;
  }
  
  .domain-grid {
    grid-template-columns: 1fr;
  }
  
  .rune-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
}