/**
 * Developer Wellness App Styles - Breathe & Relax
 * Uses the theme design system tokens (style.css :root).
 */

/* Modal Overlay */
.dev-game-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.dev-game-modal.active {
  opacity: 1;
  visibility: visible;
}

/* Game Container */
.dev-game-container {
  position: relative;
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  background: var(--bg-card);
  border-radius: 24px;
  border: 1px solid rgba(0, 0, 0, 0.07);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  padding: 2rem;
  transform: scale(0.9);
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.dev-game-modal.active .dev-game-container {
  transform: scale(1);
}

/* Close Button */
.game-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  background: var(--bg-body);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition);
  z-index: 10;
}

.game-close-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: var(--primary);
  color: var(--primary);
  transform: rotate(90deg);
}

/* Game Header */
.game-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.game-header h2 {
  font-size: 2.5rem;
  margin: 0 0 0.5rem 0;
  font-weight: 700;
  color: var(--text-main);
}

.game-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  margin: 0;
}

/* Wellness Stats */
.wellness-stats {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.stat-item {
  background: var(--bg-body);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  padding: 0.75rem 1.5rem;
  text-align: center;
  min-width: 120px;
}

.stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.25rem;
}

.stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Game Area */
.game-area {
  position: relative;
  width: 100%;
  min-height: 450px;
  background: var(--bg-body);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.game-screen {
  position: relative;
  width: 100%;
  min-height: 450px;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  flex: 1;
}

/* Menu Screen */
.menu-content {
  width: 100%;
  max-width: 700px;
}

.menu-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.wellness-card {
  background: var(--bg-card);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-card);
}

.wellness-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(0, 0, 0, 0.12);
}

.card-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.wellness-card h3 {
  font-size: 1.3rem;
  color: var(--text-main);
  margin: 0 0 0.5rem 0;
}

.wellness-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.5;
}

/* Back Button */
.back-btn {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--bg-card);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

.back-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateX(-3px);
}

/* Breathing Screen */
.breathe-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
  padding: 1rem 0;
}

.breathing-circle {
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: var(--gradient-main);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 40px var(--primary-glow);
  transition: all 1s ease-in-out;
  position: relative;
  margin: 1rem 0;
}

.breathing-circle::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: inherit;
  opacity: 0.5;
  animation: pulse-ring 2s ease-out infinite;
}

@keyframes pulse-ring {
  0% {
    transform: scale(1);
    opacity: 0.5;
  }
  100% {
    transform: scale(1.3);
    opacity: 0;
  }
}

.breathing-circle.inhale {
  transform: scale(1.3);
  box-shadow: 0 15px 60px rgba(0, 0, 0, 0.2);
}

.breathing-circle.hold {
  transform: scale(1.3);
}

.breathing-circle.exhale {
  transform: scale(1);
  box-shadow: 0 5px 20px var(--primary-glow);
}

.circle-inner {
  text-align: center;
  color: #fff;
}

.breath-text {
  display: block;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.breath-count {
  display: block;
  font-size: 3rem;
  font-weight: 700;
  opacity: 0.8;
}

.breathing-controls {
  display: flex;
  gap: 1rem;
}

.btn-wellness-primary,
.btn-wellness-secondary {
  padding: 1rem 2rem;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-wellness-primary {
  background: var(--gradient-main);
  color: #fff;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-wellness-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

.btn-wellness-secondary {
  background: var(--bg-body);
  color: var(--text-muted);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.btn-wellness-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.breathing-info {
  text-align: center;
  max-width: 500px;
}

.breathing-info p {
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.info-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Zen Garden Screen */
.zen-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.zen-controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 0.5rem;
  border-radius: 12px;
}

.zen-tool-btn {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 2px solid transparent;
  background: var(--bg-body);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.zen-tool-btn:hover {
  transform: scale(1.1);
}

.zen-tool-btn.active {
  border-color: var(--primary);
  background: var(--primary-glow);
}

.color-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.1);
}

.zen-clear-btn {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: var(--bg-body);
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  margin-left: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.zen-clear-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

#zen-canvas {
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  cursor: crosshair;
  background: #f5e6d3;
}

.zen-instruction {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .dev-game-container {
    width: 95%;
    padding: 1.5rem;
  }

  .game-header h2 {
    font-size: 2rem;
  }

  .game-area {
    min-height: 400px;
  }

  .wellness-stats {
    flex-direction: column;
    gap: 0.5rem;
  }

  .stat-item {
    width: 100%;
  }

  .menu-options {
    grid-template-columns: 1fr;
  }

  .breathing-circle {
    width: 200px;
    height: 200px;
  }

  .breath-text {
    font-size: 1.2rem;
  }

  .breath-count {
    font-size: 2.5rem;
  }

  #zen-canvas {
    max-width: 100%;
    height: auto;
  }

  .breathing-controls {
    flex-direction: column;
    width: 100%;
  }

  .btn-wellness-primary,
  .btn-wellness-secondary {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .game-area {
    min-height: 350px;
  }

  .breathing-circle {
    width: 180px;
    height: 180px;
  }

  .zen-controls {
    flex-wrap: wrap;
  }
}
