#globalreels-root {
  position: relative;
  width: 100%;
  /*height: 100vh;*/
  height: 100%;
  min-height: 500px; /* o lo que tú quieras */
  background: #000;
  overflow: hidden;
  touch-action: none;
}

.globalreels-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.globalreels-track {
  position: absolute;
  width: 100%;
  height: 300%;
  transform: translateY(-100%);
  transition: transform 0.35s ease;
}

.globalreel {
  position: relative;
  width: 100%;
  /*height: 100%;*/
  height: 33.3333%;;
  overflow: hidden;
}

.globalreel video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 2;
}

.globalreels-poster {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 1;
  opacity: 1;
  transition: opacity 0.4s ease;
}

/* AVATAR */
.globalreels-avatar {
  position: absolute;
  left: 12px;
  bottom: 80px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  text-decoration: none;
}


.globalreels-avatar-bg {
  position: absolute;
  inset: -6px;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 999px;
  z-index: 0;
}

.globalreels-avatar img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}


.globalreels-avatar span {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

/* ACTIONS */
.globalreels-actions {
  position: absolute;
  right: 12px;
  bottom: 80px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.globalreels-actions button {
  background: rgba(0,0,0,.6);
  border: none;
  color: #fff;
  font-size: 18px;
  padding: 10px;
  border-radius: 50%;
}

/* SPINNER */
.globalreels-spinner {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

.globalreels-spinner .ring {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}


/* ===== APP MODE ===== */
body.globalreels-app {
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden;
}

body.globalreels-app #globalreels-root {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100dvh; /* clave */
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  z-index: 9999;
}

body.globalreels-app #globalreels-root {
  border: 3px solid #0f3d2e; /* verde oscuro (ajustable) */
  box-sizing: border-box;
}

.globalreels-logo {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0px;
  padding: 8px;
  text-decoration: none;
  z-index: 9999;
}

.globalreels-logo span {
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  z-index: 9999;
}

.globalreels-logo img {
  height: 32px;
  width: auto;
  z-index: 9999;
}


.globalreels-ad-footer {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  width: 320px;
  height: 50px;
  z-index: 25;
  pointer-events: auto;
}

/* Evitar que el banner tape gestos */
body.globalreels-app .globalreels-avatar {
  bottom: 140px;
}

body.globalreels-app .globalreels-actions {
  bottom: 140px;
}


.globalreels-bottom-bar {
  position: absolute;
  left: 50%;
  bottom: 70px; /* justo encima del banner */
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: 500px;
  height: 56px;

  display: flex;
  justify-content: space-around;
  align-items: center;

  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  border-radius: 14px;
  z-index: 30;
  pointer-events: auto;
}

.globalreels-bottom-bar .gr-btn {
  background: none;
  border: none;
  font-size: 22px;
  color: #fff;
  cursor: pointer;
  padding: 8px;
}

.globalreels-bottom-bar .gr-btn:active {
  transform: scale(0.9);
}


.globalreels-coffee-modal {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(6px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 50;
}

.globalreels-coffee-modal.active {
  display: flex;
}

.gr-coffee-box {
  background: rgba(20,20,20,0.9);
  padding: 20px;
  border-radius: 16px;
  text-align: center;
  max-width: 280px;
  color: #fff;
}

.gr-coffee-box button {
  margin-top: 12px;
  padding: 10px 16px;
  background: #0f3d2e;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
}

.gr-btn svg {
  width: 22px;
  height: 22px;
  fill: #fff;
  display: block;
}

/* ===== AVATAR BLUR BACKGROUND ===== */

.globalreels-avatar {
  position: absolute;
  left: 12px;
  bottom: 80px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  text-decoration: none;
}

.globalreels-avatar-bg {
  position: absolute;
  inset: -6px;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 999px;
  z-index: 0;
}

.globalreels-avatar img,
.globalreels-avatar span {
  position: relative;
  z-index: 1;
}

.globalreels-avatar span {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
