/* ================================================================
   مارجان كىنوخانىسى - ئاساسلىق ئۇسلۇب
   ئاندىروئىد + iOS ماسلىشىشچان، پاكىز، ئاددىي لايىھە
   RTL (ئوڭدىن سولغا) - ئۇيغۇر تىلى
   ================================================================ */

/* === 1. ئاساسىي ئېلېمېنتلار === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: clamp(14px, 2.5vw, 16px);
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  touch-action: pan-y;
}

body {
  font-family: 'UKIJ Ekran', 'Microsoft YaHei', 'Segoe UI', sans-serif;
  background: #0a0a0f;
  color: #e0e0e0;
  direction: rtl;
  line-height: 1.7;
  min-height: 100vh;
  min-height: -webkit-fill-available;
  overflow-x: hidden;
  overflow-y: auto;
  touch-action: pan-y;
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
  transition: background-color 0.3s ease, color 0.3s ease;
}

body.light-theme {
  background: #f5f5f7;
  color: #1a1a2e;
}

/* موبايل تىزىملىك ئوچۇق ۋاقىتتا سىرغىشنى چەكلەش */
body.menu-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  user-select: none;
  /* دىققەت: image-rendering: crisp-edges ئىشلەتمەڭ!
     ئۇ فوتو رەسىملەرنى پىكسېللاشتۇرۇپ تۇتۇق قىلىپ قويىدۇ.
     تور كۆرگۈنىڭ سۈكۈتتىكى ئەلالاشتۇرۇلغان ئىككىلىك سىزىق (bicubic) ئۇسۇلى
     فوتو رەسىملەر ئۈچۈن ئەڭ ياخشى نەتىجە بېرىدۇ. */
}

button {
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  border: none;
  background: none;
  min-height: 44px;
}

input, select, textarea {
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}

/* === 2. رەڭ ئۆزگەرگۈچىلەر === */
:root {
  --bg-dark: #0a0a0f;
  --bg-card: #16162a;
  --bg-card-hover: #1e1e38;
  --border: rgba(255, 255, 255, 0.08);
  --text-primary: #e0e0e0;
  --text-secondary: #888;
  --primary: #ff6b35;
  --primary-dark: #e55a2b;
  --green: #22C55E;
  --radius: 12px;
  --radius-sm: 8px;
}

body.light-theme {
  --bg-dark: #f5f5f7;
  --bg-card: #ffffff;
  --bg-card-hover: #f0f0f5;
  --border: rgba(0, 0, 0, 0.08);
  --text-primary: #1a1a2e;
  --text-secondary: #666;
}

/* === 3. ئۈستى يولباشلاش بالدىقى === */
.navbar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1000;
  background: rgba(10, 10, 15, 0.95);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  height: 56px;
  display: flex;
  align-items: center;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  padding-top: env(safe-area-inset-top, 0);
}

body.light-theme .navbar {
  background: rgba(245, 245, 247, 0.95);
}

.navbar-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 16px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  font-size: 1em;
  font-weight: bold;
  color: var(--primary);
  white-space: nowrap;
}

/* ئۈستى تىزىملىك — كومپيۇتېردا كۆرۈنىدۇ */
.nav-links {
  display: flex;
  list-style: none;
  gap: 4px;
}

.nav-links a {
  display: block;
  padding: 8px 14px;
  color: var(--text-secondary);
  font-size: 0.9em;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  background: rgba(255, 107, 53, 0.1);
}

/* ئىزدەش قۇتىسى */
.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-box input {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85em;
  width: 160px;
  outline: none;
  transition: border-color 0.2s;
}

.search-box input:focus {
  border-color: var(--primary);
}

.search-box button {
  background: var(--primary);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85em;
  white-space: nowrap;
}

.search-box button:active {
  background: var(--primary-dark);
}

/* موبايل تىزىملىك كۇنۇپكىسى */
.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--text-primary);
}

/* === 4. موبايل سىيرىلما تىزىملىك === */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1001;
  opacity: 0;
  transition: opacity 0.3s;
}

.mobile-overlay.show {
  display: block;
  opacity: 1;
}

.mobile-nav {
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100%;
  background: var(--bg-card);
  z-index: 1002;
  padding: 80px 20px 20px;
  padding-top: calc(80px + env(safe-area-inset-top, 0));
  transition: right 0.3s ease;
  border-left: 1px solid var(--border);
  overflow-y: auto;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

.mobile-nav.show {
  right: 0;
}

.mobile-nav a {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  color: var(--text-primary);
  font-size: 1em;
  border-radius: var(--radius-sm);
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}

.mobile-nav a:hover,
.mobile-nav a:active {
  background: var(--bg-card-hover);
}

/* === 5. Hero سۈرەتلىك === */
.hero {
  position: relative;
  width: 100%;
  height: 45vh;
  min-height: 280px;
  max-height: 500px;
  overflow: hidden;
  background: #111;
  margin-top: 56px;
  margin-top: calc(56px + env(safe-area-inset-top, 0));
}

.hero-slides {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

.hero-slide {
  min-width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  position: relative;
}

.hero-overlay {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 100%;
  height: 100%;
  padding: 30px;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent 60%);
}

.hero-overlay h1 {
  color: #fff;
  font-size: 1.6em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
  margin: 0;
}

.hero-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 5;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: background 0.3s;
}

.hero-dot.active {
  background: var(--primary);
}

/* === 6. سۈزگۈچ بالداق === */
.filter-bar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}

.filter-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 16px;
}

.category-toggle-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-card-hover);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9em;
}

.toggle-arrow {
  font-size: 0.8em;
  transition: transform 0.3s;
}

.category-toggle-btn.open .toggle-arrow {
  transform: rotate(180deg);
}

.category-collapse {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  opacity: 0;
}

.category-collapse.open {
  max-height: 500px;
  opacity: 1;
  padding-top: 12px;
}

.filter-label {
  color: var(--text-secondary);
  font-size: 0.85em;
  margin-bottom: 6px;
}

.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.filter-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background: var(--bg-card-hover);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-primary);
  font-size: 0.85em;
  transition: all 0.2s;
}

.filter-tag.active,
.filter-tag:active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* === 7. ئاساسلىق مەزمۇن رايونى === */
.main-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 16px 80px;
}

.section {
  margin-bottom: 36px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.section-title {
  font-size: 1.2em;
  color: var(--text-primary);
  font-weight: bold;
}

.section-more {
  color: var(--primary);
  font-size: 0.85em;
}

/* === 8. كىنو تورى === */
.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.movie-card {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  transition: transform 0.2s ease;
}

.movie-card:active {
  transform: scale(0.97);
  opacity: 0.9;
}

.card-poster {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--bg-card-hover);
  /* رەسىم يۈكلەنمىگەندە كۆرۈنىدىغان ئارقا كۆرۈنۈش */
  background: linear-gradient(110deg, var(--bg-card) 30%, var(--bg-card-hover) 50%, var(--bg-card) 70%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

.card-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* رەسىم يۈكلەنگەندە fade-in قىلىش */
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card-poster img.loaded,
.card-poster img[fetchpriority="high"] {
  opacity: 1;
}

/* img كامېرا تەرىپىدىن يۈكلەنگەندە loaded كلاس قوشۇلىدۇ (app.js) */
/* fetchpriority="high" بولغان رەسىملەر دەرھال كۆرۈنىدۇ */

/* Skeleton شىمېر ئانىماتسىيەسى */
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* رەسىم يۈكلەنگەندە skeleton نى توختىتىش */
.card-poster:has(img.loaded) {
  animation: none;
  background: var(--bg-card-hover);
}

.card-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.2s;
}

.movie-card:active .card-play {
  opacity: 0.9;
}

.card-badge {
  position: absolute;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7em;
  font-weight: bold;
}

.card-badge.score {
  top: 6px;
  right: 6px;
  background: rgba(255, 193, 7, 0.9);
  color: #000;
}

.card-badge.ep {
  bottom: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
}

.card-body {
  padding: 8px 10px;
}

.card-title {
  font-size: 0.85em;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.card-meta {
  font-size: 0.75em;
  color: var(--text-secondary);
}

/* === 9. ئەينەك كارتىلار === */
.glass-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.glass-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.2s;
}

.glass-card:active {
  transform: scale(0.97);
}

.glass-card-icon {
  font-size: 2em;
  margin-bottom: 8px;
}

.glass-card-icon.green { color: var(--green); }
.glass-card-icon.orange { color: var(--primary); }
.glass-card-icon.blue { color: #3b82f6; }
.glass-card-icon.purple { color: #a855f7; }

.glass-card-value {
  font-size: 1.5em;
  font-weight: bold;
  color: var(--text-primary);
}

.glass-card-label {
  font-size: 0.8em;
  color: var(--text-secondary);
}

/* === 10. بوش ھالەت === */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

/* === 10b. Skeleton كارتا (ھورۇن يۈكلەش ئۈچۈن) === */
.skeleton-card .card-poster {
  background: linear-gradient(110deg, var(--bg-card) 30%, var(--bg-card-hover) 50%, var(--bg-card) 70%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

.skeleton-card .card-body {
  background: var(--bg-card);
}

/* يۈكلەنگەندىن كېيىن skeleton نى توختىتىش */
.skeleton-card .card-poster img.loaded {
  opacity: 1;
}

/* رەسىم يۈكلەنگەندە ئانىماتسىيەنى توختىتىش */
.card-poster img.loaded ~ * {
  position: relative;
}

/* === 11. ئاستى يولباشلاش === */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  right: 0;
  left: 0;
  z-index: 1000;
  background: rgba(10, 10, 15, 0.98);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  padding: 6px 0;
  padding-bottom: calc(6px + env(safe-area-inset-bottom, 0));
  justify-content: space-around;
  align-items: center;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

body.light-theme .bottom-nav {
  background: rgba(245, 245, 247, 0.98);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 12px;
  color: var(--text-secondary);
  font-size: 0.65em;
  min-width: 44px;
  min-height: 44px;
}

.bottom-nav-item.active {
  color: var(--primary);
}

.bottom-nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.bottom-nav-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  transform: translateY(-8px);
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

.bottom-nav-cta:active {
  transform: translateY(-4px);
}

/* === 12. يۇقىرىغا سىرغىش كۇنۇپكىسى === */
.scroll-top {
  position: fixed;
  bottom: 80px;
  left: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.scroll-top.show {
  opacity: 1;
  pointer-events: auto;
}

/* === 13. بەت ئاستى === */
.footer {
  text-align: center;
  padding: 30px 16px;
  color: var(--text-secondary);
  font-size: 0.85em;
}

.footer-text {
  margin-bottom: 4px;
}

/* === 14. بەتلىنىش === */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 0.85em;
}

.page-btn:active {
  background: var(--bg-card-hover);
}

.page-btn.page-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: bold;
}

/* === 15. تىزىملىك بەت === */
.lists-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 16px 80px;
}

/* === 16. تەپسىلات بەت === */
.detail-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 16px 80px;
}

.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--primary);
  font-size: 0.9em;
  margin-bottom: 16px;
}

.detail-header {
  display: flex;
  gap: 20px;
  margin-bottom: 24px;
}

.detail-cover {
  width: 120px;
  min-width: 120px;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
}

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

.detail-info h1 {
  font-size: 1.4em;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85em;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.detail-meta .meta-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.detail-description {
  font-size: 0.9em;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 20px;
}

.detail-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-play {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #fff;
  font-size: 0.9em;
}

.btn-play:active {
  background: var(--primary-dark);
}

.btn-favorite {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 0.9em;
}

.btn-favorite.active {
  color: #ff4757;
}

/* === 17. قىسىم تىزىملىكى === */
.episode-section {
  margin-top: 24px;
}

.episode-section-title {
  font-size: 1.1em;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.episode-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.episode-btn, .ep-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 0.85em;
}

.episode-btn:active, .ep-link:active {
  background: var(--bg-card-hover);
}

.episode-btn.episode-active,
.ep-link.episode-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: bold;
}

/* === 18. قويغۇچ قاچىسى === */
.player-wrapper {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.player-container {
  position: relative;
  width: 100%;
  background: #000;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
}

.player-container video,
.player-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* === 19. ئىزدەش بەت === */
.search-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 16px 80px;
}

/* === 20. مېنىڭ بەت === */
.mine-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 16px 80px;
}

.mine-header {
  text-align: center;
  margin-bottom: 24px;
}

.mine-menu {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
}

.mine-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 0.95em;
}

.mine-menu-item:last-child {
  border-bottom: none;
}

.mine-history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.mine-history-item {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-card);
}

.mine-history-item img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
}

.mine-history-item .mi-title {
  padding: 6px 8px;
  font-size: 0.75em;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* === 21. مودال كۆزنەك === */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.show {
  display: flex;
}

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 420px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 24px;
}

/* === 22. ئارقا بەت === */
.admin-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 16px 80px;
}

.admin-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 10px 12px;
  text-align: right;
  border-bottom: 1px solid var(--border);
  font-size: 0.85em;
}

th {
  color: var(--text-secondary);
  font-weight: normal;
}

.btn-edit, .btn-danger, .btn-submit {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.8em;
  border: 1px solid var(--border);
}

.btn-edit {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
}

.btn-submit {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ئۇقتۇرۇش */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 0.9em;
}

.alert-success {
  background: rgba(34, 197, 94, 0.15);
  color: var(--green);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.alert-error {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* === 23. جانلىق لايىھە === */
@media (max-width: 768px) {
  /* موبايل: ئۈستى تىزىملىك يوشۇرۇن */
  .nav-links { display: none; }
  .mobile-menu-btn { display: flex; }
  .search-box input { width: 100px; }
  .logo { font-size: 0.85em; }

  /* ئاستى يولباشلاشنى كۆرسىتىش */
  .bottom-nav { display: flex; }

  /* تۆۋەن قوشۇمچە */
  .main-content,
  .detail-page,
  .lists-page,
  .search-page,
  .mine-page,
  .admin-page,
  .footer {
    padding-bottom: 80px;
  }

  .scroll-top { bottom: 90px; }

  /* تەپسىلات بەت موبايل */
  .detail-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .detail-cover {
    width: 140px;
    min-width: 140px;
  }

  /* كىنو تورى موبايل */
  .movie-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
  }

  /* Hero موبايل */
  .hero {
    height: 35vh;
    min-height: 220px;
  }

  .hero-overlay h1 {
    font-size: 1.3em;
  }
}

@media (max-width: 480px) {
  .movie-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .glass-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .card-title { font-size: 0.8em; }
  .card-meta { font-size: 0.7em; }
}

@media (min-width: 769px) {
  /* كومپيۇتېر: content-velocity پەقەت چوڭ ئېكراندا */
  section {
    content-visibility: auto;
    contain-intrinsic-size: auto 500px;
  }
}
