:root {
  --color-primary: #FF4D67;
  --color-primary-hover: #FF7B8F;
  --color-primary-dark: #CC0033;
  --color-success: #00CC88;
  --color-danger: #FF3366;
  --color-warning: #FFAA00;
  --color-text-primary: #F0F4F8;
  --color-text-secondary: #C3CBD3;
  --color-text-subtle: #8A94A0;
  --bg-main: #0A0A0F;
  --bg-secondary: #151521;
  --bg-tertiary: #1E1E2D;
  --bg-glass: rgba(30, 30, 45, 0.7);
  --bg-glass-dark: rgba(10, 10, 15, 0.8);
  --border-color-primary: rgba(255, 255, 255, 0.08);
  --border-color-secondary: rgba(255, 255, 255, 0.12);
  --border-glow: rgba(255, 77, 103, 0.3);
  --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.15);
  --shadow-medium: 0 8px 30px rgba(0, 0, 0, 0.25);
  --shadow-large: 0 15px 40px rgba(0, 0, 0, 0.35);
  --gradient-primary: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  --font-family-sans: "Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont, sans-serif;
  --border-radius-sm: 8px;
  --border-radius-md: 12px;
  --border-radius-lg: 16px;
  --border-radius-xl: 24px;
}

/* Base Styles */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  background-color: var(--bg-main);
  font-family: var(--font-family-sans);
  line-height: 1.6;
  color: var(--color-text-primary);
  overflow-x: hidden;
}

.h1, .h2, .h3, .h4, .h5, .h6,
h1, h2, h3, h4, h5, h6 {
  color: var(--color-text-primary);
  font-weight: 600;
  line-height: 1.2;
}

.h1, h1 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  background: linear-gradient(135deg, var(--color-text-primary) 0%, var(--color-text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.h2, h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
}

.h3, h3 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
}

.h4, h4 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

a:hover {
  color: var(--color-primary-hover);
}

/* Layout Components */
header.p-0 {
  background: var(--bg-glass-dark);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color-primary);
  position: sticky;
  top: 0;
  z-index: 1000;
}

main {
  margin-top: 2rem;
  min-height: 80vh;
  padding-bottom: 2rem;
}

footer, footer.main-footer {
  background: var(--bg-glass-dark);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-color-primary);
  color: var(--color-text-secondary);
  margin-top: 4rem;
}

footer.main-footer {
  padding: 3rem 0;
}

/* Navigation */
.main-navbar {
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color-primary);
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-link {
  color: var(--color-text-secondary);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius-md);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gradient-primary);
  transition: left 0.3s ease;
  z-index: -1;
}

.nav-link:hover {
  color: white;
  transform: translateY(-2px);
}

.nav-link:hover::before {
  left: 0;
}

.nav-link.active {
  color: white;
  background: var(--gradient-primary);
  box-shadow: 0 4px 15px rgba(255, 77, 103, 0.3);
}

/* Form Elements */
header .form-control {
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color-primary);
  color: var(--color-text-primary);
  border-radius: var(--border-radius-lg);
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
}

header .form-control::placeholder {
  color: var(--color-text-subtle);
}

header .form-control:focus {
  background: var(--bg-glass-dark);
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--border-glow), var(--shadow-soft);
  transform: translateY(-2px);
}

header .btn-primary {
  background: var(--gradient-primary);
  border: none;
  border-radius: var(--border-radius-lg);
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

header .btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

header .btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(255, 77, 103, 0.4);
}

header .btn-primary:hover::before {
  left: 100%;
}

/* Movie Items */
.movie-item {
  padding: 8px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.movie-item:hover {
  transform: translateY(-8px);
}

.movie-item .poster-container {
  position: relative;
  overflow: hidden;
  margin-bottom: 1rem;
  background: var(--gradient-glass);
  border: 1px solid var(--border-color-primary);
  border-radius: var(--border-radius-md);
  aspect-ratio: 4/3;
  transition: all 0.4s ease;
  box-shadow: var(--shadow-soft);
}

.movie-item:hover .poster-container {
  border-color: var(--color-primary);
  box-shadow: 0 12px 30px rgba(255, 77, 103, 0.25), var(--shadow-medium);
  transform: scale(1.02);
}

.movie-item img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.movie-item:hover img {
  transform: scale(1.05);
}

.poster-container::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 77, 103, 0.1) 0%, rgba(10, 10, 15, 0.4) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
}

.poster-container::before {
  content: "\f040a";
  font-family: "Material Design Icons";
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  font-size: 3rem;
  color: white;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8);
  transition: all 0.4s ease;
}

.movie-item:hover .poster-container::after {
  opacity: 1;
}

.movie-item:hover .poster-container::before {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.movie-item h6 {
  font-size: 0.95rem;
  color: var(--color-text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
  overflow: hidden;
  font-weight: 500;
  transition: color 0.3s ease;
  margin-bottom: 0.5rem;
}

.movie-item a:active .poster-container {
  transform: scale(0.95);
}

/* Buttons */
.btn {
  border-radius: var(--border-radius-md);
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn-outline-primary {
  background: transparent;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
}

.btn-outline-primary:hover {
  background: var(--gradient-primary);
  border-color: transparent;
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(255, 77, 103, 0.3);
}

.btn-download {
  background: var(--gradient-primary);
  border: none;
  color: white;
}

.btn-download:hover {
  background: linear-gradient(135deg, var(--color-success), #00AA66);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 204, 136, 0.3);
}

.btn-player {
  background: var(--bg-glass);
  border: 1px solid var(--border-color-primary);
  color: var(--color-text-secondary);
  backdrop-filter: blur(10px);
}

.btn-player.active,
.btn-player:hover {
  background: var(--gradient-primary);
  border-color: transparent;
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(255, 77, 103, 0.3);
}

/* Pagination */
#pagination-nav {
  overflow-x: auto;
  padding-bottom: 10px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

#pagination-nav::-webkit-scrollbar {
  display: none;
}

.page-item .page-link {
  background: var(--bg-glass);
  border: 1px solid var(--border-color-primary);
  color: var(--color-text-secondary);
  border-radius: var(--border-radius-md);
  margin: 0 3px;
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.page-item .page-link:hover {
  background: var(--gradient-primary);
  border-color: transparent;
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.page-item.active .page-link {
  background: var(--gradient-primary);
  border-color: transparent;
  color: white;
  box-shadow: 0 4px 15px rgba(255, 77, 103, 0.3);
}

/* Tabs */
.nav-tabs {
  border-bottom-color: var(--border-color-primary);
}

.nav-tabs .nav-link {
  background: transparent;
  border: 1px solid transparent;
  color: var(--color-text-subtle);
  border-radius: var(--border-radius-md) var(--border-radius-md) 0 0;
  padding: 1rem 1.5rem;
  transition: all 0.3s ease;
}

.nav-tabs .nav-link.active,
.nav-tabs .nav-link:hover {
  background: var(--bg-glass);
  border-color: var(--border-color-primary);
  color: var(--color-text-primary);
  backdrop-filter: blur(10px);
}

.tab-content {
  background: var(--bg-glass);
  border: 1px solid var(--border-color-primary);
  border-top: none;
  border-radius: 0 0 var(--border-radius-md) var(--border-radius-md);
  padding: 2rem;
  backdrop-filter: blur(10px);
}

/* Video Player */
#video-player-wrapper {
  position: relative;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-medium);
}

#video-player-placeholder,
.ratio iframe {
  border-radius: var(--border-radius-md);
}

#video-player-placeholder {
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
}

/* Directory Links */
.directory-link {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  margin: 0.25rem;
  background: var(--bg-glass);
  color: var(--color-text-secondary);
  border: 1px solid var(--border-color-primary);
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  text-decoration: none;
}

.directory-link:hover {
  background: var(--gradient-primary);
  color: white;
  border-color: transparent;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 20px rgba(255, 77, 103, 0.3);
}

/* Skeleton Loading */
.skeleton-card .poster-placeholder,
.skeleton-card .title-placeholder {
  background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-tertiary) 50%, var(--bg-secondary) 75%);
  background-size: 200% 100%;
  animation: 1.5s ease-in-out infinite shimmer;
  border-radius: var(--border-radius-md);
}

.skeleton-card .poster-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
}

.skeleton-card .title-placeholder {
  height: 1rem;
  width: 80%;
  margin-top: 1rem;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Focus States */
[tabindex]:not([tabindex="-1"]):focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px rgba(255, 77, 103, 0.2);
  border-radius: var(--border-radius-sm);
}

/* Share Buttons */
.share-buttons-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: flex-start;
  margin-bottom: 2rem;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  border-radius: var(--border-radius-lg);
  color: white;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-soft);
  min-width: 140px;
  position: relative;
  overflow: hidden;
  border: none;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.share-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.share-btn:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: var(--shadow-medium);
}

.share-btn:hover::before {
  left: 100%;
}

.share-btn i {
  margin-right: 0.5rem;
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.share-btn:hover i {
  transform: scale(1.2) rotate(5deg);
}

/* Mobile Responsive */
@media (max-width: 991px) {
  .main-navbar .navbar-nav .nav-link {
    display: block;
    padding: 1rem;
    margin: 0.25rem 0;
    border-radius: var(--border-radius-md);
  }
  
  .share-btn {
    min-width: auto;
    padding: 0.875rem 1.5rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 768px) {
  .page-item .page-link {
    padding: 0.6rem 0.8rem;
    font-size: 0.9rem;
  }
  
  .share-btn {
    font-size: 0;
    width: 50px;
    height: 50px;
    padding: 0;
    border-radius: 50%;
    min-width: auto;
  }
  
  .share-btn i {
    margin-right: 0;
    font-size: 1.3rem;
  }
  
  .movie-item {
    padding: 5px;
  }
}

/* Utility Classes */
.text-success {
  color: var(--color-success) !important;
}

.text-danger {
  color: var(--color-danger) !important;
}

.text-warning {
  color: var(--color-warning) !important;
}

.glass-effect {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color-primary);
}

.glow-effect {
  box-shadow: 0 0 20px rgba(255, 77, 103, 0.3);
}

/* Smooth scrollbar for webkit */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--gradient-primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary-hover);
}