:root {
  --primary-color: #4f46e5;
  --secondary-color: #ec4899;
  --bg-color: #0f172a;
  --text-main: #f8fafc;
  --card-bg: rgba(30, 41, 59, 0.7);
  --border-color: rgba(255, 255, 255, 0.1);
}

body {
  background: var(--bg-color);
  background-image: radial-gradient(circle at top right, #1e1b4b, transparent 40%),
                    radial-gradient(circle at bottom left, #312e81, transparent 40%);
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
}

/* Glassmorphism Classes */
.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.glass-nav {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
}

/* Buttons */
.btn-primary-custom {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border: none;
  color: white;
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary-custom:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.4);
  color: white;
}

/* Forms */
.form-control, .form-select {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  color: white;
}
.form-control:focus, .form-select:focus {
  background: rgba(15, 23, 42, 0.8);
  border-color: var(--primary-color);
  color: white;
  box-shadow: 0 0 0 0.25rem rgba(79, 70, 229, 0.25);
}
.form-control::placeholder {
  color: #94a3b8;
}

/* Nav Tabs */
.nav-tabs .nav-link {
  color: #94a3b8;
  border: none;
  border-bottom: 2px solid transparent;
}
.nav-tabs .nav-link.active {
  background: transparent;
  color: white;
  border-color: transparent transparent var(--primary-color) transparent;
}

/* Scanner Container */
#reader {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--border-color);
}
#reader video {
  border-radius: 1rem;
}

.book-img-placeholder {
  height: 200px;
  background: linear-gradient(135deg, #334155, #1e293b);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: #64748b;
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
}

/* Micro-animations */
.fade-in {
  animation: fadeIn 0.4s ease-in-out;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.book-card {
  transition: transform 0.2s;
  cursor: pointer;
}
.book-card:hover {
  transform: translateY(-5px);
}
