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

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background-image: url('../images/fondo.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: clamp(10px, 3vw, 30px);
}

.container {
  max-width: 100%;
  width: clamp(300px, 90vw, 800px);
  margin: 0 auto;
  padding: clamp(15px, 4vw, 30px);
  background-color: rgba(255, 255, 255, 0.85);
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.9);
  overflow: hidden;
}

.header-logo {
  width: clamp(150px, 50%, 250px);
  height: auto;
  display: block;
  margin: 0 auto clamp(15px, 4vw, 30px);
}

.video-section {
  margin-bottom: clamp(20px, 5vw, 30px);
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #000;
  border-radius: 8px;
  overflow: hidden;
}

.video-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}

#live-video,
#offline-image,
#loading-message {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  object-fit: cover;
}

#loading-message {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.85);
  color: white;
  font-size: 1.4rem;
  z-index: 3;
}

#offline-image {
  display: none;
  z-index: 2;
}

#live-video {
  display: none;
  z-index: 1;
}

iframe {
  width: 100%;
  height: 100%;
  border: none;
}

header {
  text-align: center;
  margin-bottom: clamp(20px, 5vw, 30px);
}

h1 {
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  margin-bottom: clamp(10px, 3vw, 15px);
}

h2 {
  text-align: center;
  font-size: clamp(1.3rem, 4vw, 1.8rem);
  margin-bottom: clamp(10px, 3vw, 15px);
}

p {
  font-size: clamp(0.9rem, 2.5vw, 1rem);
  margin-bottom: clamp(10px, 3vw, 15px);
}

.social-links {
  margin-top: clamp(20px, 5vw, 30px);
}

.buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(10px, 3vw, 20px);
  justify-content: center;
}

.social-link {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 100px;
  transition: transform 0.3s;
}

.social-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.social-link:hover {
  transform: scale(1.1);
}

footer {
  text-align: center;
  margin-top: clamp(20px, 5vw, 30px);
  font-size: clamp(0.8rem, 2vw, 0.9rem);
}

.live-button {
  text-align: center;
  margin-top: clamp(20px, 5vw, 30px);
}

.button {
  display: inline-block;
  padding: clamp(10px, 2vw, 15px) clamp(20px, 4vw, 30px);
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: #fff;
  background-color: #007bff;
  text-decoration: none;
  border-radius: 5px;
  transition: background-color 0.3s, transform 0.3s;
}

.button:hover {
  background-color: #0056b3;
  transform: scale(1.05);
}

/* Chat debajo del video normalmente */
#chat-container {
  position: static;
  z-index: 1;
  transition: all 0.3s;
}

/* Chat flotante sobre el video en fullscreen */
.fullscreen-chat #chat-container {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw !important;
  max-width: none !important;
  height: 40vh;
  z-index: 9999;
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding: 0;
}

.fullscreen-chat #chat-container iframe {
  width: 100vw !important;
  height: 40vh !important;
  max-width: none !important;
  border: none;
}

@media (max-width: 600px) {
  body {
    padding: 10px;
  }

  .container {
    padding: 15px;
  }
}
