/* ═══════════════════════════════════════════════════
   AIMUZ.NET — Bootstrap 5 Light Theme
   Custom prefix: aimuz-  (layout/component classes)
   JS-dependent classes unchanged: audioplayer-*, ap-*,
   js-*, wplayer, btn-menu, overlay-box, btn-close,
   #side-panel, #gotop
   ═══════════════════════════════════════════════════ */

/* ── Custom properties ──────────────────────────── */
:root {
  --bs-primary:             #7c3aed;
  --bs-primary-rgb:         124, 58, 237;
  --bs-link-color:          #7c3aed;
  --bs-link-color-rgb:      124, 58, 237;
  --bs-link-hover-color:    #6d28d9;
  --bs-link-hover-color-rgb: 109, 40, 217;

  /* Audio player (dark strip at bottom) */
  --ap-bg:    #18181b;
  --ap-text:  #f0eeff;
  --ap-muted: #7c7ca0;
  --ap-acc:   #7c3aed;
  --ap-acc-h: #9f66ff;
  --ap-line:  rgba(255,255,255,.08);
  --ap-h:     72px;
}

/* ── Bootstrap btn-primary overrides ────────────── */
.btn-primary {
  --bs-btn-bg:                #7c3aed;
  --bs-btn-border-color:      #7c3aed;
  --bs-btn-hover-bg:          #6d28d9;
  --bs-btn-hover-border-color:#6d28d9;
  --bs-btn-active-bg:         #5b21b6;
  --bs-btn-focus-shadow-rgb:  124,58,237;
}
.btn-outline-primary {
  --bs-btn-color:             #7c3aed;
  --bs-btn-border-color:      #7c3aed;
  --bs-btn-hover-bg:          #7c3aed;
  --bs-btn-hover-border-color:#7c3aed;
  --bs-btn-active-bg:         #6d28d9;
  --bs-btn-focus-shadow-rgb:  124,58,237;
}
.text-primary  { color: #7c3aed !important; }
.bg-primary    { background-color: #7c3aed !important; }
.border-primary{ border-color: #7c3aed !important; }

/* ── Global ──────────────────────────────────────── */
.container-xl { max-width: 1120px !important; }

body {
  padding-bottom: calc(var(--ap-h) + 12px);
  background-color: #f5f5f7 !important;
}
a { color: #7c3aed; }
a:hover { color: #6d28d9; }

/* ── Navbar ──────────────────────────────────────── */
.navbar-brand img { transition: opacity .12s; }
.navbar-brand:hover img { opacity: .85; }

/* Mobile menu trigger (btn-menu — used by libs.js) */
.btn-menu {
  background: none; border: 1px solid #dee2e6; border-radius: .375rem;
  color: #6c757d; padding: .3rem .55rem; line-height: 1;
  cursor: pointer; font-size: 1.1rem; transition: background .1s, color .1s;
  display: none; /* hidden on desktop, shown by responsive rule */
}
.btn-menu:hover { background: #f3f0ff; color: #7c3aed; border-color: #7c3aed; }

@media (max-width: 991.98px) {
  .btn-menu { display: inline-flex; align-items: center; justify-content: center; }
  #sidebar  { display: none !important; }
}

/* ── Utility ─────────────────────────────────────── */
.hidden, #dofullsearch { display: none; }
.nowrap { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* libs.js flex utilities — required by audio player layout */
.fx-row    { display: flex; }
.fx-middle { align-items: center; }
.fx-1      { flex: 1 1 0%; min-width: 0; }
.fx-first  { flex-shrink: 0; }

/* ════════════════════════════════════════════════════
   SIDEBAR NAVIGATION
   ════════════════════════════════════════════════════ */
.aimuz-nav-link {
  display: flex; align-items: center; gap: .5rem;
  padding: .45rem .75rem; font-size: .85rem;
  color: #212529; text-decoration: none;
  transition: background .1s, color .1s;
}
.aimuz-nav-link:hover { background: #f3f0ff; color: #7c3aed; }
.aimuz-nav-link span[class*="myicon-"] { color: #7c3aed; font-size: 1rem; }

/* ════════════════════════════════════════════════════
   TRACK LIST ITEM (shortstory.tpl)
   ════════════════════════════════════════════════════ */
.aimuz-track {
  display: flex; align-items: center; gap: .6rem;
  padding: .45rem .75rem; border-bottom: 1px solid #f0f0f0;
  color: #212529; text-decoration: none;
  transition: background .1s;
}
.aimuz-track:last-child { border-bottom: 0; }
.aimuz-track:hover { background: #f3f0ff; color: #212529; }
.aimuz-track.js-item-played { background: #ede9fe; }
.aimuz-track.js-item-played .aimuz-track-btn {
  background: #7c3aed !important; color: #fff !important;
}

.aimuz-track-btn {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #ede9fe; color: #7c3aed;
  border: none; cursor: pointer; font-size: .65rem;
  transition: background .1s, color .1s;
}
.aimuz-track-btn:hover { background: #7c3aed; color: #fff; }

.aimuz-track-info  { flex: 1; min-width: 0; }
.aimuz-track-artist {
  font-weight: 600; font-size: .82rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.aimuz-track-name {
  font-size: .78rem; color: #6c757d;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.aimuz-track-dur { font-size: .73rem; color: #adb5bd; flex-shrink: 0; }

/* ════════════════════════════════════════════════════
   NEW RELEASES GRID (custom-top.tpl)
   ════════════════════════════════════════════════════ */
.aimuz-album-btn {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #ede9fe; color: #7c3aed;
  border: none; cursor: pointer; font-size: .75rem;
  margin: 0 auto; transition: background .1s, color .1s;
}
.aimuz-album-btn:hover { background: #7c3aed; color: #fff; }
.js-item-played .aimuz-album-btn { background: #7c3aed !important; color: #fff !important; }

/* ════════════════════════════════════════════════════
   SIDEBAR TOP-10 (custom-topside.tpl)
   ════════════════════════════════════════════════════ */
.aimuz-rank-item {
  display: flex; align-items: center; gap: .5rem;
  padding: .4rem .75rem; border-bottom: 1px solid #f0f0f0;
  color: #212529; text-decoration: none; font-size: .8rem;
  transition: background .1s;
}
.aimuz-rank-item:last-child { border-bottom: 0; }
.aimuz-rank-item:hover { background: #f3f0ff; color: #7c3aed; }
.aimuz-rank-info { flex: 1; min-width: 0; }
.aimuz-rank-artist {
  font-weight: 600; font-size: .8rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.aimuz-rank-name {
  color: #6c757d; font-size: .75rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ════════════════════════════════════════════════════
   BREADCRUMB / SPEEDBAR
   ════════════════════════════════════════════════════ */
.aimuz-speedbar {
  display: inline-flex; align-items: center; flex-wrap: wrap; gap: .15rem;
  background: #f8f5ff;
  border: 1px solid rgba(124,58,237,.18);
  border-left: 3px solid #7c3aed;
  border-radius: .5rem;
  padding: .4rem .9rem;
  font-size: .78rem; color: #6c757d;
  margin-bottom: 1rem; width: 100%;
  line-height: 1.5;
}
.aimuz-speedbar a {
  color: #7c3aed; text-decoration: none; font-weight: 500;
  transition: color .1s;
}
.aimuz-speedbar a:hover { color: #6d28d9; text-decoration: underline; }

/* ════════════════════════════════════════════════════
   FULL TRACK PAGE (fullstory.tpl)
   ════════════════════════════════════════════════════ */
.aimuz-article h1 {
  font-size: 1.4rem; font-weight: 700; line-height: 1.25; margin-bottom: .6rem;
}
.aimuz-cat-badge {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .78rem; color: #7c3aed;
}
.aimuz-cat-badge a { color: #7c3aed; text-decoration: none; }
.aimuz-cat-badge a:hover { text-decoration: underline; }

.aimuz-track-stats {
  margin: 0 0 .75rem; padding: 0;
}
.aimuz-track-stats li {
  display: flex; gap: .5rem; padding: .2rem 0;
  border-bottom: 1px solid #f5f5f5; font-size: .82rem;
}
.aimuz-track-stats li > span:first-child { color: #6c757d; min-width: 105px; }

.aimuz-track-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

.aimuz-btn-play {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .45rem 1.2rem; border-radius: 2rem;
  background: #7c3aed; color: #fff; border: none; cursor: pointer;
  font-size: .85rem; font-weight: 600;
  transition: background .12s;
}
.aimuz-btn-play:hover { background: #6d28d9; }

.aimuz-btn-dl {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .45rem 1.2rem; border-radius: 2rem;
  background: #10b981; color: #fff;
  border: none; text-decoration: none;
  font-size: .85rem; font-weight: 600;
  transition: background .12s;
}
.aimuz-btn-dl:hover { background: #059669; color: #fff; }

.aimuz-track-cap {
  font-size: .78rem; color: #6c757d; margin-top: .5rem;
  width: 100%;
}

.aimuz-sect { margin-bottom: 1.5rem; }
.aimuz-sect-title {
  font-size: .95rem; font-weight: 700;
  padding-bottom: .35rem; margin-bottom: .6rem;
  border-bottom: 2px solid #7c3aed;
  display: inline-block;
}

.aimuz-full-text { font-size: .9rem; line-height: 1.75; }
.aimuz-full-text h2, .aimuz-full-text h3 { margin: 1rem 0 .4rem; font-size: 1rem; }
.aimuz-full-text p { margin-bottom: .5rem; }
.aimuz-full-text a { color: #7c3aed; }
.aimuz-full-text img { max-width: 100%; border-radius: .375rem; margin: .5rem 0; }

.aimuz-lyric-text {
  font-size: .83rem; line-height: 1.9; color: #495057;
  background: #fafafa; border: 1px solid #e9ecef;
  border-radius: .375rem; padding: 1rem;
  max-height: 420px; overflow-y: auto; white-space: pre-wrap;
}
.aimuz-lyric-text::-webkit-scrollbar { width: 4px; }
.aimuz-lyric-text::-webkit-scrollbar-thumb { background: #ced4da; border-radius: 2px; }

/* ════════════════════════════════════════════════════
   SEO DESCRIPTION BLOCKS
   ════════════════════════════════════════════════════ */
.aimuz-seo {
  margin-top: 2rem; padding-top: 1.5rem;
  border-top: 1px solid #dee2e6;
  font-size: .83rem; color: #495057; line-height: 1.7;
}
.aimuz-seo h2 {
  font-size: .9rem; font-weight: 600;
  color: #343a40; margin: .9rem 0 .35rem;
}
.aimuz-seo p  { margin-bottom: .5rem; }
.aimuz-seo ul { padding: 0; list-style: none; margin-bottom: .5rem; }
.aimuz-seo li { padding-left: 1rem; position: relative; margin-bottom: .2rem; }
.aimuz-seo li::before { content: "•"; position: absolute; left: 0; color: #7c3aed; }

/* ════════════════════════════════════════════════════
   FIXED AUDIO PLAYER  (dark bar, JS-dependent classes)
   ════════════════════════════════════════════════════ */
.wplayer {
  width: 100%; position: fixed; left: 0; bottom: 0; z-index: 997;
  background: var(--ap-bg);
  box-shadow: 0 -1px 0 rgba(124,58,237,.4);
}
.audioplayer {
  position: relative; /* required for bar absolute positioning */
  max-width: 1120px; width: calc(100% - 32px);
  margin: 0 auto; height: var(--ap-h);
  display: flex; align-items: center;
  padding-top: 4px; /* push controls below the progress bar */
}
.audioplayer audio { display: none; }

/* Progress bar — sits at the very top of the player strip */
.audioplayer-bar {
  position: absolute; left: 0; top: 0;
  height: 4px; width: 100%; cursor: pointer;
  background: rgba(255,255,255,.1);
  border-radius: 0;
}
.audioplayer-bar-loaded {
  position: absolute; left: 0; top: 0; height: 100%;
  background: rgba(124,58,237,.3);
}
.audioplayer-bar-played {
  position: absolute; left: 0; top: 0; height: 100%;
  z-index: 10; background: linear-gradient(90deg, #7c3aed, #9f66ff);
}
.audioplayer-bar-played::before {
  content: ''; background: #9f66ff;
  width: 12px; height: 12px; border-radius: 50%;
  position: absolute; right: -6px; top: 50%; margin-top: -6px; z-index: 3;
  box-shadow: 0 0 8px rgba(159,102,255,.6);
}

.audioplayer-volume { position: relative; z-index: 100; margin-left: 18px; font-size: 15px; }
.audioplayer-muted .fa-volume-up::before { content: '\f6a9'; }
.audioplayer-volume-button a {
  color: var(--ap-muted); display: block; height: 30px; line-height: 30px;
  text-align: center; transition: color .12s;
}
.audioplayer-volume-button a:hover { color: var(--ap-acc); }
.audioplayer-volume-adjust {
  position: absolute; left: 0; bottom: 100%;
  width: 30px; height: 100px;
  background: #27272a; border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px; padding: 8px; display: none;
}
.audioplayer-volume-adjust > div {
  width: 10px; height: 80px; position: relative; cursor: pointer;
  background: #18181b; border-radius: 4px; overflow: hidden;
}
.audioplayer-volume-adjust > div > div {
  width: 100% !important; background: var(--ap-acc);
  position: absolute; left: 0; bottom: 0; z-index: 10;
}
.audioplayer-volume:hover .audioplayer-volume-adjust { display: block; }

.ap-dl  { font-size: 15px; color: var(--ap-muted); margin-left: 18px; transition: color .12s; flex-shrink: 0; }
.ap-dl:hover { color: var(--ap-acc); }
.ap-time { font-size: .68rem; color: var(--ap-muted); margin-left: 18px; white-space: nowrap; flex-shrink: 0; }
.audioplayer-time-current::after { content: '/'; margin: 0 4px; }
.ap-desc { flex: 1; min-width: 0; max-width: 260px; display: flex; align-items: center; margin-left: 18px; overflow: hidden; }
.ap-img     { width: 42px; height: 42px; margin-right: 10px; border-radius: 6px; flex-shrink: 0; overflow: hidden; }
.ap-img img { width: 42px; height: 42px; object-fit: cover; display: block; }
.ap-info    { flex: 1; min-width: 0; }
.ap-artist { font-size: .65rem; color: var(--ap-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-title  { font-size: .78rem; color: var(--ap-text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-btns   { display: flex; align-items: center; flex-shrink: 0; }

.audioplayer-playpause a {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 10px; background: var(--ap-acc); color: #fff;
  transition: background .12s;
}
.audioplayer-playpause a:hover { background: var(--ap-acc-h); }
.ap-prev, .ap-next { cursor: pointer; color: var(--ap-muted); font-size: 15px; transition: color .12s; }
.ap-prev:hover, .ap-next:hover { color: var(--ap-acc); }
.audioplayer-stopped .audioplayer-playpause a { padding-left: 2px; }
.wplayer-init .audioplayer-playpause .far::before { content: '\f04b'; padding-left: 1px; }

/* ── Scroll to top ───────────────────────────────── */
#gotop {
  position: fixed; width: 40px; height: 40px; line-height: 40px;
  right: 16px; bottom: 90px; z-index: 990; display: none;
  background: #7c3aed; color: #fff; cursor: pointer;
  font-size: 14px; border-radius: 10px; text-align: center;
  box-shadow: 0 4px 16px rgba(124,58,237,.35);
  transition: background .12s, transform .12s;
}
#gotop:hover { background: #6d28d9; transform: translateY(-2px); }

/* ── Pagination (DLE-generated) ──────────────────── */
.navigation { text-align: center; margin: 1rem 0; }
.navigation a, .navigation span,
.pnext a, .pprev a, .pprev > span, .pnext > span {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 10px; margin: 0 2px 6px; height: 32px; min-width: 32px;
  border-radius: 5px; font-size: .78rem;
  border: 1px solid #dee2e6; color: #6c757d;
  text-decoration: none; transition: all .1s;
}
.navigation a:hover { border-color: #7c3aed; color: #7c3aed; }
.navigation span:not(.nav_ext) { background: #7c3aed; color: #fff; border-color: #7c3aed; }

/* ── DLE Comments ────────────────────────────────── */
.add-comms { margin-bottom: 1.5rem; }
.ac-protect, .ac-textarea .bb-editor + br { display: none; }
.comments_subscribe { display: block; margin: .5rem 0; }
.mass_comments_action { display: none; }
.last-comm-link { display: inline-block; padding-bottom: 1.5rem; color: #7c3aed; }

.comm-avatar { position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%; }
.comm-letter {
  position: absolute; inset: 0; line-height: 36px; text-align: center;
  background: linear-gradient(135deg, #7c3aed, #9f66ff);
  color: #fff; font-size: 14px; text-transform: uppercase; border-radius: 50%;
}
.comm-item { margin-bottom: 1.25rem; font-size: .85rem; padding-left: 48px; position: relative; min-height: 36px; }
.comm-two  { margin: .4rem 0; }
.comm-one > span { margin-right: .75rem; color: #9ca3af; }
.comm-one > span.comm-author,
.comm-one > span.comm-author a { color: #111; font-weight: 700; }
.comm-three-left > a, .comm-three-right li a { opacity: .65; }
.comm-three-right li { display: inline-block; margin-left: .75rem; }

/* ── DLE form inputs override ────────────────────── */
input[type="text"], input[type="password"],
input[type="email"], textarea, select {
  font-family: inherit;
}

/* ════════════════════════════════════════════════════
   MOBILE SIDE PANEL
   ════════════════════════════════════════════════════ */
.side-panel {
  width: 280px; height: 100%; overflow: hidden auto;
  background: #fff; border-right: 1px solid #dee2e6;
  padding: 0;
  z-index: 9999; position: fixed; left: -300px; top: 0;
  transition: left .28s ease;
  box-shadow: 4px 0 24px rgba(0,0,0,.12);
}
.side-panel.active { left: 0; }

.aimuz-panel-head {
  background: #7c3aed; color: #fff;
  padding: .7rem 1rem; font-size: .9rem; font-weight: 600;
}

.side-panel .side-nav { list-style: none; padding: 0; margin: 0; }
.side-panel .side-nav li a {
  display: flex; align-items: center;
  padding: .5rem 1rem; color: #212529;
  text-decoration: none; font-size: .88rem;
  border-bottom: 1px solid #f5f5f5; transition: background .1s, color .1s;
}
.side-panel .side-nav li a:hover { background: #f3f0ff; color: #7c3aed; }

.overlay-box {
  width: 100%; height: 100%; background: rgba(0,0,0,.45);
  position: fixed; inset: 0; z-index: 9998; display: none;
}
.overlay-box.hidden { display: none; }

/* Override Bootstrap .btn-close for side panel X button */
.btn-close {
  cursor: pointer !important;
  position: fixed !important; left: 280px !important; top: -42px !important;
  z-index: 9999 !important; width: 42px !important; height: 42px !important;
  line-height: 42px !important; text-align: center !important;
  font-size: 17px !important; background: #7c3aed !important;
  color: #fff !important; opacity: 1 !important;
  border-radius: 0 0 4px 0 !important;
  background-image: none !important;
  padding: 0 !important; box-sizing: border-box !important;
  transition: top .28s ease !important;
}
.btn-close.active { top: 0 !important; }
body.opened-menu { overflow: hidden; }

/* ════════════════════════════════════════════════════
   ICOMOON ICON FONT
   ════════════════════════════════════════════════════ */
@font-face {
  font-family: 'icomoon';
  src: url('../webfonts/icomoon.woff?sr7zzu') format('woff');
  font-weight: normal; font-style: normal; font-display: swap;
}
[class^="myicon-"], [class*=" myicon-"] {
  font-family: 'icomoon' !important; speak: none;
  font-style: normal; font-weight: normal; font-variant: normal;
  text-transform: none; line-height: 1;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
.myicon-albums::before    { content: "\e900"; }
.myicon-calendar-1::before{ content: "\e901"; }
.myicon-download::before  { content: "\e902"; }
.myicon-favorite::before  { content: "\e903"; }
.myicon-genres::before    { content: "\e904"; }
.myicon-genres2::before   { content: "\e905"; }
.myicon-home-run::before  { content: "\e906"; }
.myicon-hot::before       { content: "\e907"; }
.myicon-like-2::before    { content: "\e908"; }
.myicon-logo::before      { content: "\e909"; }
.myicon-logo2::before     { content: "\e912"; }
.myicon-music::before     { content: "\e913"; }
.myicon-music2::before    { content: "\e914"; }
.myicon-next-1::before    { content: "\e915"; }
.myicon-next::before      { content: "\e916"; }
.myicon-pause::before     { content: "\e917"; }
.myicon-play::before      { content: "\e918"; }
.myicon-play1::before     { content: "\e919"; }
.myicon-radio::before     { content: "\e91a"; }
.myicon-search-1::before  { content: "\e91b"; }
.myicon-stop::before      { content: "\e91c"; }
.myicon-volume::before    { content: "\e91d"; }

/* ════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════ */
@media (max-width: 767.98px) {
  .aimuz-article h1 { font-size: 1.2rem; }
  .aimuz-track-actions { gap: .4rem; }
  .aimuz-btn-play, .aimuz-btn-dl { padding: .4rem .9rem; font-size: .8rem; }
  .audioplayer-volume, .ap-time, .ap-img { display: none !important; }
  .audioplayer-playpause a { margin: 0 8px; }
}

@media (max-width: 575.98px) {
  .ap-desc { display: none; }
}
