/* ==========================================
   PLAY88 PREMIUM READABILITY REFINEMENT
   Pearl background / Slate typography / Teal
========================================== */

:root {
  --p88-page: #f1f4f8;
  --p88-surface: #ffffff;
  --p88-heading: #18283f;
  --p88-text: #34445b;
  --p88-secondary: #526177;
  --p88-muted: #64748b;
  --p88-border: #dce4ed;
  --p88-teal: #078d88;
  --p88-teal-light: #24b8ad;
}

/* GLOBAL TEXT */
html, body {
  color: #34445b !important;
  font-size: 15.5px !important;
  background-color: #f1f4f8 !important;
}

body {
  color: #34445b !important;
  line-height: 1.58 !important;
}

#page-content {
  color: #34445b !important;
}

/* HEADINGS */
h1, h2, h3, h4,
.p88-section-head h1,
.p88-section-head h2,
.p88-video-info h3,
.yt-result-body h3 {
  color: #18283f !important;
}

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

/* SECONDARY AND DESCRIPTION TEXT */
p, small, label,
.p88-section-head p,
.p88-section-caption small,
.p88-bookmarks-heading p,
.p88-no-bookmarks,
.p88-muted,
.p88-video-info p,
.yt-channel,
.yt-date,
.p88-video-meta,
.p88-detail-stats,
.p88-description,
.p88-sync-notice p,
.p88-sync-notice small,
.p88-plan p,
.p88-plan li,
.p88-payment-note {
  color: #526177 !important;
}

/* COUNTRY DETECTION */
.p88-section-head p,
.p88-trending-filters label {
  color: #4e5e73 !important;
  font-size: 13px !important;
  font-weight: 550 !important;
}

/* SIDEBAR */
.sidebar, .app-sidebar, aside, nav.sidebar {
  background: #ffffff !important;
}

.sidebar a,
.sidebar button,
.app-sidebar a,
.app-sidebar button,
.nav-item,
[data-view] {
  color: #35465e !important;
  font-size: 14.5px !important;
  font-weight: 600 !important;
}

.sidebar .active,
.app-sidebar .active,
.nav-item.active,
[data-view].active {
  color: #087b77 !important;
  background: linear-gradient(120deg,#e4f5f2,#edf2f8) !important;
}

.sidebar small,
.app-sidebar small {
  color: #526177 !important;
  font-size: 12px !important;
}

/* HEADER SEARCH */
#global-search {
  background: #ffffff !important;
  color: #27374d !important;
  border: 1px solid #cbd6e3 !important;
  font-size: 14px !important;
}

#global-search::placeholder,
.p88-search-box input::placeholder,
.play88-search-form input::placeholder {
  color: #69778b !important;
  opacity: 1 !important;
}

/* SEARCH PANEL */
.p88-search-box,
.play88-search-panel,
.yt-search-panel {
  background: #ffffff !important;
  border: 1px solid #dfe6ee !important;
}

.p88-search-box input,
.play88-search-form input,
.yt-search-form input {
  background: #ffffff !important;
  color: #27374d !important;
  border: 1px solid #cbd6e3 !important;
  font-size: 15px !important;
}

.p88-search-box input:focus,
.play88-search-form input:focus {
  border-color: #249f99 !important;
  box-shadow: 0 0 0 3px rgba(36,159,153,.12) !important;
}

/* SEARCH AND SORT BUTTONS */
.p88-primary,
.primary-button,
.p88-search-box button[type="submit"] {
  color: #ffffff !important;
  background: linear-gradient(135deg,#20b8ad,#078984) !important;
  border: 1px solid #078984 !important;
}

.p88-secondary,
.secondary-button {
  color: #34465d !important;
  background: #f1f4f8 !important;
  border: 1px solid #cdd8e4 !important;
}

.p88-sort-line button,
.play88-sort-options button {
  color: #35465d !important;
  background: #edf1f6 !important;
  border: 1px solid #d3dde8 !important;
  font-size: 12.5px !important;
}

.p88-sort-line button.selected,
.play88-sort-options button.active {
  color: #ffffff !important;
  background: linear-gradient(135deg,#20b8ad,#078984) !important;
}

/* IMPORTANT: DISABLED SAVE BUTTON REMAINS READABLE */
button:disabled,
.p88-search-box button:disabled,
.play88-search-form button:disabled {
  opacity: .85 !important;
  color: #536176 !important;
  background: #e9eef4 !important;
  border-color: #d3dce6 !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
}

/* BOOKMARKS */
.p88-bookmark-area,
.play88-bookmarks {
  border-top: 1px solid #e0e6ee !important;
}

.p88-section-caption b,
.play88-bookmarks-heading b {
  color: #24354c !important;
  font-size: 14px !important;
  font-weight: 750 !important;
}

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

.p88-section-caption > span,
.play88-bookmarks-heading > span {
  color: #526177 !important;
  font-size: 12px !important;
}

.p88-bookmark {
  background: #edf3f7 !important;
  border: 1px solid #d4dfe9 !important;
}

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

/* FEATURE BUTTONS */
.p88-feature-tabs button {
  color: #35465d !important;
  background: linear-gradient(145deg,#ffffff,#edf1f6) !important;
  border: 1px solid #d9e2eb !important;
  font-size: 13px !important;
}

.p88-feature-tabs button.active {
  color: #ffffff !important;
  background: linear-gradient(135deg,#20b8ad,#078984) !important;
  border-color: transparent !important;
}

/* VIDEO CARDS */
.p88-video-card,
.yt-result-card {
  background: #ffffff !important;
  border: 1px solid #dfe6ee !important;
}

.p88-video-info,
.yt-result-body {
  background: #ffffff !important;
}

.p88-video-info h3,
.yt-result-body h3 {
  color: #1e3048 !important;
  font-size: 15px !important;
  font-weight: 750 !important;
  line-height: 1.55 !important;
}

.p88-video-info p,
.yt-channel,
.yt-date {
  color: #526177 !important;
  font-size: 12.5px !important;
}

.p88-video-meta {
  color: #596980 !important;
  font-size: 12px !important;
}

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

.yt-watch-link {
  color: #087e78 !important;
  font-size: 12px !important;
  font-weight: 750 !important;
}

/* VIDEO ACTIONS */
.p88-video-actions button,
.p88-video-info > button {
  background: #edf2f6 !important;
  color: #35475d !important;
  border: 1px solid #d4dee8 !important;
  font-size: 11.5px !important;
}

.p88-video-actions button:first-child {
  background: linear-gradient(135deg,#20b8ad,#078984) !important;
  color: #ffffff !important;
  border-color: transparent !important;
}

/* COUNTRY AND CATEGORY SELECTORS */
.p88-section-head select,
.p88-trending-filters select {
  background: #ffffff !important;
  color: #34445b !important;
  border: 1px solid #ccd7e3 !important;
  font-size: 12.5px !important;
}

.p88-section-head select option,
.p88-trending-filters select option {
  color: #26364d !important;
  background: #ffffff !important;
}

/* STORAGE CARD: WHITE AND LEGIBLE */
.p88-storage-card,
.p88-storage-card * {
  background-color: transparent;
  color: #526177 !important;
  font-size: 12px !important;
}

.p88-storage-card {
  background: linear-gradient(145deg,#ffffff,#f4f7fb) !important;
  border: 1px solid #dce5ee !important;
  border-radius: 15px !important;
  box-shadow: 0 8px 22px rgba(35,55,83,.075) !important;
  padding: 15px !important;
}

.p88-storage-card [data-p88-storage-title],
.p88-storage-card [data-p88-storage-value] {
  color: #24354c !important;
  font-size: 13px !important;
  font-weight: 750 !important;
}

.p88-storage-card progress {
  accent-color: #119d97 !important;
}

.p88-storage-card [class*="progress"],
.p88-storage-card [class*="Progress"] {
  background-color: #e0e7ef !important;
}

/* OTHER PANELS */
.p88-playlist-card,
.p88-account-card,
.p88-plan,
.p88-sync-notice {
  background: #ffffff !important;
  color: #34445b !important;
  border-color: #dfe6ee !important;
}

.p88-playlist-card h3,
.p88-account-card h2,
.p88-plan h2 {
  color: #203249 !important;
}

.p88-playlist-card p,
.p88-plan li,
.p88-account-card label {
  color: #526177 !important;
  font-size: 13px !important;
}

/* DETAIL WINDOW */
.p88-detail-box {
  background: #ffffff !important;
  color: #34445b !important;
}

.p88-detail-content h2 {
  color: #203249 !important;
}

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

/* EMPTY STATES */
.p88-message,
.p88-loading {
  background: #ffffff !important;
  color: #526177 !important;
  border: 1px solid #dfe6ee !important;
  font-size: 13px !important;
}

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

/* MOBILE TEXT */
@media(max-width:600px) {
  body {
    font-size: 14.5px !important;
  }

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

  .p88-video-info p,
  .yt-channel,
  .yt-date {
    font-size: 12px !important;
  }
}