/* Reset & base styles */
html, body {
  height: auto !important;
  overflow: auto !important;;
}

body {
  font-family: Arial, sans-serif;
  background: #f5f5f5;
  color: #333;
}

section h1,
article h1,
nav h1,
aside h1 {
  font-size: clamp(1.25rem, 1.5vw + 1rem, 2.25rem);
  line-height: 1.3;
}

h1, h2, h3 {
  color: #1d3557;
}

a {
  text-decoration: none;
  color: #0077cc;
}
a:hover {
  text-decoration: underline;
}

/* Movie list & card */
.movie-list {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.movie-card {
  background: white;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 15px;
  width: 250px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.movie-card img {
  max-width: 100%;
  border-radius: 8px;
}

/* Form controls */
form input[type="text"],
form input[type="password"],
form input[type="datetime-local"],
form input[type="file"],
form textarea {
  width: 100%;
 /* padding: 8px; */
 /* margin-top: 5px; */
 /* margin-bottom: 15px; */
  border: 1px solid #ccc;
  border-radius: 5px;
}

form button {
  background: #1d3557;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
}
form button:hover {
  background: #457b9d;
}



/* scale thumbnails */
.image-hover-zoom {
  display: inline-block;
  overflow: hidden;
  border-radius: 12px;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.image-hover-zoom:hover,
.image-hover-zoom:focus {
  transform: scale(1.2);
  box-shadow: 0 0 15px rgba(0, 123, 255, 0.5); /* light blue glow */
  z-index: 10;
  position: relative;
}

/* Table */
table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}
table th,
table td {
  padding: 10px;
  border: 1px solid #ddd;
}
table img {
  max-height: 80px;
  border-radius: 5px;
}

/* Poster fixed ratio 5:7 */
.poster-container {
  width: 100%;
  padding-top: 140%;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}
.poster-container img {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.poster-container img:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Responsive poster width */
.poster-wrapper {
  width: 120px;
}
@media (max-width: 991.98px) {
  .poster-wrapper {
    width: 80px;
  }
}
@media (max-width: 575.98px) {
  .poster-wrapper {
    width: 60px;
  }
}
@media screen and (max-width: 600px) {
  .movie-list {
    flex-direction: column;
    align-items: center;
  }
}

/* Back to Top */
#backToTop {
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
#backToTop.show {
  opacity: 1;
  pointer-events: auto;
}

/* Share Button */
.share-box {
  background-color: #2d2f35;
  color: #ccc;
  padding: 12px 16px;
  border-radius: 8px;
  display: inline-block;
  font-size: 0.9rem;
}
.share-icons {
  display: flex;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.share-icons .icon {
  width: 36px;
  height: 36px;
  background-size: cover;
  background-repeat: no-repeat;
  border-radius: 6px;
  display: inline-block;
  transition: transform 0.2s;
  cursor: pointer;
}
.share-icons .icon:hover {
  transform: scale(1.1);
}
.icon.facebook  { background-image: url('https://cdn.jsdelivr.net/npm/simple-icons@v9/icons/facebook.svg'); background-color: #1877f2; }
.icon.twitter   { background-image: url('https://cdn.jsdelivr.net/npm/simple-icons@v9/icons/x.svg'); background-color: #000000; }
.icon.telegram  { background-image: url('https://cdn.jsdelivr.net/npm/simple-icons@v9/icons/telegram.svg'); background-color: #0088cc; }
.icon.whatsapp  { background-image: url('https://cdn.jsdelivr.net/npm/simple-icons@v9/icons/whatsapp.svg'); background-color: #25d366; }
.icon.email     { background-image: url('https://cdn.jsdelivr.net/npm/simple-icons@v9/icons/gmail.svg'); background-color: #d14836; }
.icon.link      { background-image: url('https://cdn.jsdelivr.net/npm/simple-icons@v9/icons/link.svg'); background-color: #6c757d; }

.btn-outline-purple {
  color: #7360f2;
  border-color: #7360f2;
}
.btn-outline-purple:hover {
  background-color: #7360f2;
  color: #fff;
}

/* Animations */
@keyframes zoomAndColorFlash {
  0%   { transform: scale(1); background-color: transparent; }
  50%  { transform: scale(1.3); background-color: rgba(255, 200, 0, 0.3); }
  100% { transform: scale(1); background-color: transparent; }
}
@keyframes redZoomFlash {
  0%   { transform: scale(1); background-color: transparent; color: inherit; }
  50%  { transform: scale(1.4); background-color: rgba(255, 0, 0, 0.15); color: red; }
  100% { transform: scale(1); background-color: transparent; color: inherit; }
}
.flash, .flash-sec {
  border-radius: 6px;
}
.flash { animation: zoomAndColorFlash 0.35s ease-in-out; }
.flash-sec { animation: redZoomFlash 0.4s ease-in-out; color: red !important; }

.count-box {
  background: rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 10px 15px;
  min-width: 60px;
}
.count-value {
  font-size: 1.8rem;
  font-weight: bold;
  transition: all 0.2s ease-in-out;
  display: inline-block;
}
.count-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #ccc;
}
.animate-flash {
  animation: flashFadeZoom 0.3s ease;
}
@keyframes flashFadeZoom {
  0%   { transform: scale(1); opacity: 1; color: #fff; }
  50%  { transform: scale(1.25); opacity: 0.5; color: #ffc107; }
  100% { transform: scale(1); opacity: 1; color: #fff; }
}

/* Related thumbnails */
.related-thumb-wrapper {
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 8px;
  background-color: #f0f0f0;
}
.related-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.related-thumb-wrapper:hover .related-thumb {
  transform: scale(1.05);
}

/* Responsive image */
.responsive-img {
  width: 33%;
}
@media (min-width: 768px) {
  .responsive-img {
    width: 66%;
  }
}

/* Minor tweaks */
input.form-control.country {
  margin-bottom: 0px;
}

/* Search results dropdown */
#search-results {
  display: none;
  position: absolute;
  width: 100%;
  max-height: 300px;
  overflow-y: auto;
  background: linear-gradient(135deg, rgba(30, 30, 60, 0.85), rgba(60, 30, 60, 0.85));
  backdrop-filter: blur(12px);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  padding: 8px 0;
  z-index: 999;
  transition: all 0.3s ease-in-out;
}
#search-results a {
  display: block;
  padding: 12px 20px;
  margin: 4px 8px;
  color: #ffffff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  transition: all 0.25s ease;
}
#search-results a:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Hover scale effect */
.hover-scale {
  transition: transform 0.2s ease;
}
.hover-scale:hover {
  transform: scale(1.03);
}

/* Pastel backgrounds */
.bg-pastel-blue   { background-color: #e6f0ff; }
.bg-pastel-green  { background-color: #e8f9e8; }


    
/* Optional enhancements */
.nav-tabs .nav-link {
  border: 0;
  padding: 0.5rem 1rem;
  transition: background 0.2s ease;
}

.nav-tabs .nav-link:hover {
  background-color: rgba(128,128,128,0.1);
}

.nav-tabs .nav-link.active {
  font-weight: 600;
  border-bottom: 3px solid #0d6efd;
  background-color: rgba(0,0,0,0.05);
  color: var(--bs-emphasis-color);
}

@media (prefers-color-scheme: dark) {
  .nav-tabs .nav-link.active {
    background-color: rgba(255,255,255,0.05);
  }
}


/* Countdown index page*/
.countdown {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-start;
  align-items: center;
  font-family: 'Courier New', monospace;
  font-variant-numeric: tabular-nums;
}

.cd-box {
  background-color: #111;
  padding: 6px 10px;
  border-radius: 6px;
  text-align: center;
  min-width: 38px;
  box-shadow: inset 0 0 4px #000, 0 0 6px rgba(255, 255, 255, 0.05);
  color: #39ff14;
  border: 1px solid #222;
  flex: 1 0 auto;
}

.cd-box span {
  display: block;
  font-weight: bold;
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  color: inherit;
  text-shadow: 0 0 5px #39ff14;
  line-height: 1.2;
}

.cd-box small {
  font-size: clamp(0.6rem, 1.2vw, 0.75rem);
  color: #aaa;
  display: block;
  margin-top: 1px;
  line-height: 1;
}

.cd-box.cd-sec {
  background-color: #400;
  color: #ff4d4d;
  text-shadow: 0 0 6px red;
}

.line-limit-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* Tab-anime */
.card-header.bg-body-secondary.text-dark {
  background-color: #f8f9fa;
  color: #212529;
}

body[data-bs-theme="dark"] .card-header.bg-body-secondary.text-dark {
  background-color: #343a40;
  color: #f8f9fa;
}

.nav-link {
  color: #007bff;
  font-weight: 500;
}

body[data-bs-theme="dark"] .nav-link {
  color: #ffffff;
}

.nav-link.active {
  color: #ffffff;
  background-color: #007bff;
}

body[data-bs-theme="dark"] .nav-link.active {
  color: #007bff;
  background-color: #f8f9fa;
}

.toggle-password {
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
  background-color: transparent;
  border-left: none;
  border-radius: 0 .375rem .375rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.toggle-password:hover { background-color: rgba(0,0,0,.05); }

/* Respect OS accessibility settings and retain a clear keyboard focus. */
:focus-visible {
  outline: 3px solid #0d6efd;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
