/* ─── Modal Overlay ─── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(7, 9, 15, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

/* ─── Modal Content ─── */
.modal-content {
  background: linear-gradient(180deg, #0d1320 0%, #07090f 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 28px;
  cursor: pointer;
  transition: color 160ms ease;
  z-index: 10;
}

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

/* ─── Modal Header ─── */
.modal-header {
  padding: 40px 40px 24px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  position: relative;
  background-image: url('/image/musician-perform.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.modal-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(13, 19, 32, 0.92) 0%,
    rgba(13, 19, 32, 0.88) 50%,
    rgba(13, 19, 32, 0.95) 100%
  );
  backdrop-filter: blur(10px);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.modal-header > * {
  position: relative;
  z-index: 1;
}

.modal-eyebrow {
  display: inline-block;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.modal-header h2 {
  font-size: 28px;
  margin: 0 0 12px;
}

.modal-header p {
  color: var(--muted);
  margin: 0;
}

.email-link {
  color: var(--accent);
  font-weight: 600;
}

/* ─── Modal Body ─── */
.modal-body {
  padding: 32px 40px;
}

/* ─── Apply Table ─── */
.apply-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.apply-table th {
  text-align: left;
  padding: 12px 16px;
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}

.apply-table td {
  padding: 16px;
  border-bottom: 1px solid rgba(151, 176, 255, 0.08);
  vertical-align: top;
}

.apply-table tr:last-child td {
  border-bottom: none;
}

.apply-table .col-num {
  width: 40px;
}

.apply-table .col-item {
  width: 25%;
}

.apply-table .col-type {
  width: 80px;
}

.apply-table .num {
  font-family: monospace;
  font-size: 13px;
  color: var(--muted);
}

.apply-table .item {
  font-weight: 600;
  color: var(--text);
}

.apply-table .desc {
  color: var(--muted);
  line-height: 1.5;
}

/* ─── Badges ─── */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.badge-required {
  background: rgba(86, 225, 255, 0.12);
  color: var(--accent);
  border: 1px solid rgba(86, 225, 255, 0.25);
}

.badge-optional {
  background: rgba(156, 171, 204, 0.12);
  color: var(--muted);
  border: 1px solid rgba(156, 171, 204, 0.25);
}

/* ─── Tips Section ─── */
.modal-tips {
  margin-top: 32px;
  padding: 24px;
  background: rgba(14, 20, 34, 0.6);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.modal-tips h4 {
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 600;
}

.modal-tips ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.modal-tips li {
  margin-bottom: 8px;
}

.modal-tips li:last-child {
  margin-bottom: 0;
}

/* ─── Modal Footer ─── */
.modal-footer {
  padding: 24px 40px 40px;
  text-align: center;
  border-top: 1px solid var(--border);
}

.modal-footer .button-elite-large {
  display: inline-flex;
  margin-bottom: 16px;
}

.copy-email {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  transition: color 160ms ease;
}

.copy-email:hover {
  color: var(--accent);
}

/* ─── Responsive ─── */
@media (max-width: 640px) {
  .modal-content {
    max-height: 95vh;
    border-radius: 16px;
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding-left: 20px;
    padding-right: 20px;
  }

  .modal-header {
    padding-top: 32px;
    padding-bottom: 20px;
  }

  .modal-header h2 {
    font-size: 20px;
  }

  .modal-header p {
    font-size: 13px;
  }

  .modal-body {
    padding: 20px;
  }

  .modal-footer {
    padding: 20px;
  }

  .apply-table {
    font-size: 12px;
    display: block;
    overflow-x: auto;
  }

  .apply-table th,
  .apply-table td {
    padding: 10px 8px;
    white-space: nowrap;
  }

  .apply-table .col-type {
    width: 60px;
  }

  .badge {
    padding: 3px 8px;
    font-size: 10px;
  }

  .modal-tips {
    padding: 20px;
    font-size: 13px;
  }

  .modal-tips h4 {
    font-size: 14px;
  }

  .modal-tips ul {
    font-size: 13px;
  }

  .button-elite-large {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .modal-content {
    max-height: 97vh;
    border-radius: 12px;
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .modal-header {
    padding-top: 24px;
  }

  .modal-header h2 {
    font-size: 18px;
  }

  .modal-header p {
    font-size: 12px;
  }

  .modal-body {
    padding: 16px;
  }

  .modal-footer {
    padding: 16px;
  }

  .apply-table {
    font-size: 11px;
  }

  .apply-table th,
  .apply-table td {
    padding: 8px 6px;
  }

  .modal-close {
    top: 12px;
    right: 16px;
    font-size: 24px;
  }

  .modal-tips {
    padding: 16px;
  }

  .modal-tips h4 {
    font-size: 13px;
    margin-bottom: 12px;
  }

  .modal-tips ul {
    font-size: 12px;
    line-height: 1.6;
  }
}
