/* ═══════════════════════════════════════════════════════════
   SHATAN ALMASIHU — Visual Enhancements & Animations
   Professional images, effects, and motion design
═══════════════════════════════════════════════════════════ */

/* ══ LOADING SPLASH SCREEN ══════════════════════════════ */
#splashScreen {
  position: fixed; inset: 0; z-index: 9999;
  background: #07090d;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 20px;
  transition: opacity .5s ease;
}
#splashScreen.fade-out { opacity: 0; pointer-events: none; }

.splash-cross {
  font-size: 52px;
  animation: splashCross 1.2s cubic-bezier(.4,0,.2,1) forwards;
}
@keyframes splashCross {
  0%   { opacity: 0; transform: scale(.4) rotate(-20deg); }
  60%  { opacity: 1; transform: scale(1.12) rotate(4deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}
.splash-title {
  font-family: 'Clash Display', sans-serif;
  font-size: 22px; font-weight: 700;
  color: #EDE9E0; letter-spacing: .5px;
  opacity: 0; animation: splashFade .6s .55s ease forwards;
}
.splash-sub {
  font-size: 12px; color: #5a6472; letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0; animation: splashFade .5s .8s ease forwards;
}
.splash-bar-wrap {
  width: 120px; height: 2px;
  background: rgba(255,255,255,.07);
  border-radius: 2px; overflow: hidden;
  opacity: 0; animation: splashFade .4s .9s ease forwards;
}
.splash-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #E8622A, #F0C040);
  border-radius: 2px;
  animation: splashLoad 1s .9s ease-out forwards;
  width: 0;
}
@keyframes splashLoad { to { width: 100%; } }
@keyframes splashFade { to { opacity: 1; } }

/* ══ GLOBAL ANIMATIONS ══════════════════════════════════ */
@keyframes pageSlideIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes floatUp {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(232,98,42,.2); }
  50%       { box-shadow: 0 0 40px rgba(232,98,42,.5); }
}
@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position:  600px 0; }
}
@keyframes spinSlow {
  to { transform: rotate(360deg); }
}
@keyframes popIn {
  0%   { opacity: 0; transform: scale(.7); }
  75%  { transform: scale(1.08); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-24px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes rippleOut {
  from { transform: scale(0); opacity: .4; }
  to   { transform: scale(1); opacity: 0; }
}
@keyframes toastPop {
  0%   { transform: translateX(-50%) scale(.88); }
  60%  { transform: translateX(-50%) scale(1.04); }
  100% { transform: translateX(-50%) scale(1); }
}

/* ══ SCROLL REVEAL ══════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .55s ease, transform .55s ease;
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}
.reveal-left  { transform: translateX(-24px); }
.reveal-right { transform: translateX( 24px); }
.reveal-left.revealed, .reveal-right.revealed { transform: translateX(0); }
.reveal-scale { transform: scale(.94); }
.reveal-scale.revealed { transform: scale(1); }

/* ══ SKELETON SHIMMER ════════════════════════════════ */
.skel {
  background: linear-gradient(90deg,
    var(--bg3) 25%, rgba(255,255,255,.05) 50%, var(--bg3) 75%);
  background-size: 600px 100%;
  animation: shimmer 1.6s infinite;
  border-radius: 6px;
}
.skel-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r); overflow: hidden;
}
.skel-thumb { width: 100%; aspect-ratio: 16/9; border-radius: 0; }
.skel-body  { padding: 11px 13px 13px; display: flex; flex-direction: column; gap: 6px; }
.skel-line  { height: 12px; }
.skel-row   { display: flex; align-items: center; gap: 13px; padding: 10px 12px; }
.skel-num   { width: 24px; height: 12px; flex-shrink: 0; }
.skel-cover { width: 44px; height: 44px; border-radius: 9px; flex-shrink: 0; }

/* ══ HERO ENHANCEMENTS ═══════════════════════════════ */

/* Animated grid overlay */
.hero-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(232,98,42,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232,98,42,.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 30%, transparent 100%);
  animation: gridDrift 20s linear infinite;
}
@keyframes gridDrift {
  from { background-position: 0 0; }
  to   { background-position: 48px 48px; }
}

/* Hero badge pulse */
.hero-badge {
  animation: badgeFadeIn .7s .15s ease both;
}
@keyframes badgeFadeIn {
  from { opacity: 0; transform: translateX(-10px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Hero title stagger */
.hero-title {
  animation: heroTitleIn .75s .25s cubic-bezier(.22,1,.36,1) both;
}
@keyframes heroTitleIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-sub {
  animation: heroTitleIn .6s .45s cubic-bezier(.22,1,.36,1) both;
}
.hero-search {
  animation: heroTitleIn .5s .6s cubic-bezier(.22,1,.36,1) both;
}
.hero-stats {
  animation: heroTitleIn .5s .75s cubic-bezier(.22,1,.36,1) both;
}

/* Stat numbers glow */
.hstat-num {
  background: linear-gradient(90deg, var(--accent), var(--gold));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: transform .2s;
}
.hstat:hover .hstat-num { transform: scale(1.12); }

/* Hero floating music notes decoration */
.hero-notes {
  position: absolute; right: 60px; top: 36px;
  display: flex; flex-direction: column; gap: 18px;
  pointer-events: none; z-index: 0; opacity: .18;
}
.hero-note {
  font-size: 22px; color: var(--accent);
  animation: floatUp 3.5s ease-in-out infinite;
}
.hero-note:nth-child(2) { animation-delay: 1.2s; font-size: 16px; }
.hero-note:nth-child(3) { animation-delay: 2.4s; font-size: 28px; }

/* ══ VIDEO CARD ENHANCEMENTS ═════════════════════════ */
.vid-card {
  transform-style: preserve-3d;
  will-change: transform;
}
.vid-card::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(232,98,42,.12) 0%, transparent 60%);
  opacity: 0; transition: opacity .25s;
  pointer-events: none;
}
.vid-card:hover::after { opacity: 1; }

/* Shimmer on thumb hover */
.vid-thumb::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(105deg,
    transparent 30%, rgba(255,255,255,.08) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform .6s;
  z-index: 1; pointer-events: none;
}
.vid-card:hover .vid-thumb::before { transform: translateX(100%); }

/* Duration badge pop */
.vid-dur { animation: popIn .3s ease; }

/* ══ SONG ROW ENHANCEMENTS ═══════════════════════════ */
.srow {
  position: relative;
  transition: background .15s, transform .15s, box-shadow .15s;
}
.srow:hover {
  transform: translateX(3px);
  box-shadow: -3px 0 0 var(--accent);
}
.srow.playing {
  box-shadow: -3px 0 0 var(--accent);
  animation: playingPulse 3s ease-in-out infinite;
}
@keyframes playingPulse {
  0%, 100% { background: rgba(232,98,42,.07); }
  50%       { background: rgba(232,98,42,.12); }
}
.srow-cov { transition: transform .2s; }
.srow:hover .srow-cov { transform: scale(1.06) rotate(-1deg); }

/* ══ PLAYER BAR VISUALISER ═══════════════════════════ */
.pb-visualiser {
  display: none; align-items: flex-end;
  gap: 2px; height: 28px; padding: 0 4px;
  flex-shrink: 0;
}
.pb-visualiser.active { display: flex; }
.pb-viz-bar {
  width: 3px; height: 4px; background: var(--accent);
  border-radius: 3px;
  animation: vizBar .7s ease-in-out infinite alternate;
  transform-origin: bottom;
}
.pb-viz-bar:nth-child(odd)  { animation-duration: .55s; }
.pb-viz-bar:nth-child(3n)   { background: var(--gold); animation-duration: .9s; }
@keyframes vizBar {
  0%   { height: 3px; }
  100% { height: 22px; }
}
.pb-visualiser:not(.active) .pb-viz-bar { animation: none; height: 4px; }

/* Cover pulse when song changes */
.pb-cov.pulse-once {
  animation: coverPulse .4s ease;
}
@keyframes coverPulse {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.12); }
  100% { transform: scale(1); }
}

/* ══ SIDEBAR ANIMATIONS ══════════════════════════════ */
.sidebar { transition: transform .28s cubic-bezier(.4,0,.2,1); }
.sb-link {
  transition: background .15s, color .15s, padding-left .15s;
}
.sb-link:hover { padding-left: 14px; }
.sb-link.active { padding-left: 14px; }

/* Logo icon spin on hover */
.sb-logo-icon {
  transition: transform .3s ease, box-shadow .3s ease;
}
.sb-logo:hover .sb-logo-icon {
  transform: rotate(12deg) scale(1.08);
  box-shadow: 0 6px 22px rgba(232,98,42,.55);
}

/* ══ BUTTON RIPPLE ════════════════════════════════════ */
.ripple-effect {
  position: absolute; border-radius: 50%;
  background: rgba(255,255,255,.18);
  animation: rippleOut .55s ease-out forwards;
  pointer-events: none; transform: scale(0);
}

/* ══ MODALS ═══════════════════════════════════════════ */
.modal-box { animation: modalIn .28s cubic-bezier(.34,1.56,.64,1); }
@keyframes modalIn {
  from { opacity: 0; transform: scale(.88) translateY(18px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ══ TOAST ════════════════════════════════════════════ */
.toast.toast-pop {
  animation: toastPop .3s cubic-bezier(.34,1.56,.64,1);
}

/* ══ TABS ════════════════════════════════════════════ */
.tab {
  transition: background .18s, color .18s, transform .15s, box-shadow .18s;
}
.tab:active { transform: scale(.94); }
.tab.active { animation: tabPop .2s ease; }
@keyframes tabPop {
  0%   { transform: scale(.9); }
  60%  { transform: scale(1.04); }
  100% { transform: scale(1); }
}

/* ══ SECTION TITLES ══════════════════════════════════ */
.section-title {
  position: relative; display: inline-block;
}
.section-title::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--accent-g);
  border-radius: 2px;
  transition: width .4s ease;
}
.section:hover .section-title::after { width: 100%; }

/* ══ ABOUT PAGE ICONS ════════════════════════════════ */
.ac-icon {
  display: inline-block;
  transition: transform .25s;
}
.about-card:hover .ac-icon { transform: scale(1.2) rotate(-5deg); }

/* ══ PREMIUM CARDS ════════════════════════════════════ */
.plan-card {
  transition: transform .25s cubic-bezier(.4,0,.2,1), box-shadow .25s;
}
.plan-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 24px 60px rgba(0,0,0,.5);
}
.plan-card.featured {
  animation: featuredGlow 3s ease-in-out infinite;
}
@keyframes featuredGlow {
  0%, 100% { box-shadow: 0 0 0 1px rgba(232,98,42,.35), 0 8px 32px rgba(0,0,0,.3); }
  50%       { box-shadow: 0 0 0 1px rgba(232,98,42,.6), 0 12px 48px rgba(232,98,42,.2); }
}

/* ══ NOTIF BAR ═══════════════════════════════════════ */
.nb-item { transition: background .12s, transform .12s; }
.nb-item:hover { transform: translateX(3px); }
.nb-item-icon {
  transition: transform .2s;
}
.nb-item:hover .nb-item-icon { transform: scale(1.1) rotate(-5deg); }

/* ══ UPLOAD DROPZONE ═════════════════════════════════ */
.dropzone {
  transition: border-color .2s, background .2s, transform .2s;
}
.dropzone:hover { transform: scale(1.01); }
.dropzone.drag  { transform: scale(1.02); }
.dz-icon {
  animation: floatUp 2.5s ease-in-out infinite;
}

/* ══ ADMIN STAT CARDS ════════════════════════════════ */
.stat-card {
  transition: transform .2s, box-shadow .2s;
  overflow: hidden;
}
.stat-card:hover { transform: translateY(-4px); }
.stat-card-num {
  transition: color .3s;
  animation: countUp .6s cubic-bezier(.22,1,.36,1) both;
}
@keyframes countUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ══ LIVE TV SCREEN ══════════════════════════════════ */
.live-placeholder .lpi {
  animation: floatUp 2s ease-in-out infinite;
}
/* Live indicator dot */
.live-dot {
  display: inline-block;
  width: 8px; height: 8px; border-radius: 50%;
  background: #ef4444; margin-right: 6px;
  animation: livePulse 1.4s ease-in-out infinite;
  vertical-align: middle;
}
@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(239,68,68,.4); }
  50%       { opacity: .8; transform: scale(1.1); box-shadow: 0 0 0 6px rgba(239,68,68,0); }
}

/* ══ SEARCH PAGE ══════════════════════════════════════ */
.search-big {
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.search-big:focus-within { transform: scale(1.01); }

/* ══ CHART ROWS ══════════════════════════════════════ */
.chart-row { transition: background .12s, transform .12s; }
.chart-row:hover { transform: translateX(5px); }
.chart-rank.gold   { animation: goldShine 2.5s ease-in-out infinite; }
@keyframes goldShine {
  0%, 100% { text-shadow: 0 0 6px rgba(240,192,64,.3); }
  50%       { text-shadow: 0 0 18px rgba(240,192,64,.8); }
}

/* ══ AI CHAT ══════════════════════════════════════════ */
.ai-bubble { animation: bubbleIn .25s cubic-bezier(.4,0,.2,1); }
@keyframes bubbleIn {
  from { opacity: 0; transform: translateY(8px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.ai-hd-icon {
  animation: floatUp 3s ease-in-out infinite;
}

/* ══ SECTION FEATURE CARDS (About) ═══════════════════ */
.about-card {
  transition: transform .2s cubic-bezier(.4,0,.2,1),
              box-shadow .2s, border-color .2s;
  animation: fadeUp .4s ease both;
}
.about-card:nth-child(1) { animation-delay: .05s; }
.about-card:nth-child(2) { animation-delay: .10s; }
.about-card:nth-child(3) { animation-delay: .15s; }
.about-card:nth-child(4) { animation-delay: .20s; }
.about-card:nth-child(5) { animation-delay: .25s; }
.about-card:nth-child(6) { animation-delay: .30s; }

/* ══ PROGRESS BAR FILL ════════════════════════════════ */
.prog-fill { transition: width .25s ease; }
.dl-progress-fill { transition: width .3s ease; }

/* ══ PROFILE AVATAR ══════════════════════════════════ */
.prof-av {
  transition: transform .25s, box-shadow .25s;
}
.prof-av:hover {
  transform: scale(1.06);
  box-shadow: 0 8px 28px rgba(232,98,42,.5);
}

/* ══ EMPTY STATE ══════════════════════════════════════ */
.empty-state .ei {
  animation: floatUp 2.5s ease-in-out infinite;
  display: inline-block;
}

/* ══ NOTIF BADGE POP ══════════════════════════════════ */
.notif-count-badge {
  animation: popIn .25s cubic-bezier(.34,1.56,.64,1);
}

/* ══ SECTION APPEAR ══════════════════════════════════ */
.section { animation: fadeUp .35s ease both; }
.section:nth-child(1) { animation-delay: .05s; }
.section:nth-child(2) { animation-delay: .12s; }

/* ══ MOBILE TOUCH FEEDBACK ════════════════════════════ */
@media (hover: none) {
  .srow:active  { background: var(--card); transform: scale(.98); }
  .vid-card:active { transform: scale(.97); }
  .tab:active   { transform: scale(.94); }
  .btn-accent:active { transform: scale(.96); opacity: .9; }
  .bn-btn:active { background: rgba(232,98,42,.1); }
}

/* ══ PLAYER PROGRESS DRAG HANDLE ════════════════════ */
.pb-prog::after {
  content: '';
  position: absolute; top: 50%; right: calc(100% - var(--pct, 0%));
  transform: translate(50%, -50%) scale(0);
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent); pointer-events: none;
  transition: transform .15s;
}
.pb-prog:hover::after { transform: translate(50%, -50%) scale(1); }

/* ══ OVERALL BODY TEXTURE ════════════════════════════ */
body::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='.035'/%3E%3C/svg%3E");
  background-size: 256px;
  opacity: .4;
}

/* ══ SIDEBAR ICON ANIMATIONS ════════════════════════ */
.sb-link .ico {
  transition: transform .2s, color .15s;
}
.sb-link:hover .ico { transform: scale(1.2); }
.sb-link.active .ico { transform: scale(1.15); }

/* ══ TOPBAR SEARCH GLOW ══════════════════════════════ */
.top-search:focus-within {
  animation: searchGlow .3s ease;
}
@keyframes searchGlow {
  0%   { box-shadow: 0 0 0 0 rgba(232,98,42,.3); }
  50%  { box-shadow: 0 0 0 6px rgba(232,98,42,.15); }
  100% { box-shadow: 0 0 0 3px rgba(232,98,42,.08); }
}

/* ══ PREMIUM BADGE FLOAT ════════════════════════════ */
.plan-top {
  animation: floatUp 2.2s ease-in-out infinite;
}

/* ══ HERO CROSS WATERMARK ROTATE ════════════════════ */
.hero::after {
  animation: crossRotate 60s linear infinite;
  transform-origin: center;
}
@keyframes crossRotate {
  from { opacity: .03; transform: rotate(0deg) scale(1); }
  50%  { opacity: .06; transform: rotate(180deg) scale(1.05); }
  to   { opacity: .03; transform: rotate(360deg) scale(1); }
}

/* ══ RESPONSIVE: reduce animations on mobile ════════ */
@media (max-width: 768px) {
  /* Disable tilt and heavy effects on mobile */
  .vid-card { transform-style: flat !important; }
  .vid-card:hover::after { display: none; }
  /* Keep essential animations, reduce delays */
  .about-card { animation-delay: 0s !important; }
  /* Disable noise texture on mobile for perf */
  body::before { display: none; }
}

/* ══ REDUCED MOTION ══════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .hero-particles { display: none; }
}

/* ══ INLINE SVG HERO ILLUSTRATION ════════════════════ */
/* Cross icon inside logo */
.sb-logo-icon::before {
  font-style: normal;
}

/* ══ HEADER VIDEO CARDS - image fallback gradient ════ */
.vid-thumb:not(:has(img)) {
  background: linear-gradient(135deg, #180a02, #0c1117, #020d08);
}

/* ══ MUSIC NOTE TRAIL on player ═════════════════════ */
.player-bar.visible .pb-left::after {
  content: '♪';
  position: absolute; left: 60px; top: -14px;
  font-size: 11px; color: var(--accent);
  opacity: 0;
  animation: noteFloat 2.4s ease-in-out 1.5s infinite;
}
@keyframes noteFloat {
  0%   { opacity: 0; transform: translateY(0) translateX(0) rotate(-10deg); }
  30%  { opacity: .6; }
  100% { opacity: 0; transform: translateY(-22px) translateX(8px) rotate(10deg); }
}

/* ══ PROFILE STATS ANIMATED ══════════════════════════ */
.ps span {
  display: block;
  animation: countUp .5s ease both;
}

/* ══ QUEUE ITEM SLIDE IN ═════════════════════════════ */
.queue-item {
  animation: slideInLeft .2s ease both;
}
.queue-item:nth-child(1) { animation-delay: .04s; }
.queue-item:nth-child(2) { animation-delay: .08s; }
.queue-item:nth-child(3) { animation-delay: .12s; }
.queue-item:nth-child(4) { animation-delay: .16s; }

/* ══ CHART ROW STAGGER ════════════════════════════════ */
.chart-row { animation: slideInLeft .25s ease both; }
.chart-row:nth-child(1) { animation-delay: .03s; }
.chart-row:nth-child(2) { animation-delay: .06s; }
.chart-row:nth-child(3) { animation-delay: .09s; }
.chart-row:nth-child(4) { animation-delay: .12s; }
.chart-row:nth-child(5) { animation-delay: .15s; }

/* ══ ADMIN TAB PANELS FADE ════════════════════════════ */
.admin-tab-pane.active { animation: fadeUp .2s ease; }

/* ══ NOTIF BAR ITEMS STAGGER ═════════════════════════ */
.nb-item { animation: slideInLeft .22s ease both; }
.nb-item:nth-child(1) { animation-delay: .04s; }
.nb-item:nth-child(2) { animation-delay: .08s; }
.nb-item:nth-child(3) { animation-delay: .12s; }
.nb-item:nth-child(4) { animation-delay: .16s; }
.nb-item:nth-child(5) { animation-delay: .20s; }

/* ══ FORM INPUTS FOCUS ANIMATION ══════════════════════ */
.fg input:focus,
.fg select:focus,
.fg textarea:focus {
  animation: inputFocusIn .2s ease;
}
@keyframes inputFocusIn {
  from { box-shadow: 0 0 0 0 rgba(232,98,42,.3); }
  to   { box-shadow: 0 0 0 3px rgba(232,98,42,.08); }
}

/* ══ HERO SVG WAVE BOTTOM ══════════════════════════════ */
.hero-wave {
  position: absolute; bottom: -1px; left: 0; right: 0;
  pointer-events: none; line-height: 0;
}
