/* 01/styles.css - Full Book Recommendation Portal Stylesheet */
:root {
  /* Color Palette - Modern Library Theme */
  --bg-primary: #0a0d14;
  --bg-secondary: #121624;
  --bg-card: rgba(18, 22, 36, 0.75);
  --bg-card-hover: rgba(28, 35, 56, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-gold: #f59e0b;
  --accent-blue: #3b82f6;
  --accent-purple: #8b5cf6;
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;
  --accent-cyan: #06b6d4;

  --glass-bg: rgba(18, 22, 36, 0.75);
  --glass-border: 1px solid rgba(255, 255, 255, 0.1);
  --glass-blur: blur(16px);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 25px rgba(245, 158, 11, 0.25);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-serif: 'Noto Serif KR', serif;
}

[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: rgba(241, 245, 249, 0.95);
  --border-color: rgba(0, 0, 0, 0.08);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --glass-bg: rgba(255, 255, 255, 0.8);
  --glass-border: 1px solid rgba(0, 0, 0, 0.08);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 25px rgba(59, 130, 246, 0.15);
}

/* Reset & Global */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color var(--transition), color var(--transition);
}

/* Ambient Background */
.bg-ambient {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.2;
}

.orb-1 {
  width: 550px;
  height: 550px;
  background: var(--accent-gold);
  top: -150px;
  right: -100px;
}

.orb-2 {
  width: 500px;
  height: 500px;
  background: var(--accent-purple);
  bottom: -150px;
  left: -100px;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: var(--glass-border);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.35rem;
  background: linear-gradient(135deg, var(--accent-gold), #fbbf24);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-brand i {
  font-size: 1.5rem;
  -webkit-text-fill-color: var(--accent-gold);
}

.badge-count {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(245, 158, 11, 0.3);
  font-weight: 600;
  -webkit-text-fill-color: initial;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Buttons */
.btn {
  padding: 0.65rem 1.2rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-gold), #d97706);
  color: #ffffff;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.btn-quiz {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  color: #ffffff;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

.btn-quiz:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.btn-secondary {
  background: var(--bg-card);
  border: var(--glass-border);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  transform: translateY(-1px);
}

.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: var(--glass-border);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-icon:hover {
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

/* Container */
.container {
  position: relative;
  z-index: 1;
  max-width: 1350px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* Hero Section & Reading Tracker */
.hero-banner {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.75), rgba(15, 23, 42, 0.95));
  border: var(--glass-border);
  backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  display: grid;
  grid-template-columns: 1fr 340px;
  align-items: center;
  gap: 2rem;
  box-shadow: var(--shadow-md);
}

@media (max-width: 900px) {
  .hero-banner {
    grid-template-columns: 1fr;
  }
}

.hero-title {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 0.75rem;
  font-family: var(--font-serif);
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 650px;
  margin-bottom: 1.5rem;
}

/* Reading Tracker Widget Card */
.reading-tracker-card {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tracker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 700;
}

.progress-bar-bg {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-emerald));
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
}

/* Controls Bar */
.controls-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 280px;
  max-width: 450px;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.8rem;
  background: var(--bg-card);
  border: var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  transition: all var(--transition);
}

.search-input:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.search-box i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cat-tab {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: var(--glass-border);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.cat-tab:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

.cat-tab.active {
  background: var(--accent-gold);
  color: #ffffff;
  border-color: var(--accent-gold);
  box-shadow: var(--shadow-sm);
}

/* Book Grid */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.75rem;
}

/* Book Card & Badges */
.book-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.book-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: var(--shadow-md);
}

.curation-tag {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.book-card-header {
  display: flex;
  gap: 1.25rem;
}

.book-cover {
  width: 90px;
  height: 125px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.5rem;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.book-cover-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.85;
}

.book-cover-icon {
  font-size: 1.8rem;
  color: #ffffff;
  z-index: 1;
  margin-bottom: 0.25rem;
}

.book-cover-code {
  font-size: 0.65rem;
  font-family: monospace;
  color: rgba(255, 255, 255, 0.8);
  z-index: 1;
  background: rgba(0, 0, 0, 0.4);
  padding: 0.15rem 0.3rem;
  border-radius: 4px;
}

.book-meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  padding-right: 2rem;
}

.book-genre {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-gold);
  text-transform: uppercase;
}

.book-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  font-family: var(--font-serif);
  color: var(--text-primary);
}

.book-author {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.book-rating {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--accent-gold);
  font-weight: 700;
  margin-top: 0.2rem;
}

.book-summary {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.book-footer {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.status-badge {
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
}

.status-badge.available {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge.borrowed {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.book-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-bookmark {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  transition: color var(--transition), transform var(--transition);
}

.btn-bookmark:hover, .btn-bookmark.active {
  color: var(--accent-rose);
  transform: scale(1.15);
}

/* Modals General */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: var(--bg-secondary);
  border: var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  max-width: 680px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-md);
  transform: scale(0.92);
  transition: transform var(--transition);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.modal-overlay.open .modal-box {
  transform: scale(1);
}

.modal-quote-box {
  background: rgba(245, 158, 11, 0.1);
  border-left: 4px solid var(--accent-gold);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--text-primary);
}

/* Quiz Option Card */
.quiz-option-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

@media (max-width: 600px) {
  .quiz-option-grid { grid-template-columns: 1fr; }
}

.quiz-option-btn {
  background: var(--bg-card);
  border: var(--glass-border);
  padding: 1.25rem 1rem;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all var(--transition);
  text-align: left;
}

.quiz-option-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-purple);
  transform: translateY(-2px);
}

/* Review System */
.review-item {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.88rem;
}

.review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.review-author {
  font-weight: 700;
  color: var(--text-primary);
}

.review-stars {
  color: var(--accent-gold);
}

.review-text {
  color: var(--text-secondary);
}

/* Toast Area */
.toast-area {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  padding: 0.9rem 1.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent-gold);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
