/* DJ C7 & Lil C7 — ستايل كروم / ميتال */
:root {
  --bg: #07070a;
  --bg-2: #0e0e13;
  --card: #121218;
  --card-2: #181820;
  --line: #26262f;
  --text: #ecedf2;
  --muted: #8d8f9c;
  --chrome: linear-gradient(180deg, #ffffff 0%, #c9ccd6 28%, #6d717d 52%, #e4e6ec 72%, #9da1ad 100%);
  --chrome-btn: linear-gradient(180deg, #f4f5f8 0%, #b9bcc6 45%, #7c808c 55%, #d3d6dd 100%);
  --accent: #b7c4ff;
  --danger: #ff5c6c;
  --ok: #7cf0b4;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Cairo', system-ui, sans-serif;
  background:
    radial-gradient(1200px 600px at 80% -10%, #1b1d2a 0%, transparent 60%),
    radial-gradient(900px 500px at 0% 0%, #15151d 0%, transparent 55%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}
body.has-player { padding-bottom: 96px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .6em; }
h1 { font-size: clamp(1.5rem, 4vw, 2.2rem); font-weight: 900; }
h2 { font-size: 1.3rem; }
code { background: #1d1d26; padding: 2px 6px; border-radius: 6px; direction: ltr; display: inline-block; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 24px 16px 48px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 14px 0; }
.center { text-align: center; }
.empty { color: var(--muted); padding: 30px 0; text-align: center; }

.site-title, .brand span {
  font-family: 'Metal Mania', 'Cairo', serif;
  background: var(--chrome);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  letter-spacing: .5px; direction: ltr; unicode-bidi: isolate;
  filter: drop-shadow(0 2px 6px rgba(255,255,255,.08));
}

/* ———— الشريط العلوي ———— */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px;
  padding: 10px 16px;
  background: rgba(7,7,10,.82); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none !important; }
.brand img { height: 42px; }
.brand span { font-size: 1.35rem; white-space: nowrap; }
.nav { display: flex; gap: 4px; margin-inline-start: auto; overflow-x: auto; }
.nav a { color: var(--muted); padding: 6px 12px; border-radius: 999px; white-space: nowrap; font-weight: 600; }
.nav a:hover { color: var(--text); text-decoration: none; background: var(--card); }
.nav a.on { color: #0b0b10; background: var(--chrome-btn); }
.nav .admin-link { border: 1px solid #3a3a48; }
.menu { position: relative; }
.menu summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.menu-name { font-weight: 600; direction: ltr; }
.menu-pop {
  position: absolute; inset-inline-end: 0; top: 46px; min-width: 180px;
  background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; padding: 6px;
  box-shadow: 0 12px 30px rgba(0,0,0,.5);
}
.menu-pop a, .menu-pop button {
  display: block; width: 100%; text-align: start; padding: 8px 12px; border-radius: 8px;
  color: var(--text); background: none; border: 0; font: inherit; cursor: pointer;
}
.menu-pop a:hover, .menu-pop button:hover { background: #22222c; text-decoration: none; }

/* ———— الأزرار ———— */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border-radius: 999px; font: 700 .95rem 'Cairo', sans-serif;
  border: 1px solid transparent; cursor: pointer; text-decoration: none !important;
  transition: transform .12s ease, box-shadow .12s ease, filter .12s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: wait; }
.btn-chrome {
  background: var(--chrome-btn); color: #0b0b10;
  box-shadow: inset 0 1px 0 #fff, 0 6px 20px rgba(200,205,220,.15);
  border-color: #9a9eaa;
}
.btn-chrome:hover { filter: brightness(1.08); }
.btn-ghost { background: var(--card); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: #4a4a58; }
.btn-danger { background: transparent; color: var(--danger); border-color: #5a2630; }
.btn-danger:hover { background: #2a1015; }
.btn.sm { padding: 5px 12px; font-size: .82rem; }

/* ———— البطاقات والفورمات ———— */
.card {
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
}
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; }
input, textarea, select {
  width: 100%; padding: 11px 14px; border-radius: 10px;
  background: #0b0b10; color: var(--text); border: 1px solid var(--line);
  font: 400 1rem 'Cairo', sans-serif;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: #8b90a0; box-shadow: 0 0 0 3px rgba(183,196,255,.12); }
input[type=file] { padding: 8px; }
input[type=range] { padding: 0; accent-color: #d6d9e2; background: none; border: 0; }
.drop { border: 1px dashed #3a3a48; border-radius: 12px; padding: 12px; background: #0c0c12; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.alert { background: #2a1015; border: 1px solid #5a2630; color: #ffb3bb; padding: 10px 14px; border-radius: 10px; margin: 10px 0; }
.flash { background: #0f2a1f; border: 1px solid #1f5a40; color: var(--ok); padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; }
.progress { position: relative; height: 30px; background: #0b0b10; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.progress-bar { position: absolute; inset-block: 0; inset-inline-start: 0; width: 0; background: var(--chrome-btn); transition: width .2s; }
.progress-text { position: relative; display: block; text-align: center; font-weight: 700; font-size: .85rem; line-height: 28px; mix-blend-mode: difference; }

/* ———— تسجيل الدخول ———— */
body.bare main { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth { width: 100%; max-width: 400px; text-align: center; }
.auth-logo { width: 160px; filter: drop-shadow(0 10px 30px rgba(220,225,240,.18)); }
.auth .site-title { font-size: 2.4rem; margin: 8px 0 0; }
.auth .form { text-align: start; margin: 18px 0; }
.auth .btn { width: 100%; padding: 12px; font-size: 1.05rem; }

/* ———— الصفحة الرئيسية ———— */
.hero {
  display: flex; align-items: center; gap: 28px; padding: 24px;
  border: 1px solid var(--line); border-radius: 22px; margin-bottom: 28px;
  background: radial-gradient(500px 200px at 20% 50%, rgba(200,205,230,.08), transparent), var(--card);
}
.hero-logo { width: 150px; flex-shrink: 0; filter: drop-shadow(0 10px 30px rgba(220,225,240,.15)); }
.hero .site-title { font-size: clamp(2rem, 6vw, 3.2rem); margin: 0; }
.hero p { color: var(--muted); margin: 4px 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.section-head h2 { margin: 0; }
.search input { width: min(320px, 100%); border-radius: 999px; }

/* ———— قائمة الأغاني ———— */
.tracks { display: grid; gap: 10px; }
.track {
  display: flex; align-items: center; gap: 14px; padding: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .15s;
}
.track:hover { border-color: #3c3c4a; }
.play { position: relative; padding: 0; border: 0; background: none; cursor: pointer; flex-shrink: 0; }
.track .play img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; display: block; background: #0b0b10; }
.play-ico {
  position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.3rem; color: #fff;
  background: rgba(0,0,0,.45); border-radius: 10px; opacity: 0; transition: opacity .15s;
}
.track:hover .play-ico, .play.playing .play-ico { opacity: 1; }
.play.playing .play-ico::before { content: '❚❚'; font-size: 1rem; }
.play.playing .play-ico { font-size: 0; }
.track-info { flex: 1; min-width: 0; }
.track-title { display: block; color: var(--text); font-weight: 700; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-artist { color: var(--muted); font-size: .9rem; }
.track-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: .78rem; color: var(--muted); margin-top: 4px; align-items: center; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: .72rem; font-weight: 700; background: #22222c; color: #c9ccd6; border: 1px solid #33333f; direction: ltr; }
.badge-hq { background: var(--chrome-btn); color: #0b0b10; border-color: #9a9eaa; }
.badge-bad { background: #2a1015; color: var(--danger); border-color: #5a2630; }
.tag { color: var(--accent); }
.dl { padding: 8px 14px; }

/* ———— صفحة الأغنية / المنتج ———— */
.track-hero { display: flex; gap: 28px; align-items: flex-start; margin: 10px 0 32px; flex-wrap: wrap; }
.big-cover { width: min(320px, 100%); aspect-ratio: 1; object-fit: cover; border-radius: 18px; border: 1px solid var(--line); background: var(--card); }
.track-hero-info { flex: 1; min-width: 260px; }
.artist-line { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 600; }
.desc { white-space: pre-wrap; color: #c8cad3; }
.big-play { font-size: 1.05rem; padding: 12px 26px; }
.share { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 16px 0; }
.share input { flex: 1; min-width: 200px; font-size: .85rem; }

/* ———— الأفتار ———— */
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 1px solid #3a3a48; background: #1c1c25; }
.avatar.sm { width: 30px; height: 30px; }
.avatar.xl { width: 120px; height: 120px; }
.avatar-empty { display: inline-grid; place-items: center; font-weight: 900; background: var(--chrome-btn); color: #0b0b10; }
.avatar-empty.xl { font-size: 2.6rem; }
.avatar-edit { display: flex; align-items: center; gap: 16px; }
.profile { display: flex; gap: 22px; align-items: center; margin-bottom: 26px; flex-wrap: wrap; }

/* ———— المتجر ———— */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 20px; }
.tab { padding: 8px 18px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--text); font-weight: 600; }
.tab:hover { text-decoration: none; border-color: #4a4a58; }
.tab.on { background: var(--chrome-btn); color: #0b0b10; border-color: #9a9eaa; }
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--text); transition: transform .15s, border-color .15s; }
.product:hover { transform: translateY(-3px); border-color: #4a4a58; text-decoration: none; }
.product img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: #0b0b10; }
.product-body { padding: 12px 14px 16px; }
.product h3 { font-size: 1.02rem; margin: 4px 0 8px; }
.cat { font-size: .8rem; color: var(--muted); }
.price { font-weight: 900; font-size: 1.1rem; background: var(--chrome); -webkit-background-clip: text; background-clip: text; color: transparent; }
.price.big { font-size: 2rem; }
.pay-logos { display: flex; gap: 6px; flex-wrap: wrap; }
.pay-logos span { font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: 6px; border: 1px solid var(--line); background: #0b0b10; color: #c9ccd6; direction: ltr; }

/* ———— الجداول (المشرف) ———— */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); margin-top: 20px; }
.table { width: 100%; border-collapse: collapse; min-width: 640px; }
.table th, .table td { padding: 10px 12px; text-align: start; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { background: var(--card-2); font-size: .85rem; color: var(--muted); }
.table tr:last-child td { border-bottom: 0; }
.inline { display: inline-flex; gap: 6px; align-items: center; margin: 2px; }
.inline select { width: auto; padding: 5px 10px; }
.price-input { width: 110px !important; padding: 5px 10px !important; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.stat b { display: block; font-size: 1.6rem; background: var(--chrome); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { color: var(--muted); font-size: .9rem; }
.admin-tabs { margin-top: 0; }

/* ———— صفحات الرسائل ———— */
.msg { max-width: 460px; margin: 40px auto; padding: 32px; }
.msg-ico { font-size: 2.6rem; }

/* ———— المشغل السفلي ———— */
.player {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 30;
  display: flex; align-items: center; gap: 14px; padding: 10px 16px;
  background: rgba(12,12,17,.96); backdrop-filter: blur(14px);
  border-top: 1px solid #2c2c37;
}
.player[hidden] { display: none; }
.player img { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; }
.pl-meta { min-width: 0; width: 200px; display: flex; flex-direction: column; }
.pl-meta a { color: var(--text); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-meta span { color: var(--muted); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid #9a9eaa; background: var(--chrome-btn); color: #0b0b10; font-size: 1rem; cursor: pointer; flex-shrink: 0; }
.pl-bar { flex: 1; display: flex; align-items: center; gap: 10px; font-size: .78rem; color: var(--muted); direction: ltr; }
.pl-bar input { flex: 1; }
#pl-vol { width: 90px; }
.foot { text-align: center; color: var(--muted); font-size: .8rem; padding: 20px; }

@media (max-width: 720px) {
  .topbar { flex-wrap: wrap; gap: 8px; }
  .brand span { font-size: 1.1rem; }
  .nav { order: 3; width: 100%; margin: 0; }
  .menu { margin-inline-start: auto; }
  .menu-name { display: none; }
  .hero { flex-direction: column; text-align: center; }
  .hero .row { justify-content: center; }
  .track .play img { width: 54px; height: 54px; }
  .pl-meta { width: auto; flex: 1; }
  .pl-bar { position: absolute; top: -8px; inset-inline: 0; padding: 0; }
  .pl-bar span { display: none; }
  #pl-vol { display: none; }
}
