@import url('https://fonts.googleapis.com/css2?family=Rye&family=Yellowtail&family=Inter:wght@400;500;600;800&display=swap');

:root {
  --bg-color: #000000;
  --text-color: #ffffff;
  --golden-yellow: #ffc107;
  --danger-color: #ef4444;
  --danger-hover: #dc2626;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  overflow-x: hidden;
}

/* Common Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Typography */
.western-font {
  font-family: 'Rye', serif;
}

.cursive-font {
  font-family: 'Yellowtail', cursive;
}

/* Host Dashboard Header */
.header {
  text-align: center;
  margin-bottom: 3rem;
  padding: 3rem 1rem;
  background-color: var(--golden-yellow);
  border-radius: 2rem;
  border: 4px solid var(--golden-yellow);
  box-shadow: 0 0 40px rgba(255, 193, 7, 0.4);
}

.header h1 {
  font-family: 'Rye', serif;
  font-size: 3.5rem;
  margin: 0;
  letter-spacing: 2px;
  color: #000;
  text-transform: uppercase;
}

.header p {
  font-size: 1.25rem;
  font-weight: 600;
  color: #000;
  font-family: 'Inter', sans-serif;
  margin-top: 1rem;
}

/* Host Controls Grid */
.group-section {
  margin-bottom: 3rem;
}

.group-title {
  border-bottom: 4px dashed var(--golden-yellow);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
  color: var(--golden-yellow);
  font-family: 'Rye', serif;
  font-size: 2.5rem;
  letter-spacing: 1px;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

button {
  background-color: #000;
  color: var(--golden-yellow);
  border: 3px solid var(--golden-yellow);
  padding: 1rem;
  border-radius: 0;
  cursor: pointer;
  transition: all 0.1s ease;
  font-size: 1.1rem;
  font-weight: 800;
  font-family: 'Inter', sans-serif;
  text-transform: uppercase;
  box-shadow: 4px 4px 0px var(--golden-yellow);
}

button:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px #fff;
  background-color: var(--golden-yellow);
  color: #000;
  border-color: #fff;
}

button:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px var(--golden-yellow);
}

button.active {
  background-color: var(--golden-yellow);
  color: #000;
  box-shadow: inset 4px 4px 0px rgba(0,0,0,0.4);
  transform: translate(2px, 2px);
}

button.danger {
  background-color: #000;
  color: var(--danger-color);
  border-color: var(--danger-color);
  box-shadow: 4px 4px 0px var(--danger-color);
}

button.danger:hover {
  background-color: var(--danger-color);
  color: white;
  box-shadow: 6px 6px 0px var(--danger-hover);
}

/* Master Controls */
.master-controls {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 3rem;
  padding: 2rem;
  background: #000;
  border: 4px solid var(--golden-yellow);
  border-radius: 1rem;
  box-shadow: 0 0 20px rgba(255, 193, 7, 0.2);
  flex-wrap: wrap;
}

.master-controls button {
  min-width: 180px;
}

/* Display & Member Screen Styles */
.fullscreen-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.media-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  pointer-events: none;
}

.media-layer.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 10;
}

video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background-color: #000;
}

/* Idle Screen Wavy Blob Design */
.logo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #000;
  overflow: hidden;
}

.blob-background {
  position: absolute;
  width: 95vw;
  height: 90vh;
  max-width: 1600px;
  max-height: 900px;
  background-color: var(--golden-yellow);
  border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
  animation: blob-morph 10s ease-in-out infinite alternate;
  z-index: -1;
}

@keyframes blob-morph {
  0% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; transform: scale(1) rotate(0deg); }
  33% { border-radius: 70% 30% 50% 50% / 30% 30% 70% 70%; transform: scale(1.05) rotate(2deg); }
  66% { border-radius: 100% 60% 60% 100% / 100% 100% 60% 60%; transform: scale(0.95) rotate(-2deg); }
  100% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; transform: scale(1) rotate(0deg); }
}

.flyer-content {
  text-align: center;
  color: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem;
  z-index: 1;
  max-width: 90%;
}

.forty-years {
  font-family: 'Rye', serif;
  font-size: 3.5rem;
  letter-spacing: 2px;
}

.main-title {
  font-family: 'Rye', serif;
  font-size: 5.5rem;
  line-height: 1.1;
  margin: 1rem 0;
  letter-spacing: 3px;
}

.cursive-text {
  font-family: 'Yellowtail', cursive;
  font-size: 4rem;
  margin: 0.5rem 0;
  transform: rotate(-3deg);
}

.location {
  font-family: 'Rye', serif;
  font-size: 2.5rem;
  margin: 1rem 0 0.5rem 0;
  letter-spacing: 2px;
}

.date {
  font-family: 'Rye', serif;
  font-size: 2rem;
  margin: 0;
  letter-spacing: 3px;
}

@media (max-width: 768px) {
  .main-title { font-size: 3rem; }
  .forty-years { font-size: 2rem; }
  .cursive-text { font-size: 2.5rem; }
  .location { font-size: 1.5rem; }
  .date { font-size: 1.25rem; }
  
  .schedule-header { font-size: 2.5rem; margin-bottom: 1rem; }
  .schedule-item { font-size: 1.2rem; padding-bottom: 0.75rem; }
  .schedule-content { width: 95%; gap: 0.75rem; }
  .schedule-time { padding: 0.25rem 0.75rem; }
}

/* Host Webcam local preview */
#local-webcam-preview {
  width: 100%;
  max-width: 400px;
  border-radius: 0.5rem;
  margin-top: 1rem;
  display: none;
  border: 4px solid var(--golden-yellow);
  box-shadow: 0 0 20px rgba(255, 193, 7, 0.3);
}
#local-webcam-preview.active {
  display: block;
}

/* Webcam Display Layer Styles */
#layer-webcam {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #000;
}

#webcam-video {
  width: 90vw;
  height: 85vh;
  max-width: 1400px;
  max-height: 800px;
  object-fit: cover;
  border: 15px solid var(--golden-yellow);
  border-radius: 3rem;
  animation: webcam-glow 3s infinite alternate;
}

@keyframes webcam-glow {
  0% { box-shadow: 0 0 30px rgba(255, 193, 7, 0.4); }
  100% { box-shadow: 0 0 80px rgba(255, 193, 7, 0.9); }
}

/* Lower Third Styles */
.lower-third {
  position: absolute;
  bottom: 10%;
  left: 5%;
  background: var(--golden-yellow);
  border: 4px solid #000;
  box-shadow: 8px 8px 0px rgba(0,0,0,0.5);
  padding: 1.5rem 2.5rem;
  border-radius: 1rem;
  transform: translateX(-150vw);
  transition: transform 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 20;
}

.lower-third.show {
  transform: translateX(0);
}

.lt-group {
  font-family: 'Rye', serif;
  font-size: 1.5rem;
  color: #000;
  border-bottom: 3px dashed #000;
  padding-bottom: 0.5rem;
  margin-bottom: 0.5rem;
}

.lt-title {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 3rem;
  color: #000;
  text-transform: uppercase;
}

#layer-schedule {
  background-color: var(--golden-yellow) !important;
  overflow-y: auto;
}

#layer-schedule .blob-background {
  display: none !important;
}

/* Schedule Styles */
.schedule-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 85%;
  max-width: 1000px;
  z-index: 1;
}

.schedule-header {
  font-family: 'Rye', serif;
  font-size: 5rem;
  letter-spacing: 2px;
  border-bottom: 6px dashed #000;
  padding-bottom: 1rem;
  margin-bottom: 2rem;
  text-align: center;
  color: #000;
}

.schedule-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 2.5rem;
  text-transform: uppercase;
  border-bottom: 3px solid rgba(0,0,0,0.1);
  padding-bottom: 1.5rem;
  color: #000;
}

.schedule-time {
  color: var(--golden-yellow);
  background: #000;
  padding: 0.5rem 1.5rem;
  border-radius: 0.5rem;
  box-shadow: 4px 4px 0px rgba(0,0,0,0.5);
  border: 3px solid #000;
}

.schedule-activity {
  flex: 1;
  text-align: right;
  padding-left: 2rem;
}

/* Initialization Overlay */
#init-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
#init-overlay button {
  font-size: 2rem;
  font-family: 'Rye', serif;
  padding: 1.5rem 3rem;
  background-color: #000;
  color: var(--golden-yellow);
  border: 4px solid var(--golden-yellow);
  box-shadow: 0 0 20px rgba(255, 193, 7, 0.3);
}
#init-overlay.hidden {
  display: none;
}

/* Animated Newt Characters */
.newts {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}

.newt {
  position: absolute;
  max-width: 450px;
  max-height: 500px;
  opacity: 0;
  animation: 35s infinite cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(6px 6px 0px rgba(0,0,0,1));
}

@keyframes newt-float {
  0%   { transform: translateY(100px) rotate(-10deg); opacity: 0; }
  5%   { transform: translateY(0) rotate(5deg); opacity: 1; }
  20%  { transform: translateY(-20px) rotate(-5deg); opacity: 1; }
  35%  { transform: translateY(0) rotate(5deg); opacity: 1; }
  50%  { transform: translateY(50px) rotate(15deg); opacity: 0; }
  100% { transform: translateY(100px) rotate(0deg); opacity: 0; }
}

@keyframes newt-float-side {
  0%   { transform: translateX(100px) rotate(30deg); opacity: 0; }
  5%   { transform: translateX(0) rotate(-5deg); opacity: 1; }
  20%  { transform: translateX(-20px) rotate(5deg); opacity: 1; }
  35%  { transform: translateX(0) rotate(-5deg); opacity: 1; }
  50%  { transform: translateX(50px) rotate(-15deg); opacity: 0; }
  100% { transform: translateX(100px) rotate(0deg); opacity: 0; }
}

@keyframes newt-float-left {
  0%   { transform: translateX(-100px) rotate(-30deg); opacity: 0; }
  5%   { transform: translateX(0) rotate(5deg); opacity: 1; }
  20%  { transform: translateX(20px) rotate(-5deg); opacity: 1; }
  35%  { transform: translateX(0) rotate(5deg); opacity: 1; }
  50%  { transform: translateX(-50px) rotate(15deg); opacity: 0; }
  100% { transform: translateX(-100px) rotate(0deg); opacity: 0; }
}

.newt-1 { bottom: 5%; left: 15%; animation-name: newt-float; animation-delay: 0s; }
.newt-2 { top: 15%; right: 5%; animation-name: newt-float-side; animation-delay: 5s; }
.newt-3 { bottom: 10%; right: 15%; animation-name: newt-float; animation-delay: 10s; }
.newt-4 { top: 40%; left: 2%; animation-name: newt-float-left; animation-delay: 15s; }
.newt-5 { top: -5%; left: 40%; animation-name: newt-float; animation-delay: 20s; }
.newt-6 { bottom: 20%; right: -2%; animation-name: newt-float-side; animation-delay: 25s; max-height: 600px; max-width: 550px; }
.newt-7 { bottom: 8%; left: 45%; animation-name: newt-float; animation-delay: 30s; }

/* Now Playing Widget */
#now-playing-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none; /* Controlled dynamically */
  align-items: center;
  justify-content: center;
}

#webcam-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 1010; /* Sits on top of the now-playing modal */
  display: none; /* Controlled dynamically */
  align-items: center;
  justify-content: center;
}

.now-playing-card {
  width: 90%;
  max-width: 800px;
  background: #000;
  border: 4px solid var(--golden-yellow);
  border-radius: 1.5rem;
  padding: 2rem;
  box-shadow: 0 0 35px rgba(255, 193, 7, 0.35);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  animation: modal-pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modal-pop {
  0% { transform: scale(0.9) translateY(20px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.live-dot {
  width: 12px;
  height: 12px;
  background-color: var(--danger-color);
  border-radius: 50%;
  display: inline-block;
  animation: pulse-live 1s infinite alternate;
}

@keyframes pulse-live {
  0% { transform: scale(0.85); opacity: 0.5; box-shadow: 0 0 0 rgba(239, 68, 68, 0); }
  100% { transform: scale(1.15); opacity: 1; box-shadow: 0 0 10px rgba(239, 68, 68, 0.8); }
}

.now-playing-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 3px dashed var(--golden-yellow);
  padding-bottom: 1rem;
}

.now-playing-header h2 {
  font-family: 'Rye', serif;
  font-size: 2.2rem;
  margin: 0;
  color: var(--golden-yellow);
  text-transform: uppercase;
}

#now-playing-group {
  font-family: 'Yellowtail', cursive;
  font-size: 2rem;
  color: var(--golden-yellow);
  transform: rotate(-2deg);
}

.now-playing-body {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  width: 100%;
}

#host-video-preview {
  width: 100%;
  max-width: 480px;
  aspect-ratio: 16/9;
  border: 3px solid var(--golden-yellow);
  border-radius: 0.5rem;
  background-color: #111;
  object-fit: contain;
}

.controls-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
  flex-wrap: wrap;
}

#btn-toggle-video {
  min-width: 180px;
}

#scrub-slider {
  flex: 1;
  height: 8px;
  -webkit-appearance: none;
  background: #222;
  border: 2px solid var(--golden-yellow);
  border-radius: 4px;
  outline: none;
  cursor: pointer;
}

#scrub-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--golden-yellow);
  cursor: pointer;
  border: 2px solid #000;
  box-shadow: 0 0 10px rgba(255, 193, 7, 0.8);
  transition: transform 0.1s ease;
}

#scrub-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

#time-display {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--golden-yellow);
  min-width: 120px;
  text-align: right;
}
