/* ═══════════════════════════════════════════════
   LyricsFlow — Global Styles
   ═══════════════════════════════════════════════ */

/* Google Fonts (fallback for Georgian, CJK, Cyrillic, Devanagari, etc.) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Georgian:wght@400;500;600;700;800;900&display=swap');

/* ── Local Fonts: SF Pro (Latin) & SF Arabic ── */
@font-face {
  font-family: 'SF Pro';
  src: url('../fonts/sfpro.woff2') format('woff2'),
    url('../fonts/sfpro.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'SF Pro Display';
  src: url('../fonts/sfpro-display-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'SF Pro Display';
  src: url('../fonts/sfpro-display-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'SF Pro Display';
  src: url('../fonts/sfpro-display-Semibold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'SF Pro Display';
  src: url('../fonts/sfpro-display-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'SF Pro Display';
  src: url('../fonts/sfpro-display-Heavy.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'SF Arabic';
  src: url('../fonts/sfarabic.woff2') format('woff2'),
    url('../fonts/sfarabic.ttf') format('truetype');
  font-weight: 100 1200;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'SF Pro Rounded';
  src: url('../fonts/sfpro-rounded-Semibold.otf') format('opentype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ── Reset ── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  font-family: 'SF Pro Display', 'SF Pro', 'Inter', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans', 'SF Arabic', 'Noto Sans Georgian', 'Vazirmatn', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow: hidden;
  height: 100%;
  height: 100dvh;
}

body {
  margin: 0;
  padding: 0;
  background: #1c1c1e;
  color: #ffffff;
  font-family: 'SF Pro Display', 'SF Pro', 'Inter', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans', 'SF Arabic', 'Noto Sans Georgian', 'Vazirmatn', sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-weight: 700;
  overflow: hidden;
  height: 100%;
  height: 100dvh;
  width: 100vw;
  user-select: none;
}

h1, h2, h3, h4, h5, h6,
.am-hero-title, .am-search-section-title, .am-hub-pill-btn {
  font-family: 'SF Pro Display', 'SF Pro', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

img,
a {
  -webkit-user-drag: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: 'SF Pro Display', 'SF Pro', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input {
  font-family: 'SF Pro Display', 'SF Pro', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ── CSS Custom Properties ── */
:root {
  /* Background */
  --bg-rotation-degree: 258deg;
  --spice-main: #000000;
  --spice-sidebar: #000000;
  --spice-text: #ffffff;
  --spice-button: #ffffff;

  /* Lyrics sizing */
  --DefaultLyricsSize: clamp(1.85rem, calc(1cqw * 7), 3.5rem);
  --LyricsFlow-LineSpacing: 1cqw 0;

  /* Glow definitions */
  --TextGlowDef: rgba(255, 255, 255, 0.15) 0px 0px 6px;
  --ActiveTextGlowDef: rgba(255, 255, 255, 0.4) 0px 0px 14px;
  --StrongTextGlowDef: rgba(255, 255, 255, 0.553) 0px 0px 16.4px;
  --StrongerTextGlowDef: rgba(255, 255, 255, 0.508) 0px 0px 16px;

  /* Scrollbar */
  --Simplebar-Scrollbar-Color: rgba(255, 255, 255, 0.6);

  /* NowBar sizing (Apple Music Layout) */
  --NowBarWidth: 40cqw;
  /* Compact panel */
  --NowBarRightSpacing: 4cqw;
  --NowBarLeftSpacing: 6cqw;

  /* Lyrics padding */
  --LyricsLeftSidePadding: calc(var(--NowBarWidth) + var(--NowBarLeftSpacing) + var(--NowBarRightSpacing));
  --LyricsRightSidePadding: 6cqw;

  /* Font */
  --lyricsflow-font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro', 'PingFang SC', 'Hiragino Sans', 'SF Arabic', Inter, "Noto Sans Georgian", "Vazirmatn", sans-serif;

  /* Default font size for content */
  --default-font-size: clamp(0.5rem, calc(1cqw * 3), 2.4rem);

  /* SLM property */
  --SLM_GradientPosition: -50%;
}

@property --SLM_GradientPosition {
  syntax: "<percentage>";
  inherits: false;
  initial-value: -50%;
}

/* ── Scrollbar Styling ── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ── Utility Classes ── */
.hidden {
  display: none !important;
}

.WaitingForHeight {
  opacity: 0 !important;
}

/* ── Branding ── */
.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.logo-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  vertical-align: middle;
}

.back-button .logo-icon {
  width: 20px;
  height: 20px;
}

/* ── AeroUI (via CDN) ── */
@import url('https://nurislamaibekuly.github.io/aeroui/src/aeroui.css');

:root {
  --aero-primary: #ffffff;
}

/* ── Global AeroUI Dropdown Overlay Standards ── */
.aero-dropdown {
  position: relative !important;
  display: inline-block !important;
}

.aero-dropdown .aero-menu {
  position: absolute !important;
  top: calc(100% + 6px) !important;
  right: 0 !important;
  z-index: 9999999 !important;
  min-width: 170px !important;
  background: rgba(30, 30, 32, 0.95) !important;
  backdrop-filter: blur(25px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(25px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  border-radius: 12px !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
  padding: 6px !important;
  display: none;
  flex-direction: column !important;
  gap: 2px !important;
}

.aero-dropdown .aero-menu.is-open,
.aero-dropdown .aero-menu.is-active,
.aero-dropdown.is-open .aero-menu,
.aero-dropdown.is-active .aero-menu {
  display: flex !important;
}

.aero-dropdown .aero-menu-item {
  background: transparent !important;
  border: none !important;
  color: rgba(255, 255, 255, 0.85) !important;
  padding: 8px 12px !important;
  font-size: 0.88rem !important;
  font-weight: 500 !important;
  text-align: left !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  transition: background 0.15s ease, color 0.15s ease !important;
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.aero-dropdown .aero-menu-item:hover {
  background: rgba(255, 255, 255, 0.14) !important;
  color: #ffffff !important;
}

.aero-dropdown .aero-menu-item[aria-current="true"] {
  background: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
  font-weight: 600 !important;
}

/* ── AeroUI Dialog Enhancements ── */
dialog.aero-modal {
  z-index: 10000001 !important;
}

dialog.aero-modal::backdrop {
  z-index: 10000000 !important;
}

.aero-prompt-dialog,
.aero-confirm-dialog,
.aero-alert-dialog {
  min-width: 320px;
  max-width: 420px;
}

.aero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 0.92rem;
  transition: opacity 0.15s ease, transform 0.1s ease;
}

.aero-btn:active {
  transform: scale(0.96);
}

/* ── Playlist Detail & Tracklist Table Fixes ── */
#page-playlists .am-hero.is-detail {
  display: none !important;
}

.am-playlist-detail-header {
  display: flex !important;
  align-items: flex-end !important;
  gap: 32px !important;
  padding: 24px 0 32px !important;
}

.am-playlist-detail-art-wrap {
  width: 230px !important;
  height: 230px !important;
  border-radius: 14px !important;
  overflow: hidden !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6) !important;
  flex-shrink: 0 !important;
  background: #1c1c1e !important;
}

.am-playlist-detail-art {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

.am-playlist-detail-info {
  flex: 1 !important;
}

.am-playlist-detail-title {
  font-size: clamp(2rem, 4vw, 2.8rem) !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  margin: 0 0 6px 0 !important;
  letter-spacing: -0.02em !important;
}

.am-playlist-detail-curator {
  font-size: 1.25rem !important;
  color: #fa586a !important;
  font-weight: 600 !important;
  margin: 0 0 8px 0 !important;
  display: inline-block !important;
  text-decoration: none !important;
}

.am-playlist-detail-meta {
  font-size: 0.84rem !important;
  color: rgba(255, 255, 255, 0.55) !important;
  margin-bottom: 6px !important;
}

.am-playlist-detail-desc {
  font-size: 0.92rem !important;
  line-height: 1.5 !important;
  color: rgba(255, 255, 255, 0.7) !important;
  margin-bottom: 20px !important;
  max-width: 680px !important;
}

.am-playlist-detail-actions {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
}

.am-tracklist-table-header {
  display: flex !important;
  align-items: center !important;
  padding: 8px 16px !important;
  color: rgba(255, 255, 255, 0.45) !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  margin-bottom: 6px !important;
}

.am-suggested-list {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
  gap: 12px 18px !important;
}

.am-suggested-song-row {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 8px 12px !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, 0.03) !important;
  cursor: pointer !important;
  transition: background 0.15s ease !important;
}

.am-suggested-song-row:hover {
  background: rgba(255, 255, 255, 0.08) !important;
}

.am-suggested-art {
  width: 44px !important;
  height: 44px !important;
  border-radius: 6px !important;
  object-fit: cover !important;
  flex-shrink: 0 !important;
}

.am-suggested-info {
  flex: 1 !important;
  min-width: 0 !important;
}

.am-suggested-title {
  font-size: 0.88rem !important;
  font-weight: 600 !important;
  color: #fff !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.am-suggested-artist {
  font-size: 0.76rem !important;
  color: rgba(255, 255, 255, 0.5) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}