/* ============================================
   MARTA — Day/Night Themes
   ============================================ */

/* --- Day Mode (default) --- */
.theme-day {
  --window-sky: linear-gradient(180deg, #87CEEB 0%, #B8E4F9 50%, #E8F4FD 100%);
  --window-light: rgba(255, 236, 179, 0.3);
  --room-ambient: rgba(255, 248, 240, 1);
  --sun-opacity: 1;
  --moon-opacity: 0;
  --stars-opacity: 0;
}

/* --- Sunset Mode --- */
.theme-sunset {
  --window-sky: linear-gradient(180deg, #FF6B6B 0%, #FFB347 30%, #FFD93D 60%, #87CEEB 100%);
  --window-light: rgba(255, 179, 71, 0.25);
  --room-ambient: rgba(255, 245, 235, 1);
  --sun-opacity: 0.8;
  --moon-opacity: 0;
  --stars-opacity: 0;
}

/* --- Night Mode --- */
.theme-night {
  --window-sky: linear-gradient(180deg, #0F0C29 0%, #1B1464 50%, #2B2070 100%);
  --window-light: rgba(255, 236, 179, 0.08);
  --room-ambient: rgba(42, 38, 60, 0.15);
  --sun-opacity: 0;
  --moon-opacity: 1;
  --stars-opacity: 1;
}

/* Night overlay on the room */
.night-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 12, 41, 0);
  transition: background 2s ease;
  pointer-events: none;
  z-index: 2;
}

.theme-night .night-overlay {
  background: rgba(15, 12, 41, 0.15);
}

/* Window element */
.room-window {
  position: absolute;
  top: 8%;
  right: 8%;
  width: 30%;
  height: 35%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 6px solid #DDD0C0;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.1), var(--shadow-soft);
}

.room-window-sky {
  position: absolute;
  inset: 0;
  background: var(--window-sky);
  transition: background 2s ease;
}

/* Sun */
.room-window-sun {
  position: absolute;
  width: 40px;
  height: 40px;
  background: radial-gradient(circle, #FFE66D, #FFD93D);
  border-radius: 50%;
  top: 20%;
  left: 25%;
  opacity: var(--sun-opacity);
  transition: opacity 2s ease;
  box-shadow: 0 0 30px rgba(255, 217, 61, 0.6);
}

/* Sun rays */
.room-window-sun::after {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 230, 109, 0.3), transparent 70%);
  animation: energyGlow 3s ease-in-out infinite;
}

/* Moon */
.room-window-moon {
  position: absolute;
  width: 32px;
  height: 32px;
  background: radial-gradient(circle at 35% 35%, #F5F5DC, #E8E4D4);
  border-radius: 50%;
  top: 15%;
  right: 25%;
  opacity: var(--moon-opacity);
  transition: opacity 2s ease;
  box-shadow: 0 0 20px rgba(245, 245, 220, 0.4);
}

/* Moon craters */
.room-window-moon::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 50%;
  top: 30%;
  left: 40%;
  box-shadow: 6px 8px 0 3px rgba(0,0,0,0.04), -3px 12px 0 2px rgba(0,0,0,0.03);
}

/* Stars */
.room-window-stars {
  position: absolute;
  inset: 0;
  opacity: var(--stars-opacity);
  transition: opacity 2s ease;
}

.window-star {
  position: absolute;
  width: 3px;
  height: 3px;
  background: #FFF;
  border-radius: 50%;
  animation: starTwinkle 2s ease-in-out infinite;
}

.window-star:nth-child(1) { top: 15%; left: 20%; animation-delay: 0s; }
.window-star:nth-child(2) { top: 30%; left: 60%; animation-delay: 0.7s; }
.window-star:nth-child(3) { top: 10%; left: 80%; animation-delay: 1.3s; }
.window-star:nth-child(4) { top: 50%; left: 40%; animation-delay: 0.4s; }
.window-star:nth-child(5) { top: 25%; left: 10%; animation-delay: 1.8s; }
.window-star:nth-child(6) { top: 45%; left: 75%; animation-delay: 0.9s; }
.window-star:nth-child(7) { top: 60%; left: 30%; animation-delay: 1.5s; }
.window-star:nth-child(8) { top: 55%; left: 90%; animation-delay: 0.2s; }

/* Window light rays (day) */
.window-light-rays {
  position: absolute;
  top: 8%;
  right: 5%;
  width: 40%;
  height: 60%;
  background: linear-gradient(
    135deg,
    var(--window-light) 0%,
    transparent 60%
  );
  clip-path: polygon(30% 0%, 100% 0%, 100% 100%, 0% 100%);
  opacity: var(--sun-opacity);
  transition: opacity 2s ease;
  pointer-events: none;
  z-index: 1;
}

/* Room floor */
.room-floor {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 25%;
  background: linear-gradient(180deg, #E8D5B8 0%, #DCC9AC 100%);
  border-top: 2px solid rgba(0, 0, 0, 0.05);
}

/* Room wall */
.room-wall {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #FFF5EC 0%, #FFEFE0 70%, #E8D5B8 70%);
}

.room-wall::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 100% 25px;
  pointer-events: none;
}

/* Cozy wall decoration - picture frame */
.wall-frame {
  position: absolute;
  top: 12%;
  left: 10%;
  width: 18%;
  height: 22%;
  border: 4px solid #C4A882;
  border-radius: 6px;
  background: linear-gradient(135deg, #FFF5E8, #FFE8D0);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08), inset 0 0 0 1px rgba(255,255,255,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Sleep mode specific */
.sleep-mode .room-wall {
  background: linear-gradient(180deg, #1a1540 0%, #2B2070 70%, #1a1540 70%);
  transition: background 1.5s ease;
}

.sleep-mode .room-floor {
  background: linear-gradient(180deg, #1a1540 0%, #15102E 100%);
  transition: background 1.5s ease;
}

.sleep-mode .wall-frame {
  opacity: 0.3;
  transition: opacity 1.5s ease;
}

/* Indoor warm light (lamp) */
.room-lamp {
  position: absolute;
  bottom: 25%;
  left: 5%;
  width: 40px;
  z-index: 1;
}

.room-lamp-shade {
  width: 40px;
  height: 30px;
  background: linear-gradient(180deg, #FFE4B5, #FFD093);
  border-radius: 50% 50% 0 0;
  position: relative;
}

.room-lamp-light {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 120px;
  background: radial-gradient(ellipse at top, rgba(255, 228, 181, 0.3), transparent 80%);
  pointer-events: none;
}

.theme-night .room-lamp-light {
  background: radial-gradient(ellipse at top, rgba(255, 228, 181, 0.5), transparent 80%);
}

.room-lamp-stand {
  width: 6px;
  height: 40px;
  background: #C4A882;
  margin: 0 auto;
  border-radius: 0 0 3px 3px;
}

/* Plant decoration */
.room-plant {
  position: absolute;
  bottom: 25%;
  right: 5%;
  z-index: 1;
}

.plant-pot {
  width: 30px;
  height: 24px;
  background: linear-gradient(180deg, #D4826A, #C4725A);
  border-radius: 2px 2px 6px 6px;
  position: relative;
}

.plant-pot::before {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  height: 6px;
  background: #D4826A;
  border-radius: 3px;
}

.plant-leaves {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
}

.plant-leaf {
  position: absolute;
  width: 16px;
  height: 24px;
  background: #6BCB77;
  border-radius: 50% 50% 50% 0;
  transform-origin: bottom center;
}

.plant-leaf:nth-child(1) { transform: rotate(-30deg) translateY(-5px) translateX(-8px); }
.plant-leaf:nth-child(2) { transform: rotate(20deg) translateY(-8px) translateX(2px); }
.plant-leaf:nth-child(3) { transform: rotate(-10deg) translateY(-15px) translateX(-3px); background: #5EBA6F; }

/* Kitchen background for feeding screen */
.kitchen-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #FFF8F0 0%, #FFF2E6 65%, #E8D5B8 65%);
}

.kitchen-tiles {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 65%;
  background-image:
    linear-gradient(rgba(255,255,255,0.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.3) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.5;
}

.kitchen-counter {
  position: absolute;
  bottom: 35%;
  left: 0;
  right: 0;
  height: 8px;
  background: linear-gradient(180deg, #C4A882, #B89A76);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
