:root {
  --bg-main: #FFFFFF;
  --bg-soft: #F5F8FC;
  --bg-card: #FFFFFF;
  --primary-blue: #0B3D91;
  --primary-dark: #082A66;
  --primary-light: #2F6FDE;
  --accent-gold: #C9A227;
  --accent-gold-light: #E6C65C;
  --accent-gold-hover: #b38f20;
  --text-main: #0F1B33;
  --text-muted: #5B6B85;
  --text-light: #8E9BAE;
  --border-color: #E2E8F0;
  --status-green: #1E9E6A;
  --status-red: #D64545;
  --status-yellow: #E0A800;
  --font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 2px 4px rgba(11, 61, 145, 0.05);
  --shadow-md: 0 4px 12px rgba(11, 61, 145, 0.08);
  --shadow-lg: 0 8px 24px rgba(11, 61, 145, 0.12);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-soft);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--primary-blue);
}

/* Common Container & Card */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

.container-narrow {
  max-width: 720px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-bottom: 24px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  min-height: 48px;
  text-align: center;
}

.btn-primary {
  background-color: var(--primary-blue);
  color: #FFFFFF;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  color: #FFFFFF;
}

.btn-gold {
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-light));
  color: #0F1B33;
  box-shadow: 0 4px 14px rgba(201, 162, 39, 0.35);
  font-weight: 700;
}

.btn-gold:hover {
  background: linear-gradient(135deg, var(--accent-gold-hover), var(--accent-gold));
  color: #0F1B33;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(201, 162, 39, 0.45);
}

.btn-whatsapp {
  background-color: #25D366;
  color: #FFFFFF;
  font-weight: 700;
}

.btn-whatsapp:hover {
  background-color: #1EBE5D;
  color: #FFFFFF;
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: #E2E8F0;
  color: var(--text-main);
}

.btn-secondary:hover {
  background-color: #CBD5E1;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
  min-height: 32px;
}

.btn-block {
  display: flex;
  width: 100%;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-live {
  background-color: var(--status-red);
  color: #FFFFFF;
  animation: pulse-live 1.5s infinite;
}

.badge-recorded {
  background-color: #4A5568;
  color: #FFFFFF;
}

.badge-gold {
  background-color: var(--accent-gold);
  color: #0F1B33;
}

.badge-blue {
  background-color: #EBF3FF;
  color: var(--primary-blue);
  border: 1px solid #D0E2FF;
}

.badge-green {
  background-color: #E6F8F0;
  color: var(--status-green);
}

@keyframes pulse-live {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.85; }
  100% { transform: scale(1); opacity: 1; }
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 27, 51, 0.7);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  max-width: 500px;
  width: 100%;
  padding: 28px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
  position: relative;
  animation: modalIn 0.25s ease-out;
}

@keyframes modalIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}

/* Form inputs */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--text-main);
  background: #FFFFFF;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(47, 111, 222, 0.15);
}

/* Video room layout */
.room-wrapper {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: #0b111e;
  color: #FFFFFF;
  overflow: hidden;
}

.room-header {
  padding: 12px 20px;
  background: #080d17;
  border-bottom: 1px solid #1a2536;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.room-main {
  display: flex;
  flex: 1;
  overflow: hidden;
}

@media (max-width: 900px) {
  .room-main {
    flex-direction: column;
  }
}

body.room-page {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

body.room-page input,
body.room-page textarea {
  user-select: text;
  -webkit-user-select: text;
}

.video-container {
  flex: 1;
  position: relative;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.video-player-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
}

.video-player-wrapper iframe,
.video-player-wrapper video {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  pointer-events: none; /* Block all mouse hover & clicks to YouTube iframe */
}

/* YouTube Masking (Crop outer boundaries to hide any logo/branding completely) */
.video-player-wrapper.video-youtube-masked iframe {
  width: 114% !important;
  height: 114% !important;
  position: absolute !important;
  top: -7% !important;
  left: -7% !important;
  pointer-events: none !important;
}

.video-overlay-shield {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  background: rgba(0, 0, 0, 0.001);
  pointer-events: auto;
  cursor: default;
}

.unmute-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 25;
  background: rgba(14, 23, 38, 0.95);
  color: var(--accent-gold);
  border: 1px solid var(--accent-gold);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.6);
  user-select: none;
  -webkit-user-select: none;
  animation: pulseGold 2s infinite;
}

/* Custom Volume Controller Bar (No Pause, No Seek) */
.custom-volume-bar {
  position: absolute;
  bottom: 16px;
  right: 16px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(14, 23, 38, 0.9);
  border: 1px solid rgba(212, 175, 55, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 6px 14px;
  border-radius: 30px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6);
  transition: all 0.2s ease;
  user-select: none;
  -webkit-user-select: none;
}

.custom-volume-bar:hover {
  background: rgba(14, 23, 38, 0.98);
  border-color: var(--accent-gold);
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.25);
}

.volume-btn {
  background: none;
  border: none;
  color: #FFFFFF;
  cursor: pointer;
  padding: 2px 4px;
  font-size: 15px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
  transition: transform 0.15s ease;
}

.volume-btn:hover {
  transform: scale(1.15);
}

.volume-slider-wrapper {
  display: flex;
  align-items: center;
  width: 80px;
}

.volume-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: #233450;
  outline: none;
  cursor: pointer;
}

.volume-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--accent-gold);
  cursor: pointer;
  box-shadow: 0 0 6px rgba(212, 175, 55, 0.8);
  transition: transform 0.15s ease;
}

.volume-range::-webkit-slider-thumb:hover {
  transform: scale(1.25);
}

.volume-range::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border: none;
  border-radius: 50%;
  background: var(--accent-gold);
  cursor: pointer;
  box-shadow: 0 0 6px rgba(212, 175, 55, 0.8);
}

.volume-percent {
  font-size: 11px;
  font-weight: 700;
  color: #C0CFE3;
  min-width: 28px;
  font-family: monospace;
}

@media (max-width: 600px) {
  .custom-volume-bar {
    bottom: 10px;
    right: 10px;
    padding: 5px 10px;
    gap: 8px;
  }
  .volume-slider-wrapper {
    width: 60px;
  }
}

@keyframes pulseGold {
  0% { transform: scale(1); }
  50% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

/* Chat container */
.chat-container {
  width: 360px;
  background: #0e1726;
  border-left: 1px solid #1c2b42;
  display: flex;
  flex-direction: column;
}

@media (max-width: 900px) {
  .chat-container {
    width: 100%;
    height: 45vh;
    border-left: none;
    border-top: 1px solid #1c2b42;
  }
}

.chat-header {
  padding: 12px 16px;
  background: #131f33;
  border-bottom: 1px solid #1c2b42;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-messages {
  flex: 1;
  padding: 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-bubble {
  font-size: 13.5px;
  line-height: 1.45;
  background: #17243a;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #233452;
  word-wrap: break-word;
}

.chat-bubble.bubble-moderator {
  border-left: 3px solid var(--accent-gold);
  background: #1c2738;
}

.chat-bubble.bubble-system {
  background: #1f2330;
  border: 1px dashed var(--accent-gold-light);
  color: var(--accent-gold-light);
  text-align: center;
  font-size: 12.5px;
}

.chat-sender {
  font-weight: 700;
  margin-bottom: 2px;
  color: #79a8ff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat-sender.sender-mod {
  color: var(--accent-gold);
}

.chat-input-bar {
  padding: 12px;
  background: #131f33;
  border-top: 1px solid #1c2b42;
  display: flex;
  gap: 8px;
}

/* Room Events (Banner CTA / Poll) */
.room-banner-cta {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(11, 25, 44, 0.95);
  border: 2px solid var(--accent-gold);
  border-radius: var(--radius-md);
  padding: 16px 24px;
  color: #FFFFFF;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  z-index: 50;
  max-width: 500px;
  width: 90%;
  text-align: center;
  animation: bannerSlideUp 0.3s ease-out;
}

@keyframes bannerSlideUp {
  from { transform: translate(-50%, 20px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}
