/**
 * RC8 — Companion Premium Living Room Pass
 * Presentation only — ambient life, UI polish, claim FX.
 */

/* ===== PART 2 — Living room ambience ===== */
.companion-ambience {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.companion-ambience__fog {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 100%, rgba(255, 105, 180, 0.08), transparent 70%);
  animation: rc8-fog-drift 18s ease-in-out infinite alternate;
}

.companion-ambience__light-rays {
  position: absolute;
  inset: 0;
  background: linear-gradient(125deg, transparent 40%, rgba(255, 248, 220, 0.04) 48%, transparent 56%);
  animation: rc8-light-sweep 14s ease-in-out infinite;
}

.companion-ambience__neon-edge {
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 24px rgba(56, 189, 248, 0.12);
  animation: rc8-neon-flicker 5s ease-in-out infinite;
}

.companion-ambience__monitor-flicker {
  position: absolute;
  top: 12%;
  right: 8%;
  width: 18%;
  height: 14%;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.06);
  animation: rc8-monitor-flicker 3.2s steps(2) infinite;
  opacity: 0.5;
}

.companion-ambience__vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.35) 100%);
  animation: rc8-vignette-breathe 8s ease-in-out infinite;
}

.companion-ambience__glow {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 60%;
  height: 30%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(255, 105, 180, 0.12), transparent 70%);
}

.companion-ambience__dust,
.companion-ambience__particles {
  position: absolute;
  inset: 0;
}

.companion-ambience__dust-speck {
  position: absolute;
  left: var(--dust-x, 50%);
  top: var(--dust-y, 50%);
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  animation: rc8-dust-float var(--dust-duration, 16s) ease-in-out infinite;
  animation-delay: var(--dust-delay, 0s);
}

.companion-ambience__particle {
  position: absolute;
  left: var(--p-x, 50%);
  bottom: 15%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 215, 0, 0.25);
  animation: rc8-particle-rise 6s ease-out infinite;
  animation-delay: var(--p-delay, 0s);
}

.companion-ambience--paused,
.companion-ambience--paused * {
  animation-play-state: paused !important;
}

.companion-scene--claim-glow {
  box-shadow:
    inset 0 0 40px rgba(255, 215, 0, 0.25),
    0 0 28px rgba(255, 105, 180, 0.35);
  transition: box-shadow 0.35s ease;
}

/* ===== PART 3 — Camera breathing ===== */
.companion-scene--camera {
  animation: rc8-scene-breathe 9s ease-in-out infinite;
  transform-origin: center center;
}

.companion-scene--camera .cat-room-scene-bg {
  will-change: transform;
}

.companion-scene--camera .cat-room-scene-furniture,
.companion-scene--camera .cat-room-scene-pet {
  will-change: transform;
}

/* ===== PART 5 — Claim FX ===== */
.companion-claim-coin-burst {
  position: absolute;
  width: 18px;
  height: 18px;
  pointer-events: none;
  z-index: 20;
  transform: translate(-50%, -50%);
  animation: rc8-coin-burst 0.85s ease-out forwards;
}

.companion-balance-pulse {
  animation: rc8-balance-pulse 0.55s ease-out;
}

.cat-room-pet-sparkle {
  position: absolute;
  color: #ffd700;
  font-size: 0.85rem;
  pointer-events: none;
  text-shadow: 0 0 6px rgba(255, 215, 0, 0.8);
}

/* ===== PART 6 — UI polish (glass / depth / buttons) ===== */
.cat-room-full {
  background: linear-gradient(165deg, rgba(10, 8, 22, 0.97), rgba(6, 12, 28, 0.98));
  border: 1px solid rgba(255, 105, 180, 0.35);
  box-shadow:
    0 0 40px rgba(255, 105, 180, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
}

.cat-room-shop {
  background: rgba(4, 8, 20, 0.55);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 14px;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
}

.cat-room-full .btn,
.cat-room-panel .btn {
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    filter 0.18s ease;
}

.cat-room-full .btn:not(:disabled):hover,
.cat-room-panel .btn:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(255, 105, 180, 0.25);
  filter: brightness(1.06);
}

.cat-room-full .btn:not(:disabled):active,
.cat-room-panel .btn:not(:disabled):active {
  transform: translateY(1px) scale(0.98);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.cat-room-full .btn.primary:not(:disabled):hover {
  box-shadow: 0 4px 18px rgba(255, 105, 180, 0.4), 0 0 12px rgba(56, 189, 248, 0.2);
}

.cat-room-claim-btn--ready {
  animation: rc8-claim-ready-pulse 2.4s ease-in-out infinite;
}

/* ===== PART 7 — Premium shop cards ===== */
.cat-room-shop-card--premium {
  grid-template-columns: 64px 1fr auto;
  padding: 0.55rem;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(8, 12, 28, 0.85), rgba(4, 8, 18, 0.9));
  border: 1px solid rgba(56, 189, 248, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 2px 8px rgba(0, 0, 0, 0.35);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.cat-room-shop-card--premium:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 105, 180, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 6px 18px rgba(255, 105, 180, 0.15);
}

.cat-room-shop-card-preview {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.cat-room-shop-card-preview img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}

.cat-room-shop-bonus {
  color: #4ade80;
  margin: 0.12rem 0 0;
  font-size: 0.66rem;
  font-weight: 600;
}

.cat-room-capsule-card.cat-room-shop-card--premium .cat-room-capsule-icon {
  font-size: 2rem;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
}

/* ===== Keyframes ===== */
@keyframes rc8-fog-drift {
  from { opacity: 0.6; transform: translateY(0); }
  to { opacity: 0.9; transform: translateY(-6px); }
}

@keyframes rc8-light-sweep {
  0%, 100% { opacity: 0.3; transform: translateX(-5%); }
  50% { opacity: 0.7; transform: translateX(5%); }
}

@keyframes rc8-neon-flicker {
  0%, 100% { opacity: 0.85; }
  48% { opacity: 1; }
  50% { opacity: 0.7; }
  52% { opacity: 1; }
}

@keyframes rc8-monitor-flicker {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.65; }
}

@keyframes rc8-vignette-breathe {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}

@keyframes rc8-dust-float {
  0% { transform: translate(0, 0); opacity: 0; }
  15% { opacity: 0.6; }
  85% { opacity: 0.4; }
  100% { transform: translate(8px, -24px); opacity: 0; }
}

@keyframes rc8-particle-rise {
  0% { transform: translateY(0); opacity: 0; }
  20% { opacity: 0.5; }
  100% { transform: translateY(-40px); opacity: 0; }
}

@keyframes rc8-scene-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.003); }
}

@keyframes rc8-coin-burst {
  0% { transform: translate(-50%, -50%) scale(0.4); opacity: 1; }
  100% {
    transform: translate(calc(-50% + var(--burst-x, 0)), calc(-50% + var(--burst-y, -40px))) rotate(var(--burst-rot, 0deg)) scale(0.8);
    opacity: 0;
  }
}

@keyframes rc8-balance-pulse {
  0% { transform: scale(1); color: inherit; }
  40% { transform: scale(1.12); color: #fbbf24; text-shadow: 0 0 8px rgba(251, 191, 36, 0.6); }
  100% { transform: scale(1); color: inherit; }
}

@keyframes rc8-claim-ready-pulse {
  0%, 100% { box-shadow: 0 0 0 rgba(255, 215, 0, 0); }
  50% { box-shadow: 0 0 14px rgba(255, 215, 0, 0.35); }
}

@media (prefers-reduced-motion: reduce) {
  .companion-ambience *,
  .companion-scene--camera,
  .cat-room-claim-btn--ready {
    animation: none !important;
  }

  .cat-room-shop-card--premium:hover,
  .cat-room-full .btn:not(:disabled):hover {
    transform: none;
  }
}
