/* CSS Design System - Apple TV+ Style */

:root {
  /* Colors */
  --bg-body: #000000;
  --bg-card: rgba(28, 28, 30, 0.6);
  --bg-glass: rgba(20, 20, 20, 0.65);
  --text-primary: #f5f5f7;
  --text-secondary: #86868b;
  --accent-blue: #2997ff;
  --accent-white: #ffffff;
  
  /* Spacing */
  --space-xs: 4px;
  --space-s: 8px;
  --space-m: 16px;
  --space-l: 24px;
  --space-xl: 40px;
  --space-xxl: 80px;
  
  /* Typography */
  --font-stack: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  
  /* Animations */
  --trans-fast: 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
  --trans-smooth: 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
  --trans-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Global Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-body);
  color: var(--text-primary);
  font-family: var(--font-stack);
  overflow-x: hidden; /* Prevent horizontal scroll */
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
  user-select: none;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

/* Utilities */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.text-gradient {
  background: linear-gradient(to right, #fff, #888);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Glassmorphism */
.glass {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Animated Entrance */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.fade-in {
  animation: fadeIn 0.8s ease-out forwards;
}

.slide-up {
  animation: slideUp 0.8s ease-out forwards;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-xl);
  transition: background 0.3s;
}

.nav-links {
  display: flex;
  gap: var(--space-l);
}

.nav-link {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 400;
  transition: color var(--trans-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 99px;
  font-weight: 600;
  font-size: 16px;
  transition: transform var(--trans-fast), opacity var(--trans-fast);
}

.btn-primary {
  background-color: var(--accent-white);
  color: #000;
}

.btn-glass {
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent-white);
  backdrop-filter: blur(10px);
}

.btn:hover {
  transform: scale(1.02);
}

.btn:active {
  transform: scale(0.98);
}

/* Cards */
.card-row {
  display: flex;
  gap: var(--space-m);
  padding: var(--space-m) 0;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-left: var(--space-xl); /* Start padding for horizontal scroll */
  padding-right: var(--space-xl);
}

.card-row::-webkit-scrollbar {
  display: none; /* Hide scrollbar */
}

.movie-card {
  flex: 0 0 280px; /* specific width */
  aspect-ratio: 16/9;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  transition: transform var(--trans-smooth), box-shadow var(--trans-smooth);
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.movie-card-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--trans-smooth);
}

.movie-card:hover {
  transform: scale(1.05);
  box-shadow: 0 20px 40px rgba(0,0,0,0.6);
  z-index: 10;
}

.movie-card:hover .movie-card-poster {
  transform: scale(1.1); /* Parallax inner effect */
}

/* Hover Overlay on Cards */
.card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
  padding: var(--space-m);
  opacity: 0;
  transition: opacity var(--trans-smooth);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.movie-card:hover .card-overlay {
  opacity: 1;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

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

/* Sections */
section {
  padding: var(--space-l) 0;
}

.section-title {
  padding: 0 var(--space-xl);
  margin-bottom: var(--space-m);
  font-size: 24px;
  font-weight: 700;
}

/* ==========================================
   General layout
========================================== */
.main-content {
    padding-top: 80px; /* space for fixed navbar */
    padding-bottom: 60px;
}

.content-section {
    padding: 2.5rem 4%;
}

.hero-container {
    min-height: 70vh;
    position: relative;
}

/* Card row scrolling */
.scroll-container {
    position: relative;
}

.scroll-container::before,
.scroll-container::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    z-index: 1;
    pointer-events: none;
}

.scroll-container::before {
    left: 0;
    background: linear-gradient(to right, #000, transparent);
}

.scroll-container::after {
    right: 0;
    background: linear-gradient(to left, #000, transparent);
}

/* Navbar improvements */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 4%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.4s ease;
}

.navbar.scrolled {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.logo {
    font-size: 2rem;
    font-weight: 900;
    color: white;
    text-decoration: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: #ccc;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
    color: white;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.4rem;
}

.nav-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
}

.profile-badge {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: #ddd;
}

/* Fallback message */
.no-content {
    text-align: center;
    padding: 80px 20px;
    color: #888;
}