/* Generic modal-screen chrome used by Library, Create, AI. */

.modal-screen {
  display: none;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  background: var(--bg);
  z-index: 1000;
  overflow-y: auto;
}

.modal-screen.active {
  display: block;
}

.modal-header {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 1.25rem clamp(1rem, 4vw, 2rem);
  background: #1A140E;
  border-bottom: 1px solid var(--hairline);
  text-align: center;
}

.modal-close-button {
  position: absolute;
  top: 50%;
  left: clamp(1rem, 3vw, 1.5rem);
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-soft);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-pill);
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.modal-close-button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.3);
}

.modal-title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  margin: 0 0 0.35rem;
}

.modal-subtitle {
  font-size: clamp(0.9rem, 2vw, 1rem);
  color: var(--text-muted);
}

.modal-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3rem) clamp(1rem, 4vw, 2rem);
}

/* Generic content cards (not used by Library but kept for compatibility) */
.content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.5rem, 4vw, 2rem);
}

.content-grid > * {
  flex: 1 1 clamp(250px, 30vw, 300px);
  min-width: 0;
}

.content-card {
  padding: clamp(1.5rem, 3vw, 1.75rem);
  background: var(--bg-elev);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.content-card:hover {
  background: var(--bg-elev-2);
  border-color: rgba(255, 140, 0, 0.35);
  transform: translateY(-2px);
}

.content-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.6rem;
}

.content-card p {
  font-size: 0.92rem;
  color: var(--text-soft);
  line-height: 1.6;
  margin: 0 0 1.25rem;
}

/* Download button — shared */
.download-button {
  background: var(--brand);
  color: #ffffff;
  border: 1px solid var(--brand);
  border-radius: var(--radius-sm);
  padding: 0.55rem 1.2rem;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.2px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.download-button:hover {
  background: var(--brand-strong);
  border-color: var(--brand-strong);
}

.download-button:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
