/* QrFlipBook Modern Glassmorphic Design System */
:root {
  --bg-dark: #f8fafc;
  --bg-base: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --border-glass: rgba(0, 0, 0, 0.08);
  --border-glass-hover: rgba(99, 102, 241, 0.35);
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.25);
  --secondary: #ec4899;
  --secondary-glow: rgba(236, 72, 153, 0.25);
  --accent-gold: #f59e0b;
  --text-main: #0f172a;
  --text-primary: #0f172a;
  --text-muted: #64748b;
  --text-secondary: #475569;
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
}

body.theme-light, html.theme-light {
  --bg-dark: #f8fafc;
  --bg-base: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --border-glass: #e2e8f0;
  --border-glass-hover: rgba(99, 102, 241, 0.35);
  --text-main: #0f172a;
  --text-primary: #0f172a;
  --text-muted: #64748b;
  --text-secondary: #475569;
  background-color: #f8fafc !important;
  background: #f8fafc !important;
  color: #0f172a !important;
}

body.theme-dark, html.theme-dark, [data-theme="dark"] {
  --bg-dark: #060814;
  --bg-base: #060814;
  --bg-surface: #0f172a;
  --bg-card: rgba(13, 17, 39, 0.75);
  --bg-card-hover: rgba(22, 28, 64, 0.85);
  --border-glass: rgba(139, 92, 246, 0.2);
  --border-glass-hover: rgba(236, 72, 153, 0.4);
  --text-main: #f8fafc;
  --text-primary: #f8fafc;
  --text-muted: #94a3b8;
  --text-secondary: #94a3b8;
  background-color: #060814;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(124, 58, 237, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(236, 72, 153, 0.12) 0%, transparent 45%);
  color: #f8fafc;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Modern Sleek Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.25);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.45);
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: linear-gradient(135deg, #a78bfa 0%, #ec4899 50%, #f43f5e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(6, 8, 20, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glass);
  padding: 16px 0;
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-icon-box {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 0 15px var(--primary-glow);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.nav-links a:hover, .nav-links a.active {
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #ffffff;
  box-shadow: 0 4px 18px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px var(--secondary-glow);
  filter: brightness(1.1);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-glass);
  color: var(--text-main);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-glass-hover);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.3);
  color: #fff;
}

/* Cards & Glassmorphism */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all 0.3s ease;
}

.glass-card:hover {
  border-color: var(--border-glass-hover);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(124, 58, 237, 0.15);
  color: #c4b5fd;
  border: 1px solid rgba(124, 58, 237, 0.3);
}

.badge-gold {
  background: rgba(245, 158, 11, 0.15);
  color: #fde68a;
  border-color: rgba(245, 158, 11, 0.3);
}

/* Hero Section */
.hero {
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
}

.hero-tag {
  margin-bottom: 20px;
}

.hero h1 {
  font-size: 3.5rem;
  line-height: 1.15;
  margin-bottom: 24px;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto 36px;
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 48px;
}

/* Showcase Grid */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin: 40px 0;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin: 30px 0;
}

/* Album Card */
.album-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.album-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-glass-hover);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6), 0 0 20px var(--primary-glow);
}

.album-cover-wrap {
  width: 100%;
  aspect-ratio: 16/10;
  position: relative;
  overflow: hidden;
  background: #0d1127;
}

.album-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.album-card:hover .album-cover-img {
  transform: scale(1.06);
}

.album-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
}

.album-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.album-title {
  font-size: 1.15rem;
  margin-bottom: 6px;
  color: #fff;
}

.album-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.album-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

/* Flipbook Viewer Container */
.flipbook-viewport {
  position: relative;
  width: 100%;
  height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #04050b;
  overflow: hidden;
}

.flipbook-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  max-width: 1200px;
  padding: 20px;
}

.book-stage {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(124, 58, 237, 0.2);
  border-radius: 8px;
  overflow: hidden;
  background: #111;
  position: relative;
  max-width: 90vw;
  max-height: 80vh;
}

.book-spread {
  display: flex;
  width: 100%;
  height: 100%;
  position: relative;
}

.book-page {
  flex: 1;
  height: 100%;
  background: #181818;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.book-page img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Spine Shadow effect */
.book-page.page-left::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 40px;
  background: linear-gradient(to left, rgba(0, 0, 0, 0.45), transparent);
  pointer-events: none;
}

.book-page.page-right::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 40px;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.45), transparent);
  pointer-events: none;
}

/* Floating Toolbar */
.toolbar-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(13, 17, 39, 0.85);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  padding: 8px 18px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 500;
}

.tool-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.tool-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.1);
}

.tool-btn.active {
  color: var(--secondary);
}

/* Form Controls */
.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: #cbd5e1;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.2s ease;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 12px var(--primary-glow);
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 15, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-dialog {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 500px;
  padding: 30px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  transform: scale(0.95);
  transition: transform 0.25s ease;
}

.modal-backdrop.show .modal-dialog {
  transform: scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: #fff;
}

/* Footer */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--border-glass);
  padding: 40px 0 24px;
  background: rgba(6, 8, 20, 0.95);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

/* Toast */
.toast-box {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1e1b4b;
  border: 1px solid var(--primary);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  z-index: 3000;
  display: none;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 { font-size: 2.4rem; }
  .hero p { font-size: 1rem; }
  .nav-links { display: none; }
  .hero-cta { flex-direction: column; }
}
