
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800&display=swap');

/* ZH MOVIES - PURPLE & GOLD */
:root {
  --dark: #f8edff;
  --purple: #9149d4;
  --yellow: #ffd56a;
  --bg: #10091b;
  --muted: #c4b0d3;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: linear-gradient(145deg, #21102f, #10091b 55%, #080510);
  color: var(--dark);
  font-family: Vazirmatn, sans-serif;
  min-height: 100vh;
}

button, input, select, textarea {
  font: inherit;
}

button, .yellow, .purple {
  border: 0;
  border-radius: 12px;
  padding: 11px 20px;
  cursor: pointer;
  font-weight: 700;
}

/* HEADER */
header {
  height: 72px;
  background: #180d27;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 7%;
  border-bottom: 1px solid #b18a4d;
  box-shadow: 0 5px 25px #0007;
}

.logo {
  direction: ltr;
  text-decoration: none;
  color: white;
  font-weight: 800;
}

.logo b {
  display: inline-grid;
  place-items: center;
  background: #40205e;
  color: var(--yellow);
  border: 1px solid var(--yellow);
  padding: 10px;
  border-radius: 10px;
  margin-left: 8px;
}

/* HERO */
.hero {
  margin: 28px 5%;
  padding: 55px 8%;
  min-height: 370px;
  border-radius: 26px;
  background: linear-gradient(120deg, #210e35, #582b7c);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  border: 1px solid #b18a4d;
  box-shadow: 0 15px 40px #0008;
}

.hero small, #library small {
  color: #c9a6e9;
}

.hero h1 {
  font-size: clamp(35px, 5vw, 58px);
  line-height: 1.4;
}

.hero h1 span,
.heading h2 span {
  color: var(--yellow);
}

.hero p {
  color: #eadcf3;
}

.yellow {
  display: inline-block;
  background: linear-gradient(135deg, #ffe9a5, #e9b840);
  color: #261132;
  text-decoration: none;
}

.purple,
.filter.active {
  background: linear-gradient(135deg, #a05be1, #582681);
  color: white;
}

.poster-art {
  width: 160px;
  height: 205px;
  background: linear-gradient(140deg, #ffd34f, #bd7cdb);
  border-radius: 18px;
  display: grid;
  place-content: center;
  text-align: center;
  color: #28183b;
  font-size: 45px;
  font-weight: 800;
  transform: rotate(7deg);
  box-shadow: 0 20px 45px #10051c66;
}

.poster-art small {
  font-size: 10px;
  letter-spacing: 2px;
}

/* MOVIE LIBRARY */
#library {
  padding: 35px 7% 80px;
}

.heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.heading h2 {
  color: white;
}

.filter {
  background: #261536;
  border: 1px solid #74518d;
  color: #eee0fa;
  margin: 3px;
}

#notice {
  color: var(--muted);
  font-size: 13px;
}

/* SMALL HORIZONTAL POSTERS */
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.card {
  min-width: 0;
  background: #21132f;
  border: 1px solid #75518c;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 22px #0007;
}

.thumb {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(140deg, #38204f, #a879d5);
  display: grid;
  place-items: center;
  color: var(--yellow);
  font-size: 32px;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.info {
  padding: 10px;
  overflow-wrap: anywhere;
}

.info h3 {
  margin: 0;
  color: #ffda77;
  font-size: 14px;
  line-height: 1.6;
}

.info p {
  color: #d2c0de;
  font-size: 12px;
  line-height: 1.8;
}

.info video {
  display: block;
  width: 100%;
  margin-top: 12px;
  border-radius: 12px;
  background: black;
}

/* FOOTER */
footer {
  text-align: center;
  padding: 25px;
  background: #140b20;
  color: #bca9ca;
  border-top: 1px solid #60417c;
}

/* MODALS & ADMIN PANEL */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: #080310dd;
  align-items: center;
  justify-content: center;
  padding: 15px;
  z-index: 5;
}

.modal.open {
  display: flex;
}

.panel {
  background: #241532;
  color: white;
  border: 1px solid #b18a4d;
  border-radius: 20px;
  padding: 25px;
  width: min(100%, 440px);
  max-height: 90vh;
  overflow: auto;
  position: relative;
}

.close {
  float: left;
  padding: 4px 12px;
}

.panel form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.panel input,
.panel select,
.panel textarea {
  padding: 12px;
  border: 1px solid #76538c;
  border-radius: 10px;
  width: 100%;
  background: #170d22;
  color: white;
}

.row {
  display: flex;
  gap: 10px;
}

.pick {
  display: block;
  padding: 14px;
  border: 1px dashed #a879d5;
  border-radius: 12px;
  color: var(--purple);
  cursor: pointer;
}

.pick input {
  display: none;
}

.gold {
  border-color: #e5c85e;
  color: #8b6b13;
}

.bar {
  height: 7px;
  background: #eee;
  border-radius: 10px;
  overflow: hidden;
}

.bar div {
  height: 100%;
  width: 0;
  background: var(--purple);
}

#login[hidden],
#uploadPanel[hidden] {
  display: none !important;
}

/* DESKTOP */
@media (min-width: 768px) {
  .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
  }
}

/* MOBILE */
@media (max-width: 600px) {
  .hero {
    padding: 35px 25px;
    min-height: 350px;
  }

  .poster-art {
    opacity: .25;
    position: absolute;
    left: 0;
  }

  .hero > div:first-child {
    position: relative;
    z-index: 1;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .thumb {
    aspect-ratio: 16 / 9;
    height: auto;
  }

  .info {
    padding: 9px;
  }

  .info h3 {
    font-size: 13px;
  }

  .card {
    border-radius: 12px;
  }
}
