/* ====== APP STYLES ====== */
/* Extends theme.css for the recommendation app pages */

/* ────── HERO CTA BUTTON ────── */
.hero-cta {
  display: inline-block;
  margin-top: 2.5rem;
  padding: 1rem 2.2rem;
  background: var(--accent);
  color: #0c0a14;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border-radius: 8px;
  letter-spacing: 0.01em;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 0 28px var(--accent-glow);
}

.hero-cta:hover {
  background: #e8bb65;
  transform: translateY(-2px);
  box-shadow: 0 4px 40px rgba(212, 168, 83, 0.45);
}

.closing-cta {
  margin-top: 2.5rem;
}

/* ────── APP NAV ────── */
.app-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 1.25rem 2rem;
  background: rgba(12, 10, 20, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(212, 168, 83, 0.08);
}

.nav-brand {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: -0.01em;
}

/* ────── APP MAIN ────── */
.app-main {
  min-height: 100vh;
  padding-top: 5rem;
  position: relative;
  overflow: hidden;
}

.app-hero-glow {
  position: fixed;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(212, 168, 83, 0.12) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

/* ────── INPUT SECTION ────── */
.input-section {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  padding: 4rem 2rem 6rem;
}

.input-inner {
  max-width: 580px;
  width: 100%;
  text-align: center;
}

.app-kicker {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.2rem;
}

.app-heading {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  margin-bottom: 1.2rem;
  letter-spacing: -0.02em;
}

.app-lede {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 2.5rem;
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
}

/* ────── BOOK FORM ────── */
.book-form {
  text-align: left;
}

.book-inputs {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.book-input-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid rgba(212, 168, 83, 0.12);
  border-radius: 10px;
  padding: 0.1rem 1rem 0.1rem 0.75rem;
  transition: border-color 0.2s;
}

.book-input-row:focus-within {
  border-color: rgba(212, 168, 83, 0.45);
}

.input-number {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.55;
  min-width: 1.5rem;
  text-align: center;
}

.book-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 400;
  padding: 0.85rem 0;
}

.book-input::placeholder {
  color: var(--text-secondary);
  opacity: 0.5;
}

.optional-row {
  opacity: 0.7;
}

.optional-row:focus-within {
  opacity: 1;
}

/* ────── SUBMIT BUTTON ────── */
.btn-primary {
  width: 100%;
  padding: 1rem 2rem;
  background: var(--accent);
  color: #0c0a14;
  border: none;
  border-radius: 10px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 0 24px var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

.btn-primary:hover:not(:disabled) {
  background: #e8bb65;
  transform: translateY(-2px);
  box-shadow: 0 4px 36px rgba(212, 168, 83, 0.4);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Loading spinner */
.btn-loading {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(12, 10, 20, 0.3);
  border-top-color: #0c0a14;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ────── FORM ERROR ────── */
.form-error {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(220, 80, 80, 0.12);
  border: 1px solid rgba(220, 80, 80, 0.3);
  border-radius: 8px;
  color: #f08080;
  font-size: 0.92rem;
  text-align: center;
}

/* ────── RESULTS SECTION ────── */
.results-section {
  position: relative;
  z-index: 1;
  padding: 3.5rem 2rem 6rem;
}

.results-inner {
  max-width: 820px;
  margin: 0 auto;
}

.results-header {
  text-align: center;
  margin-bottom: 3rem;
}

.results-heading {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.results-sub {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* ────── RECOMMENDATION CARDS ────── */
.rec-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.rec-card {
  display: flex;
  gap: 1.75rem;
  background: var(--bg-card);
  border: 1px solid rgba(212, 168, 83, 0.1);
  border-radius: 16px;
  padding: 2rem 2rem;
  transition: border-color 0.25s, transform 0.25s;
  align-items: flex-start;
}

.rec-card:hover {
  border-color: rgba(212, 168, 83, 0.3);
  transform: translateY(-3px);
}

.rec-number {
  font-family: var(--serif);
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--accent);
  opacity: 0.3;
  line-height: 1;
  min-width: 3rem;
}

.rec-body {
  flex: 1;
}

.rec-title {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  line-height: 1.25;
}

.rec-author {
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.75rem;
  letter-spacing: 0.01em;
}

.rec-reason {
  font-size: 0.97rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ────── RESULTS ACTIONS ────── */
.results-actions {
  text-align: center;
}

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(212, 168, 83, 0.3);
  color: var(--accent);
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.btn-ghost:hover {
  background: rgba(212, 168, 83, 0.08);
  border-color: rgba(212, 168, 83, 0.55);
}

/* ────── RESPONSIVE ────── */
@media (max-width: 640px) {
  .input-section { padding: 2rem 1.25rem 4rem; }
  .results-section { padding: 2rem 1.25rem 4rem; }

  .rec-card {
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.5rem;
  }

  .rec-number {
    font-size: 1.8rem;
    opacity: 0.25;
  }

  .app-nav { padding: 1rem 1.25rem; }
}
