/* ========== RESET ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root{
  --bg: #0f2027;
  --bg-alt: #203a43;
  --panel: rgba(255,255,255,0.04);
  --text: #e8f6f4;
  --muted: #cfd8d8;
  --accent: #00ffae;
  --glass: rgba(255,255,255,0.04);
  --shadow: 0 6px 20px rgba(0,0,0,0.85); /* Much darker shadow */

  --light-bg: #f5f7fb;
  --light-bg-alt: #e9eef6;
  --light-panel: rgba(0,0,0,0.03);
  --light-text: #0b2230;
  --light-muted: #3b5566;
  --light-accent: #006b45;
}

body {
  --c-bg: var(--bg);
  --c-bg-alt: var(--bg-alt);
  --c-panel: var(--panel);
  --c-text: var(--text);
  --c-muted: var(--muted);
  --c-accent: var(--accent);
  background: linear-gradient(135deg, var(--c-bg), var(--c-bg-alt));
  color: var(--c-text);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  min-height: 100vh;
  transition: background 350ms ease, color 350ms ease;
  scroll-behavior: smooth;
}

body.light {
  --c-bg: var(--light-bg);
  --c-bg-alt: var(--light-bg-alt);
  --c-panel: var(--light-panel);
  --c-text: var(--light-text);
  --c-muted: var(--light-muted);
  --c-accent: var(--light-accent);
}

.sr-only { position: absolute; width: 1px; height: 1px; overflow:hidden; }

/* NAVBAR */
.navbar {
  position: fixed; top: 0; width: 100%; height: 68px;
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 1.25rem;
  background: linear-gradient(180deg, rgba(0,0,0,0.25), transparent);
  backdrop-filter: blur(6px);
  z-index: 1000;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  box-shadow: var(--shadow);
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo img { height: 44px; }
.logo .brand { font-weight: 700; color: var(--c-accent); font-size: 1.15rem; }
.nav-links { display: flex; gap: 1.25rem; list-style: none; }
.nav-links a { color: var(--c-text); text-decoration: none; font-weight: 600; }
.nav-links a:hover { color: var(--c-accent); }
.nav-links a.active { color: var(--c-accent); }
.nav-actions { display: flex; gap: 0.6rem; align-items: center; }
.theme-toggle { border:none; background: var(--c-panel); color: var(--c-text); padding: 8px 10px; border-radius: 10px; cursor: pointer; border: 1px solid rgba(255,255,255,0.1); box-shadow: var(--shadow); }
.menu-toggle { display: none; border:none; background: transparent; color: var(--c-text); font-size: 1.2rem; cursor: pointer; }

/* ===== DROPDOWN ===== */
.dropdown {
  position: relative;
}
.dropdown > a {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.dropdown-menu {
  position: absolute;
  top: 100%; left: 0;
  background: var(--c-panel);
  display: none;
  flex-direction: column;
  min-width: 180px;
  padding: 0.5rem 0;
  border-radius: 10px;
  box-shadow: var(--shadow);
  z-index: 999;
  border: 1px solid rgba(255,255,255,0.1);
}
.dropdown-menu li { list-style: none; }
.dropdown-menu a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--c-text);
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
}
.dropdown-menu a:hover {
  background: var(--c-accent);
  color: #021415;
}
.dropdown:hover .dropdown-menu {
  display: flex;
}

/* HOME */
.home-container {
  height: calc(100vh - 68px);
  display: flex; align-items: center; justify-content: center; text-align: center;
  margin-top: 68px;
  background-image: url('main-logo.png');
  background-repeat: no-repeat; background-position: center 30%; background-size: 28%;
}
.home-info { max-width: 900px; padding: 2rem; border-radius: 16px; }
.home-info h1 { font-size: 3rem; margin-bottom: .6rem; }
.home-info h1 span { color: var(--c-accent); }
.home-info h3 { color: var(--c-muted); margin-bottom: 1rem; }
.home-info p { color: var(--c-muted); margin-bottom: 2rem; line-height: 1.6; }

.cta-row { display:flex; justify-content:center; }

/* Enlarged button */
.button {
  border: none;
  padding: 1rem 2.2rem;   /* bigger */
  border-radius: 999px;
  font-weight: 700;
  font-size: 1.25rem;     /* bigger text */
  cursor: pointer;
  background: linear-gradient(90deg, var(--c-accent), rgba(0,0,0,0));
  color: #021415;
  transition: transform 160ms ease;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: var(--shadow);
}
.button:hover { transform: scale(1.05); }

/* CONTENT SECTIONS */
.content-section { 
  padding: 4rem 1.25rem; 
  max-width: 1000px; 
  margin: 0 auto; 
  line-height: 1.7;
}
.content-section h2 { 
  margin-bottom: 1rem; 
  color: var(--c-accent); 
  font-size: 2rem;
}
.content-section h3 { 
  margin-bottom: 1rem; 
  font-size: 1.6rem; 
  color: var(--c-text); 
}
.content-section h4 {
  margin-top: 1.8rem;
  margin-bottom: 0.8rem;
  font-size: 1.25rem;
  color: var(--c-accent);
  border-left: 4px solid var(--c-accent);
  padding-left: 0.6rem;
}

.content-section p { 
  margin-bottom: 1rem; 
  color: var(--c-muted);
  font-size: 1.05rem;
  text-align: justify;
}

.content-section ul { 
  margin: 0.8rem 0 1.2rem 1.5rem; 
  padding-left: 0.5rem;
}
.content-section ul li { 
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
  color: var(--c-text);
  list-style: "✔️ ";
}
.content-section ul li::marker {
  font-size: 1.1rem;
}

.content-section b { 
  color: var(--c-accent);
}

/* NOTE HIGHLIGHTS */
.content-section p strong, 
.content-section ul li strong {
  background: var(--c-panel);
  padding: 0 4px;
  border-radius: 4px;
}

/* SPECIAL STYLE: Chapter boxes */
#c1,
#c2,
#c3,
#c4 {
  background: var(--c-panel);
  border: 2px solid var(--c-accent);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow); /* Now uses the much darker shadow */
  margin-top: 2rem;
}

/* Additional styles for tables and special content */
.digestive-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: var(--shadow);
}

.digestive-table th, .digestive-table td {
  padding: 0.8rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.digestive-table th {
  background-color: var(--c-accent);
  color: #021415;
  font-weight: 700;
}

.digestive-table tr:last-child td {
  border-bottom: none;
}

.icon-cell {
  text-align: center;
  width: 60px;
}

.process-step {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1rem;
  padding: 1rem;
  background: var(--c-panel);
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: var(--shadow);
}

.step-icon {
  font-size: 1.5rem;
  margin-right: 1rem;
  min-width: 40px;
  color: var(--c-accent);
}

.step-content {
  flex: 1;
}

.comparison-box {
  background: var(--c-panel);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  border-left: 4px solid var(--c-accent);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: var(--shadow);
}

.comparison-title {
  color: var(--c-accent);
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.animal-card {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  padding: 1.2rem;
  margin: 1rem 0;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: var(--shadow);
}

.animal-card h5 {
  color: var(--c-accent);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* FOOTER */
.footer {
  background: var(--c-panel);
  padding: 2rem 1.25rem;
  margin-top: 3rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-content {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.footer-section h4 {
  color: var(--c-accent);
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.footer-section p {
  color: var(--c-muted);
  line-height: 1.6;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section ul li a {
  color: var(--c-muted);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section ul li a:hover {
  color: var(--c-accent);
}

.footer-bottom {
  max-width: 1000px;
  margin: 2rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  color: var(--c-muted);
}

/* HEAT CHAPTER SPECIFIC STYLES */
.heat-transfer-card {
  background: var(--c-panel);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: var(--shadow);
}

.heat-transfer-card h5 {
  color: var(--c-accent);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.keyword-highlight {
  background: linear-gradient(90deg, var(--c-accent), transparent);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  color: #021415;
  font-weight: 600;
  display: inline-block;
  margin: 0.2rem;
}

.revision-tip {
  background: rgba(0, 255, 174, 0.1);
  border-left: 4px solid var(--c-accent);
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 0 8px 8px 0;
}

.revision-tip ul {
  margin: 0.5rem 0 0 1.5rem;
}

/* ========== CHAPTER 4: ACIDS, BASES & SALTS ========== */
.acid-base-card {
  background: var(--c-panel);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: var(--shadow);
}

.acid-base-card h5 {
  color: var(--c-accent);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.indicator-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.indicator-item {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  padding: 1.2rem;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.indicator-icon {
  font-size: 1.8rem;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 255, 174, 0.1);
}

.indicator-info h6 {
  color: var(--c-accent);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.neutralization-demo {
  background: linear-gradient(135deg, rgba(255, 0, 0, 0.1), rgba(0, 0, 255, 0.1));
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.neutralization-demo::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, 
    rgba(255, 0, 0, 0.15) 0%, 
    rgba(128, 0, 128, 0.15) 50%, 
    rgba(0, 0, 255, 0.15) 100%);
  z-index: -1;
}

.neutralization-demo h5 {
  color: var(--c-accent);
  margin-bottom: 1rem;
  text-align: center;
}

.neutralization-equation {
  text-align: center;
  font-size: 1.2rem;
  margin: 1rem 0;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  font-family: 'Courier New', monospace;
}

.acid-base-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: var(--shadow);
}

.acid-base-table th, .acid-base-table td {
  padding: 0.8rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.acid-base-table th {
  background-color: var(--c-accent);
  color: #021415;
  font-weight: 700;
}

.acid-base-table tr:last-child td {
  border-bottom: none;
}

.acid-row {
  background: linear-gradient(90deg, rgba(255, 0, 0, 0.05), transparent);
}

.base-row {
  background: linear-gradient(90deg, rgba(0, 0, 255, 0.05), transparent);
}

.salt-row {
  background: linear-gradient(90deg, rgba(128, 0, 128, 0.05), transparent);
}

.ph-scale {
  height: 40px;
  background: linear-gradient(90deg, 
    #ff0000 0%, 
    #ff8000 16.67%, 
    #ffff00 33.33%, 
    #80ff00 50%, 
    #00ff00 66.67%, 
    #00ffff 83.33%, 
    #0000ff 100%);
  border-radius: 8px;
  margin: 1.5rem 0;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.ph-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--c-muted);
}

.ph-pointer {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: white;
  transform: translateX(-50%);
  box-shadow: 0 0 5px rgba(0,0,0,0.5);
}

.ph-value {
  position: absolute;
  top: -25px;
  transform: translateX(-50%);
  background: var(--c-accent);
  color: #021415;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: bold;
  font-size: 0.9rem;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .menu-toggle { display: block; }
  .home-info h1 { font-size: 2rem; }
  .home-info { padding: 1rem; }
  .content-section { padding: 2rem 1rem; }
  .indicator-list { grid-template-columns: 1fr; }
  .footer-content { grid-template-columns: 1fr; }
}

/* Mobile menu */
.mobile-nav {
  position: fixed;
  top: 68px;
  left: 0;
  right: 0;
  background: var(--c-panel);
  backdrop-filter: blur(10px);
  padding: 1rem;
  display: none;
  flex-direction: column;
  gap: 1rem;
  z-index: 999;
  border-top: 1px solid rgba(255,255,255,0.1);
  box-shadow: var(--shadow);
}

.mobile-nav.show { display: flex; }

.mobile-nav .dropdown-menu {
  position: static;
  display: none;
  margin: 0.5rem 0 0 1rem;
  box-shadow: none;
  background: rgba(255,255,255,0.05);
}

.mobile-nav .dropdown.active .dropdown-menu {
  display: flex;
}

/* ========== CHAPTER 5: PHYSICAL AND CHEMICAL CHANGES ========== */

/* Special styling for Chapter 5 section */
#c5 {
  background: var(--c-panel);
  border: 2px solid var(--c-accent);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow);
  margin-top: 2rem;
}

/* Change type indicators */
.change-type {
  display: flex;
  gap: 1rem;
  margin: 1.5rem 0;
}

.change-card {
  flex: 1;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
}

.change-card.physical {
  border-top: 4px solid #4fc3f7;
}

.change-card.chemical {
  border-top: 4px solid #ff6b6b;
}

.change-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.change-title {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--c-accent);
}

/* Example cards */
.example-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.2rem;
  margin: 1.5rem 0;
}

.example-card {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
}

.example-card h5 {
  color: var(--c-accent);
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.example-icon {
  font-size: 1.5rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 255, 174, 0.1);
}

/* Observation highlights */
.observation-list {
  margin: 1rem 0;
  padding-left: 1rem;
}

.observation-list li {
  margin-bottom: 0.5rem;
  color: var(--c-text);
  list-style: "🔍 ";
}

.observation-list li::marker {
  font-size: 1rem;
}

/* Experiment demo boxes */
.experiment-demo {
  background: linear-gradient(135deg, rgba(79, 195, 247, 0.1), rgba(255, 107, 107, 0.1));
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
}

.experiment-demo h5 {
  color: var(--c-accent);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.experiment-equation {
  text-align: center;
  font-size: 1.1rem;
  margin: 1rem 0;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  font-family: 'Courier New', monospace;
}

/* Prevention methods */
.prevention-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.method-item {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
}

.method-icon {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  color: var(--c-accent);
}

/* Practice questions */
.practice-questions {
  background: rgba(0, 255, 174, 0.05);
  border-left: 4px solid var(--c-accent);
  padding: 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 8px 8px 0;
}

.practice-questions h5 {
  color: var(--c-accent);
  margin-bottom: 1rem;
}

.practice-questions ol {
  margin-left: 1.5rem;
}

.practice-questions li {
  margin-bottom: 0.8rem;
  color: var(--c-text);
}

/* Responsive adjustments for Chapter 5 */
@media (max-width: 768px) {
  .change-type {
    flex-direction: column;
  }
  
  .example-grid {
    grid-template-columns: 1fr;
  }
  
  .prevention-methods {
    grid-template-columns: 1fr;
  }
}

/* ========== CHAPTER 6: RESPIRATION IN ORGANISMS ========== */
#c6 {
  background: var(--c-panel);
  border: 2px solid var(--c-accent);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow);
  margin-top: 2rem;
}

#c7{
  background: var(--c-panel);
  border: 2px solid var(--c-accent);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow);
  margin-top: 2rem;
}

#c8{
  background: var(--c-panel);
  border: 2px solid var(--c-accent);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow);
  margin-top: 2rem;
}

#c9{
  background: var(--c-panel);
  border: 2px solid var(--c-accent);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow);
  margin-top: 2rem;
}