@import "tailwindcss";

@theme {
  --color-primary: #E50914;
  --color-primary-dark: #B20710;
  --color-bg-primary: #0a0a0a;
  --color-bg-card: #1a1a1a;
  --color-bg-elevated: #252525;
  --color-text-primary: #ffffff;
  --color-text-secondary: #a0a0a0;
  --color-text-muted: #666666;
  --color-border: #333333;
  --color-accent: #ffd700;
  --color-success: #46d369;
  --color-info: #1a8fe0;
}

html:not(.dark) {
  --bg-primary: #ffffff;
  --bg-card: #f5f5f5;
  --bg-elevated: #eeeeee;
  --text-primary: #111111;
  --text-secondary: #666666;
  --text-muted: #999999;
  --border: #e0e0e0;
}
html.dark {
  --bg-primary: #0a0a0a;
  --bg-card: #1a1a1a;
  --bg-elevated: #252525;
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --text-muted: #666666;
  --border: #333333;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }
body { font-family: 'Tajawal', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background-color: var(--bg-primary); color: var(--text-primary); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
#root { min-height: 100vh; max-width: 100vw; overflow-x: hidden; }

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 2px; }
html:not(.dark) ::-webkit-scrollbar-thumb { background: #ccc; }

.scroll-row { display: flex; gap: 0.75rem; overflow-x: auto; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; padding-bottom: 4px; margin: 0 -0.375rem; padding-left: 0.375rem; padding-right: 0.375rem; scrollbar-width: none; }
.scroll-row::-webkit-scrollbar { display: none; }
.scroll-row .poster-item { scroll-snap-align: start; flex-shrink: 0; }

.poster-card { transition: transform 0.2s ease, box-shadow 0.2s ease; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.poster-card:active { transform: scale(0.97); opacity: 0.9; }

.glass { backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }

input, select, textarea { background: var(--bg-elevated) !important; color: var(--text-primary) !important; border: 1px solid var(--border) !important; font-size: 16px !important; }
input::placeholder, textarea::placeholder { color: var(--text-muted) !important; }

.skeleton { background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-card) 50%, var(--bg-elevated) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

#splash { position: fixed; inset: 0; background: var(--bg-primary); display: flex; align-items: center; justify-content: center; z-index: 9999; transition: opacity 0.4s ease, visibility 0.4s ease; }
#splash img { height: 80px; width: auto; }
html.app-loaded #splash { opacity: 0; visibility: hidden; pointer-events: none; }

.nav-top { height: 52px; }
.nav-bottom { height: 64px; bottom: 0; left: 0; right: 0; }
@media (min-width: 640px) { .nav-top { height: 56px; } .nav-bottom { height: 68px; } }

@media (max-width: 639px) { button, .tap-target { min-height: 44px; min-width: 44px; } .settings-item button, .settings-item select, .settings-item .toggle { min-height: 48px; } }
