@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@500;600;700;800&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@500;600&display=swap');

/* ===================================================================
   1. DESIGN SYSTEM & TOKENS
   =================================================================== */
:root {
  /* Brand Palette */
  --bg-main:       #dcd7c4;
  --bg-surface:    #FFFFFF;
  --bg-hero:       #0F172A; /* Deep Slate Blue */
  --bg-hero-alt:   #1E293B;
  
  --primary-gold:  #F59E0B; /* Vibrant Gold Accent */
  --primary-hover: #D97706;
  --teal-free:     #0D9488;
  --coral-premium: #E11D48;

  --text-main:     #0F172A;
  --text-muted:    #64748B;
  --text-light:    #F8FAFC;
  --line-color:    #E2E8F0;

  /* Typography */
  --font-heading:  'Plus Jakarta Sans', sans-serif;
  --font-body:     'Inter', sans-serif;
  --font-mono:     'JetBrains Mono', monospace;

  /* Radii & Shadows */
  --radius-sm:     6px;
  --radius-md:     12px;
  --radius-lg:     18px;

  --shadow-sm:     0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md:     0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg:     0 12px 28px rgba(15, 23, 42, 0.12);
  --shadow-glow:   0 0 20px rgba(245, 158, 11, 0.25);

  --transition:    all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===================================================================
   2. GLOBAL RESETS
   =================================================================== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
}

/* ===================================================================
   3. NAVIGATION BAR (.topbar)
   =================================================================== */
.topbar {
  background: var(--bg-hero);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 14px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.topbar .logo {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 22px;
  color: var(--text-light);
}

.topbar .logo span {
  color: var(--primary-gold);
}

.topbar .nav-group {
  display: flex;
  align-items: center;
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.topbar nav a {
  color: #94A3B8;
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
}

.topbar nav a:hover {
  color: var(--text-light);
}

.account-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 24px;
  transition: var(--transition);
}

.account-btn:hover {
  background: var(--primary-gold);
  border-color: var(--primary-gold);
  color: var(--bg-hero);
  transform: translateY(-2px);
}

/* ===================================================================
   4. HERO SECTION (.hero)
   =================================================================== */
.hero {
  background: var(--bg-hero);
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(245, 158, 11, 0.12) 0%, transparent 60%),
    radial-gradient(circle at 85% 80%, rgba(13, 148, 136, 0.08) 0%, transparent 50%);
  color: var(--text-light);
  padding: 80px 24px 110px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.hero h1 {
  font-size: 44px;
  font-weight: 800;
  line-height: 1.15;
  max-width: 760px;
  margin: 0 0 16px 0;
  text-align: left;
  background: linear-gradient(180deg, #FFFFFF 0%, #CBD5E1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 17px;
  color: #94A3B8;
  max-width: 420px;
  margin: 0 0 32px 0;
  text-align: left;
}

.hero-actions {
  display: flex;
  flex-direction : column;
  justify-content: left;
  gap: 24px;
  align-items: flex-start;
  position: relative;
  top: 32px;
}

/* Hero CTA Buttons */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-gold);
  color: var(--bg-hero);
  padding: 18px 34px;
  border-radius: 35px;
  font-family: var(--font-heading);
  font-weight: 1000;
  font-size: 25px;
  transition: var(--transition);
  box-shadow: var(--shadow-glow);
  margin-right: auto;
}

.btn-secondary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.4);
}

/* ===================================================================
   5. LAYOUT & CONTENT CARDS (.grid & .card)
   =================================================================== */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 60px;
  position: relative;
  z-index: 20;
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--line-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: #CBD5E1;
}

/* Accent Bar on Left Edge */
.card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 4px;
  background: var(--primary-gold);
  border-radius: 0 4px 4px 0;
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: #FEF3C7;
  color: var(--primary-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.card h3 {
  font-size: 19px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.card p {
  color: var(--text-muted);
  font-size: 14.5px;
  margin-bottom: 24px;
  flex-grow: 1;
}

.card .btn {
  align-self: flex-start;
}

/* General Button inside Cards */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-hero);
  color: var(--text-light);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  transition: var(--transition);
}

.btn:hover {
  background: var(--primary-gold);
  color: var(--bg-hero);
  transform: translateY(-1px);
}

/* Tags (Free / Premium) */
.tag {
  position: absolute;
  top: 24px;
  right: 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tag-free {
  background: #CCFBF1;
  color: var(--teal-free);
}

.tag-premium {
  background: #FFE4E6;
  color: var(--coral-premium);
}

/* ===================================================================
   6. SECTION HEADINGS & STEPS (.steps-section)
   =================================================================== */
.section-title {
  font-size: 26px;
  font-weight: 800;
  text-align: center;
  color: var(--text-main);
  margin-top: 60px;
  margin-bottom: 6px;
}

.section-sub {
  text-align: center;
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 36px;
}

.steps-section {
  background: var(--bg-surface);
  border-top: 1px solid var(--line-color);
  border-bottom: 1px solid var(--line-color);
  padding: 60px 0;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.step {
  background: var(--bg-main);
  border: 1px solid var(--line-color);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: var(--transition);
}

.step:hover {
  border-color: #CBD5E1;
  transform: translateY(-2px);
}

.step-num {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--bg-hero);
  background: #FEF3C7;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.step h3 {
  font-size: 17px;
  margin-bottom: 6px;
}

.step p {
  color: var(--text-muted);
  font-size: 14px;
}

/* ===================================================================
   7. SITE FOOTER
   =================================================================== */
.site-footer {
  background: var(--bg-hero);
  color: #94A3B8;
  padding-top: 50px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand .logo {
  font-size: 20px;
  color: var(--text-light);
  margin-bottom: 6px;
}

.footer-brand p {
  font-size: 13.5px;
  max-width: 340px;
}

.footer-bottom {
  background: #090E1A;
  padding: 20px 0;
}

.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  margin-bottom: 10px;
}

.footer-legal a {
  margin-left: 20px;
  transition: var(--transition);
}

.footer-legal a:hover {
  color: var(--text-light);
}

.footer-disclaimer {
  font-size: 11.5px;
  color: #64748B;
  text-align: center;
  line-height: 1.5;
}

/* ===================================================================
   8. FORMS, PRICING, EXAM INTERFACE, NOTES READER
   =================================================================== */
/* Login Form Box */
.form-box {
  max-width: 400px;
  margin: 60px auto;
  background: var(--bg-surface);
  border: 1px solid var(--line-color);
  padding: 36px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.form-box h2 {
  text-align: center;
  margin-bottom: 6px;
}

.form-box label {
  display: block;
  margin-top: 16px;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
}

.form-box input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--line-color);
  border-radius: var(--radius-sm);
  font-size: 14px;
}

/* Exam Interface Keep-Alive */
.exam-header { background: #003366; color: #fff; padding: 10px 16px; display: flex; justify-content: space-between; }
.exam-body { display: flex; height: calc(100vh - 45px); }
.exam-main { flex: 1; padding: 20px; overflow-y: auto; background: #fff; }
.exam-side { width: 260px; background: #F1F5F9; padding: 16px; }

/* Notes Reader Paper Effect */
.notes-reader {
  max-width: 880px;
  margin: 40px auto;
  padding: 60px;
  background-color: #F8FAF9;
  border: 1px solid var(--line-color);
  border-radius: 4px;
  box-shadow: var(--shadow-md);
  font-family: Georgia, serif;
  line-height: 1.7;
}

/* Responsive Overrides */
@media (max-width: 768px) {
  .hero h1 { font-size: 30px; }
  .grid { margin-top: -20px; }
  .footer-inner, .footer-bottom-inner { flex-direction: column; gap: 16px; text-align: center; }
}


/* =========================================
   CLASS LIBRARY
   ========================================= */

.class-library {
  max-width: 1050px;
  margin: 70px auto;
  padding: 0 25px;
}


/* =========================================
   BOOK RACK
   ========================================= */

.book-rack {
  position: relative;
  background: #211711;

  padding: 48px 55px 35px;

  border-radius: 5px;

  box-shadow:
    0 18px 35px rgba(0, 0, 0, 0.35),
    inset 0 0 30px rgba(0, 0, 0, 0.35);

  border-left: 20px solid #633b24;
  border-right: 20px solid #633b24;

  max-width: 1200px;
  width: 100%;
  margin: 0 auto;

  z-index: 10;
}


/* =========================================
   INDIVIDUAL SHELF
   ========================================= */

.bookshelf {
  position: relative;

  height: 285px;

  display: flex;
  align-items: flex-end;
  justify-content: center;

  gap: 8px;

  padding: 0 25px 22px;

  background: #17120f;

  z-index: 12;

  margin: 0 auto;
  max-width: 1200px;
}


/* Wooden shelf board */

.bookshelf::after {
  content: "";

  position: absolute;

  left: -20px;
  right: -20px;
  bottom: 0;

  height: 23px;

  background:
    linear-gradient(
      to bottom,
      #8b5a38,
      #684027
    );

  border-radius: 3px;

  box-shadow:
    0 7px 12px rgba(0,0,0,0.4),
    inset 0 2px rgba(255,255,255,0.08);

  z-index: 20;
}


/* =========================================
   NORMAL BOOKS
   ========================================= */

.normal-book {
  position: relative;

  width: 30px;
  height: 205px;

  flex-shrink: 0;

  border-radius: 3px 6px 6px 3px;

  box-shadow:
    3px 4px 7px rgba(0,0,0,0.4);

  transition:
    transform 0.25s ease;
}


/* Book spine highlight */

.normal-book::before {
  content: "";

  position: absolute;

  left: 5px;
  top: 0;
  bottom: 0;

  width: 3px;

  background: rgba(255,255,255,0.08);

  border-radius: 2px;
}


/* Decorative spine line */

.normal-book::after {
  content: "";

  position: absolute;

  left: 8px;
  right: 5px;
  top: 22px;

  height: 2px;

  background: rgba(255,255,255,0.2);

  box-shadow:
    0 155px 0 rgba(255,255,255,0.18);
}


/* Different normal books */

.book-a {
  height: 190px;
  background: #3e5260;
  transform: rotate(-2deg);
}

.book-b {
  height: 225px;
  background: #704c35;
  transform: rotate(2deg);
}

.book-c {
  height: 205px;
  background: #563e5e;
  transform: rotate(-1deg);
}

.book-d {
  height: 220px;
  background: #354f48;
  transform: rotate(2deg);
}

.book-e {
  height: 185px;
  background: #765548;
  transform: rotate(-3deg);
}

.book-f {
  height: 215px;
  background: #4b465c;
  transform: rotate(1deg);
}

.book-g {
  height: 200px;
  background: #655b3f;
  transform: rotate(-2deg);
}

.book-h {
  height: 230px;
  background: #493b35;
  transform: rotate(2deg);
}


/* =========================================
   CLASS BOOKS
   ========================================= */

.class-book {
  position: relative;

  width: 79px;
  height: 250px;

  margin: 0 -3px;

  display: flex;
  align-items: center;
  justify-content: center;

  text-decoration: none;

  border-radius: 4px 9px 9px 4px;

  box-shadow:
    5px 7px 10px rgba(0,0,0,0.5);

  z-index: 10;

  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}


/* Spine */

.class-book::before {
  content: "";

  position: absolute;

  left: 8px;
  top: 0;
  bottom: 0;

  width: 5px;

  background: rgba(0,0,0,0.18);

  border-radius: 3px 0 0 3px;
}


/* Decorative lines */

.class-book::after {
  content: "";

  position: absolute;

  left: 22px;
  right: 15px;
  top: 25px;

  height: 3px;

  background: rgba(255,255,255,0.25);

  box-shadow:
    0 190px 0 rgba(255,255,255,0.25);
}


/* =========================================
   CLASS 11
   ========================================= */
/* Chapter 1: Some Basic Concepts of Chemistry */
.chapter-some-basic-concepts-of-chemistry {
  height: 250px;
  background: linear-gradient(90deg, #263d31, #3d654b 18%, #426f51);
  transform: rotate(-1.5deg);
}

.chapter-some-basic-concepts-of-chemistry:hover {
  transform: translateY(-30px) rotate(-2.5deg);
  box-shadow: 8px 20px 22px rgba(0,0,0,0.55);
}

/* Chapter 2: Structure of Atom */
.chapter-structure-of-atom {
  height: 250px;
  background: linear-gradient(90deg, #1b3a4b, #284b63 18%, #3c6e71);
  transform: rotate(2deg);
}

.chapter-structure-of-atom:hover {
  transform: translateY(-30px) rotate(1deg);
  box-shadow: 8px 20px 22px rgba(0,0,0,0.55);
}

/* Chapter 3: Classification of Elements and Periodicity in Properties */
.chapter-classification-of-elements {
  height: 250px;
  background: linear-gradient(90deg, #4a2e35, #6b444f 18%, #784c57);
  transform: rotate(-2.5deg);
}

.chapter-classification-of-elements:hover {
  transform: translateY(-30px) rotate(-3.5deg);
  box-shadow: 8px 20px 22px rgba(0,0,0,0.55);
}

/* Chapter 4: Chemical Bonding and Molecular Structure */
.chapter-chemical-bonding {
  height: 250px;
  background: linear-gradient(90deg, #382c44, #524063 18%, #5d4870);
  transform: rotate(1deg);
}

.chapter-chemical-bonding:hover {
  transform: translateY(-30px) rotate(0deg);
  box-shadow: 8px 20px 22px rgba(0,0,0,0.55);
}

/* Chapter 5: Thermodynamics */
.chapter-thermodynamics {
  height: 250px;
  background: linear-gradient(90deg, #593922, #7a5032 18%, #8a5b39);
  transform: rotate(-1deg);
}

.chapter-thermodynamics:hover {
  transform: translateY(-30px) rotate(-2deg);
  box-shadow: 8px 20px 22px rgba(0,0,0,0.55);
}

/* Chapter 6: Equilibrium */
.chapter-equilibrium {
  height: 250px;
  background: linear-gradient(90deg, #224c59, #32697a 18%, #39768a);
  transform: rotate(2.5deg);
}

.chapter-equilibrium:hover {
  transform: translateY(-30px) rotate(1.5deg);
  box-shadow: 8px 20px 22px rgba(0,0,0,0.55);
}

/* Chapter 7: Redox Reactions */
.chapter-redox-reactions {
  height: 250px;
  background: linear-gradient(90deg, #592222, #7a3232 18%, #8a3939);
  transform: rotate(-2deg);
}

.chapter-redox-reactions:hover {
  transform: translateY(-30px) rotate(-3deg);
  box-shadow: 8px 20px 22px rgba(0,0,0,0.55);
}

/* Chapter 8: Organic Chemistry – Some Basic Principles and Techniques */
.chapter-organic-chemistry {
  height: 250px;
  background: linear-gradient(90deg, #2e4a38, #446b50 18%, #4d7a5b);
  transform: rotate(1.5deg);
}

.chapter-organic-chemistry:hover {
  transform: translateY(-30px) rotate(0.5deg);
  box-shadow: 8px 20px 22px rgba(0,0,0,0.55);
}

/* Chapter 9: Hydrocarbons */
.chapter-hydrocarbons {
  height: 250px;
  background: linear-gradient(90deg, #453625, #635038 18%, #705b40);
  transform: rotate(-0.5deg);
}

.chapter-hydrocarbons:hover {
  transform: translateY(-30px) rotate(-1.5deg);
  box-shadow: 8px 20px 22px rgba(0,0,0,0.55);
}

/* Chapter 1: Sets */
.chapter-sets {
  height: 250px;
  background: linear-gradient(90deg, #263d31, #3d654b 18%, #426f51);
  transform: rotate(-1.5deg);
}

.chapter-sets:hover {
  transform: translateY(-30px) rotate(-2.5deg);
  box-shadow: 8px 20px 22px rgba(0,0,0,0.55);
}

/* Chapter 2: Quadratic Equations */
.chapter-quadratic-equations {
  height: 250px;
  background: linear-gradient(90deg, #1b3a4b, #284b63 18%, #3c6e71);
  transform: rotate(2deg);
}

.chapter-quadratic-equations:hover {
  transform: translateY(-30px) rotate(1deg);
  box-shadow: 8px 20px 22px rgba(0,0,0,0.55);
}

/* Chapter 3: Complex Numbers */
.chapter-complex-numbers {
  height: 250px;
  background: linear-gradient(90deg, #4a2e35, #6b444f 18%, #784c57);
  transform: rotate(-2.5deg);
}

.chapter-complex-numbers:hover {
  transform: translateY(-30px) rotate(-3.5deg);
  box-shadow: 8px 20px 22px rgba(0,0,0,0.55);
}

/* Chapter 4: Permutations and Combinations */
.chapter-permutations-and-combinations {
  height: 250px;
  background: linear-gradient(90deg, #382c44, #524063 18%, #5d4870);
  transform: rotate(1deg);
}

.chapter-permutations-and-combinations:hover {
  transform: translateY(-30px) rotate(0deg);
  box-shadow: 8px 20px 22px rgba(0,0,0,0.55);
}

/* Chapter 5: Bionomial Theorem */
.chapter-bionomial-theorem {
  height: 250px;
  background: linear-gradient(90deg, #593922, #7a5032 18%, #8a5b39);
  transform: rotate(-1deg);
}

.chapter-bionomial-theorem:hover {
  transform: translateY(-30px) rotate(-2deg);
  box-shadow: 8px 20px 22px rgba(0,0,0,0.55);
}

/* Chapter 6: Sequence and Series */
.chapter-sequence-and-series {
  height: 250px;
  background: linear-gradient(90deg, #224c59, #32697a 18%, #39768a);
  transform: rotate(2.5deg);
}

.chapter-sequence-and-series:hover {
  transform: translateY(-30px) rotate(1.5deg);
  box-shadow: 8px 20px 22px rgba(0,0,0,0.55);
}

/* Chapter 7: Coordinate Geometry */
.chapter-coordinate-geometry {
  height: 250px;
  background: linear-gradient(90deg, #592222, #7a3232 18%, #8a3939);
  transform: rotate(-2deg);
}

.chapter-coordinate-geometry:hover {
  transform: translateY(-30px) rotate(-3deg);
  box-shadow: 8px 20px 22px rgba(0,0,0,0.55);
}

/* Chapter 8: Trigonometry */
.chapter-trigonometry {
  height: 250px;
  background: linear-gradient(90deg, #2e4a38, #446b50 18%, #4d7a5b);
  transform: rotate(1.5deg);
}

.chapter-trigonometry:hover {
  transform: translateY(-30px) rotate(0.5deg);
  box-shadow: 8px 20px 22px rgba(0,0,0,0.55);
}

/* Chapter 9: Differentiation */
.chapter-differentiation {
  height: 250px;
  background: linear-gradient(90deg, #453625, #635038 18%, #705b40);
  transform: rotate(-0.5deg);
}

.chapter-differentiation:hover {
  transform: translateY(-30px) rotate(-1.5deg);
  box-shadow: 8px 20px 22px rgba(0,0,0,0.55);
}

/* Chapter 10: Statistics */
.chapter-statistics {
  height: 250px;
  background: linear-gradient(90deg, #303447, #484c6d 18%, #54587a);
  transform: rotate(1.8deg);
}

.chapter-statistics:hover {
  transform: translateY(-30px) rotate(0.8deg);
  box-shadow: 8px 20px 22px rgba(0,0,0,0.55);
}

/* Chapter 1: Units & Measurements */
.chapter-units-and-measurements {
  height: 250px;
  background: linear-gradient(90deg, #1f3a3d, #2f565b 18%, #36656a);
  transform: rotate(-1.2deg);
}

.chapter-units-and-measurements:hover {
  transform: translateY(-30px) rotate(-2.2deg);
  box-shadow: 8px 20px 22px rgba(0,0,0,0.55);
}

/* Chapter 2: Kinematics */
.chapter-kinematics {
  height: 250px;
  background: linear-gradient(90deg, #3d2f1f, #5b462f 18%, #6a5236);
  transform: rotate(1.8deg);
}

.chapter-kinematics:hover {
  transform: translateY(-30px) rotate(0.8deg);
  box-shadow: 8px 20px 22px rgba(0,0,0,0.55);
}

/* Chapter 4: Work, Energy & Power */
.chapter-work-energy-and-power {
  height: 250px;
  background: linear-gradient(90deg, #321f3d, #4c2f5b 18%, #57366a);
  transform: rotate(-2deg);
}

.chapter-work-energy-and-power:hover {
  transform: translateY(-30px) rotate(-3deg);
  box-shadow: 8px 20px 22px rgba(0,0,0,0.55);
}

/* Chapter 5: Rotational Motion */
.chapter-rotational-motion {
  height: 250px;
  background: linear-gradient(90deg, #1f2a3d, #2f3e5b 18%, #36486a);
  transform: rotate(1.2deg);
}

.chapter-rotational-motion:hover {
  transform: translateY(-30px) rotate(0.2deg);
  box-shadow: 8px 20px 22px rgba(0,0,0,0.55);
}

/* Chapter 6: Gravitation */
.chapter-gravitation {
  height: 250px;
  background: linear-gradient(90deg, #3d1f1f, #5b2f2f 18%, #6a3636);
  transform: rotate(-1.8deg);
}

.chapter-gravitation:hover {
  transform: translateY(-30px) rotate(-2.8deg);
  box-shadow: 8px 20px 22px rgba(0,0,0,0.55);
}

/* Chapter 7: Properties of Solids and Liquids */
.chapter-properties-of-solids-and-liquids {
  height: 250px;
  background: linear-gradient(90deg, #1f3d2a, #2f5b3f 18%, #366a48);
  transform: rotate(2.2deg);
}

.chapter-properties-of-solids-and-liquids:hover {
  transform: translateY(-30px) rotate(1.2deg);
  box-shadow: 8px 20px 22px rgba(0,0,0,0.55);
}

/* Chapter 8: Thermodynamics */
.chapter-thermodynamics-physics {
  height: 250px;
  background: linear-gradient(90deg, #3d351f, #5b4f2f 18%, #6a5c36);
  transform: rotate(-0.8deg);
}

.chapter-thermodynamics-physics:hover {
  transform: translateY(-30px) rotate(-1.8deg);
  box-shadow: 8px 20px 22px rgba(0,0,0,0.55);
}

/* Chapter 9: Kinetic Theory of Gases */
.chapter-kinetic-theory-of-gases {
  height: 250px;
  background: linear-gradient(90deg, #2a1f3d, #3f2f5b 18%, #48366a);
  transform: rotate(1.5deg);
}

.chapter-kinetic-theory-of-gases:hover {
  transform: translateY(-30px) rotate(0.5deg);
  box-shadow: 8px 20px 22px rgba(0,0,0,0.55);
}

/* Chapter 10: Oscillations and Waves */
.chapter-oscillations-and-waves {
  height: 250px;
  background: linear-gradient(90deg, #1f3d38, #2f5b53 18%, #366a60);
  transform: rotate(-1.5deg);
}

.chapter-oscillations-and-waves:hover {
  transform: translateY(-30px) rotate(-2.5deg);
  box-shadow: 8px 20px 22px rgba(0,0,0,0.55);
}


/* =========================================
   CLASS 12
   ========================================= */

/* Chapter 1: Solutions */
.chapter-solutions {
  height: 250px;
  background: linear-gradient(90deg, #1e3a4c, #2d5670 18%, #366685);
  transform: rotate(-1.5deg);
}

.chapter-solutions:hover {
  transform: translateY(-30px) rotate(-2.5deg);
  box-shadow: 8px 20px 22px rgba(0,0,0,0.55);
}

/* Chapter 2: Electrochemistry */
.chapter-electrochemistry {
  height: 250px;
  background: linear-gradient(90deg, #4c1e33, #702d51 18%, #853660);
  transform: rotate(2deg);
}

.chapter-electrochemistry:hover {
  transform: translateY(-30px) rotate(1deg);
  box-shadow: 8px 20px 22px rgba(0,0,0,0.55);
}

/* Chapter 3: Chemical Kinetics */
.chapter-chemical-kinetics {
  height: 250px;
  background: linear-gradient(90deg, #334c1e, #51702d 18%, #608536);
  transform: rotate(-2.2deg);
}

.chapter-chemical-kinetics:hover {
  transform: translateY(-30px) rotate(-3.2deg);
  box-shadow: 8px 20px 22px rgba(0,0,0,0.55);
}

/* Chapter 4: d- and f-Block Elements */
.chapter-d-and-f-block-elements {
  height: 250px;
  background: linear-gradient(90deg, #4c3f1e, #705d2d 18%, #856e36);
  transform: rotate(1.2deg);
}

.chapter-d-and-f-block-elements:hover {
  transform: translateY(-30px) rotate(0.2deg);
  box-shadow: 8px 20px 22px rgba(0,0,0,0.55);
}

/* Chapter 5: Coordination Compounds */
.chapter-coordination-compounds {
  height: 250px;
  background: linear-gradient(90deg, #1e4c45, #2d7066 18%, #368579);
  transform: rotate(-1.8deg);
}

.chapter-coordination-compounds:hover {
  transform: translateY(-30px) rotate(-2.8deg);
  box-shadow: 8px 20px 22px rgba(0,0,0,0.55);
}

/* Chapter 6: Haloalkanes and Haloarenes */
.chapter-haloalkanes-and-haloarenes {
  height: 250px;
  background: linear-gradient(90deg, #421e4c, #622d70 18%, #743685);
  transform: rotate(2.5deg);
}

.chapter-haloalkanes-and-haloarenes:hover {
  transform: translateY(-30px) rotate(1.5deg);
  box-shadow: 8px 20px 22px rgba(0,0,0,0.55);
}

/* Chapter 7: Alcohols, Phenols and Ethers */
.chapter-alcohols-phenols-and-ethers {
  height: 250px;
  background: linear-gradient(90deg, #4c1e1e, #702d2d 18%, #853636);
  transform: rotate(-0.8deg);
}

.chapter-alcohols-phenols-and-ethers:hover {
  transform: translateY(-30px) rotate(-1.8deg);
  box-shadow: 8px 20px 22px rgba(0,0,0,0.55);
}

/* Chapter 8: Aldehydes, Ketones and Carboxylic Acids */
.chapter-aldehydes-ketones-and-carboxylic-acids {
  height: 250px;
  background: linear-gradient(90deg, #1e2c4c, #2d4270 18%, #364f85);
  transform: rotate(1.8deg);
}

.chapter-aldehydes-ketones-and-carboxylic-acids:hover {
  transform: translateY(-30px) rotate(0.8deg);
  box-shadow: 8px 20px 22px rgba(0,0,0,0.55);
}

/* Chapter 9: Amines */
.chapter-amines {
  height: 250px;
  background: linear-gradient(90deg, #2c4c1e, #42702d 18%, #4f8536);
  transform: rotate(-1.2deg);
}

.chapter-amines:hover {
  transform: translateY(-30px) rotate(-2.2deg);
  box-shadow: 8px 20px 22px rgba(0,0,0,0.55);
}

/* Chapter 10: Biomolecules */
.chapter-biomolecules {
  height: 250px;
  background: linear-gradient(90deg, #4c301e, #70472d 18%, #855436);
  transform: rotate(1.5deg);
}

.chapter-biomolecules:hover {
  transform: translateY(-30px) rotate(0.5deg);
  box-shadow: 8px 20px 22px rgba(0,0,0,0.55);
}

/* Chapter 1: Relations and Functions */
.chapter-relations-and-functions {
  height: 250px;
  background: linear-gradient(90deg, #233446, #374d68 18%, #415a77);
  transform: rotate(-1.5deg);
}

.chapter-relations-and-functions:hover {
  transform: translateY(-30px) rotate(-2.5deg);
  box-shadow: 8px 20px 22px rgba(0,0,0,0.55);
}

/* Chapter 2: Matrices and Determinant */
.chapter-matrices-and-determinant {
  height: 250px;
  background: linear-gradient(90deg, #463223, #684a37 18%, #775441);
  transform: rotate(2deg);
}

.chapter-matrices-and-determinant:hover {
  transform: translateY(-30px) rotate(1deg);
  box-shadow: 8px 20px 22px rgba(0,0,0,0.55);
}

/* Chapter 3: Limits, Continuity and Differentiability */
.chapter-limits-continuity-and-differentiability {
  height: 250px;
  background: linear-gradient(90deg, #234631, #376848 18%, #417753);
  transform: rotate(-2.2deg);
}

.chapter-limits-continuity-and-differentiability:hover {
  transform: translateY(-30px) rotate(-3.2deg);
  box-shadow: 8px 20px 22px rgba(0,0,0,0.55);
}

/* Chapter 4: Application of derivatives */
.chapter-application-of-derivatives {
  height: 250px;
  background: linear-gradient(90deg, #462338, #683753 18%, #77415e);
  transform: rotate(1.2deg);
}

.chapter-application-of-derivatives:hover {
  transform: translateY(-30px) rotate(0.2deg);
  box-shadow: 8px 20px 22px rgba(0,0,0,0.55);
}

/* Chapter 5: Integral Calculas */
.chapter-integral-calculas {
  height: 250px;
  background: linear-gradient(90deg, #384623, #536837 18%, #5e7741);
  transform: rotate(-1.8deg);
}

.chapter-integral-calculas:hover {
  transform: translateY(-30px) rotate(-2.8deg);
  box-shadow: 8px 20px 22px rgba(0,0,0,0.55);
}

/* Chapter 6: Differential Equations */
.chapter-differential-equations {
  height: 250px;
  background: linear-gradient(90deg, #234546, #376668 18%, #417577);
  transform: rotate(2.5deg);
}

.chapter-differential-equations:hover {
  transform: translateY(-30px) rotate(1.5deg);
  box-shadow: 8px 20px 22px rgba(0,0,0,0.55);
}

/* Chapter 7: 3D Geometry */
.chapter-3d-geometry {
  height: 250px;
  background: linear-gradient(90deg, #462323, #683737 18%, #774141);
  transform: rotate(-0.8deg);
}

.chapter-3d-geometry:hover {
  transform: translateY(-30px) rotate(-1.8deg);
  box-shadow: 8px 20px 22px rgba(0,0,0,0.55);
}

/* Chapter 8: Vector Algebra */
.chapter-vector-algebra {
  height: 250px;
  background: linear-gradient(90deg, #2c2346, #413768 18%, #4c4177);
  transform: rotate(1.8deg);
}

.chapter-vector-algebra:hover {
  transform: translateY(-30px) rotate(0.8deg);
  box-shadow: 8px 20px 22px rgba(0,0,0,0.55);
}

/* Chapter 9: Probability */
.chapter-probability {
  height: 250px;
  background: linear-gradient(90deg, #464423, #686437 18%, #777341);
  transform: rotate(-1.2deg);
}

.chapter-probability:hover {
  transform: translateY(-30px) rotate(-2.2deg);
  box-shadow: 8px 20px 22px rgba(0,0,0,0.55);
}

/* Chapter 1: Electrostatics */
.chapter-electrostatics {
  height: 250px;
  background: linear-gradient(90deg, #1d3548, #2a4c68 18%, #345979);
  transform: rotate(-1.5deg);
}

.chapter-electrostatics:hover {
  transform: translateY(-30px) rotate(-2.5deg);
  box-shadow: 8px 20px 22px rgba(0,0,0,0.55);
}

/* Chapter 2: Current Electricity */
.chapter-current-electricity {
  height: 250px;
  background: linear-gradient(90deg, #482a1d, #683d2a 18%, #794934);
  transform: rotate(2deg);
}

.chapter-current-electricity:hover {
  transform: translateY(-30px) rotate(1deg);
  box-shadow: 8px 20px 22px rgba(0,0,0,0.55);
}

/* Chapter 3: Magnetic Effects of Current and Magnetism */
.chapter-magnetic-effects-of-current {
  height: 250px;
  background: linear-gradient(90deg, #1d4831, #2a6845 18%, #347952);
  transform: rotate(-2.2deg);
}

.chapter-magnetic-effects-of-current:hover {
  transform: translateY(-30px) rotate(-3.2deg);
  box-shadow: 8px 20px 22px rgba(0,0,0,0.55);
}

/* Chapter 4: Electromagnetic Induction and Alternating Current */
.chapter-emi-and-ac {
  height: 250px;
  background: linear-gradient(90deg, #481d3e, #682a58 18%, #793468);
  transform: rotate(1.2deg);
}

.chapter-emi-and-ac:hover {
  transform: translateY(-30px) rotate(0.2deg);
  box-shadow: 8px 20px 22px rgba(0,0,0,0.55);
}

/* Chapter 5: Electromagnetic Waves */
.chapter-electromagnetic-waves {
  height: 250px;
  background: linear-gradient(90deg, #38481d, #4e682a 18%, #5d7934);
  transform: rotate(-1.8deg);
}

.chapter-electromagnetic-waves:hover {
  transform: translateY(-30px) rotate(-2.8deg);
  box-shadow: 8px 20px 22px rgba(0,0,0,0.55);
}

/* Chapter 6: Optics */
.chapter-optics {
  height: 250px;
  background: linear-gradient(90deg, #1d4548, #2a6368 18%, #347479);
  transform: rotate(2.5deg);
}

.chapter-optics:hover {
  transform: translateY(-30px) rotate(1.5deg);
  box-shadow: 8px 20px 22px rgba(0,0,0,0.55);
}

/* Chapter 7: Dual Nature of Matter and Radiation */
.chapter-dual-nature-of-matter {
  height: 250px;
  background: linear-gradient(90deg, #481d1d, #682a2a 18%, #793434);
  transform: rotate(-0.8deg);
}

.chapter-dual-nature-of-matter:hover {
  transform: translateY(-30px) rotate(-1.8deg);
  box-shadow: 8px 20px 22px rgba(0,0,0,0.55);
}

/* Chapter 8: Atoms and Nuclei */
.chapter-atoms-and-nuclei {
  height: 250px;
  background: linear-gradient(90deg, #2b1d48, #3d2a68 18%, #483479);
  transform: rotate(1.8deg);
}

.chapter-atoms-and-nuclei:hover {
  transform: translateY(-30px) rotate(0.8deg);
  box-shadow: 8px 20px 22px rgba(0,0,0,0.55);
}

/* Chapter 9: Electronic Devices */
.chapter-electronic-devices {
  height: 250px;
  background: linear-gradient(90deg, #48431d, #685f2a 18%, #796e34);
  transform: rotate(-1.2deg);
}

.chapter-electronic-devices:hover {
  transform: translateY(-30px) rotate(-2.2deg);
  box-shadow: 8px 20px 22px rgba(0,0,0,0.55);
}


.shelf-container {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  isolation: isolate;
}

/* Parent container for the split curtains */
.curtain-cover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  z-index: 50;
  pointer-events: none; /* Allows hover to pass through to the container cleanly */
}

/* Individual left/right curtain panel styling */
.curtain-panel {
  position: relative;
  width: 50%;
  height: 100%;
  background: linear-gradient(135deg, #2c1d11, #1a1008);
  border: 2px solid #5c3a21;
  color: #f4e3c1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  cursor: pointer;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

.curtain-left {
  border-right: 1px solid #c5a059;
  transform-origin: left;
}

.curtain-right {
  border-left: 1px solid #c5a059;
  transform-origin: right;
}

.curtain-panel h2 {
  font-family: serif;
  font-size: 1.8rem;
  letter-spacing: 2px;
  margin: 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
  border-bottom: 2px solid #c5a059;
  padding-bottom: 5px;
  text-align: center;
}

.curtain-panel p {
  font-size: 0.9rem;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Instead of .shelf-container:hover, we use .shelf-container.unpacked */
.shelf-container.unpacked .curtain-left {
  transform: translateX(-100%);
  opacity: 0.2;
  pointer-events: none; /* Allows clicking on books underneath once opened */
}

.shelf-container.unpacked .curtain-right {
  transform: translateX(100%);
  opacity: 0.2;
  pointer-events: none;
}

/* =========================================
   CLASS LABEL
   ========================================= */
.class-tag {
  position: relative;
  z-index: 1;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  /* text-align : center */
  padding: 24px 6px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #f5f5f5;
  /* border: 1px solid rgba(255,255,255,0.35); */
  background: rgba(0,0,0,0.12);
  border-radius: 2px;
}

/* =========================================
   BOOKMARK
   ========================================= */
.class-book .bookmark {
  position: absolute;
  top: 0;
  right: 18px;
  width: 15px;
  height: 65px;
  background: rgba(210,180,100,0.8);
  clip-path: polygon(0 0,100% 0,100% 100%,50% 78%,0 100%);
}

/* =========================================
   MULTIPLE RACKS
   ========================================= */
.book-rack + .book-rack {
  margin-top: 45px;
}

/* =========================================
   MOBILE
   ========================================= */
@media (max-width: 700px) {
  .book-rack {padding: 25px 20px 0;}
  .bookshelf {overflow: hidden;padding-left: 10px;padding-right: 10px;}
  .normal-book {width: 22px;}
  .class-book {width: 95px;margin: 0 3px;}
  .class-tag {font-size: 15px;}
}

/* =========================================
   WOODEN RACK FRAME & HEADER
   ========================================= */
.book-rack::before {
  content: "IITians Library";
  position: absolute;
  left: -12px;
  right: -12px;
  top: -15px;
  height: 55px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:repeating-linear-gradient(0deg,rgba(255,255,255,0.035) 0px,rgba(255,255,255,0.035) 2px,transparent 2px,transparent 8px),linear-gradient(to bottom,#9a6540,#754629,#5d361f);
  border-radius: 5px;
  color: #f5e6c8;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 27px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-shadow:1px 2px 2px rgba(0,0,0,0.55);
  box-shadow:0 6px 10px rgba(0,0,0,0.4),inset 0 2px rgba(255,255,255,0.12);
  z-index: 30;
}

/* Bottom wooden beam */
.book-rack::after {
  content: "";
  position: absolute;
  left: -12px;
  right: -12px;
  bottom: -15px;
  height: 30px;
  background:
    linear-gradient(to bottom,#704327,#5b351f);
  border-radius: 4px;
  box-shadow:0 8px 12px rgba(0,0,0,0.4);
  z-index: 30;
}


/* =========================================
   ENTIRE PAGE & SCIENCE LAYER FIX
   ========================================= */

.library-page {
    position: relative;
    min-height: 100vh;
    background:
        radial-gradient(
            circle at center,
            #34383b 0%,
            #202326 45%,
            #111315 100%
        );
    overflow: hidden;
    padding: 80px 7vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    isolation: isolate; /* Forces a new stacking context so child layers render correctly */
}

/* Minimal Book Lock */
.class-book.locked {
  opacity: 0.45;
  filter: grayscale(0.7);
  position: relative;
  cursor: not-allowed;
}

/* Floating lock icon placed directly above the book */
.class-book.locked::after {
  content: "🔒";
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 16px;
  line-height: 1;
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}