/* ===== إعدادات عامة ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: "Cairo", system-ui, Tahoma, Arial;
  background: #111111;
  color: #f5f5f5;
  min-height: 100vh;
}
a {
  text-decoration: none;
  color: inherit;
}
img {
  max-width: 100%;
  display: block;
}

/* ===== التخطيط العام ===== */
.app {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 16px;
}

@media (max-width: 880px) {
  .app {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0;
  }
}

/* ===== الشريط الجانبي (سطح المكتب) ===== */
.sidebar-wrapper {
  background: #181818;
  border-radius: 18px;
  border: 1px solid #262626;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 10px;
  height: calc(100vh - 20px);
}

.sidebar-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  margin-bottom: 10px;
}

.sidebar-logo {
  width: 100px;
  height: 100px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.sidebar-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-title-main {
  font-size: 15px;
  font-weight: 600;
}

.sidebar-title-sub {
  font-size: 12px;
  color: #a5a5a5;
}

.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  width: 100%;
}

.nav-item {
  border-radius: 999px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #c4c4c4;
  cursor: pointer;
  border: 1px solid transparent;
  transition: 0.16s;
}

.nav-item span.icon {
  font-size: 16px;
}

.nav-item:hover {
  background: #222222;
  border-color: #333333;
}

.nav-item.active {
  background: #2b2b2b;
  border-color: #3f3f3f;
  color: #ffffff;
}

/* ===== الشريط السفلي (الموبايل) ===== */
.bottom-nav {
  display: none;
}
@media (max-width: 880px) {
  .bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: #1a1a1a;
    border-top: 1px solid #2c2c2c;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0;
    z-index: 50;
  }
  .bottom-item {
    text-align: center;
    font-size: 10px;
    color: #999;
  }
  .bottom-item span.icon {
    display: block;
    font-size: 18px;
    margin-bottom: 2px;
  }
  .bottom-item.active {
    color: #e0b15a;
  }
}

/* ===== المحتوى الرئيسي ===== */
.main {
  background: #151515;
  border-radius: 22px;
  border: 1px solid #262626;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
  padding: 20px 20px 80px;
  position: relative;
}
@media (max-width: 880px) {
  .main {
    border-radius: 0;
    border: none;
    box-shadow: none;
    padding: 80px 14px 90px; /* 80 للهيدر، 90 للبوتوم */
  }
}

.page-header {
  margin-bottom: 14px;
}
.page-title {
  font-size: 20px;
}
.page-subtitle {
  font-size: 13px;
  color: #aaa;
  margin-top: 3px;
}

/* ===== مربع البحث ===== */
.search-box {
  margin-bottom: 16px;
}
.search-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #121212;
  border-radius: 999px;
  border: 1px solid #2a2a2a;
  padding: 8px 12px;
}
.search-inner span {
  font-size: 16px;
  color: #999;
}
.search-inner input {
  border: none;
  outline: none;
  background: transparent;
  color: #fff;
  font-size: 14px;
  width: 100%;
}
.search-inner input::placeholder {
  color: #777;
}

/* ===== الهيدر الخاص بالموبايل ===== */
.mobile-header {
  display: none;
}

.mobile-header-logo-img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: cover;
}

@media (max-width: 880px) {
  .mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: #151515;
    border-bottom: 1px solid #262626;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    height: 58px;
  }

  .mobile-header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .mobile-header-logo {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: #2a2a2a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
  }

  .mobile-header-text {
    display: flex;
    flex-direction: column;
    font-size: 11px;
    line-height: 1.2;
  }

  .mobile-header-text strong {
    font-size: 13px;
  }

  .mobile-header-season {
    font-size: 11px;
    color: #aaaaaa;
    text-align: left;
  }
}

/* ===== الشبكة الداخلية ===== */
.content-grid {
  display: grid;
  grid-template-columns: 2fr 1.2fr;
  gap: 16px;
}
@media (max-width: 880px) {
  .content-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* ===== البطاقات العامة ===== */
.card {
  background: #1b1b1b;
  border-radius: 14px;
  border: 1px solid #2b2b2b;
  padding: 14px;
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.card-header h3 {
  font-size: 15px;
}
.card-header a {
  color: #e0b15a;
  font-size: 12px;
}

/* ===== بطاقات المقاطع ===== */
.track-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.track-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #1c1c1c;
  border-radius: 12px;
  border: 1px solid #2a2a2a;
  padding: 8px 10px;
  transition: 0.2s;
}
.track-item:hover {
  background: #222;
}
.track-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #2a2a2a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.track-body {
  flex: 1;
  min-width: 0;
}
.track-title {
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.track-meta {
  font-size: 11px;
  color: #aaa;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.track-meta span + span::before {
  content: "·";
  margin: 0 4px;
}
.track-tag {
  display: inline-block;
  margin-top: 3px;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #222;
  border: 1px solid #333;
  color: #bbb;
}

/* ===== الرواديد / الشعراء ===== */
.people-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.person-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #1c1c1c;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 8px 10px;
  transition: 0.2s;
}
.person-item:hover {
  background: #222;
}
.person-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #2a2a2a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.person-info {
  flex: 1;
  min-width: 0;
}
.person-name {
  font-size: 14px;
}
.person-meta {
  font-size: 11px;
  color: #aaa;
}
.person-count {
  font-size: 11px;
  color: #aaa;
}

/* ===== بطاقات المناسبات ===== */
.tags-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 600px) {
  .tags-grid {
    grid-template-columns: 1fr;
  }
}
.tag-card {
  background: #1c1c1c;
  border-radius: 12px;
  border: 1px solid #2a2a2a;
  padding: 10px;
  transition: 0.2s;
}
.tag-card:hover {
  background: #222;
}
.tag-title {
  font-size: 13px;
  margin-bottom: 2px;
}
.tag-meta {
  font-size: 11px;
  color: #aaa;
}

/* ===== كبسولات وفلاتر ===== */
.chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.chip {
  border-radius: 999px;
  padding: 4px 10px;
  background: #222;
  border: 1px solid #333;
  font-size: 11px;
  color: #bbb;
}
.chip.highlight {
  background: #2d2d2d;
  border-color: #e0b15a55;
  color: #f8e2b4;
}

/* ===== زرّان عامّان ===== */
.btn-main,
.btn-ghost {
  border-radius: 999px;
  font-size: 11px;
  padding: 5px 10px;
  cursor: pointer;
  border: none;
}
.btn-main {
  background: #e0b15a;
  color: #1b1b1b;
}
.btn-ghost {
  background: transparent;
  border: 1px solid #3a3a3a;
  color: #f5f5f5;
}

/* ===== نصوص جانبية ===== */
.side-note {
  font-size: 11px;
  color: #aaa;
  line-height: 1.7;
}
.side-note strong {
  color: #fff;
}

/* ===== أهم جزء: التحكم بين السايدبار والبوتوم ===== */
@media (max-width: 880px) {
  /* إخفاء السايدبار نهائياً في الموبايل */
  .sidebar-wrapper {
    display: none !important;
  }
}

/* للتأكيد: في الديسكتوب، البوتوم مخفي دائماً */
@media (min-width: 881px) {
  .bottom-nav {
    display: none !important;
  }
}
/* إخفاء السايدبار تمامًا في الموبايل */
@media screen and (max-width: 880px) {
  /* لو السايدبار ملفوف داخل <aside> */
  .app > aside {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
  }

  /* ولو فيه ديف بكلاس sidebar-wrapper */
  .sidebar-wrapper {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
  }
}