/* ═══════════════════════════════════════════════════════════════
   SETTINGS MENU - In-Game Settings Access
   ═══════════════════════════════════════════════════════════════ */

.settings-menu-container {
  position: relative;
  z-index: 100;
}

/* Settings Toggle Button */
.settings-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--color-bg-card);
  border: 3px solid var(--color-border);
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-md);
  z-index: 101;
}

.settings-btn:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  transform: scale(1.1) rotate(30deg);
  box-shadow: 0 6px 0 rgba(0,0,0,0.2), 0 8px 16px rgba(0,0,0,0.3);
}

.settings-btn:active {
  transform: scale(0.95) rotate(30deg);
}

/* Settings Panel */
.settings-panel {
  position: fixed;
  top: 80px;
  right: 20px;
  width: 320px;
  max-height: calc(100vh - 100px);
  background: var(--color-bg-card);
  border-radius: var(--radius-xl);
  border: 3px solid var(--color-border);
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 2px solid var(--color-border);
  background: var(--color-bg-dark);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.settings-header h3 {
  margin: 0;
  font-family: 'Fredoka One', cursive;
  color: var(--color-primary);
  font-size: 1.25rem;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.close-btn:hover {
  background: rgba(255,255,255,0.1);
  color: var(--color-text);
}

/* Settings Content */
.settings-content {
  padding: 16px;
}

.settings-section {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
}

.settings-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
}

.settings-section h4 {
  margin: 0 0 12px 0;
  font-family: 'Fredoka One', cursive;
  color: var(--color-accent-yellow);
  font-size: 1rem;
}

/* Pause Button */
.pause-btn {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-lg);
  border: 3px solid var(--color-border);
  background: var(--color-bg-dark);
  color: var(--color-text);
  font-family: 'Fredoka One', cursive;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pause-btn:hover {
  border-color: var(--color-accent-yellow);
  background: rgba(255, 206, 84, 0.1);
}

.pause-btn.paused {
  background: var(--color-accent-green);
  border-color: var(--color-accent-green);
  color: white;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 187, 79, 0.4); }
  50% { box-shadow: 0 0 0 10px rgba(0, 187, 79, 0); }
}

.paused-by {
  text-align: center;
  margin-top: 8px;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  font-family: 'Fredoka One', cursive;
}

/* Difficulty Select */
.difficulty-select select {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-lg);
  border: 2px solid var(--color-border);
  background: var(--color-bg-dark);
  color: var(--color-text);
  font-family: 'Fredoka One', cursive;
  font-size: 0.9375rem;
  cursor: pointer;
}

.difficulty-select select:focus {
  outline: none;
  border-color: var(--color-primary);
}

/* Setting Items */
.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

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

.setting-item label {
  font-family: 'Fredoka One', cursive;
  font-size: 0.875rem;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.setting-item label span {
  color: var(--color-accent-yellow);
  min-width: 30px;
}

.setting-item input[type="checkbox"] {
  width: 22px;
  height: 22px;
  cursor: pointer;
  accent-color: var(--color-primary);
}

.setting-item input[type="range"] {
  flex: 1;
  max-width: 120px;
  cursor: pointer;
}

/* Custom Settings Panel */
.custom-settings {
  margin-top: 12px;
  padding: 12px;
  background: rgba(0,0,0,0.2);
  border-radius: var(--radius-lg);
  border: 2px solid var(--color-border);
}

.custom-settings.hidden {
  display: none;
}

/* Settings Footer */
.settings-footer {
  padding: 16px;
  border-top: 2px solid var(--color-border);
  background: var(--color-bg-dark);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

.save-btn {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-lg);
  border: none;
  background: var(--color-accent-green);
  color: white;
  font-family: 'Fredoka One', cursive;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 0 #009940, 0 6px 16px rgba(0, 187, 79, 0.4);
}

.save-btn:hover {
  background: #00d45a;
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #009940, 0 8px 20px rgba(0, 187, 79, 0.5);
}

.save-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #009940, 0 4px 12px rgba(0, 187, 79, 0.4);
}

/* Pause Overlay */
.pause-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.pause-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.pause-content {
  text-align: center;
  animation: bounceIn 0.5s ease-out;
}

@keyframes bounceIn {
  0% { transform: scale(0.3); opacity: 0; }
  50% { transform: scale(1.05); }
  70% { transform: scale(0.9); }
  100% { transform: scale(1); opacity: 1; }
}

.pause-icon {
  font-size: 6rem;
  margin-bottom: 20px;
}

.pause-text {
  font-family: 'Fredoka One', cursive;
  font-size: 2.5rem;
  color: white;
  text-shadow: 3px 3px 0 rgba(0,0,0,0.5);
  margin-bottom: 10px;
}

.pause-by {
  font-family: 'Fredoka One', cursive;
  font-size: 1.25rem;
  color: var(--color-accent-yellow);
}

/* Responsive */
@media (max-width: 480px) {
  .settings-panel {
    right: 10px;
    left: 10px;
    width: auto;
    max-height: calc(100vh - 120px);
  }

  .settings-btn {
    top: 10px;
    right: 10px;
    width: 44px;
    height: 44px;
    font-size: 1.25rem;
  }

  .pause-icon {
    font-size: 4rem;
  }

  .pause-text {
    font-size: 2rem;
  }
}
