@font-face {
  font-family: "Noto Sans Arabic";
  src: url("assets/fonts/noto-sans-arabic.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("assets/fonts/inter-variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #0e1212;
  --panel: #151818;
  --panel-dark: #0a1011;
  --header: #160d0b;
  --nav: #0b1719;
  --text: #f7f3f1;
  --muted: #b5afad;
  --cyan: #24b9e7;
  --blue: #00aef0;
  --green: #2cae72;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #070a0b;
}

body {
  color: var(--text);
  font-family: "Noto Sans Arabic", "Inter", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
[role="button"] {
  pointer-events: none;
}

.app-shell {
  position: relative;
  display: grid;
  grid-template-rows: 66px minmax(0, 1fr) 72px;
  width: min(100%, 685px);
  height: 100svh;
  margin: 0 auto;
  overflow: hidden;
  background:
    radial-gradient(70% 30% at 8% 0%, rgba(112, 34, 27, 0.32), transparent 68%),
    radial-gradient(55% 30% at 95% 8%, rgba(20, 50, 58, 0.18), transparent 70%),
    var(--bg);
}

.topbar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 0 50px 0 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  background: linear-gradient(90deg, #160c09 0%, #130c0b 32%, #101111 100%);
}

.topnav {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  direction: ltr;
}

.topnav-item {
  position: relative;
  padding: 22px 2px 21px;
  color: #f4f1ef;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.topnav-item.active {
  color: #fff;
}

.topnav-item.active::after {
  position: absolute;
  right: 4px;
  bottom: 0;
  left: 4px;
  height: 3px;
  border-radius: 999px;
  background: #35b9e4;
  content: "";
}

.search-icon {
  position: absolute;
  top: 50%;
  right: 13px;
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  color: #fff;
  transform: translateY(-50%);
}

.search-icon svg {
  width: 22px;
  height: 22px;
}

.feed {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.feed::-webkit-scrollbar {
  display: none;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 10px 8px 88px;
  direction: ltr;
}

.profile-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: 12px;
  background: var(--panel-dark);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
  direction: rtl;
}

.card-media {
  position: relative;
  aspect-ratio: 1.58 / 1;
  overflow: hidden;
  background-color: #222;
  background-position: center;
  background-size: cover;
}

.card-media::after {
  position: absolute;
  inset: 35% 0 0;
  content: "";
  background: linear-gradient(180deg, transparent, rgba(6, 9, 10, 0.48));
}

.card-01 { background-image: url("assets/images/card-01.webp"); }
.card-02 { background-image: url("assets/images/card-02.webp"); }
.card-03 { background-image: url("assets/images/card-03.webp"); }
.card-04 { background-image: url("assets/images/card-04.webp"); }
.card-05 { background-image: url("assets/images/card-05.webp"); }
.card-06 { background-image: url("assets/images/card-06.webp"); }
.card-07 { background-image: url("assets/images/card-07.webp"); }
.card-08 { background-image: url("assets/images/card-08.webp"); }
.card-09 { background-image: url("assets/images/card-09.webp"); }
.card-10 { background-image: url("assets/images/card-10.webp"); }

.free-pill,
.online-pill {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.free-pill {
  top: 7px;
  left: 7px;
  min-width: 44px;
  height: 20px;
  padding: 0 7px;
  border-radius: 5px;
  background: var(--blue);
}

.online-pill {
  right: 7px;
  bottom: 7px;
  gap: 4px;
  height: 19px;
  padding: 0 6px;
  border-radius: 5px;
  background: rgba(32, 143, 98, 0.94);
}

.online-pill i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #c9ffe3;
}

.broadcast-badge {
  position: absolute;
  z-index: 2;
  right: 8px;
  bottom: 31px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: 50%;
  color: #fff;
  background: rgba(24, 184, 220, 0.88);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}

.broadcast-badge svg {
  width: 18px;
  height: 18px;
}

.card-info {
  display: flex;
  min-height: 35px;
  align-items: center;
  padding: 7px 9px 8px;
  text-align: right;
}

.card-info strong {
  max-width: 100%;
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bottom-nav {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: center;
  padding: 0 8px env(safe-area-inset-bottom, 0px);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: linear-gradient(180deg, #0b1719, #081011);
}

.nav-action {
  display: inline-flex;
  height: 100%;
  align-items: center;
  justify-content: center;
  color: #d9d9d9;
}

.nav-action svg {
  width: 24px;
  height: 24px;
}

.nav-action.active,
.nav-action.accent {
  color: var(--cyan);
}

.nav-action.rank {
  font-family: "Inter", sans-serif;
  font-size: 23px;
  font-weight: 500;
  color: #b9b9b9;
}

@media (min-width: 600px) {
  .app-shell {
    grid-template-rows: 76px minmax(0, 1fr) 82px;
  }

  .topnav-item {
    padding-top: 27px;
    padding-bottom: 26px;
    font-size: 17px;
  }

  .search-icon {
    right: 18px;
    width: 32px;
    height: 32px;
  }

  .card-grid {
    gap: 14px;
    padding: 12px 10px 100px;
  }

  .profile-card {
    border-radius: 15px;
  }

  .topnav-item.active::after {
    height: 4px;
  }

  .free-pill {
    top: 9px;
    left: 9px;
    min-width: 54px;
    height: 24px;
    padding: 0 9px;
    border-radius: 6px;
    font-size: 12px;
  }

  .online-pill {
    right: 9px;
    bottom: 9px;
    height: 23px;
    padding: 0 8px;
    border-radius: 6px;
    font-size: 12px;
  }

  .card-info {
    min-height: 43px;
    padding: 8px 11px 9px;
  }

  .card-info strong {
    font-size: 15px;
  }

  .nav-action svg {
    width: 29px;
    height: 29px;
  }

  .nav-action.rank {
    font-size: 27px;
  }
}

@media (max-width: 360px) {
  .app-shell {
    grid-template-rows: 61px minmax(0, 1fr) 68px;
  }

  .topnav-item {
    font-size: 13px;
  }

  .search-icon {
    right: 9px;
  }

  .card-grid {
    gap: 8px;
    padding: 8px 6px 82px;
  }

  .card-info strong {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
