/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;400;700&display=swap');

/* Color Variables */
:root {
  --primary-color: #0D1B2A;
  --secondary-color: #1B263B;
  --highlight-color: #0074D9;
  --tag-bg: #0064A6;
  --tag-highlight: #00528C;
  --text-light: #FFFFFF;
  --text-muted: #B3B3B3;
  --text-dark: #000000;
  --disabled: #555555;
  --border-color: #27406B;
  --placeholder-color: #8c8c8c;
  --dev-blue: #55c6ff;
}

/* Base Reset */
* {
  box-sizing: border-box;
}

body {
  background-color: var(--primary-color);
  font-family: 'Poppins', sans-serif;
  margin: 0;
  color: #fff;
  min-height: 100vh;
  width: 100vw;
  overflow-x: hidden;
}

/* HEADER */
header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background-color: var(--secondary-color);
  gap: 1rem;
}

.logo {
  max-width: 50px;
  height: auto;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  transition: all 0.3s ease;
  position: relative;
  top: 0;
  margin-top: 10px;
}

.nav-links a {
  color: var(--text-light);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: var(--highlight-color);
}

.hamburger {
  display: none;
  font-size: 30px;
  cursor: pointer;
  padding: 10px;
  color: var(--highlight-color);
}

/* --- Hero Section and Welcome Text --- */
.hero {
  width: 100vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  text-align: center;
  margin: 0 auto;
}
.hero h1 {
  font-size: 3rem;
  font-weight: bold;
  color: #1e90ff;
  margin-bottom: 1rem;
  text-align: center;
  width: 100%;
}
.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  color: #cfd8e3;
  text-align: center;
  width: 100%;
}

/* --- Watch Now Button --- */
.watch-now-btn {
  display: inline-block;
  background: linear-gradient(90deg, var(--highlight-color) 60%, var(--dev-blue) 100%);
  color: var(--text-light);
  padding: 0.8em 2.2em;
  border-radius: 2em;
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(30,144,255,0.30);
  border: none;
  outline: none;
  margin-top: 1.2rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.watch-now-btn:active,
.watch-now-btn:focus {
  background: linear-gradient(90deg, var(--dev-blue) 60%, var(--highlight-color) 100%);
  color: var(--text-light);
  transform: scale(0.98);
  text-decoration: none;
}
.watch-now-btn:hover {
  background: linear-gradient(90deg, var(--dev-blue) 60%, var(--highlight-color) 100%);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 8px 32px rgba(30,144,255,0.28);
}

/* --- Responsive SEARCH area, input, clear button, autocomplete --- */
#form,
.search-container {
  max-width: 350px;
  min-width: 220px;
  width: 100%;
  margin: 0 auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search {
  width: 100%;
  max-width: 350px;
  padding: 0.5rem 2.5rem 0.5rem 1rem;
  border: 2px solid var(--highlight-color);
  border-radius: 50px;
  font-size: 1rem;
  color: var(--text-light);
  background-color: var(--primary-color);
  box-sizing: border-box;
  font-family: inherit;
  transition: border-color 0.2s;
}

.search:focus {
  border-color: var(--dev-blue);
  background-color: var(--secondary-color);
}

.search::placeholder {
  color: var(--highlight-color);
  opacity: 1;
}

.clear-btn {
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--highlight-color);
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
  user-select: none;
  z-index: 12;
  padding: 0;
}

.clear-btn:hover {
  color: var(--tag-bg);
}

.autocomplete-items {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  width: 100%;
  background-color: var(--secondary-color);
  border: 1px solid var(--border-color);
  max-height: 250px;
  overflow-y: auto;
  z-index: 1000;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  font-size: 1rem;
  color: var(--text-light);
}

/* --- Cool colored scrollbars for app and autocomplete dropdown --- */
.autocomplete-items::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 8px;
  background: var(--secondary-color);
  border-radius: 8px;
}

.autocomplete-items::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, var(--highlight-color), var(--dev-blue));
  border-radius: 8px;
}

.autocomplete-items::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(90deg, var(--dev-blue), var(--highlight-color));
}

/* Firefox */
.autocomplete-items {
  scrollbar-width: thin;
  scrollbar-color: var(--highlight-color) var(--secondary-color);
}
body {
  scrollbar-width: thin;
  scrollbar-color: var(--dev-blue) var(--primary-color);
}

/* Extra: Make dropdown pop with a subtle shadow and border */
.autocomplete-items {
  box-shadow: 0 8px 24px rgba(0, 116, 217, 0.12), 0 2px 8px rgba(0,0,0,0.18);
  border: 2px solid var(--highlight-color);
  background: var(--secondary-color);
  transition: box-shadow 0.2s;
}
.autocomplete-item:hover {
  background: linear-gradient(90deg, var(--highlight-color) 60%, var(--dev-blue) 100%);
  color: var(--text-light);
}

.autocomplete-item img {
  flex-shrink: 0;
  width: 40px;
  height: 60px;
  object-fit: cover;
  margin-right: 10px;
  border-radius: 5px;
}

/* --- Mobile Fixes --- */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .nav-links {
    display: none;
    flex-direction: column;
    background-color: #27406B;
    color: white;
    padding: 10px;
    position: absolute;
    top: 50px;
    left: 10px;
    right: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    border-radius: 8px;
    z-index: 1000;
  }
  .nav-links a {
    color: white;
    padding: 10px;
    text-decoration: none;
    border-bottom: 1px solid #27406B;
  }
  .nav-links a:hover {
    background-color: #1B263B;
  }
  .nav-links.active {
    display: flex;
  }
  .hamburger {
    display: block;
    font-size: 30px;
    cursor: pointer;
    padding: 10px;
  }
  .hero {
    min-height: 140px;
    padding: 16px 0 12px 0;
    text-align: center;
    align-items: center;
    justify-content: center;
  }
  .hero h1 {
    font-size: 2rem;
    width: 100%;
    text-align: center;
    margin-bottom: 0.7rem;
  }
  .hero p {
    font-size: 1.08rem;
    margin-bottom: 1.2rem;
    width: 100%;
    text-align: center;
  }
  .watch-now-btn {
    font-size: 1.1rem;
    padding: 0.7em 1.2em;
    margin-top: 0.6rem;
  }
}

@media (max-width: 600px) {
  #form,
  .search-container {
    max-width: 92vw !important;
    width: 92vw !important;
    min-width: 0 !important;
    margin: 0 auto !important;
    padding: 0 !important;
    position: relative !important;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .search {
    font-size: 0.97rem !important;
    padding: 0.3em 2.0em 0.3em 0.9em !important;
    height: 2.2em !important;
    max-width: 92vw !important;
    min-width: 0 !important;
    margin: 0 auto !important;
    border-radius: 50px !important;
    background-color: var(--primary-color) !important;
    color: var(--text-light) !important;
    border: 2px solid var(--highlight-color) !important;
  }
  .search:focus {
    border-color: var(--dev-blue) !important;
    background-color: var(--secondary-color) !important;
  }
  .search::placeholder {
    color: var(--highlight-color) !important;
    opacity: 1 !important;
  }
  .clear-btn {
    right: 0.8em !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-size: 1.1em !important;
    padding: 0 !important;
    z-index: 12 !important;
  }
  .autocomplete-items {
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 92vw !important;
    font-size: 0.96rem !important;
    border-radius: 0 0 12px 12px !important;
    z-index: 1000 !important;
  }
  .autocomplete-item img {
    width: 32px !important;
    height: 48px !important;
    margin-right: 8px !important;
  }
  .hero {
    min-height: 100px;
    padding: 8px 0 8px 0;
    text-align: center;
    align-items: center;
    justify-content: center;
  }
  .hero h1 {
    font-size: 1.3rem;
    width: 100%;
    text-align: center;
    margin-bottom: 0.4rem;
  }
  .hero p {
    font-size: 0.95rem;
    margin-bottom: 0.7rem;
    width: 100%;
    text-align: center;
  }
  .watch-now-btn {
    font-size: 1rem;
    padding: 0.6em 1em;
    margin-top: 0.5rem;
  }
}

/* Extra: for very small screens */
@media (max-width: 400px) {
  .search {
    font-size: 0.90rem !important;
    height: 1.9em !important;
    padding: 0.22em 1.5em 0.22em 0.7em !important;
    max-width: 98vw !important;
  }
  .clear-btn {
    font-size: 1em !important;
    right: 0.5em !important;
  }
  .autocomplete-items {
    font-size: 0.87rem !important;
    max-width: 98vw !important;
  }
  .hero {
    min-height: 60px;
    padding: 3px 0 3px 0;
    text-align: center;
    align-items: center;
    justify-content: center;
  }
  .hero h1 {
    font-size: 0.98rem;
    width: 100%;
    text-align: center;
    margin-bottom: 0.2rem;
  }
  .hero p {
    font-size: 0.81rem;
    margin-bottom: 0.2rem;
    width: 100%;
    text-align: center;
  }
  .watch-now-btn {
    font-size: 0.85rem;
    padding: 0.5em 0.7em;
    margin-top: 0.2rem;
  }
}

/* MAIN MOVIE GRID AND CARD STYLES */
main {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.movie {
  width: 170px;
  margin: 1rem;
  border-radius: 8px;
  box-shadow: 0.2px 4px 12px rgba(0, 0, 0, 0.14);
  background-color: var(--secondary-color);
  position: relative;
  overflow: hidden;
  aspect-ratio: 2/3;
  transition: box-shadow 0.2s;
}
.movie:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}

.movie img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  border-radius: 8px 8px 0 0;
  background: #111;
}

.movie-info {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem 1rem;
  letter-spacing: 0.5px;
  font-size: 15px;
}

.movie-info h3 {
  margin-top: 0;
  font-size: 13px;
}

.movie-info span {
  background-color: var(--primary-color);
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
  font-weight: bold;
}

.movie-info span.green {
  color: lightgreen;
}

.movie-info span.orange {
  color: var(--highlight-color);
}

.movie-info span.red {
  color: var(--tag-highlight);
}

.overview {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--text-light);
  padding: 1rem;
  max-height: 50%;
  transform: translateY(101%);
  transition: transform 0.3s ease-in;
  font-size: clamp(9px, 2.5vw, 12px);
  display: flex;
  flex-direction: column;
}

.overview-text {
  overflow-y: auto;
  max-height: 74%;
  margin-bottom: 10px;
  color: black;
}

.movie:hover .overview {
  transform: translateY(0);
}

.know-more {
  background-color: var(--highlight-color);
  color: var(--text-light);
  font-size: 13px;
  font-weight: bold;
  border: 0;
  border-radius: 50px;
  padding: 8px 18px;
  margin-left: auto;
  margin-right: auto;
  display: block;
  transition: background 0.2s;
}

.know-more:hover {
  background-color: var(--tag-highlight);
}

/* GENRE TAGS */
#tags {
  width: 80%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  margin: 10px auto;
}

.tag {
  color: var(--text-light);
  padding: 8px 16px;
  background-color: var(--tag-bg);
  border-radius: 50px;
  margin: 5px;
  display: inline-block;
  cursor: pointer;
  font-size: 0.95rem;
}

.tag.highlight {
  background-color: var(--tag-highlight);
}

.no-results {
  color: var(--text-light);
}

/* PAGINATION */
.pagination {
  display: flex;
  margin: 10px 30px;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
}

.page {
  padding: 16px;
  cursor: pointer;
}

.page.disabled {
  cursor: not-allowed;
  color: var(--disabled);
}

.current {
  padding: 8px 16px;
  border-radius: 50%;
  border: 4px solid var(--highlight-color);
  font-size: 18px;
  font-weight: 600;
}

/* FOOTER */
footer {
  background-color: var(--highlight-color);
  color: var(--text-light);
  text-align: center;
  padding: 20px;
  position: relative;
  bottom: 0;
  width: 100%;
}

.social-media {
  margin-top: 10px;
}

.social-media a {
  color: var(--text-light);
  margin: 0 15px;
  text-decoration: none;
  font-size: 18px;
}

.social-media a:hover {
  text-decoration: underline;
  text-decoration-color: var(--tag-bg);
  text-shadow: 0 0 2px var(--tag-bg);
  cursor: pointer;
}

/* MODAL OVERLAY */
.modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.98);
  overflow-y: auto;
  padding: 0;
}

.modal-content {
  margin: 48px auto;
  width: 95vw;
  max-width: 900px;
  background: #222;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 16px;
  padding: 32px 24px 30px 24px;
  box-shadow: 0 8px 36px #000a;
  min-height: 70vh;
  position: relative;
}

.close-button {
  position: absolute;
  top: 18px;
  right: 28px;
  font-size: 36px;
  font-weight: 700;
  color: var(--highlight-color);
  background: rgba(255,255,255,0.07);
  border: none;
  cursor: pointer;
  padding: 9px 16px;
  border-radius: 12px;
  z-index: 10;
  transition: background-color 0.2s;
}
.close-button:hover,
.close-button:focus {
  background-color: rgba(255,255,255,0.14);
}

/* Info Section: Poster + Details horizontal */
.modal-info-section {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  width: 100%;
  max-width: 900px;
  margin-bottom: 18px;
  justify-content: flex-start;
}

.modal-poster {
  width: 120px;
  height: 180px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 6px 22px #000a;
  margin: 0;
}

.modal-details {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  flex: 1;
  min-width: 0;
}

/* Title */
#movieTitle {
  font-size: 2rem;
  font-weight: bold;
  color: var(--text-light);
  margin: 0 0 10px 0;
  word-break: break-word;
}

/* Icons Bar */
.modal-icons {
  display: flex;
  gap: 20px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

/* Overview: one line, truncate if too long */
#movieOverview {
  font-size: 1.08rem;
  color: var(--text-muted);
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 14px;
  line-height: 1.4;
  max-width: 100%;
}

/* Server dropdown just below overview */
#serverDropdown {
  margin-top: 0;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1rem;
}

/* Video Player Container - Large, Centered */
.video-container {
  position: relative;
  width: 100%;
  max-width: 900px;
  height: 60vh;
  min-height: 340px;
  background-color: black;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 0;
  box-shadow: 0 8px 32px #000a;
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-container iframe, 
.video-container video {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 14px;
  background: #111;
  display: block;
}

/* Responsive adjustments for modal and player */
@media (max-width: 900px) {
  .modal-content { padding: 18px 2vw 24px 2vw; }
  .modal-info-section,
  .video-container {
    width: 100vw;
    max-width: 100vw;
  }
  .modal-poster { width: 90px; height: 120px; }
  .video-container { height: 38vh; min-height: 180px; }
  #movieTitle { font-size: 1.25rem; }
}

@media (max-width: 700px) {
  .modal-info-section {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 98vw;
  }
  .modal-poster {
    width: 70px;
    height: 105px;
  }
  #movieTitle {
    font-size: 1.1rem;
  }
  #movieOverview {
    font-size: 0.94rem;
    max-width: 96vw;
  }
  #serverDropdown {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .video-container { height: 23vh; min-height: 90px; }
}

@media (max-width: 600px) {
  .modal-content {
    padding: 6vw 1vw 16vw 1vw !important;
    min-height: 60vh !important;
    max-width: 99vw !important;
    width: 99vw !important;
    border-radius: 10px !important;
  }
  .modal-info-section {
    flex-direction: column !important;
    align-items: center !important;
    gap: 8px !important;
    width: 97vw !important;
    margin-bottom: 8px !important;
  }
  .modal-poster {
    width: 80px !important;
    height: 110px !important;
    margin-bottom: 10px !important;
  }
  #movieTitle {
    font-size: 1.1rem !important;
  }
  #movieOverview {
    font-size: 0.93rem !important;
    max-width: 96vw !important;
    margin-bottom: 10px !important;
  }
  #serverDropdown {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }
  .video-container {
    height: 35vh !important;
    min-height: 180px !important;
    max-width: 98vw !important;
    border-radius: 11px !important;
    margin-bottom: 10px !important;
  }
  .video-container iframe,
  .video-container video {
    height: 100% !important;
    width: 100% !important;
    border-radius: 11px !important;
    min-height: 180px !important;
    background: #111 !important;
  }
}

/* About Dev/Developer Section - Unified Style */
.about-container, .about {
  max-width: 600px;
  margin: 50px auto 40px auto;
  padding: 32px 24px;
  background: #222e3c;
  color: #fff;
  border-radius: 18px;
  box-shadow: 0 6px 32px #0008;
  text-align: center;
}

.dev-photo {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 0 0 6px #1B263B, 0 4px 18px #0003;
  margin-bottom: 18px;
  margin-top: 12px;
  border: 4px solid #1B263B;
  background: #111;
}

.about-container h1, .about h2 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 18px;
  color: var(--dev-blue);
  text-shadow: 0 2px 8px #0006;
}

.about-container p, .about p {
  font-size: 1.11rem;
  line-height: 1.7;
  margin-bottom: 18px;
  color: #cfd8e3;
}

.about-container .btn.btn-primary, .about .btn.btn-primary {
  background: #0074D9;
  color: #fff;
  border-radius: 8px;
  padding: 12px 30px;
  font-size: 1rem;
  font-weight: 600;
  box-shadow: 0 2px 8px #0074d966;
  border: none;
  margin-top: 10px;
  transition: background 0.2s;
}
.about-container .btn.btn-primary:hover,
.about-container .btn.btn-primary:focus,
.about .btn.btn-primary:hover,
.about .btn.btn-primary:focus {
  background: #00528C;
  color: #fff;
  text-decoration: none;
}

/* Overlay styles - fixes for color and layout */
.overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(24,41,64,0.97);
  color: #fff;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex-direction: column;
  padding: 2rem;
  transition: opacity 0.2s;
}
.contact-form {
  background: #22334c;
  padding: 2.5rem 2rem 2rem 2rem;
  border-radius: 18px;
  box-shadow: 0 6px 32px rgba(34,46,60,0.23);
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
  text-align: left;
  position: relative;
  border: 2px solid #1e90ff;
}
.contact-form h3 {
  color: #1e90ff;
  font-weight: bold;
  margin-bottom: 1rem;
  text-align: center;
  font-size: 1.4rem;
}
.contact-form p {
  color: #cfd8e3;
  font-size: 1rem;
  margin-bottom: 1.3rem;
  text-align: center;
}
.form-control {
  background: #182940;
  border: 1px solid #1e90ff;
  color: #fff;
  margin-bottom: 1rem;
  border-radius: 8px;
  font-size: 1rem;
}
.form-control:focus {
  background: #182940;
  color: #fff;
  border-color: #1565c0;
  box-shadow: none;
}
.send-message-btn {
  background: linear-gradient(90deg,#1e90ff 60%,#42a5f5 100%);
  color: #fff;
  font-weight: bold;
  border-radius: 10px;
  padding: 0.5rem 1rem;
  border: none;
  width: 100%;
  transition: background 0.2s;
  box-shadow: 0 2px 8px rgba(30,144,255,0.17);
  font-size: 1.1rem;
  margin-bottom: 8px;
}
.send-message-btn:hover {
  background: linear-gradient(90deg,#1565c0 60%,#1e90ff 100%);
}
.btn-close {
  margin-top: 1rem;
  font-size: 1.1rem;
  background: #1e90ff;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.5rem 2rem;
  cursor: pointer;
  transition: background 0.2s;
  box-shadow: 0 2px 8px rgba(30,144,255,0.17);
  display: block;
  width: 100%;
}
.btn-close:hover {
  background: #1565c0;
}
#formStatus {
  text-align: center;
}

.spinner {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.lds-ring {
  display: inline-block;
  position: relative;
  width: 80px;
  height: 80px;
}
.lds-ring div {
  box-sizing: border-box;
  display: block;
  position: absolute;
  width: 64px;
  height: 64px;
  margin: 8px;
  border: 8px solid #fff;
  border-radius: 50%;
  animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  border-color: #fff transparent transparent transparent;
}
.lds-ring div:nth-child(1) { animation-delay: -0.45s; }
.lds-ring div:nth-child(2) { animation-delay: -0.3s; }
.lds-ring div:nth-child(3) { animation-delay: -0.15s; }
@keyframes lds-ring {
  0% { transform: rotate(0deg);}
  100% { transform: rotate(360deg);}
}
/* ...keep your existing styles... */

/* Overlay styles for mobile and desktop */
.overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(24,41,64,0.97);
  color: #fff;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex-direction: column;
  padding: 0;
  transition: opacity 0.2s;
}
.contact-form {
  background: #22334c;
  padding: 2.5rem 2rem 2rem 2rem;
  border-radius: 18px;
  box-shadow: 0 6px 32px rgba(34,46,60,0.23);
  max-width: 420px;
  width: 94vw;
  margin: 0 auto;
  text-align: left;
  position: relative;
  border: 2px solid #1e90ff;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.contact-form h3 {
  color: #1e90ff;
  font-weight: bold;
  margin-bottom: 0.7rem;
  text-align: center;
  font-size: 1.4rem;
}
.contact-form label {
  font-size: 1rem;
  font-weight: 400;
  margin-bottom: 0.2rem;
  color: #fff;
  margin-top: 0.6rem;
}
.contact-form input,
.contact-form textarea {
  background: #182940;
  border: 1px solid #1e90ff;
  color: #fff;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  padding: 0.7rem 1rem;
  margin-bottom: 0.6rem;
  resize: vertical;
  width: 100%;
  box-sizing: border-box;
}
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #1565c0;
  outline: none;
}
.send-message-btn {
  background: linear-gradient(90deg,#1e90ff 60%,#42a5f5 100%);
  color: #fff;
  font-weight: bold;
  border-radius: 10px;
  padding: 0.9rem 1rem;
  border: none;
  width: 100%;
  transition: background 0.2s;
  box-shadow: 0 2px 8px rgba(30,144,255,0.17);
  font-size: 1.08rem;
  margin-bottom: 8px;
  cursor: pointer;
}
.send-message-btn:hover {
  background: linear-gradient(90deg,#1565c0 60%,#1e90ff 100%);
}
.btn-close {
  position: absolute;
  top: 10px; right: 14px;
  background: #1e90ff;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1.8rem;
  font-weight: bold;
  width: 38px; height: 38px;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-close:hover { background: #1565c0; }
#quotationStatus, #messageDevStatus {
  text-align: center;
  font-size: 1.05rem;
  margin-top: 0.7rem;
}

/* Overlay mobile responsiveness */
@media (max-width: 600px) {
  .overlay { padding: 0; }
  .contact-form {
    max-width: 98vw;
    padding: 1.2rem 0.5rem 1.2rem 0.5rem;
    border-radius: 12px;
    font-size: 1rem;
  }
  .contact-form h3 { font-size: 1.2rem; }
  .contact-form label { font-size: 0.98rem; }
  .contact-form input,
  .contact-form textarea { font-size: 0.97rem; padding: 0.6rem 0.8rem; }
  .btn-close { font-size: 1.3rem; width: 30px; height: 30px; top: 8px; right: 8px; }
}
/* --- Android: 2 images per row, maximize space --- */
@media (max-width: 700px) {
  main {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.7vw !important;
    justify-content: stretch !important;
    align-items: stretch !important;
    padding: 0 2vw !important;
    width: 100vw !important;
  }
  .movie {
    width: 100% !important;
    margin: 0 !important;
    max-width: 100% !important;
    min-width: 0 !important;
    aspect-ratio: 2/3 !important;
    border-radius: 7px !important;
  }
  .movie img {
    width: 100% !important;
    height: auto !important;
    min-height: 1px !important;
    aspect-ratio: 2/3 !important;
    object-fit: cover !important;
    border-radius: 7px 7px 0 0 !important;
  }
  .movie-info {
    padding: 0.38rem 0.5rem 0.5rem !important;
    font-size: 13px !important;
  }
}

/* --- Even smaller screens: 1 image per row --- */
@media (max-width: 400px) {
  main {
    grid-template-columns: 1fr !important;
    gap: 2vw !important;
    padding: 0 1vw !important;
  }
  .movie img {
    height: auto !important;
  }
}