@import url("https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Roboto+Slab:wght@100..900&display=swap");

:root {
  --header-font: "Bebas Neue", cursive;
  --text-font: "Roboto Slab", serif;
  --primary-background: #000000;
  --accent: #e50914;
  --text-secondary: #b3b3b3;
  --text-primary: #ffffff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--text-font);
}

body {
  background-color: #000;
  display: flex;
  flex-direction: column;
  padding-top: 70px; /* عشان الهيدر الثابت */
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 10px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff;
  background-color: rgba(28, 28, 28, 0.95);
  transition: background-color 0.3s ease;
  z-index: 1000;
}

header h1 {
  font-family: var(--header-font);
  font-size: clamp(1rem, 2vw, 2.5rem);
  color: var(--accent);
  letter-spacing: 5px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
  cursor: pointer;
}

header div {
  flex: 1;
}

header div:last-child {
  flex: 1.5;
  display: flex;
  align-items: center;
}

.search-bar {
  display: flex;
  width: clamp(200px, 30vw, 350px);
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.search-bar input {
  flex: 5;
  padding: 12px;
  border: none;
  outline: none;
  font-size: 1rem;
  background: #222;
  color: var(--text-primary);
}

.search-bar input::placeholder {
  color: #888;
}

.search-bar button {
  flex: 1;
  padding: 12px 15px;
  border: none;
  background-color: var(--accent);
  color: var(--text-primary);
  cursor: pointer;
  transition: filter 0.3s;
  font-weight: bold;
}

.search-bar button:hover {
  filter: brightness(0.8);
}
form{
  flex: 1;
  width: 100%;
  display: flex;
}
main {
  padding: 30px 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 40px;
}
main h2 {
  font-family: var(--header-font);
  font-size: clamp(1.5rem, 3vw, 3rem);
  margin-bottom: 20px;
  letter-spacing: 10px;
  color: var(--text-primary);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 10px;
  text-align: center;
  text-transform: uppercase;
  background: linear-gradient(90deg, var(--accent), #f40612, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shine 3s linear infinite;
}
main section {
  justify-content: center;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

#list-selection {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 30px 0;
  font-family: var(--text-font);
}

#list-selection button {
  background-color: var(--accent);
  color: var(--text-primary);
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s ease;
  font-family: var(--header-font);
  letter-spacing: 1px;
}

#list-selection button:hover {
  background-color: #b0060f; /* darker accent */
  transform: translateY(-2px);
}

#list-selection button:disabled {
  background-color: #444;
  color: var(--text-secondary);
  cursor: not-allowed;
  transform: none;
}

#page-info {
  font-size: 18px;
  font-weight: bold;
  color: var(--text-primary);
  font-family: var(--text-font);
}

/* Top rated movie card styles */
.top-rated-card {
  flex: 0 0 auto;
  width: clamp(200px, 20vw, 250px);
  height: clamp(auto ,20vw,500px);
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.3s ease;
  scroll-snap-align: start;
  scroll-snap-stop: always; /* Ensures snap stops at each card */
}

.top-rated-card img {
  width: 100%;
  max-width: 250px;
  object-fit: cover;
  border-radius: 12px 12px 0 0;
  transition: 0.5s;
  position: relative;
  filter: brightness(0.8);
  transition: transform 0.3s ease, filter 0.3s ease, opacity 0.3s ease;
}

.card-overlay {
  color: #fff;
  display: flex;
  text-align: left;
  flex-direction: column;
  justify-content: flex-end;
  padding: 15px;
  gap: 10px;
  transition: top 0.4s ease, opacity 0.3s ease;
}

.card-overlay h3 {
  margin: 0;
  font-size: clamp(1rem , 2vw ,1rem);
}

.card-overlay p {
  font-size: 0.9rem;
  transition: opacity 0.3s ease;
}

.top-rated-card img:hover {
  transform: scale(1.07);
  filter: brightness(1.1); 
}

/* Footer Styles */
footer {
  background-color: #111;
  color: #bbb;
  padding: 40px 20px 20px;
  margin-top: 40px;
  border-top: 2px solid var(--accent);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: space-between;
}

.footer-brand {
  flex: 1;
  min-width: 250px;
}

.footer-brand h1 {
  font-family: var(--header-font);
  font-size: 2.8rem;
  color: var(--accent);
  letter-spacing: 4px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
  margin-bottom: 15px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.footer-brand h1::before {
  content: "";
  position: absolute;
  width: 0%;
  height: 2px;
  bottom: 0;
  background-color: var(--accent);
  transition: all 0.3s ease;
}
.footer-brand h1:hover {
  text-shadow: 0 0 10px rgba(229, 9, 20, 0.5);
}
.footer-brand h1:hover::before {
  width: clamp(50%, 40%, 30%);
  transition: all 0.3s ease;
}

.footer-brand p {
  font-size: 1rem;
  line-height: 1.6;
  max-width: 300px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
}

.footer-nav,
.footer-social {
  min-width: 150px;
}

.footer-nav h3,
.footer-social h3 {
  color: var(--text-primary);
  font-size: 1.3rem;
  margin-bottom: 20px;
  font-weight: 700;
  position: relative;
  padding-bottom: 10px;
}

.footer-nav h3:after,
.footer-social h3:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background-color: var(--accent);
}

.footer-nav ul {
  list-style: none;
}

.footer-nav li {
  margin-bottom: 12px;
}

.footer-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 1rem;
  transition: all 0.3s ease;
  position: relative;
  padding-left: 0;
}

.footer-nav a:before {
  content: "▶";
  color: var(--accent);
  position: absolute;
  left: -15px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  transition: all 0.3s ease;
}

.footer-nav a:hover {
  color: var(--text-primary);
  padding-left: 15px;
}

.footer-nav a:hover:before {
  opacity: 1;
  left: 0;
}

.social-icons {
  display: flex;
  gap: 15px;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: #222;
  color: var(--text-secondary);
  border-radius: 50%;
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-icons a:hover {
  background-color: var(--accent);
  color: var(--text-primary);
  transform: translateY(-3px);
}

.footer-bottom {
  max-width: 1200px;
  margin: 40px auto 0;
  padding-top: 20px;
  border-top: 1px solid #333;
  text-align: center;
  font-size: 0.9rem;
}

.footer-bottom p {
  color: #777;
}

/* Responsive Design */
@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    gap: 30px;
  }

  .footer-links {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 480px) {
  .search-bar {
    width: 20vw;
    max-width: 280px;
    border-radius: 0;
  }

  header {
    padding: 8px 10px;
  }

  .search-bar input {
    padding: 10px 12px;
    font-size: 0.85rem;
  }

  .search-bar button {
    display: none;
  }
  .footer-links {
    flex-direction: column;
    gap: 30px;
  }

  .footer-brand h1 {
    font-size: 2.2rem;
  }
}
