/* ===== Global Reset & Base ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-image: url("./bg1.jpg");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  background-attachment: fixed; /* stays in place while scrolling */
  background-clip: border-box;
  color: #fff;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  margin: 15px;
}


/* ===== Layout ===== */
.container {
  margin: 2rem auto;
  width: min(90%, 1000px);
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(5px);
  border-radius: 1.25rem;
  padding: 2rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

section {
  display: none;
}
section.active {
  display: block;
}

/* ===== Typography ===== */
h1, h2, h3 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
}
p {
  margin-bottom: 0.75rem;
  color: rgba(255, 255, 255, 0.85);
}
small {
  font-size: 0.875rem;
  opacity: 0.8;
}

/* ===== Forms ===== */
input,
button {
  width: 100%;
  padding: 0.75rem 1rem;
  margin: 0.5rem 0;
  border: none;
  border-radius: 0.75rem;
  font-size: 1rem;
}

input {
  background: rgba(0, 0, 0, 0.15);
  color: white;
}
input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}
input:focus {
  outline: 2px solid rgba(255, 255, 255, 0.5);
}

/* ===== Buttons ===== */
button {
  background: rgba(0, 0, 0, 0.25);
  color: white;
  cursor: pointer;
  transition: all 0.25s ease;
}
button:hover {
  background: rgba(0, 0, 0, 0.4);
  transform: translateY(-2px);
}
button:active {
  transform: scale(0.98);
}

#player {
  display: block;
  width: 100%;
  max-height: 70vh;
  border-radius: 0.75rem;
  background: black;
  z-index: 10;
}


/* ===== Movie Grid ===== */
#movieList {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
  padding: 1.5rem 0;
}

.movie-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: rgba(3, 3, 3, 0.331);
  height: min-content;
  text-overflow: ellipsis;
  overflow: hidden;
  text-wrap: normal;
  backdrop-filter: blur(15px);
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(70, 37, 92, 0.35);
}
.movie-card h3 {
  margin-bottom: 0.5rem;
  font-size: clamp(1.1rem, 2vw, 1.3rem);
}
.movie-card p {
  flex-grow: 1;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

/* ===== Modal ===== */
#adminModal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.0);
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}
#adminModal .modal-content {
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(20px);
  border-radius: 1rem;
  padding: 2rem;
  width: min(90%, 800px);
  max-height: 90%;
  overflow-y: auto;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  animation: slideUp 0.35s ease;
}
#adminModal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
#adminModal button {
  margin: 0.25rem;
  width: fit-content;
}

/* ===== Menu ===== */
.menu {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

/* ===== Animations ===== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
