/* Reseta e define AMOLED puro */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  min-height: 100%;
  min-height: -webkit-fill-available;
  background-color: #000000;
  color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

/* Contêiner principal ocupando 100% da tela */
#player-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background-color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Wrapper do IFrame */
.iframe-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.iframe-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background-color: #000000;
}

/* Contêineres de feedback e estado */
.state-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  max-width: 90%;
  z-index: 5;
  animation: fadeIn 0.25s ease-out;
}

/* Spinner de carregamento minimalista */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  margin-bottom: 16px;
}

.state-text {
  font-size: 14px;
  color: #8e8e93;
  letter-spacing: 0.3px;
}

/* Estado de Erro */
.error-icon {
  color: #ff453a;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.error-title {
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 8px;
}

.error-message {
  font-size: 14px;
  color: #a1a1a6;
  line-height: 1.5;
  max-width: 320px;
}

/* Utilitário para ocultar elementos */
.hidden {
  display: none !important;
}

/* Animações */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
