@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,400&display=swap');

/* =========================================================
   AUTH PAGE  — login.html
   ========================================================= */

.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background-color: #fffdf5;
}

/* Left brand panel */
.auth-brand-panel {
  background: linear-gradient(145deg, #101109 0%, #1b1c14 60%, #2b2c22 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 60px 56px;
  position: relative;
  overflow: hidden;
}

.auth-brand-panel::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -80px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 253, 245, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.auth-brand-panel::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -60px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 253, 245, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.auth-brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 56px;
  z-index: 1;
}

.auth-brand-logo img {
  width: min(310px, 72vw);
  height: auto;
  filter: brightness(0) invert(1);
}

.auth-brand-tagline {
  z-index: 1;
}

.auth-brand-tagline h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 2.6rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.auth-brand-tagline h1 span {
  color: var(--accent-primary);
  font-style: italic;
}

.auth-brand-tagline p {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: rgba(255, 253, 245, 0.75);
  line-height: 1.65;
  max-width: 360px;
  margin-bottom: 40px;
}

.auth-feature-list {
  list-style: none;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-feature-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 253, 245, 0.85);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
}

.auth-feature-list li .feat-icon {
  width: 32px;
  height: 32px;
  background: rgba(255, 253, 245, 0.12);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

/* Floating cards on the brand panel */
.auth-floating-cards {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
  margin-top: 36px;
}

.auth-mini-card {
  background: hsla(0, 0%, 100%, 0.08);
  backdrop-filter: blur(8px);
  border: 1px solid hsla(0, 0%, 100%, 0.12);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.auth-mini-card {
  flex: 1 1 200px;
}

.auth-mini-card-icon {
  font-size: 1.5rem;
}

.auth-mini-card-text {
  display: flex;
  flex-direction: column;
}

.auth-mini-card-text strong {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  color: #fff;
  font-weight: 600;
}

.auth-mini-card-text span {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  color: hsla(0, 0%, 100%, 0.6);
}

/* Right form panel */
.auth-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 48px;
  background: #fffdf5;
}

.auth-form-container {
  width: 100%;
  max-width: 420px;
}

.auth-form-header {
  margin-bottom: 32px;
}

.auth-form-header h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: #1b1c14;
  margin-bottom: 6px;
}

.auth-form-header p {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: rgba(27, 28, 20, 0.68);
}

/* Auth Tabs */
.auth-tabs {
  display: flex;
  background: #f3eeda;
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 28px;
  gap: 4px;
}

.auth-tab-btn {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: 7px;
  background: transparent;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(27, 28, 20, 0.68);
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-tab-btn.active {
  background: #fffdf5;
  color: #1b1c14;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

/* Form Groups */
.auth-form-group {
  margin-bottom: 18px;
}

.auth-form-group label {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(27, 28, 20, 0.75);
  margin-bottom: 7px;
}

.auth-form-group input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid hsla(217, 30%, 15%, 0.1);
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: #1b1c14;
  background: #fffdf5;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.auth-form-group input:focus {
  border-color: #1b1c14;
  box-shadow: 0 0 0 3px rgba(27, 28, 20, 0.08);
}

.auth-form-group input::placeholder {
  color: rgba(27, 28, 20, 0.4);
}

.auth-submit-btn {
  width: 100%;
  padding: 13px 20px;
  background: #1b1c14;
  color: #ffffff;
  border: none;
  border-radius: 999px;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.auth-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(27, 28, 20, 0.3);
}

.auth-submit-btn:disabled {
  opacity: 0.65;
  transform: none;
  cursor: not-allowed;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: rgba(27, 28, 20, 0.5);
  font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: hsla(217, 30%, 15%, 0.08);
}

.auth-footer-link {
  text-align: center;
  margin-top: 20px;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: rgba(27, 28, 20, 0.68);
}

.auth-footer-link a {
  color: #1b1c14;
  font-weight: 600;
  text-decoration: none;
}

/* Error/Success notices */
.auth-notice {
  padding: 10px 14px;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  margin-bottom: 16px;
  display: none;
}

.auth-notice.error {
  background: hsla(0, 80%, 55%, 0.08);
  border: 1px solid hsla(0, 80%, 55%, 0.2);
  color: hsl(0, 70%, 42%);
}

.auth-notice.success {
  background: hsla(142, 70%, 45%, 0.08);
  border: 1px solid hsla(142, 70%, 45%, 0.2);
  color: hsl(142, 60%, 32%);
}

.auth-notice.show {
  display: block;
}

/* Spinner inside button */
.btn-spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

/* Back to storefront link */
.auth-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  color: rgba(27, 28, 20, 0.68);
  text-decoration: none;
  margin-bottom: 28px;
  transition: color 0.2s;
}

.auth-back-link:hover {
  color: #1b1c14;
}

/* =========================================================
   LIBRARY PAGE — library.html
   ========================================================= */

.library-page {
  background-color: #fffdf5;
  min-height: 100vh;
}

.library-hero {
  background: linear-gradient(135deg, #101109 0%, #1b1c14 60%, #2b2c22 100%);
  padding: 100px 24px 50px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.library-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.library-hero-content {
  position: relative;
  z-index: 1;
}

.library-hero h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.library-hero p:not(.library-eyebrow) {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: var(--text-secondary);
}

.library-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px;
}

.library-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.library-tab {
  padding: 9px 20px;
  border: 1.5px solid hsla(217, 30%, 15%, 0.1);
  border-radius: 30px;
  background: #fffdf5;
  font-family: 'Inter', sans-serif;
  font-size: 0.87rem;
  font-weight: 600;
  color: rgba(27, 28, 20, 0.68);
  cursor: pointer;
  transition: all 0.2s ease;
}

.library-tab.active,
.library-tab:hover {
  background: #1b1c14;
  color: #ffffff;
  border-color: #1b1c14;
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 24px;
}

.library-card {
  background: #fffdf5;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border: 1px solid hsla(217, 30%, 15%, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}

.library-card:hover {
  box-shadow: 0 6px 20px rgba(4, 107, 210, 0.1);
}

.library-card-cover {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
}

.library-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.library-card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #1b1c14;
  color: #fff;
}

.library-card-badge.free {
  background: #6b6b63;
}

.library-card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.library-card-category {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: #1b1c14;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.library-card-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1rem;
  font-weight: 700;
  color: #1b1c14;
  margin-bottom: 8px;
  line-height: 1.35;
}

.library-card-meta {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  color: rgba(27, 28, 20, 0.68);
  margin-bottom: 16px;
  flex: 1;
}

.library-progress {
  margin-bottom: 14px;
}

.library-progress-label {
  display: flex;
  justify-content: space-between;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  color: rgba(27, 28, 20, 0.68);
  margin-bottom: 6px;
}

.library-progress-bar {
  height: 4px;
  background: hsla(217, 30%, 15%, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.library-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #1b1c14, #6b6b63);
  border-radius: 4px;
  transition: width 0.5s ease;
}

.library-read-btn {
  width: 100%;
  padding: 11px 16px;
  background: #1b1c14;
  color: #ffffff;
  border: none;
  border-radius: 999px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

.library-read-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(27, 28, 20, 0.3);
}

/* Empty library state */
.library-empty {
  text-align: center;
  padding: 80px 20px;
  grid-column: 1 / -1;
}

.library-empty-icon {
  font-size: 4rem;
  margin-bottom: 16px;
  opacity: 0.4;
}

.library-empty h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.4rem;
  color: rgba(27, 28, 20, 0.75);
  margin-bottom: 8px;
}

.library-empty p {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: rgba(27, 28, 20, 0.68);
  margin-bottom: 24px;
}

/* Responsive auth */
@media (max-width: 768px) {
  .auth-page {
    grid-template-columns: 1fr;
  }
  .auth-brand-panel {
    display: none;
  }
  .auth-form-panel {
    padding: 32px 24px;
  }
}

/* 2026 client redesign: a private reading desk, not an exam-dashboard template. */
.auth-brand-panel {
  background:
    linear-gradient(rgba(255,253,245,.055) 1px, transparent 1px) 0 0/100% 42px,
    #1b1c14;
}
.auth-brand-panel::before,
.auth-brand-panel::after { display: none; }
.auth-brand-tagline h1 { font-weight: 500; letter-spacing: -.035em; }
.auth-feature-list li .feat-icon,
.auth-mini-card,
.auth-tabs,
.auth-tab-btn,
.auth-form-group input { border-radius: 0; }
.auth-mini-card { backdrop-filter: none; }
.auth-form-panel { border-left: 1px solid rgba(27,28,20,.16); }

.library-page { background: #fffdf5; }
.library-hero {
  background:
    linear-gradient(90deg, transparent 0 72%, rgba(27,28,20,.08) 72% calc(72% + 1px), transparent calc(72% + 1px)),
    #f3eeda;
  border-bottom: 1px solid rgba(27,28,20,.14);
}
.library-hero::before { display: none; }
.library-hero h1 { font-weight: 500; letter-spacing: -.035em; }
.library-tabs { border-bottom: 1px solid rgba(27,28,20,.15); padding-bottom: 14px; }
.library-tab { border-radius: 0; }
.library-grid { gap: 1px; background: rgba(27,28,20,.14); border: 1px solid rgba(27,28,20,.14); }
.library-card { border: 0; border-radius: 0; background: #fffdf5; }
.library-card:hover { transform: none; box-shadow: inset 0 -4px #1b1c14; }
.library-card-cover img { filter: saturate(.78); }
.library-card-badge,
.library-read-btn { border-radius: 0; }

/* Google Auth button & Separator */
.auth-separator {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 20px 0;
  color: rgba(27, 28, 20, 0.68);
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
}

.auth-separator::before,
.auth-separator::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(27, 28, 20, 0.15);
}

.auth-separator:not(:empty)::before {
  margin-right: .5em;
}

.auth-separator:not(:empty)::after {
  margin-left: .5em;
}

.btn-google-auth {
  width: 100%;
  padding: 11px 16px;
  background-color: #ffffff;
  border: 1px solid rgba(27, 28, 20, 0.25);
  border-radius: 999px;
  color: #1b1c14;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-google-auth:hover {
  background-color: #faf6e9;
  border-color: rgba(27, 28, 20, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.btn-google-auth:active {
  background-color: #f3eeda;
}

.google-icon {
  flex-shrink: 0;
}
