/* =========================
   BASE PLAYER (DESKTOP)
========================= */

.panel-player {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.player-header {
  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 12px 14px;

  border-radius: 14px;

  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}

.now-title {
  font-weight: 700;
  font-size: 15px;
  color: #fff;
}

.quality-pill {
  padding: 6px 10px;
  border-radius: 999px;

  font-size: 12px;
  font-weight: 600;

  background: rgba(59,130,246,0.15);
  border: 1px solid rgba(59,130,246,0.3);
  color: #fff;
}

/* =========================
   VIDEO
========================= */

.video-wrap {
  position: relative;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
}

.video-wrap video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* =========================
   DESKTOP CONTROLS
========================= */

.player-controls {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 10px;
}

.control-pill {
  padding: 10px 14px;
  border-radius: 999px;

  font-size: 13px;
  font-weight: 600;

  cursor: pointer;

  color: #fff;

  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
}

.control-pill.primary {
  background: linear-gradient(
    135deg,
    #2563eb,
    #1d4ed8
  );
}

.player-hint {
  text-align: center;
  opacity: 0.7;
  font-size: 12px;
}

/* =========================
   MOBILE NAV HIDDEN
========================= */

.mobile-nav {
  display: none;
}

/* =========================
   MOBILE PLAYER
========================= */

@media (max-width: 768px) {

  html,
  body {
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .app {
    overflow: visible;
  }

  .panel-player {
    position: relative;

    width: 100%;
    min-height: 100svh;

    display: flex;
    flex-direction: column;

    background: #000;
    overflow: hidden;
  }

  /* HEADER OVERLAY */

  .player-header {
    position: absolute;

    top: 0;
    left: 0;
    right: 0;

    z-index: 20;

    color: #fff;

    background: linear-gradient(
      to bottom,
      rgba(0,0,0,.65),
      transparent
    );
  }

  .now-title {
    font-size: 14px;
  }

  .quality-pill {
    font-size: 12px;
    padding: 4px 10px;

    background: rgba(255,255,255,0.12);

    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

.video-wrap {
  position: relative;
  width: 100%;
  height: 420px; /* 👈 INCREASE THIS */
  border-radius: 14px;
  overflow: hidden;
  background: #000;
}

  .video-wrap video {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

  
    object-position: center;
  }

  /* HIDE DESKTOP CONTROLS */

  .player-controls {
    display: none;
  }

  /* BOTTOM MOBILE BAR */

  .mobile-nav {
    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    z-index: 40;

    display: flex;
    justify-content: space-around;
    align-items: center;

    padding:
      10px
      12px
      calc(
        10px + env(safe-area-inset-bottom)
      );

    background: linear-gradient(
      to top,
      rgba(0,0,0,.80),
      transparent
    );

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .mobile-btn {
    background: transparent;
    border: none;

    color: #fff;

    font-size: 12px;
    font-weight: 600;

    padding: 6px 8px;

    cursor: pointer;

    white-space: nowrap;
  }

  .fit-btn {
    background: rgba(229,159,7,.92);
    border-radius: 999px;

    padding: 6px 10px;

    border: 1px solid rgba(255,255,255,.15);
  }

  .player-hint {
    display: none;
  }
}

/* =========================
   FORCE MOBILE LAYOUT
   FOR PHONE LANDSCAPE
========================= */

@media (orientation: landscape) and (max-width: 900px) {

  .app {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
  }

}


/* DESKTOP */
.seo-mobile-toggle {
  display: none;
}

/* MOBILE */
@media (max-width: 768px) {

  .seo-mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;

    padding: 12px;

    font-weight: 600;
    font-size: 14px;

    cursor: pointer;

    color: #fff;

    border-radius: 12px;

    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.10);

    margin-bottom: 10px;
  }

  /* FIX: match your actual HTML class */
  .seo-mobile-content {
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;

    max-height: 0;
    opacity: 0;
  }

  .seo-mobile-content.expanded {
    max-height: 2000px;
    opacity: 1;
  }

  .seo-mobile-content.collapsed {
    max-height: 0;
    opacity: 0;
  }
}

#resetAppBtn {
  position: relative;
  z-index: 9999;
  pointer-events: auto;
}

.seo-mobile-content.collapsed {
  pointer-events: none;
}
.seo-mobile-content.expanded {
  pointer-events: auto;
}

#castAirplayBtn {
  background: linear-gradient(
    135deg,
    #14b8a6 0%,  /* teal */
    #22c55e 50%, /* green */
    #0ea5e9 100% /* sky blue */
  );

  color: #fff;
  border: none;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 999px; /* pill shape */
  cursor: pointer;
  white-space: nowrap;

  box-shadow:
    0 2px 8px rgba(20, 184, 166, 0.25),
    0 2px 12px rgba(34, 197, 94, 0.15);

  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

#castAirplayBtn:hover {
  transform: translateY(-1px);
  opacity: 0.96;
  box-shadow:
    0 4px 12px rgba(20, 184, 166, 0.3),
    0 4px 16px rgba(34, 197, 94, 0.2);
}

#castAirplayBtn:active {
  transform: scale(0.96);
}

#castAirplayBtn:focus {
  outline: none;
}

@media (max-width: 768px) {
  #castAirplayBtn {
    padding: 5px 10px;
    font-size: 12px;
  }
}

.now-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* LANDSCAPE MOBILE FULLSCREEN */
@media (max-width: 900px) and (orientation: landscape) {

 .panel-player {
  min-height: 100dvh !important;
  height: auto !important;
  max-height: none !important;
}
  .video-wrap {
    height: 100dvh !important;
    min-height: 100dvh !important;
  }

  .video-wrap video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  .player-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
  }

  .mobile-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
  }
}

.fit-mode .video-wrap {
  padding: 10px;
}

@media (max-width: 768px) {

  body.fit-mode .panel-player {
    height: 100dvh;
  }

  body.fit-mode .player-header {
    opacity: 0.4;
  }

  body.fit-mode .mobile-nav {
    opacity: 0.6;
  }

  body.fit-mode .video-wrap {
    height: 100dvh;
  }
}



@media (max-width: 768px) {
  #seoCountryBlock {
    display: none !important;
  }
}