/*-----------------------------------*\
 * React-Style Theme for Streamside
 * Matches the React frontend design
\*-----------------------------------*/

:root {
  /* Colors matching React theme */
  --background: hsl(0, 0%, 4%);
  --foreground: hsl(0, 0%, 98%);
  --card: hsl(0, 0%, 7%);
  --card-foreground: hsl(0, 0%, 98%);
  --primary: hsl(142, 76%, 36%);
  --primary-foreground: hsl(0, 0%, 98%);
  --secondary: hsl(0, 0%, 14%);
  --muted: hsl(0, 0%, 12%);
  --muted-foreground: hsl(0, 0%, 60%);
  --accent: hsl(38, 92%, 50%);
  --border: hsl(0, 0%, 15%);
  
  /* Typography */
  --font-sans: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius: 0.5rem;
}

/* Base styles */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans) !important;
  background-color: var(--background) !important;
  color: var(--foreground);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  margin: 0;
  padding: 0;
}

/* Hide old header styles */
.header {
  display: none !important;
}

/* Hide old search bar */
.header__search {
  display: none !important;
}

/*-----------------------------------*\
 * SEARCH MODAL - React Style
\*-----------------------------------*/
.search-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 100px;
}

.search-modal.active {
  display: flex;
}

.search-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
}

.search-modal__content {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 450px;
  margin: 0 16px;
  padding: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.search-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.search-modal__header h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--foreground);
  margin: 0;
}

.search-modal__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

.search-modal__close:hover {
  background: var(--muted);
  color: var(--foreground);
}

.search-modal__form {
  display: flex;
  gap: 8px;
}

.search-modal__input {
  flex: 1;
  height: 40px;
  padding: 0 12px;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--foreground);
  font-size: 14px;
  font-family: inherit;
}

.search-modal__input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

.search-modal__input::placeholder {
  color: var(--muted-foreground);
}

.search-modal__btn {
  height: 40px;
  padding: 0 16px;
  background: var(--primary);
  color: var(--primary-foreground);
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s ease;
}

.search-modal__btn:hover {
  background: hsl(142, 76%, 30%);
}

/*-----------------------------------*\
 * HEADER - React Style
\*-----------------------------------*/
.header-react {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-react .container {
  max-width: 1536px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 768px) {
  .header-react .container {
    padding: 0 2rem;
  }
}

.header-react__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 1rem;
}

@media (min-width: 768px) {
  .header-react__content {
    height: 80px;
  }
}

.header-react__logo img {
  height: 24px;
  width: auto;
}

@media (min-width: 768px) {
  .header-react__logo img {
    height: 28px;
  }
}

.header-react__nav {
  display: none;
  align-items: center;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .header-react__nav {
    display: flex;
  }
}

.header-react__nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.2s ease;
}

.header-react__nav-link:hover {
  color: var(--foreground);
}

.header-react__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-react__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: transparent;
  border: none;
  color: var(--foreground);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.header-react__btn:hover {
  background: var(--muted);
  color: var(--foreground);
}

.header-react__btn svg,
.header-react__btn i {
  width: 20px;
  height: 20px;
  font-size: 20px;
  line-height: 1;
}

/* Sign In Button - filled style */
.header-react__btn--primary {
  background: var(--primary);
  color: var(--primary-foreground);
  width: auto;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 500;
  gap: 8px;
}

.header-react__btn--primary:hover {
  background: hsl(142, 76%, 30%);
  color: var(--primary-foreground);
}

/* Mobile menu button */
.header-react__mobile-btn {
  display: flex;
}

@media (min-width: 768px) {
  .header-react__mobile-btn {
    display: none;
  }
}

/* Mobile navigation */
.header-react__mobile-nav {
  display: none;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
}

.header-react__mobile-nav.active {
  display: block;
}

@media (min-width: 768px) {
  .header-react__mobile-nav {
    display: none !important;
  }
}

.header-react__mobile-nav a {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

.header-react__mobile-nav a:hover {
  color: var(--foreground);
  background: var(--muted);
}

/*-----------------------------------*\
 * HERO CAROUSEL - React Style
\*-----------------------------------*/
.hero-react {
  position: relative;
  width: 100%;
  min-height: 60vh;
  overflow: hidden;
  padding-top: 64px; /* Account for fixed header */
}

@media (min-width: 768px) {
  .hero-react {
    min-height: 75vh;
    padding-top: 80px;
  }
}

.hero-react__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.7s ease;
  pointer-events: none;
}

.hero-react__slide.active {
  opacity: 1;
  pointer-events: auto;
}

.hero-react__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-react__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--background) 0%, rgba(10, 10, 10, 0.6) 50%, transparent 100%);
}

.hero-react__overlay-side {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(10, 10, 10, 0.8) 0%, transparent 50%, transparent 100%);
}

.hero-react__content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
}

@media (min-width: 768px) {
  .hero-react__content {
    padding: 3rem;
  }
}

@media (min-width: 1024px) {
  .hero-react__content {
    padding: 4rem;
  }
}

.hero-react__content-inner {
  max-width: 1536px;
  margin: 0 auto;
}

.hero-react__info {
  max-width: 36rem;
}

.hero-react__subtitle {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
  .hero-react__subtitle {
    font-size: 1rem;
  }
}

.hero-react__title {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 1rem;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

@media (min-width: 768px) {
  .hero-react__title {
    font-size: 3rem;
  }
}

@media (min-width: 1024px) {
  .hero-react__title {
    font-size: 3.75rem;
  }
}

.hero-react__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.hero-react__badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  border-radius: 0.25rem;
}

.hero-react__badge--free {
  background: hsl(142, 76%, 36%);
  color: white;
}

.hero-react__badge--rent {
  background: hsl(24, 95%, 53%);
  color: white;
}

.hero-react__meta-text {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.hero-react__description {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (min-width: 768px) {
  .hero-react__description {
    font-size: 1rem;
    -webkit-line-clamp: 3;
  }
}

.hero-react__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Buttons */
.btn-react {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  border: none;
}

.btn-react--primary {
  background: var(--primary);
  color: var(--primary-foreground);
}

.btn-react--primary:hover {
  background: hsl(24, 95%, 53%);
  color: white;
}

.btn-react--rent {
  background: hsl(24, 95%, 53%) !important;
  color: white !important;
}

.btn-react--rent:hover {
  background: hsl(24, 95%, 43%) !important;
  color: white !important;
}

.btn-react--outline {
  background: rgba(10, 10, 10, 0.2);
  backdrop-filter: blur(4px);
  border: 1px solid var(--border);
  color: var(--foreground);
}

.btn-react--outline:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-react svg,
.btn-react i {
  width: 16px;
  height: 16px;
  font-size: 16px;
}

/* Hero navigation arrows */
.hero-react__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(10, 10, 10, 0.5);
  backdrop-filter: blur(4px);
  border: none;
  color: var(--foreground);
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-react:hover .hero-react__nav {
  opacity: 1;
}

.hero-react__nav:hover {
  background: rgba(10, 10, 10, 0.7);
}

.hero-react__nav--prev {
  left: 1rem;
}

.hero-react__nav--next {
  right: 1rem;
}

.hero-react__nav svg,
.hero-react__nav i {
  width: 24px;
  height: 24px;
  font-size: 24px;
}

/* Hero dots */
.hero-react__dots {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-react__dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.3);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hero-react__dot:hover {
  background: rgba(255, 255, 255, 0.5);
}

.hero-react__dot.active {
  width: 24px;
  background: var(--primary);
}

/*-----------------------------------*\
 * MOVIE CAROUSEL SECTION - React Style
\*-----------------------------------*/
.section-react {
  padding: 1.5rem 0;
}

@media (min-width: 768px) {
  .section-react {
    padding: 2rem 0;
  }
}

.section-react .container {
  max-width: 1536px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 768px) {
  .section-react .container {
    padding: 0 2rem;
  }
}

@media (min-width: 1024px) {
  .section-react .container {
    padding: 0 3rem;
  }
}

.section-react__subtitle {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.section-react__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .section-react__title {
    font-size: 1.5rem;
  }
}

.section-react__carousel {
  position: relative;
}

.section-react__carousel-inner {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc(50% - 8px);
  gap: 1rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 0.5rem;
}

.section-react__carousel-inner::-webkit-scrollbar {
  display: none;
}

@media (min-width: 640px) {
  .section-react__carousel-inner {
    grid-auto-columns: calc(33.333% - 11px);
  }
}

@media (min-width: 768px) {
  .section-react__carousel-inner {
    grid-auto-columns: calc(25% - 12px);
  }
}

/* Carousel navigation */
.section-react__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  border: none;
  color: white;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.section-react__carousel:hover .section-react__nav {
  opacity: 1;
}

.section-react__nav--prev {
  left: -0.5rem;
}

.section-react__nav--next {
  right: -0.5rem;
}

/*-----------------------------------*\
 * MOVIE CARD - React Style
\*-----------------------------------*/
.card-react {
  position: relative;
  flex-shrink: 0;
  width: 100%;
  cursor: pointer;
}

.card-react__image-wrapper {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--muted);
}

.card-react__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.3s ease;
}

.card-react:hover .card-react__image {
  transform: scale(1.05);
  filter: brightness(1.1);
}

/* Rating badge */
.card-react__rating {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(0, 0, 0, 0.7);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  color: white;
}

.card-react__rating i {
  color: #facc15;
  font-size: 12px;
}

/* Hover overlay with play button */
.card-react__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s ease;
}

.card-react:hover .card-react__overlay {
  background: rgba(0, 0, 0, 0.4);
  opacity: 1;
}

.card-react__play {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.card-react__play i {
  font-size: 24px;
  margin-left: 2px;
}

/* Card info */
.card-react__info {
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.card-react__title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.card-react__badge {
  flex-shrink: 0;
  padding: 0.125rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 0.25rem;
}

.card-react__badge--free {
  background: hsl(142, 76%, 36%);
  color: white;
}

.card-react__badge--rent {
  background: hsl(24, 95%, 53%);
  color: white;
}

/*-----------------------------------*\
 * FOOTER - React Style
\*-----------------------------------*/
.footer-react {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 3rem 0;
  margin-top: 3rem;
}

.footer-react .container {
  max-width: 1536px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 768px) {
  .footer-react .container {
    padding: 0 2rem;
  }
}

@media (min-width: 1024px) {
  .footer-react .container {
    padding: 0 3rem;
  }
}

/* Filmmaker CTA */
.footer-react__cta {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: rgba(249, 115, 22, 0.1);
  border: 1px solid rgba(249, 115, 22, 0.3);
  border-radius: var(--radius);
}

.footer-react__cta-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

@media (min-width: 768px) {
  .footer-react__cta-inner {
    flex-direction: row;
  }
}

.footer-react__cta-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-react__cta-icon {
  width: 32px;
  height: 32px;
  color: #f97316;
}

.footer-react__cta-title {
  font-weight: 600;
  color: var(--foreground);
}

.footer-react__cta-text {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.footer-react__cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.5rem;
  background: #f97316;
  color: white;
  font-weight: 500;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background 0.2s ease;
}

.footer-react__cta-btn:hover {
  background: #ea580c;
}

/* Footer grid */
.footer-react__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

@media (min-width: 768px) {
  .footer-react__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.footer-react__brand p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-top: 1rem;
}

.footer-react__brand img {
  height: 32px;
  width: auto;
}

.footer-react__heading {
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 1rem;
}

.footer-react__links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-react__links li {
  margin-bottom: 0.5rem;
}

.footer-react__links a {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-react__links a:hover {
  color: var(--foreground);
}

.footer-react__link--filmmaker {
  color: #f97316 !important;
}

.footer-react__link--filmmaker:hover {
  color: #fb923c !important;
}

/* Social links */
.footer-react__social {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-react__social a {
  color: var(--muted-foreground);
  transition: color 0.2s ease;
}

.footer-react__social a:hover {
  color: var(--primary);
}

.footer-react__social i {
  font-size: 20px;
}

/* Footer bottom */
.footer-react__bottom {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.footer-react__copyright {
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/*-----------------------------------*\
 * UTILITIES
\*-----------------------------------*/
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
