:root {
  --bg: #101820;
  --panel: rgba(255, 255, 255, 0.1);
  --panel-strong: rgba(255, 255, 255, 0.16);
  --text: #f8fbff;
  --muted: rgba(248, 251, 255, 0.72);
  --line: rgba(255, 255, 255, 0.18);
  --red: #ff4d5e;
  --cyan: #2fd7e8;
  --green: #78e08f;
  --yellow: #ffd166;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 15% 12%, rgba(255, 77, 94, 0.34), transparent 28%),
    radial-gradient(circle at 88% 8%, rgba(47, 215, 232, 0.3), transparent 30%),
    linear-gradient(135deg, #101820 0%, #172634 45%, #221927 100%);
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 36px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, var(--red), var(--yellow));
  color: #101820;
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
  letter-spacing: 0;
}

.brand strong {
  font-size: 19px;
}

.brand small {
  color: var(--muted);
  font-size: 13px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
}

.nav-links a:hover {
  border-color: var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 26px;
  align-items: stretch;
  min-height: 520px;
  padding: 54px 0 30px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--yellow);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(42px, 8vw, 86px);
  line-height: 0.92;
  letter-spacing: 0;
}

.hero-text {
  max-width: 670px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.55;
}

.status-panel {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  max-width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(255, 209, 102, 0.42);
  border-radius: 8px;
  background: rgba(255, 209, 102, 0.13);
  color: #fff2c8;
  line-height: 1.35;
}

.pulse {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 0 0 rgba(255, 209, 102, 0.62);
  animation: pulse 1.6s infinite;
  flex: 0 0 auto;
}

.login-card {
  align-self: center;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(9, 14, 20, 0.72);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
}

.login-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 20px;
}

.login-head span {
  color: var(--muted);
}

.login-head strong {
  color: var(--yellow);
}

label {
  display: block;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 14px;
}

input {
  width: 100%;
  height: 50px;
  margin-top: 7px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

input:disabled {
  opacity: 0.72;
}

.login-card button {
  width: 100%;
  min-height: 50px;
  margin-top: 4px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--red), var(--yellow));
  color: #14161a;
  cursor: not-allowed;
  font-weight: 800;
  opacity: 0.82;
}

.login-card p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.catalog {
  padding-top: 18px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

h2 {
  margin-bottom: 0;
  font-size: 30px;
  line-height: 1.1;
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.movie-card {
  min-height: 210px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  overflow: hidden;
  position: relative;
}

.movie-card::before {
  content: "";
  position: absolute;
  inset: auto -18% -28% 22%;
  height: 120px;
  transform: rotate(-10deg);
  border-radius: 8px;
  opacity: 0.8;
}

.card-red::before {
  background: linear-gradient(135deg, rgba(255, 77, 94, 0.95), rgba(255, 209, 102, 0.82));
}

.card-cyan::before {
  background: linear-gradient(135deg, rgba(47, 215, 232, 0.95), rgba(120, 224, 143, 0.82));
}

.card-green::before {
  background: linear-gradient(135deg, rgba(120, 224, 143, 0.95), rgba(255, 209, 102, 0.82));
}

.card-yellow::before {
  background: linear-gradient(135deg, rgba(255, 209, 102, 0.95), rgba(255, 77, 94, 0.82));
}

.movie-card span {
  display: inline-flex;
  min-width: 46px;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  margin-bottom: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 13px;
  font-weight: 900;
}

.movie-card h3 {
  margin-bottom: 8px;
  font-size: 21px;
  line-height: 1.15;
  position: relative;
}

.movie-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
  position: relative;
}

.genres {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 24px 0 0;
}

.genres button {
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--muted);
  cursor: not-allowed;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 12px rgba(255, 209, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 209, 102, 0);
  }
}

@media (max-width: 860px) {
  .page-shell {
    width: min(100% - 24px, 640px);
  }

  .topbar {
    align-items: flex-start;
  }

  .nav-links {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-top: 36px;
  }

  h1 {
    font-size: clamp(42px, 14vw, 64px);
  }

  .hero-text {
    font-size: 18px;
  }

  .login-card {
    align-self: stretch;
  }

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

@media (max-width: 560px) {
  .movie-grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    display: block;
  }
}
