

/* --- Enhanced Movie Card Layout and Effects --- */
.card-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  justify-content: center;
  padding: 20px 0;
}

.card {
  position: relative;
  background-color: #1e1e1e;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.card:hover {
  transform: scale(1.05);
  z-index: 2;
  box-shadow: 0 8px 16px rgba(0,0,0,0.5);
}

.card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-bottom: 2px solid #333;
}

.card-info {
  padding: 10px;
  text-align: center;
  color: #fff;
}

.card-info h3 {
  font-size: 16px;
  margin: 0;
}

.card-info p {
  font-size: 14px;
  margin-top: 4px;
}

.genre-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background-color: #e50914;
  color: #fff;
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 4px;
  z-index: 2;
}

.watch-button {
  position: absolute;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  background: #e50914;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.3s ease;
  cursor: pointer;
}

.card:hover .watch-button {
  opacity: 1;
}

.card-info {
  padding: 10px;
  text-align: center;
  color: white;
}

.card-info h3 {
  font-size: 16px;
  margin: 0;
}

.card-info p {
  font-size: 14px;
  margin: 4px 0 0;
}


/* Fade-in animation */
@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Movie Card Layout and Spacing --- */
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px; /* Space between movie cards */
  justify-content: center;
  padding: 20px 0;
}

.card-container .card {
  width: 180px;
  background-color: #1e1e1e;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  transition: transform 0.3s ease;
}

.card-container .card:hover {
  transform: scale(1.05);
}

.card-container .card img {
  width: 100%;
  height: auto;
  display: block;
  border-bottom: 2px solid #333;
}

.card-container .card .card-info {
  padding: 10px;
  color: #fff;
  text-align: center;
}

/* Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #111;
  color: #fff;
  line-height: 1.5;
  scroll-behavior: smooth;
}

body {
  background-image: url('../images/Elden Ring Game Wallpaper.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
select {
  font-family: inherit;
  outline: none;
}

/* Navbar */
.nav-wrapper {
  background-color: #141414;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0,0,0,0.6);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  
  body.light-mode .logo {
  color: #111;
}

  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.main-color {
  color: #e50914;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links a {
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a:focus {
  color: #e50914;
}

.search-bar {
  background-color: #222;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  color: #fff;
  margin-left: 1rem;
  width: 200px;
  transition: background-color 0.3s ease;
}

.search-bar:focus {
  background-color: #333;
}

.search-bar::placeholder {
  color: #aaa;
}

/* Make nav responsive */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}
.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.menu-icon {
  display: none;
  font-size: 1.8rem;
  cursor: pointer;
}
#menu-toggle {
  display: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    margin-top: 1rem;
  }

  #menu-toggle:checked + .menu-icon + .nav-links {
    display: flex;
  }

  .menu-icon {
    display: block;
  }

  .search-bar {
    width: 100%;
    margin-top: 10px;
  }

  .hero-section h1 {
    font-size: 1.6rem;
  }

  .hero-section p.subtitle {
    font-size: 1rem;
  }

  .cta-button {
    font-size: 1rem;
    padding: 10px 20px;
  }

  .card-container {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
  }

  .modal-content {
    flex-direction: column;
  }

  .modal-body {
    flex-direction: column;
  }

  .modal img {
    width: 100%;
    height: auto;
  }
}

/* Hero Section */
.hero-section {
  position: relative;
  height: 45vh;
  background: url('../images/hero-bg.jpg') no-repeat center center/cover;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-overlay {
  background-color: rgba(0, 0, 0, 0.6);
  padding: 2rem;
  text-align: center;
  border-radius: 8px;
}

.hero-overlay h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.subtitle {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  color: #ccc;
}

.cta-button {
  background-color: #e50914;
  border: none;
  padding: 0.7rem 1.5rem;
  color: #fff;
  font-size: 1rem;
  border-radius: 30px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.cta-button:hover {
  background-color: #f40612;
}

/* Genre Filter */
.genre-filter {
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  gap: 5rem;
  
  body.light-mode .genre-filter {
  background-color: #eee;
  color: #111;
}

}

.genre-filter select {
  padding: 0.5rem;
  border-radius: 5px;
  border: none;
  background-color: #222;
  color: #fff;
}

.genre-filter {
  display: flex;
  align-items: center;
  gap: 10px;
}

.genre-filter label {
  font-weight: bold;
}

/* Main Content */
/* === Netflix Style Movie Row === */
.movie-row {
  margin-bottom: 2rem;
  padding-left: 2rem;
  overflow-x: auto;
  white-space: nowrap;
  scroll-behavior: smooth;
}

.movie-row::-webkit-scrollbar {
  display: none;
}

.movie-card {
  display: inline-block;
  width: 200px;
  margin-right: 1rem;
  background-color: #111;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.movie-card:hover {
  transform: scale(1.1);
  z-index: 10;
}

.movie-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-bottom: 2px solid #222;
}

/* Hover Overlay */
.movie-card .overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(20, 20, 20, 0.8);
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease;
}

.movie-card:hover .overlay {
  opacity: 1;
}

.movie-card .overlay button {
  background: #e50914;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 30px;
  font-weight: bold;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.3s ease;
}

.movie-card .overlay button:hover {
  background: #f40612;
}


/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 10, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fadeIn 0.3s ease-out forwards;
}

.modal-content {
  background: rgba(24, 24, 24, 0.9);
  padding: 2rem;
  border-radius: 16px;
  width: 50%;
  max-width: 800px;
  box-shadow: 0 0 25px rgba(0, 255, 255, 0.2),
              0 0 50px rgba(0, 255, 255, 0.1);
  position: relative;
  color: #f0f0f0;
  font-family: 'Segoe UI', sans-serif;
  transition: transform 0.3s ease, box-shadow 0.4s ease;
  border: 1px solid rgba(0, 255, 255, 0.4);
}

.modal-content:hover {
  transform: scale(1.015);
  box-shadow: 0 0 30px rgba(0, 255, 255, 0.4),
              0 0 60px rgba(0, 255, 255, 0.2);
}

.modal-body {
  display: flex;
  gap: 2rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.modal-body img {
  width: 220px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.modal-body img:hover {
  transform: scale(1.05);
  box-shadow: 0 0 25px rgba(0, 255, 255, 0.5);
}

.modal-text {
  flex: 1;
  font-size: 1rem;
  line-height: 1.6;
}

.modal-text h2 {
  font-size: 1.8rem;
  margin-bottom: 0.75rem;
  color: #ffffff;
  text-shadow: 0 0 5px #0ff, 0 0 10px #0ff;
}

.stars {
  margin-bottom: 0.75rem;
  color: #ffce31;
  font-size: 1.1rem;
  text-shadow: 0 0 5px #ffce31aa;
}

.close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 2rem;
  cursor: pointer;
  color: #ffffff;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  text-shadow: 0 0 10px #fff;
}

.close:hover {
  color: #ff4e4e;
  text-shadow: 0 0 10px #ff4e4e, 0 0 20px #ff4e4e;
}

/* Optional: Pulsing glow */
@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.2),
                0 0 50px rgba(0, 255, 255, 0.1);
  }
  50% {
    box-shadow: 0 0 35px rgba(0, 255, 255, 0.4),
                0 0 70px rgba(0, 255, 255, 0.2);
  }
}

.modal-content.glow {
  animation: pulseGlow 3s ease-in-out infinite;
}

/* Responsive */
@media (max-width: 768px) {
  .modal-content {
    width: 90vw;
    max-height: 90vh;
    border-radius: 12px;
    overflow-y: auto;
  }

  .modal-body {
    flex-direction: column;
    align-items: center;
  }

  .modal-body img {
    width: 100%;
    max-width: 300px;
  }
}

@media (max-width: 480px) {
  .modal-content {
    padding: 1rem;
  }

  #modal-video {
    object-fit: contain;
    width: 100%;
  }
}

/* Animation */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* Spinner */
.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  gap: 1rem;
  font-size: 1.2rem;
  color: #e50914;
}

/* Search Modal */
.search-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(20, 20, 20, 0.95);
  display: none;
  flex-direction: column;
  padding: 2rem;
  z-index: 1500;
}

.search-modal input {
  padding: 1rem;
  font-size: 1.2rem;
  border: none;
  border-radius: 10px;
  margin-bottom: 1rem;
  background-color: #222;
  color: #fff;
}

.search-modal .results {
  flex: 1;
  overflow-y: auto;
}

.search-modal .close {
  font-size: 2rem;
  align-self: flex-end;
  cursor: pointer;
  color: #fff;
  margin-bottom: 1rem;
}

/* Search Modal Background Overlay */
.search-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

/* Modal Box */
.search-modal-box {
  background: var(--bg-color);
  color: var(--text-color);
  padding: 20px;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  position: relative;
}

/* Close Button */
.search-modal-box .close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Search Input */
#search-input {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  margin-bottom: 15px;
}

/* Search Results Container */
#search-results {
  max-height: 300px;
  overflow-y: auto;
}

/* Show Modal (controlled by JS) */
.search-modal.active {
  display: flex;
}

/* Default: Light Mode */
.footer {
  width: 100%;
  padding: 20px;
  text-align: center;
  background-color: var(--footer-bg);
  color: var(--footer-text);
  transition: background-color 0.3s, color 0.3s;
}

.footer-content {
  max-width: 800px;
  margin: 0 auto;
}

/* Define footer color variables for light and dark mode */
:root {
  --footer-bg: #f2f2f2;
  --footer-text: #333;
}

[data-theme="dark"] {
  --footer-bg: #111;
  --footer-text: #fff;
}

/* === Vivamax-Style Pinoy Movies Section === */
.vivamax-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 1rem;
  padding: 1rem 0;
}

.vivamax-card {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.vivamax-card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  object-fit: cover;
}

.vivamax-card:hover {
  transform: scale(1.05);
}

.vivamax-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85), rgba(0,0,0,0));
  color: #ffffff;
  padding: 0.5rem;
  font-size: 0.85rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.vivamax-card:hover .vivamax-info {
  opacity: 1;
}

.vivamax-info h4 {
  margin: 0;
  font-weight: 600;
  font-size: 0.9rem;
}

.vivamax-info span {
  display: block;
  font-size: 0.75rem;
  color: #ccc;
}

/* ==== Vivamax Logo Styling ==== */
.vivamax-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.vivamax-logo {
  height: 60px;
  margin-bottom: 10px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

.vivamax-logo:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.vivamax-title {
  font-size: 1.8rem;
  margin: 0;
  color: var(--text-color);
  font-weight: bold;
  letter-spacing: 0.5px;
}

/* Load More Button Styles */
.load-more-container {
  text-align: center;
  margin-top: 20px;
}

.load-more-container button {
  background-color: #ff3c3c;
  color: #fff;
  font-size: 0.8rem;        /* smaller text */
  padding: 6px 16px;        /* smaller button body */
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.load-more-container button:hover {
  background-color: #e02e2e;
}

#server-switch {
  display: block;
  margin-top: 1rem;
}

#serverSelect {
  width: 100%;
  padding: 0.5rem;
  font-size: 1rem;
  background-color: #222;
  color: #fff;
  border-radius: 6px;
  border: 1px solid #444;
}

/* Mobile Tweaks */
@media (max-width: 1024px) {
  .modal-body,
  .modal-text {
    display: none; /* Still hide extra details */
  }

  .server-selector {
    display: block !important; /* Force visibility on mobile */
    padding: 1rem;
    background-color: #000;
    color: #fff;
    width: 100%;
  }

  .server-selector select {
    width: 100%;
    padding: 0.5rem;
    font-size: 1rem;
    background-color: #222;
    color: #fff;
    border: 1px solid #444;
    border-radius: 6px;
  }

  #modal-video {
    width: 100vw;
    height: 80vh;
    border: none;
  }
}

