﻿:root {
  --bg-dark: #000000;
  --accent: #ffd700;
  /* Gold */
  --glass: rgba(20, 20, 20, 0.6);
  --glass-border: rgba(255, 255, 255, 0.1);
  --text: #ffffff;
  --font-display: 'Mountains of Christmas', cursive;
  --font-body: 'Noto Sans SC', sans-serif;
}

* {
  box-sizing: border-box;
}

body,
html {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg-dark);
  font-family: var(--font-body);
  color: var(--text);
}

/* Full Screen Scene */
.scene {
  position: absolute;
  inset: 0;
  background: #000000;
  overflow: hidden;
}

.scene::before {
  content: none;
}

.scene::after {
  content: none;
}

#tree-canvas {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1;
}

/* Layers */
.decor-layer,
.album-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

/* UI Overlay */
.ui-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  z-index: 10;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: auto;
  background: transparent;
  padding: 12px 24px;
}

.top-bar h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--accent);
  letter-spacing: 1px;
}

.controls {
  display: flex;
  gap: 16px;
  align-items: center;
}

.primary-btn {
  background: rgba(255, 215, 0, 0.1);
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 8px 20px;
  border-radius: 20px;
  font-weight: bold;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 1px;
}

.primary-btn:hover {
  background: var(--accent);
  color: #000;
  box-shadow: 0 0 20px var(--accent), inset 0 0 10px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.status-text {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

.legend-bar {
  position: absolute;
  top: 100px;
  left: 24px;
  background: rgba(10, 14, 39, 0.5);
  padding: 16px;
  border-radius: 16px;
  border-left: 3px solid var(--accent);
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: auto;
  box-shadow: 0 4px 30px rgba(255, 215, 0, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 215, 0, 0.15);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  color: #ddd;
}

.icon {
  font-size: 1.2rem;
}

/* PIP Camera */
.camera-pip {
  position: absolute;
  bottom: 24px;
  right: 24px;
  width: 200px;
  background: rgba(10, 14, 39, 0.6);
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid rgba(255, 215, 0, 0.3);
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  pointer-events: auto;
  backdrop-filter: blur(10px);
}

.video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
}

video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: none;
  opacity: 0.8;
}

.overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hint {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.8);
  color: var(--accent);
  font-size: 12px;
  text-align: center;
  padding: 6px;
  font-weight: bold;
}

/* Decorations & Photos */
.decor {
  position: absolute;
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: star-pop 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.6));
}

.decor img {
  width: 100%;
  height: 100%;
}

.photo-card {
  position: absolute;
  width: 140px;
  height: 170px;
  background: #fff;
  padding: 6px 6px 24px 6px;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
  transform-origin: center top;
  animation: swing-in 1s ease-out forwards;
  z-index: 10;
}

.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #eee;
}

@keyframes star-pop {
  0% {
    transform: scale(0) rotate(-180deg);
    opacity: 0;
  }

  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

@keyframes swing-in {
  0% {
    transform: translateY(-50px) rotate(10deg) scale(0.8);
    opacity: 0;
  }

  100% {
    transform: translateY(0) rotate(var(--rot)) scale(1);
    opacity: 1;
  }
}

@media (max-width: 768px) {
  .camera-pip {
    width: 120px;
    bottom: 16px;
    right: 16px;
  }

  .top-bar {
    padding: 10px 16px;
  }

  .top-bar h1 {
    font-size: 1.2rem;
  }

  .legend-bar {
    top: auto;
    bottom: 160px;
    left: 16px;
    padding: 12px;
  }
}