/* --- CSS Variables & Resets --- */
:root {
  --bg-color: #0c0d16;
  --secondary-bg: #161a29;
  --accent-color: #E50914; /* Netflix Premium Red */
  --text-primary: #ffffff;
  --text-secondary: #e5e5e5;
  --gradient-top: linear-gradient(135deg, #E50914, #B20710);
  --glass-bg: rgba(0, 0, 0, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
  --card-shadow: 0 4px 10px rgba(0, 0, 0, 0.8);
  --header-height: 70px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
    scroll-behavior: smooth;
}

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

h1, h2, h3, .logo {
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.02em;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 4%;
}

/* --- Navigation --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  padding: 0 4%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(12, 13, 22, 0.85);
  backdrop-filter: blur(15px);
  z-index: 1000;
  border-bottom: 1px solid var(--glass-border);
}

.logo {
  font-size: 1.8rem;
  font-weight: 900;
  color: #fff;
  text-transform: uppercase;
  margin: 0;
}

.logo span {
  color: var(--accent-color);
}

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

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  opacity: 0.7;
}

.nav-links a:hover {
  opacity: 1;
}

.search-bar {
  display: flex;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border);
  border-radius: 4px;
  padding: 4px 12px;
}

.search-bar input {
  background: transparent;
  border: none;
  color: #fff;
  padding: 6px;
  outline: none;
  width: 200px;
}

.search-bar button {
  background: transparent;
  border: none;
  color: var(--accent-color);
  font-weight: 700;
  cursor: pointer;
  padding: 0 5px;
}

.row-footer-btn {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
  padding: 1rem 0 4rem; /* More space for visibility */
  position: relative;
  z-index: 50;
}

.row-footer-btn .btn {
  font-size: 1rem;
  padding: 12px 40px;
  background: var(--accent-color);
  color: #fff;
  border: none;
  font-weight: 700;
  border-radius: 4px;
  box-shadow: 0 4px 20px rgba(229, 9, 20, 0.4);
  transition: all 0.3s ease;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-login {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  padding: 6px 18px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 4px;
  white-space: nowrap;
}

.btn-login:hover {
  background: var(--accent-color);
  border-color: var(--accent-color);
}

.btn-login.logged-in {
  border-color: #2ecc71;
  color: #2ecc71;
  background: rgba(46, 204, 113, 0.1);
}

.btn-login.logged-in:hover {
  background: rgba(231, 76, 60, 0.1);
  color: #e74c3c;
  border-color: #e74c3c;
}

/* --- Hero --- */
.hero-section {
  position: relative;
  height: 85vh;
  display: flex;
  align-items: center;
  padding: 0 4%;
  background-size: cover;
  background-position: center;
  margin-top: 0;
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 700px;
}

.hero-tag {
  display: inline-block;
  background: var(--accent-color);
  color: #fff;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 900;
  margin-bottom: 1.5rem;
  letter-spacing: 1px;
}

.hero-content h1 {
  font-size: 4.5rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.hero-content p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 500px;
}

.hero-btns {
  display: flex;
  gap: 15px;
}

.btn {
  padding: 12px 30px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
}

.btn-primary { background: #fff; color: #000; }
.btn-primary:hover { background: rgba(255,255,255,0.8); transform: scale(1.05); }

.btn-secondary { background: rgba(100,100,100,0.5); color: #fff; backdrop-filter: blur(10px); }
.btn-secondary:hover { background: rgba(100,100,100,0.8); }

/* --- Video Rows & Discovery --- */
.rows-container {
  padding: 4rem 0;
  margin-top: -100px;
  position: relative;
  z-index: 20;
}

.video-row {
  margin-bottom: 4rem;
}

.row-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0 4%;
}

.row-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}

.view-all-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-color);
  opacity: 0.7;
  display: flex;
  align-items: center;
  gap: 5px;
}

.view-all-link:hover {
  opacity: 1;
  transform: translateX(5px);
}

.video-grid {
  display: flex;
  overflow-x: auto;
  gap: 10px;
  padding: 10px 4% 30px;
  scrollbar-width: none;
}

.video-grid::-webkit-scrollbar { display: none; }

.video-card {
  flex: 0 0 20%;
  min-width: 250px;
  background: #181818;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.video-card:hover {
  transform: scale(1.08);
  z-index: 30;
}

.thumbnail-container {
  position: relative;
  padding-top: 56.25%;
  background: #222;
}

.thumbnail-container img {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover;
}

.play-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.video-card:hover .play-overlay { opacity: 1; }

.play-icon {
  font-size: 2rem;
  color: #fff;
}

.video-info {
  padding: 12px;
}

.video-info h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-meta {
  font-size: 0.75rem;
  color: #999;
}

/* --- Category Page Specials --- */
.category-main {
  padding-top: 120px;
}

.loading-msg {
    grid-column: 1 / -1;
    padding: 4rem 0;
    text-align: center;
    color: #444;
    font-size: 1.1rem;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.animate-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s forwards ease-out;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  padding: 40px 0;
}

.load-more-container {
  display: flex;
  justify-content: center;
  padding: 40px 0 80px;
}

.btn-load-more {
  background: transparent;
  border: 2px solid var(--accent-color);
  color: #fff;
  padding: 12px 40px;
  font-size: 1.1rem;
  border-radius: 50px;
}

.btn-load-more:hover {
  background: var(--accent-color);
}

/* --- Modal --- */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.9);
}

.modal-content {
  position: relative;
  width: 90%;
  max-width: 1100px;
  margin: 50px auto;
  background: #141414;
  border-radius: 8px;
  overflow: hidden;
}

.close-modal {
  position: absolute;
  top: 20px; right: 20px;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
  z-index: 10;
}

.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  background: #000;
}

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

.modal-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 5px;
}

.btn-secondary {
    background: #333;
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s;
    border: 1px solid #444;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-secondary:hover {
    background: #444;
    border-color: var(--accent-color);
}

.modal-info h2 {
    font-size: 1.4rem;
    color: white;
    margin: 0;
}
.modal-info p { font-size: 1.1rem; color: #ccc; line-height: 1.7; }

/* --- Footer --- */
.footer {
  padding: 50px 4%;
  background: #000;
  text-align: center;
  color: #666;
  font-size: 0.9rem;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .video-card { flex: 0 0 33% !important; }
}

@media (max-width: 768px) {
  .hero-content h1 { font-size: 2.8rem; }
  .video-card { flex: 0 0 45% !important; }
  .nav-links { display: none; }
}
