/**
 * ═══════════════════════════════════════════════════════════════
 * SAFETY AT HOME - GAME-SPECIFIC STYLES
 * ═══════════════════════════════════════════════════════════════
 * 
 * Only styles specific to this game
 * All common styles are in ../shared/legacy/game-framework.css
 * 
 * @version 1.0.0
 * @author Learnature Dev Team
 * @date October 2025
 * 
 * ═══════════════════════════════════════════════════════════════
 */

/* ═══════════════════════════════════════════════════════════════
   1. WELCOME SCREEN - Room selection
   ═══════════════════════════════════════════════════════════════ */

.welcome-content {
  max-width: 900px;
  margin: 0 auto;
}

.welcome-hero {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.hero-emoji {
  font-size: 6rem;
  margin-bottom: var(--space-lg);
  animation: bounce 2s infinite;
}

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

.welcome-heading {
  font-family: var(--font-headings);
  font-size: var(--font-size-4xl);
  color: var(--primary-color);
  margin-bottom: var(--space-md);
}

.welcome-description {
  font-size: var(--font-size-lg);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* ───────────────────────────────────────────────────────────────
   Room Cards
   ─────────────────────────────────────────────────────────────── */

.rooms-grid {
  margin-top: var(--space-2xl);
}

.room-card {
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.room-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.room-icon {
  font-size: 4rem;
  margin-bottom: var(--space-md);
}

.room-name {
  font-family: var(--font-headings);
  font-size: var(--font-size-2xl);
  color: var(--primary-color);
  margin-bottom: var(--space-sm);
}

.room-description {
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  font-size: var(--font-size-md);
}

.room-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
  padding: var(--space-md);
  background: var(--bg-primary);
  border-radius: var(--radius-md);
}

.stat {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 600;
}

.stat-icon {
  font-size: var(--font-size-xl);
}

.stat-value {
  color: var(--primary-color);
  font-size: var(--font-size-lg);
}

/* ───────────────────────────────────────────────────────────────
   Instructions Card
   ─────────────────────────────────────────────────────────────── */

.instructions {
  background: var(--gradient-primary);
  color: var(--text-light);
}

.instructions h3 {
  color: var(--text-light);
  margin-bottom: var(--space-md);
}

.instructions ol {
  padding-left: var(--space-xl);
}

.instructions li {
  margin-bottom: var(--space-sm);
  line-height: 1.8;
}

/* ═══════════════════════════════════════════════════════════════
   2. GAME SCREEN - Room scene with hotspots
   ═══════════════════════════════════════════════════════════════ */

.room-info {
  background: var(--bg-secondary);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.room-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.room-title {
  font-family: var(--font-headings);
  font-size: var(--font-size-2xl);
  color: var(--primary-color);
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

#current-room-icon {
  font-size: var(--font-size-3xl);
}

.room-progress {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.progress-text {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--text-secondary);
}

.progress-text span {
  color: var(--primary-color);
}

/* ───────────────────────────────────────────────────────────────
   Room Scene Container
   ─────────────────────────────────────────────────────────────── */

.room-scene {
  position: relative;
  width: 100%;
  min-height: 600px;
  background-color: var(--bg-primary);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

/* TODO: Developer - Add background images for each room */
.room-scene[data-room="kitchen"] {
  background-image: url("images/kitchen-scene.jpg");
}

.room-scene[data-room="bathroom"] {
  background-image: url("images/bathroom-scene.jpg");
}

.room-scene[data-room="garage"] {
  background-image: url("images/garage-scene.jpg");
}

.room-scene[data-room="living-room"] {
  background-image: url("images/living-room-scene.jpg");
}

/* ───────────────────────────────────────────────────────────────
   Hotspot System - Interactive danger points
   ─────────────────────────────────────────────────────────────── */

.hotspot {
  position: absolute;
  width: 60px;
  height: 60px;
  border-radius: var(--radius-full);
  background: rgba(255, 82, 82, 0.3);
  border: 3px solid var(--error-color);
  cursor: pointer;
  transition: all var(--transition-normal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-xl);
  animation: hotspotPulse 2s infinite;
}

@keyframes hotspotPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.1);
    opacity: 1;
  }
}

.hotspot:hover {
  transform: scale(1.3);
  background: rgba(255, 82, 82, 0.5);
  border-width: 4px;
  z-index: var(--z-dropdown);
}

/* Hotspot pulse effect */
.hotspot-pulse {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  background: rgba(255, 82, 82, 0.4);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

/* Hotspot states */
.hotspot.found {
  background: rgba(76, 175, 80, 0.3);
  border-color: var(--success-color);
  animation: none;
  pointer-events: none;
}

.hotspot.found::after {
  content: "✅";
  font-size: var(--font-size-2xl);
}

.hotspot.wrong {
  animation: shake 0.5s;
}

.hotspot.hint-active {
  animation: hotspotPulse 0.5s infinite;
  border-color: var(--warning-color);
  background: rgba(255, 193, 7, 0.4);
}

/* ───────────────────────────────────────────────────────────────
   Room Actions
   ─────────────────────────────────────────────────────────────── */

.room-actions {
  margin-top: var(--space-xl);
  padding: var(--space-lg);
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

/* ═══════════════════════════════════════════════════════════════
   3. RESULTS SCREEN - Completion summary
   ═══════════════════════════════════════════════════════════════ */

.results-content {
  max-width: 800px;
  margin: 0 auto;
}

.results-header {
  background: var(--gradient-primary);
  color: var(--text-light);
  padding: var(--space-2xl);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-xl);
}

.results-emoji {
  font-size: 6rem;
  margin-bottom: var(--space-lg);
  animation: celebrate 1s ease-in-out infinite;
}

.results-title {
  font-family: var(--font-headings);
  font-size: var(--font-size-4xl);
  margin-bottom: var(--space-md);
}

.results-message {
  font-size: var(--font-size-lg);
  opacity: 0.9;
}

/* ───────────────────────────────────────────────────────────────
   Statistics Cards
   ─────────────────────────────────────────────────────────────── */

.results-stats {
  margin-bottom: var(--space-xl);
}

.stat-card {
  padding: var(--space-xl);
}

.stat-card .stat-icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
}

.stat-number {
  font-size: var(--font-size-4xl);
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: var(--space-sm);
}

.stat-label {
  font-size: var(--font-size-md);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ───────────────────────────────────────────────────────────────
   Safety Tips List
   ─────────────────────────────────────────────────────────────── */

.safety-tips {
  background: var(--bg-secondary);
}

.safety-tips h3 {
  color: var(--primary-color);
  margin-bottom: var(--space-lg);
}

.tips-list {
  list-style: none;
  padding: 0;
}

.tips-list li {
  background: var(--bg-primary);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  display: flex;
  align-items: start;
  gap: var(--space-md);
}

.tips-list li::before {
  content: "💡";
  font-size: var(--font-size-xl);
  flex-shrink: 0;
}

/* ───────────────────────────────────────────────────────────────
   Results Actions
   ─────────────────────────────────────────────────────────────── */

.results-actions {
  padding-top: var(--space-xl);
  border-top: 2px solid var(--border-color);
}

/* ═══════════════════════════════════════════════════════════════
   4. MODAL - Danger Information
   ═══════════════════════════════════════════════════════════════ */

.danger-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.danger-image {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.danger-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.danger-emoji-display {
  font-size: 8rem;
  line-height: 1;
  padding: var(--space-xl);
  animation: dangerAppear 0.5s ease-out;
}

@keyframes dangerAppear {
  from {
    opacity: 0;
    transform: scale(0.5) rotate(-20deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

.danger-description h3,
.danger-tip h3 {
  color: var(--primary-color);
  margin-bottom: var(--space-md);
  font-size: var(--font-size-lg);
}

.tip-box {
  background: var(--gradient-primary);
  color: var(--text-light);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  display: flex;
  gap: var(--space-md);
  align-items: start;
}

.tip-icon {
  font-size: var(--font-size-2xl);
  flex-shrink: 0;
}

.tip-box p {
  margin: 0;
  line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════════
   5. RESPONSIVE DESIGN - Mobile & Tablet
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .welcome-heading {
    font-size: var(--font-size-3xl);
  }

  .hero-emoji {
    font-size: 4rem;
  }

  .rooms-grid {
    grid-template-columns: 1fr;
  }

  .room-scene {
    min-height: 400px;
  }

  .hotspot {
    width: 50px;
    height: 50px;
  }

  .results-emoji {
    font-size: 4rem;
  }

  .results-title {
    font-size: var(--font-size-3xl);
  }

  .results-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .welcome-heading {
    font-size: var(--font-size-2xl);
  }

  .hero-emoji {
    font-size: 3rem;
  }

  .room-scene {
    min-height: 300px;
  }

  .hotspot {
    width: 40px;
    height: 40px;
    font-size: var(--font-size-md);
  }

  .room-info {
    flex-direction: column;
    text-align: center;
  }

  .room-actions {
    flex-direction: column;
    gap: var(--space-md);
  }

  .room-actions .btn {
    width: 100%;
  }
}

/* ═══════════════════════════════════════════════════════════════
   6. ACCESSIBILITY - High contrast mode
   ═══════════════════════════════════════════════════════════════ */

@media (prefers-contrast: high) {
  .hotspot {
    border-width: 4px;
    background: rgba(255, 82, 82, 0.5);
  }

  .hotspot.found {
    border-width: 4px;
    background: rgba(76, 175, 80, 0.5);
  }
}

/* ═══════════════════════════════════════════════════════════════
   7. PRINT STYLES - Printable safety tips
   ═══════════════════════════════════════════════════════════════ */

@media print {
  .game-header,
  .room-actions,
  .results-actions {
    display: none;
  }

  .room-scene {
    page-break-inside: avoid;
  }

  .safety-tips {
    page-break-inside: avoid;
  }
}
