/* ==========================================
   PLAY88 PREMIUM DESIGN POLISH
   Larger typography / consistent 3D buttons
   Pearl white / cool grey / teal
========================================== */

:root {
  color-scheme: light;

  --p88-bg: #f0f3f8;
  --p88-panel: #ffffff;
  --p88-panel-soft: #f7f9fc;
  --p88-text: #17243a;
  --p88-muted: #65748a;
  --p88-border: #dce4ed;
  --p88-teal: #079a95;
  --p88-teal-light: #31c6ba;
  --p88-teal-dark: #087a78;
  --p88-shadow: 0 8px 24px rgba(35,53,81,.09);
  --p88-shadow-hover: 0 15px 32px rgba(35,53,81,.14);
}

html {
  color-scheme: light !important;
  background: var(--p88-bg) !important;
  font-size: 15px !important;
}

body {
  background:
    radial-gradient(ellipse at 75% 0%, rgba(75,205,195,.10), transparent 36%),
    linear-gradient(135deg,#f7f9fc 0%,#eef2f8 55%,#edf3f7 100%) !important;
  color: var(--p88-text) !important;
  font-family: "Segoe UI", Inter, Arial, sans-serif !important;
  font-size: 15px !important;
  line-height: 1.55 !important;
}

/* APP BACKGROUND */
#app, #root, .app-shell, .app-layout,
.main-content, .main-area, main {
  background: transparent !important;
  color: var(--p88-text) !important;
}

#page-content {
  background: transparent !important;
  color: var(--p88-text) !important;
  padding: 20px 25px 45px !important;
  min-height: calc(100vh - 70px);
}

/* SIDEBAR */
.sidebar, .app-sidebar, aside, nav.sidebar {
  background: rgba(255,255,255,.96) !important;
  border-right: 1px solid #e1e7ef !important;
  box-shadow: 7px 0 26px rgba(34,54,83,.055) !important;
}

.sidebar a, .sidebar button,
.app-sidebar a, .app-sidebar button,
.nav-item, [data-view] {
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #536279 !important;
  border-radius: 12px !important;
  transition: background .2s ease, color .2s ease, transform .2s ease !important;
}

.nav-item:hover, [data-view]:hover {
  background: #eaf5f5 !important;
  color: #087f7e !important;
}

.nav-item.active, [data-view].active {
  background: linear-gradient(115deg,#dff5f1,#e9eff9) !important;
  color: #087d7a !important;
  border: 1px solid #d0eeea !important;
  box-shadow: 0 5px 14px rgba(19,145,139,.09) !important;
}

.brand, .brand-name, .logo {
  color: #17243a !important;
  font-weight: 900 !important;
  letter-spacing: -.6px;
}

/* TOP HEADER */
.topbar, .app-header, .top-bar, .header-bar {
  background: rgba(255,255,255,.97) !important;
  border-bottom: 1px solid #e2e8ef !important;
  box-shadow: 0 4px 20px rgba(39,57,83,.045) !important;
}

#global-search {
  background: #ffffff !important;
  color: #17243a !important;
  border: 1px solid #ccd7e4 !important;
  border-radius: 24px !important;
  min-height: 44px !important;
  font-size: 14px !important;
  padding: 0 17px !important;
  box-shadow: inset 0 2px 5px rgba(34,54,83,.045) !important;
}

#global-search:focus {
  border-color: #25aaa4 !important;
  box-shadow: 0 0 0 4px rgba(39,183,174,.13) !important;
}

/* SEARCH PANEL */
.p88-search-box, .play88-search-panel, .yt-search-panel {
  background: linear-gradient(145deg,#ffffff,#f7f9fc) !important;
  border: 1px solid #e5ebf2 !important;
  border-radius: 19px !important;
  padding: 23px !important;
  box-shadow:
    0 2px 4px #ffffff inset,
    0 12px 30px rgba(36,56,85,.09) !important;
}

.p88-search-box input,
.play88-search-form input,
.yt-search-form input {
  background: #ffffff !important;
  color: #17243a !important;
  border: 1px solid #cbd6e3 !important;
  border-radius: 12px !important;
  min-height: 50px !important;
  font-size: 15px !important;
  padding: 0 17px !important;
  box-shadow: inset 0 2px 5px rgba(38,58,88,.045) !important;
}

.p88-search-box input::placeholder,
.play88-search-form input::placeholder {
  color: #8794a5 !important;
}

/* CONSISTENT BUTTONS */
button:not(.p88-video-thumb):not(.yt-result-card)
:not(.play88-close):not(.p88-player-close)
:not(.p88-detail-close):not(.play88-player-close) {
  font-family: inherit !important;
  font-size: 13px !important;
  font-weight: 650 !important;
  cursor: pointer;
}

/* PRIMARY BUTTONS */
.p88-primary, .primary-button,
.p88-search-box button[type="submit"],
.play88-search-form button[type="submit"] {
  background: linear-gradient(135deg,#35cabe 0%,#079b96 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,.65) !important;
  border-radius: 12px !important;
  min-height: 43px !important;
  padding: 10px 19px !important;
  font-size: 13px !important;
  font-weight: 750 !important;
  box-shadow:
    0 4px 0 #087b78,
    0 8px 17px rgba(8,151,145,.20) !important;
  transition: transform .18s ease, box-shadow .18s ease !important;
}

.p88-primary:hover, .primary-button:hover {
  transform: translateY(-2px);
  box-shadow:
    0 5px 0 #087b78,
    0 12px 22px rgba(8,151,145,.25) !important;
}

.p88-primary:active, .primary-button:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #087b78 !important;
}

/* SECONDARY BUTTONS */
.p88-secondary, .secondary-button,
.p88-video-actions button,
.p88-video-info > button {
  background: linear-gradient(145deg,#ffffff,#edf2f7) !important;
  color: #40536d !important;
  border: 1px solid #dce4ed !important;
  border-radius: 11px !important;
  min-height: 38px !important;
  padding: 8px 13px !important;
  font-weight: 650 !important;
  box-shadow: 0 4px 10px rgba(37,57,86,.075) !important;
  transition: all .2s ease !important;
}

.p88-secondary:hover, .secondary-button:hover,
.p88-video-actions button:hover {
  background: #e4f7f4 !important;
  color: #087f7c !important;
  border-color: #b3e6e0 !important;
  transform: translateY(-2px);
  box-shadow: 0 7px 14px rgba(37,57,86,.12) !important;
}

/* TOP BAR PLUS BUTTON */
.topbar button, .app-header button, .header-bar button {
  font-size: 14px !important;
}

/* SORTING */
.p88-sort-line {
  gap: 9px !important;
  margin-top: 17px !important;
}

.p88-sort-line > span {
  font-size: 13px !important;
  color: #65748a !important;
}

.p88-sort-line button, .play88-sort-options button {
  background: linear-gradient(145deg,#ffffff,#edf2f8) !important;
  color: #40516a !important;
  border: 1px solid #dce5ef !important;
  border-radius: 10px !important;
  min-height: 38px !important;
  padding: 8px 16px !important;
  font-size: 13px !important;
  box-shadow: 0 3px 7px rgba(42,63,95,.055) !important;
}

.p88-sort-line button.selected,
.play88-sort-options button.active {
  background: linear-gradient(135deg,#2dc5ba,#078f8d) !important;
  color: white !important;
  border-color: transparent !important;
  box-shadow: 0 4px 0 #087b78,0 8px 15px rgba(10,153,148,.18) !important;
}

/* BOOKMARKS */
.p88-bookmark-area, .play88-bookmarks {
  border-top: 1px solid #e4eaf1 !important;
  margin-top: 17px !important;
  padding-top: 15px !important;
}

.p88-section-caption b,
.play88-bookmarks-heading b {
  font-size: 14px !important;
  color: #26364d !important;
}

.p88-section-caption small,
.play88-bookmarks-heading p {
  font-size: 12px !important;
  color: #79889b !important;
}

.p88-bookmark {
  background: linear-gradient(145deg,#ffffff,#edf4f8) !important;
  border: 1px solid #dbe6ed !important;
  border-radius: 20px !important;
  box-shadow: 0 3px 8px rgba(36,56,85,.07) !important;
}

.p88-bookmark button, .play88-bookmark-open {
  color: #365b6b !important;
  font-size: 12px !important;
}

/* FEATURE TABS */
.p88-feature-tabs {
  gap: 12px !important;
  padding: 16px 16px 21px !important;
}

.p88-feature-tabs button {
  background: linear-gradient(145deg,#ffffff,#edf2f8) !important;
  color: #465870 !important;
  border: 1px solid #e0e7ef !important;
  border-radius: 12px !important;
  min-height: 43px !important;
  padding: 10px 20px !important;
  font-size: 13px !important;
  box-shadow: 0 4px 0 #e2e8ef,0 7px 13px rgba(36,57,87,.07) !important;
}

.p88-feature-tabs button.active {
  background: linear-gradient(135deg,#2ec5ba,#088b8b) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 4px 0 #087875,0 8px 18px rgba(8,142,140,.20) !important;
}

/* SECTION HEADINGS */
.p88-section-head h1, .p88-section-head h2 {
  font-size: 25px !important;
  font-weight: 850 !important;
  letter-spacing: -.5px;
  color: #1d2d44 !important;
}

.p88-section-head p {
  font-size: 14px !important;
  color: #738197 !important;
  line-height: 1.6 !important;
}

.p88-section-head select,
.p88-trending-filters select {
  background: linear-gradient(145deg,#ffffff,#f3f6fa) !important;
  color: #354961 !important;
  border: 1px solid #d6e0ea !important;
  border-radius: 11px !important;
  min-height: 43px !important;
  padding: 9px 14px !important;
  font-size: 13px !important;
  box-shadow: 0 4px 10px rgba(38,57,84,.07) !important;
}

/* VIDEO GRID */
.p88-video-grid, .yt-results-grid {
  gap: 24px 20px !important;
  padding: 12px 16px 35px !important;
}

.p88-video-card, .yt-result-card {
  background: linear-gradient(145deg,#ffffff,#f9fbfd) !important;
  border: 1px solid #e2e9f1 !important;
  border-radius: 17px !important;
  box-shadow:
    0 2px 3px #ffffff inset,
    0 9px 22px rgba(33,53,82,.085) !important;
  overflow: hidden !important;
  transition: transform .24s ease, box-shadow .24s ease !important;
}

.p88-video-card:hover, .yt-result-card:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 18px 32px rgba(35,55,85,.15) !important;
}

.p88-video-thumb, .yt-thumbnail {
  border-radius: 12px !important;
  overflow: hidden !important;
  background: #e9eef4 !important;
}

.p88-video-info, .yt-result-body {
  padding: 14px !important;
  background: transparent !important;
}

.p88-video-info h3, .yt-result-body h3 {
  font-family: inherit !important;
  font-size: 15px !important;
  line-height: 1.5 !important;
  font-weight: 750 !important;
  color: #1c2c43 !important;
  margin-bottom: 8px !important;
}

.p88-video-info p, .yt-channel {
  font-size: 13px !important;
  color: #69788d !important;
  line-height: 1.5 !important;
}

.p88-video-meta, .yt-date {
  font-size: 12px !important;
  color: #8491a3 !important;
}

.p88-video-source, .yt-source {
  color: #079a93 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

.yt-watch-link {
  font-size: 12px !important;
  font-weight: 700 !important;
  color: #078c87 !important;
}

/* DURATION AND PLAY ICONS */
.p88-play-icon, .yt-play-overlay {
  width: 49px !important;
  height: 49px !important;
  background: linear-gradient(145deg,#ffffff,#dcefed) !important;
  color: #078f8d !important;
  box-shadow: 0 6px 17px rgba(0,0,0,.20) !important;
}

.p88-duration {
  font-size: 12px !important;
  padding: 5px 7px !important;
}

/* EMPTY STATES */
.p88-message, .p88-loading, .yt-message {
  background: linear-gradient(145deg,#ffffff,#f3f7fb) !important;
  color: #66778c !important;
  border: 1px solid #e1e8f0 !important;
  border-radius: 15px !important;
  box-shadow: 0 8px 22px rgba(35,55,85,.07) !important;
  font-size: 14px !important;
  padding: 30px !important;
}

/* PLAYLISTS / ACCOUNTS / PREMIUM */
.p88-playlist-card, .p88-account-card, .p88-plan {
  background: linear-gradient(145deg,#ffffff,#f5f8fc) !important;
  color: #263750 !important;
  border: 1px solid #e0e8f0 !important;
  border-radius: 17px !important;
  padding: 20px !important;
  box-shadow: 0 9px 25px rgba(35,55,85,.08) !important;
}

.p88-playlist-card h3, .p88-plan h2,
.p88-account-card h2 {
  color: #1b2b42 !important;
  font-size: 19px !important;
}

.p88-playlist-card p, .p88-plan p,
.p88-plan li, .p88-sync-notice p {
  font-size: 13px !important;
  line-height: 1.65 !important;
  color: #697a90 !important;
}

.p88-plan.featured {
  background: linear-gradient(145deg,#e8fbf8,#edf3ff) !important;
  border-color: #a4e4dc !important;
}

/* DOWNLOAD / ACCOUNT / DETAILS TEXT */
.p88-detail-content h2 {
  color: #1d2e45 !important;
  font-size: 23px !important;
}

.p88-description, .p88-detail-stats,
.p88-detail-content small {
  font-size: 13px !important;
  line-height: 1.75 !important;
  color: #687b91 !important;
}

/* KEEP THE VIDEO PLAYER BLACK */
.p88-player-overlay, .play88-player-backdrop,
.play88-player-dialog, .play88-player-frame {
  background: #000000 !important;
}

/* STORAGE WIDGET */
.sidebar small, .app-sidebar small {
  font-size: 11px !important;
}

/* ACCESSIBILITY / FOCUS */
button:focus-visible, a:focus-visible,
input:focus-visible, select:focus-visible {
  outline: 3px solid rgba(16,165,158,.25) !important;
  outline-offset: 3px !important;
}

@media(max-width:950px) {
  .p88-video-grid, .yt-results-grid {
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
  }
}

@media(max-width:600px) {
  html, body { font-size: 14px !important; }

  #page-content { padding: 12px 9px 30px !important; }

  .p88-search-box, .play88-search-panel, .yt-search-panel {
    padding: 15px !important;
    border-radius: 15px !important;
  }

  .p88-video-grid, .yt-results-grid {
    grid-template-columns: 1fr !important;
    gap: 19px !important;
    padding: 8px 9px 25px !important;
  }

  .p88-video-info h3, .yt-result-body h3 {
    font-size: 14px !important;
  }

  .p88-feature-tabs button {
    padding: 9px 14px !important;
    min-height: 39px !important;
  }

  .p88-section-head h1, .p88-section-head h2 {
    font-size: 22px !important;
  }
}

@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after {
    transition-duration:.01ms !important;
    animation-duration:.01ms !important;
  }
}