* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  user-select: none;
}

body, html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #050508;
  color: #fff;
}

#container {
  position: relative;
  width: 100vw;
  height: 100vh;
  margin: 0 auto;
}

/* Chuẩn tỷ lệ 9:16 dọc điện thoại khi dùng cho OBS */
body.obs-mode #container {
  width: calc(100vh * 9 / 16);
  max-width: 100vw;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
}

body.obs-mode #scene-selector {
  display: none !important;
}

#canvas3d {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* Header */
#overlay-header {
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
  pointer-events: none;
}

.room-badge {
  background: rgba(15, 12, 25, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 215, 0, 0.3);
  padding: 8px 16px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.5px;
  color: #ffd966;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.user-stats {
  background: rgba(0, 0, 0, 0.6);
  padding: 6px 14px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #00ff88;
  border-radius: 50%;
  box-shadow: 0 0 10px #00ff88;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.7; }
}

/* Guide Banner */
#guide-banner {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  z-index: 10;
  pointer-events: none;
}

.guide-box {
  background: rgba(10, 8, 20, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  padding: 10px 16px;
  border-radius: 12px;
  text-align: center;
  font-size: 13px;
  line-height: 1.4;
  color: #f0f0f5;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
}

/* Thông báo tặng quà */
#announcement-card {
  position: absolute;
  top: 90px;
  left: 20px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.25), rgba(255, 100, 50, 0.15));
  border: 1px solid #ffd700;
  backdrop-filter: blur(12px);
  padding: 10px 16px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 15;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#announcement-card.hidden {
  opacity: 0;
  transform: translateY(-20px) scale(0.9);
  pointer-events: none;
}

.avatar-ring img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid #ffd700;
  object-fit: cover;
}

.ann-user {
  font-size: 13px;
  font-weight: 700;
  color: #ffd700;
}

.ann-action {
  font-size: 12px;
  color: #ffffff;
}

#sfx-badge {
  position: absolute;
  top: 70px;
  right: 20px;
  background: rgba(20, 16, 32, 0.8);
  border: 1px solid rgba(255, 215, 0, 0.3);
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 700;
  color: #ffd966;
  z-index: 10;
}

/* Scene Switcher */
#scene-selector {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 20;
}

.scene-btn {
  background: rgba(20, 20, 30, 0.85);
  color: #bbb;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 10px 18px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
}

.scene-btn.active, .scene-btn:hover {
  background: #ffd700;
  color: #111;
  border-color: #ffd700;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}
