:root {
  --red: #E50914;
  --red-dark: #b81c1c;
  --gold: #C9A84C;
  --white: #FFFFFF;
  --off-white: #E8E0D4;
  --text-muted: rgba(255,255,255,0.55);
  --bg-dark: #0a0a0a;
  --card-bg: rgba(15, 12, 10, 0.88);
  --input-bg: rgba(255,255,255,0.07);
  --input-border: rgba(255,255,255,0.14);
  --input-focus: rgba(201,168,76,0.5);
  --font-display: 'Bebas Neue', sans-serif;
  --font-serif: 'Noto Serif KR', serif;
  --font-body: 'DM Sans', sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.22s ease;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-dark);
  color: var(--white);
  min-height: 100dvh;
  overflow-x: hidden;
  position: relative;
}

.bg-image {
  position: fixed;
  inset: 0;
  background-image: url('assets/bg.jpg');
  background-size: cover;
  background-position: center top;
  z-index: 0;
}

.bg-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10,10,10,0.65) 0%,
    rgba(10,10,10,0.72) 40%,
    rgba(10,10,10,0.92) 75%,
    rgba(10,10,10,1) 100%
  );
  z-index: 1;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px;
}

header {
  position: relative;
  z-index: 10;
  padding: 1.25rem 1.25rem 0;
}

.logo {
  display: inline-block;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 0.04em;
  line-height: 1;
}

.logo-drama {
  color: var(--white);
}

.logo-moz {
  color: var(--gold);
}

footer {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 2rem 1rem 1.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

.hero {
  position: relative;
  z-index: 10;
  min-height: calc(100dvh - 80px);
  display: flex;
  align-items: center;
  padding: 2rem 1.25rem 1.5rem;
}

.hero-content {
  width: 100%;
  max-width: 560px;
  margin: 0 auto; 
}

.hero-eyebrow {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 13vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: 0.01em;
  color: var(--white);
  margin-bottom: 1rem;
}

.hero-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 2rem;
}

.search-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  position: relative;
}

label {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--off-white);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.required {
  color: var(--red);
}

.optional {
  font-weight: 300;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0;
}

input[type="text"],
textarea {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--white);
  outline: none;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
  appearance: none;
  backdrop-filter: blur(8px);
}

input[type="text"]::placeholder,
textarea::placeholder {
  color: rgba(255,255,255,0.28);
}

input[type="text"]:focus,
textarea:focus {
  border-color: var(--gold);
  background: rgba(255,255,255,0.1);
  box-shadow: 0 0 0 3px var(--input-focus);
}

input.error {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(229,9,20,0.25);
}

textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
}

.field-error {
  font-size: 0.75rem;
  color: var(--red);
  display: none;
}

.field-error.visible {
  display: block;
}

.autocomplete-wrapper {
  position: relative;
}

.autocomplete-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: rgba(18, 14, 12, 0.97);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  list-style: none;
  z-index: 100;
  max-height: 220px;
  overflow-y: auto;
  display: none;
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
}

.autocomplete-list.open {
  display: block;
}

.autocomplete-list li {
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background var(--transition);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.autocomplete-list li:hover,
.autocomplete-list li.active {
  background: rgba(201,168,76,0.12);
  color: var(--gold);
}

.autocomplete-list li span.app-cat {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-left: auto;
}

.help-btn {
  background: transparent;
  border: 1px solid var(--text-muted);
  color: var(--text-muted);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 0.65rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  font-family: var(--font-body);
  flex-shrink: 0;
}

.help-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.btn-find {
  margin-top: 0.5rem;
  background: var(--red);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  padding: 1rem 1.5rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  transition: background var(--transition), transform 0.15s ease, box-shadow var(--transition);
  width: 100%;
  -webkit-tap-highlight-color: transparent;
}

.btn-find:hover {
  background: var(--red-dark);
  box-shadow: 0 4px 20px rgba(229,9,20,0.35);
}

.btn-find:active {
  transform: scale(0.98);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
}

.modal-overlay[hidden] {
  display: none;
}

.modal {
  background: #141210;
  border-radius: 20px 20px 0 0;
  padding: 2rem 1.5rem 2.5rem;
  width: 100%;
  max-width: 560px;
  border-top: 1px solid rgba(255,255,255,0.08);
  animation: slideUp 0.3s ease;
}

.modal h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  margin-bottom: 1.25rem;
  color: var(--gold);
  letter-spacing: 0.03em;
}

.modal-close {
  float: right;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
  transition: color var(--transition);
}

.modal-close:hover {
  color: var(--white);
}

.help-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.help-steps li {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--off-white);
  padding-left: 1.5rem;
  position: relative;
  counter-increment: step;
}

.help-steps li::before {
  content: counter(step);
  counter-reset: none;
  position: absolute;
  left: 0;
  top: 0;
  width: 18px;
  height: 18px;
  background: var(--gold);
  color: #000;
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.help-steps {
  counter-reset: step;
}

.help-steps li strong {
  display: block;
  color: var(--white);
  margin-bottom: 0.25rem;
  font-weight: 500;
}

.help-steps li em {
  color: var(--gold);
  font-style: normal;
}

.modal-tip {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  padding: 0.75rem 1rem;
  background: rgba(201,168,76,0.07);
  border-radius: var(--radius-sm);
  border-left: 2px solid var(--gold);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@media (min-width: 768px) {
  header {
    padding: 1.75rem 3rem 0;
  }

  .hero {
    padding: 2rem 3rem 2rem;
    align-items: center;
  }

  .hero-sub br {
    display: none;
  }

  .btn-find {
    width: auto;
    align-self: flex-start;
    padding: 1rem 2.5rem;
  }

  .modal-overlay {
    align-items: center;
  }

  .modal {
    border-radius: 20px;
    max-width: 480px;
    padding: 2.5rem;
  }
}

@media (min-width: 1024px) {
  header {
    padding: 2rem 4rem 0;
  }

  .hero {
    padding: 2rem 4rem 2rem;
  }

  .hero-content {
    max-width: 600px;
  }
}
