/* === START: Dark & Light Mode Theme Variables === */
:root {
  --bg-primary: #000000;
  --bg-secondary: #1a1a1a;
  --text-primary: #ffffff;
  --text-secondary: #E0E0E0;
  --accent-color: #008080;
  --card-bg: rgba(26, 26, 26, 0.8);
  --border-color: rgba(255, 255, 255, 0.15);
  --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  --scroll-progress-color: #00cccc;
  --text-muted: #b0b0b0;
  --hover-bg: rgba(36, 36, 36, 0.9);
  --primary-color: #008080;
  --text-color: #ffffff;
  --font-heading: 'Space Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

[data-theme="light"] {
  --bg-primary: #f5f7fa;
  --bg-secondary: #ffffff;
  --text-primary: #2d3748;
  --text-secondary: #4a5568;
  --accent-color: #007373;
  --card-bg: rgba(255, 255, 255, 0.9);
  --border-color: rgba(0, 0, 0, 0.1);
  --shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  --scroll-progress-color: #007373;
  --text-muted: #a0a0a0;
  --hover-bg: rgba(220, 220, 220, 0.95);
  --primary-color: #007373;
  --text-color: #2d3748;
}

/* === START: Scroll Progress Bar === */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background-color: var(--scroll-progress-color);
  width: 0%;
  z-index: 9999;
  transition: width 0.2s ease;
}

/* === START: Back to Top Button === */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--accent-color);
  color: white;
  border: none;
  padding: 12px 16px;
  border-radius: 50%;
  font-size: 1.2em;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  display: none;
  z-index: 9999;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.back-to-top.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.back-to-top:hover {
  filter: brightness(0.85);
  transform: scale(1.1);
}

html {
  scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  background-image: url('img/tech-pattern.jpg');
  background-size: cover;
  background-attachment: fixed;
  background-position: center center;
  position: relative;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body {
  /* ...keep all your other existing properties... */
  background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('img/tech-pattern.jpg');
  background-size: cover, cover;
  background-attachment: fixed, fixed;
  background-position: center center, center center;
  background-repeat: no-repeat, no-repeat;
}

/* ADD this new rule right after body: */
[data-theme="light"] body {
  background-image: linear-gradient(rgba(245, 247, 250, 0.7), rgba(245, 247, 250, 0.7)), url('img/tech-pattern.jpg');
}

/* Hero Section */
.hero {
  /* Phase 4: Subtle Hero Glow Animation */
  background: radial-gradient(circle at 0% 0%, rgba(0, 128, 128, 0.25) 0%, rgba(0, 0, 0, 0.85) 50%, rgba(0, 0, 0, 0.95) 100%);
  background-size: 150% 150%;
  padding: 80px 20px 60px;
  text-align: center;
  color: var(--text-primary);
  animation: fadeIn 1.5s ease-in, heroGlow 12s ease-in-out infinite alternate;
  border-bottom: 1px solid var(--border-color);
  position: relative;
  z-index: 1;
  transition: padding 0.5s ease;
}

[data-theme="light"] .hero {
  background: radial-gradient(circle at 0% 0%, rgba(0, 115, 115, 0.15) 0%, rgba(245, 247, 250, 0.8) 50%, rgba(229, 231, 235, 0.95) 100%);
  background-size: 150% 150%;
}

@keyframes heroGlow {
  0% { background-position: 0% 0%; }
  100% { background-position: 100% 100%; }
}

.hero.about-hero, .hero.notes-hero {
  padding: 60px 20px 40px;
}

body.scrolled-about .hero.about-hero {
  padding: 20px 20px 20px;
}

.hero-content h1 {
  font-size: 3.5em;
  font-weight: 700;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
  transform: translateZ(20px);
  transition: transform 0.3s ease;
}

.hero-content p {
  font-size: 1.3em;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto 40px auto;
  transform: translateZ(15px);
  transition: transform 0.3s ease;
}

/* Hero Action Buttons */
.hero-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 40px;
}

/* Phase 4: Clear Hero CTA Hierarchy */
.hero-button {
  display: inline-block;
  background-color: var(--accent-color);
  color: #ffffff;
  padding: 14px 32px;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 128, 128, 0.4);
  border: 2px solid var(--accent-color);
}

.hero-button:hover {
  background-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 128, 128, 0.6);
  color: #ffffff;
}

.hero-link {
  display: inline-block;
  background-color: transparent;
  color: var(--text-primary);
  border: 2px solid var(--border-color);
  padding: 14px 32px;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.hero-link:hover {
  border-color: var(--text-secondary);
  background-color: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
  color: var(--text-primary);
}

[data-theme="light"] .hero-link:hover {
  background-color: rgba(0, 0, 0, 0.03);
}

/* Navigation */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: transparent;
  box-shadow: none;
  border-radius: 0;
  margin: 0;
  transition: background-color 0.3s ease;
}

nav .logo {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.3s ease;
}

nav .logo:hover {
  color: var(--text-secondary);
  transform: scale(1.03);
}

nav .logo i {
  font-size: 1.1em;
  color: var(--accent-color);
  transition: color 0.3s ease;
}

nav .logo:hover i {
  color: var(--text-primary);
}

nav a {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 1.1em;
  transition: all 0.3s ease;
  padding-bottom: 5px;
  position: relative;
}

nav a.active {
  color: var(--text-primary);
  font-weight: 600;
}

nav a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--accent-color);
  border-radius: 2px;
}

nav a:hover {
  color: var(--text-primary);
}

/* Theme Toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-switch label {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 24px;
}

.toggle-switch label:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + label {
  background-color: var(--accent-color);
}

input:checked + label:before {
  transform: translateX(26px);
}

/* Section Styling */
.why, .explore, .featured {
  padding: 100px 40px;
  text-align: center;
  background-color: rgba(0, 0, 0, 0.75);
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  position: relative;
  z-index: 1;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.2), 0 10px 30px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .why,
[data-theme="light"] .explore,
[data-theme="light"] .featured {
  background-color: rgba(255, 255, 255, 0.9);
  color: var(--text-primary);
}

h2 {
  font-size: 2.8em;
  font-weight: 700;
  margin-bottom: 60px;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

/* Why NoteDesk? Cards */
.cards {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
}

.card {
  background-color: var(--card-bg);
  padding: 35px;
  width: 300px;
  border-radius: 12px;
  transition: all 0.4s ease;
  color: var(--text-primary);
  text-align: left;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  perspective: 1000px;
  transform-style: preserve-3d;
}

/* Phase 4: Dynamic variable on card hover */
.card:hover {
  transform: translateY(-10px) rotateX(2deg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  background-color: var(--hover-bg); 
  border-color: var(--accent-color);
}

[data-theme="light"] .card:hover {
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.card h3 .card-number {
  display: inline-block;
  font-size: 1.5em;
  font-weight: 700;
  color: var(--accent-color);
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 8px;
  margin-bottom: 10px;
  line-height: 1;
}

.card h3 {
  font-size: 1.2em;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.6;
  margin-top: 0;
  margin-bottom: 15px;
}

.card p {
  font-size: 1em;
  color: var(--text-secondary);
}

/* Explore Topics Buttons */
.topics {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  max-width: 1000px;
  margin: 0 auto;
}

.topics button {
  padding: 12px 25px;
  background-color: rgba(30, 30, 30, 0.9);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  font-size: 1.05em;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 8px;
}

[data-theme="light"] .topics button {
  background-color: rgba(245, 245, 245, 0.9);
}

.topics button:hover {
  background-color: rgba(45, 45, 45, 0.95);
  border-color: var(--accent-color);
  transform: translateY(-3px);
  color: var(--text-primary);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .topics button:hover {
  background-color: rgba(220, 220, 220, 0.95);
}

.topics button i {
  font-size: 1.1em;
  color: var(--accent-color);
  transition: color 0.3s ease;
}

.topics button:hover i {
  color: var(--text-primary);
}

/* Featured Notes Card Styling - Explicit Contrast Fix */
.featured-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
  max-width: 1000px;
  margin: 0 auto;
}

.note {
  background-color: var(--card-bg);
  padding: 25px;
  width: 300px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  transition: all 0.4s ease;
  color: var(--text-primary) !important;
  text-align: left;
  font-size: 1.05em;
  font-weight: 600;
  perspective: 1000px;
  transform-style: preserve-3d;
  cursor: pointer; /* Added for Phase 1 - makes featured cards clickable */
}

.note:hover {
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
  transform: translateY(-8px) rotateX(1deg);
  background-color: var(--hover-bg);
  border-color: var(--accent-color);
}

.explore .topics a {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.explore .topics a:hover {
    background-color: var(--hover-bg);
    transform: translateY(-5px);
}

.explore .topics a i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* Footer */
footer {
  background-color: var(--bg-primary);
  color: var(--text-secondary);
  padding: 60px 40px;
  font-size: 0.95em;
  border-top: 1px solid var(--border-color);
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 50px;
  max-width: 1300px;
  margin: 0 auto;
  text-align: left;
}

.footer-content h3 {
  margin-top: 0;
  color: var(--text-primary);
  font-size: 1.2em;
  font-weight: 600;
  margin-bottom: 20px;
}

.footer-content ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-content li {
  margin-bottom: 10px;
}

.footer-content a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-content a:hover {
  color: var(--text-primary);
}

.footer-content .socials a {
  margin-right: 18px;
  font-size: 1.5em;
  color: var(--accent-color);
  transition: all 0.3s ease;
}

.footer-content .socials a:hover {
  transform: translateY(-3px);
  color: var(--text-primary);
}

.footer-bottom {
  text-align: center;
  padding-top: 40px;
  margin-top: 40px;
  border-top: 1px solid var(--border-color);
}

/* Scroll Animation */
.js-scroll {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.js-scroll.scrolled {
  opacity: 1;
  transform: translateY(0);
}

/* About Page */
.about-page-container {
  display: flex;
  flex-wrap: wrap;
  gap: 50px;
  justify-content: center;
  max-width: 1200px;
  margin: 60px auto;
  padding: 40px;
  background-color: rgba(20, 20, 20, 0.9);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  text-align: left;
}

[data-theme="light"] .about-page-container {
  background-color: rgba(255, 255, 255, 0.9);
}

/* === 404 Error Page === */
.error-page-container {
  max-width: 700px;
  margin: 80px auto;
  padding: 60px 40px;
  text-align: center;
  background-color: rgba(20, 20, 20, 0.9);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .error-page-container {
  background-color: rgba(255, 255, 255, 0.9);
}

.error-code {
  font-family: var(--font-heading);
  font-size: 7rem;
  font-weight: 700;
  color: var(--accent-color);
  line-height: 1;
  margin-bottom: 10px;
}

.error-page-container p {
  max-width: 480px;
  margin: 0 auto 30px;
}

.error-home-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--accent-color);
  color: #ffffff;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.3s ease, transform 0.2s ease;
}

.error-home-btn:hover {
  transform: translateY(-2px);
  filter: brightness(0.9);
}

.profile-card {
  flex: 0 0 280px;
  padding: 30px;
  background-color: var(--card-bg);
  border-radius: 10px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.profile-pic {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 25px;
  border: 4px solid var(--accent-color);
  box-shadow: 0 0 0 8px rgba(0, 128, 128, 0.1);
  transition: transform 0.3s ease;
}

.profile-pic:hover {
  transform: scale(1.05);
}

.profile-card h2 {
  font-size: 1.8em;
  margin-bottom: 15px;
  color: var(--text-primary);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.profile-card .socials {
  margin-top: 25px;
}

.profile-card .socials a {
  color: var(--accent-color);
  font-size: 1.8em;
  margin: 0 12px;
  transition: all 0.3s ease;
}

.profile-card .socials a:hover {
  color: var(--text-primary);
  transform: translateY(-5px);
}

.about-main-content {
  flex: 1;
  padding: 10px 0;
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 1.05em;
}

.about-main-content .intro-text {
  font-size: 1.2em;
  font-weight: 500;
  margin-bottom: 30px;
  color: var(--text-primary);
}

.about-main-content h3 {
  font-size: 1.6em;
  color: var(--text-primary);
  margin-top: 40px;
  margin-bottom: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  border-left: 4px solid var(--accent-color);
  padding-left: 15px;
  margin-left: -15px;
}

.about-main-content p {
  margin-bottom: 20px;
  color: var(--text-secondary);
}

.about-main-content ul {
  list-style: none;
  padding: 0;
  margin-top: 20px;
  margin-bottom: 20px;
}

.about-main-content li {
  margin-bottom: 15px;
  position: relative;
  padding-left: 25px;
  color: var(--text-secondary);
}

.about-main-content li::before {
  content: "•";
  color: var(--accent-color);
  position: absolute;
  left: 0;
  font-size: 1.5em;
  line-height: 1;
  top: 2px;
}

/* Contact Links */
.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3em;
  color: var(--accent-color);
  text-decoration: none;
  transition: all 0.3s ease;
  margin-top: 10px;
  margin-bottom: 10px;
  text-shadow: 0 0 5px rgba(0, 128, 128, 0.2);
}

.contact-link:hover {
  color: var(--text-primary);
  transform: translateX(5px);
  text-shadow: 0 0 8px rgba(0, 128, 128, 0.5);
}

/* Contact Form Styles */
.contact-form-container {
  max-width: 600px;
  margin: 0 auto 50px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-weight: 500;
  color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
  padding: 12px 15px;
  background: var(--card-bg);
  border: 1px solid var(--accent-color);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 1em;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 128, 128, 0.3);
  border-color: var(--accent-color);
}

.form-submit-btn {
  padding: 15px;
  background: var(--accent-color);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

.form-submit-btn:hover {
  filter: brightness(0.85);
}

.form-submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.form-error-message {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
  padding: 14px 16px;
  background: rgba(220, 53, 69, 0.1);
  border: 1px solid #dc3545;
  border-radius: 8px;
  color: #dc3545;
  font-size: 0.9em;
}

.form-error-message i {
  font-size: 1.2em;
  flex-shrink: 0;
}

.form-success-message {
  text-align: center;
  padding: 30px;
  background: rgba(0, 128, 128, 0.1);
  border-radius: 10px;
  border: 1px solid var(--accent-color);
}

.form-success-message i {
  font-size: 3em;
  color: var(--accent-color);
  margin-bottom: 15px;
}

.contact-alt-options {
  border-top: 1px solid var(--border-color);
  padding-top: 40px;
  max-width: 600px;
  margin: 0 auto;
}

/* Loading Animation */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

.loader-logo {
  font-size: 2em;
  color: var(--accent-color);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { opacity: 0.3; transform: scale(0.95); }
  50% { opacity: 1; transform: scale(1.05); }
  100% { opacity: 0.3; transform: scale(0.95); }
}

/* Notes Page Styles */
.notes-container {
  padding: 60px 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.notes-controls {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 40px;
}

.search-bar {
  padding: 12px 20px;
  border-radius: 8px;
  border: 1px solid var(--accent-color);
  background: var(--card-bg);
  color: var(--text-primary);
  font-size: 1.1em;
  transition: all 0.3s ease;
}

.search-bar:focus {
  box-shadow: 0 0 0 3px rgba(0, 128, 128, 0.3);
  outline: none;
}

.category-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.category-filters button {
  padding: 8px 16px;
  background: var(--card-bg);
  border: 1px solid var(--accent-color);
  color: var(--text-secondary);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.category-filters button:hover {
  background: rgba(0, 128, 128, 0.1);
  color: var(--text-primary);
}

.category-filters button.active {
  background: var(--accent-color);
  color: white;
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
}

.note-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 25px;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  perspective: 1000px;
  display: flex;
  flex-direction: column;
  height: auto;
}

.note-card:hover {
  transform: translateY(-5px) rotateX(1deg);
  border-color: var(--accent-color);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.note-card h3 {
  margin-top: 0;
  font-size: 1.2em;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.note-card p {
  color: var(--text-secondary);
  font-size: 0.9em;
  flex-grow: 1;
  margin-bottom: 15px;
}

.note-date {
  display: none;
}

/* 3D Parallax Effect */
.hero-content {
  transform-style: preserve-3d;
  perspective: 1000px;
}

/* Micro-interactions */
.card, .note, .note-card, .topics button {
  transition: all 0.3s ease;
}

.card:hover, .note:hover, .topics button:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.contact-link:hover, .hero-link:hover {
  transform: translateX(5px);
}

/* Bookmark animation */
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.bookmark-icon.active {
  animation: bounce 0.5s ease;
}

/* Fade-in animation */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Responsive Adjustments */
@media (max-width: 992px) {
  .hero-content h1 {
    font-size: 2.8em;
  }
  .hero-content p {
    font-size: 1.1em;
  }
  .hero-actions {
    flex-direction: column;
    gap: 15px;
  }
  h2 {
    font-size: 2.2em;
  }
  nav {
    flex-wrap: wrap;
    padding: 20px 20px;
  }
  .nav-links {
    width: 100%;
    justify-content: center;
    margin-top: 20px;
    order: 3;
  }
  .why, .explore, .featured, .news-ticker {
    padding: 80px 20px;
  }
  .cards, .featured-notes {
    flex-direction: column;
    align-items: center;
    gap: 25px;
  }
  .card, .note {
    width: 90%;
    max-width: 400px;
    transform: none !important;
    box-shadow: none !important;
  }
  .card:hover, .note:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2) !important;
  }
  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 30px;
  }
  .footer-content > div {
    width: 100%;
  }
  /* About Page Responsive */
  .about-page-container {
    flex-direction: column;
    align-items: center;
    padding: 30px;
    margin: 50px auto;
    gap: 30px;
  }
  .profile-card {
    flex: none;
    width: 100%;
    max-width: 300px;
  }
  .profile-pic {
    width: 120px;
    height: 120px;
  }
  .profile-card h2 {
    font-size: 1.6em;
  }
  .profile-card .socials a {
    font-size: 1.6em;
    margin: 0 8px;
  }
  .about-main-content .intro-text {
    font-size: 1.1em;
  }
  .about-main-content h3 {
    font-size: 1.4em;
  }
  .about-main-content p, .about-main-content li {
    font-size: 0.95em;
  }
  /* Notes Page Responsive */
  .notes-grid {
    grid-template-columns: 1fr;
  }
  .modal-content {
    width: 95%;
    padding: 20px;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 60px 15px 40px;
  }
  
  .hero.about-hero, .hero.notes-hero {
    padding: 40px 15px 30px;
  }
  
  .hero-content h1 {
    font-size: 2.2em;
  }
  
  .hero-content p {
    font-size: 1em;
  }
  
  .notes-grid {
    grid-template-columns: 1fr;
  }
  
  .theme-toggle {
    margin-top: 15px;
  }
}

@media (max-width: 576px) {
  .hero-content h1 {
    font-size: 2em;
  }
  .hero-content p {
    font-size: 0.95em;
  }
  .hero-button {
    padding: 12px 25px;
    font-size: 1em;
  }
  .hero-link {
    font-size: 0.95em;
  }
  h2 {
    font-size: 1.8em;
  }
  nav .logo {
    font-size: 24px;
  }
  .why, .explore, .featured, .news-ticker {
    padding: 60px 15px;
  }
  .card, .note {
    padding: 25px 20px;
  }
  .topics button {
    padding: 10px 18px;
    font-size: 0.9em;
  }
  .footer-content {
    padding: 40px 15px;
  }
  /* Notes Page Mobile */
  .notes-container {
    padding: 40px 20px;
  }
  .search-bar {
    font-size: 1em;
  }
  .category-filters button {
    padding: 6px 12px;
    font-size: 0.9em;
  }
}

.hero-link {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 1.05em;
  text-decoration: none;
  transition: color 0.3s ease, transform 0.3s ease;
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
}

.hero-link:hover {
  color: var(--accent-color);
  background: none;
  box-shadow: none;
  transform: translateX(4px);
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5em;
}

h2 {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.4em;
}

p {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 1em;
}

.subtext {
  font-size: 0.9rem;
  color: var(--text-muted);
  opacity: 0.8;
}

html, body {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
}

.about-hero .hero-content h1,
.notes-hero .hero-content h1,
.contact-hero .hero-content h1 {
  font-size: 2.2rem;
  line-height: 1.3;
}

nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 30px;
  margin: 0;
  padding: 0;
  margin-left: auto;
  margin-right: 80px;
}

/* === CLASSY & HIGH-CONTRAST MODAL POPUP STYLES === */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s 0.3s;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-content.news-modal-content {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-radius: 16px;
  width: 90%;
  max-width: 650px;
  padding: 35px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--border-color);
  transform: scale(0.92) translateY(10px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal-overlay.active .modal-content.news-modal-content {
  transform: scale(1) translateY(0);
}

[data-theme="light"] .modal-content.news-modal-content {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0;
  padding: 0;
  border: none;
}

.news-modal-badges {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.news-badge {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.category-badge {
  background-color: rgba(0, 128, 128, 0.2);
  color: var(--scroll-progress-color);
  border: 1px solid rgba(0, 204, 204, 0.3);
}

.date-badge {
  background-color: var(--card-bg);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.close-modal-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 1.5rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.close-modal-btn:hover {
  background-color: var(--accent-color);
  color: #ffffff;
  transform: rotate(90deg);
}

.news-modal-title {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text-primary) !important;
  line-height: 1.35;
  margin: 10px 0 0 0;
  letter-spacing: -0.01em;
}

.news-modal-divider {
  height: 1px;
  background: var(--border-color);
  width: 100%;
  margin: 15px 0;
}

.news-modal-text {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-secondary) !important;
  max-height: 300px;
  overflow-y: auto;
  padding-right: 8px;
}

.news-modal-footer {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}

.news-source-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background-color: var(--accent-color);
  color: #ffffff !important;
  padding: 12px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.25 ease;
  box-shadow: 0 4px 12px rgba(0, 128, 128, 0.3);
}

.news-source-btn:hover {
  filter: brightness(0.85);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 128, 128, 0.45);
}

/* --- About Page Specific Styles --- */
.about-main-content p,
.about-main-content li {
  font-size: 1.05rem;
  line-height: 1.8;
}

.profile-card p {
  color: var(--text-secondary);
}

.profile-card .socials a {
  display: inline-block;
  margin-top: 8px;
  color: var(--accent-color);
  font-size: 1.1rem;
  text-decoration: none;
}

.profile-card .socials a i {
  margin-right: 6px;
}

.about-main-content h3 {
  margin-top: 1.8rem;
}

.about-main-content ul li {
  margin-bottom: 8px;
}

/* === Mobile Nav === */
.hamburger-menu {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 101;
}

.hamburger-menu .bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  background-color: var(--text-primary);
  transition: all 0.3s ease-in-out;
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 30px;
  margin: 0;
  padding: 0;
  margin-left: auto;
  margin-right: 80px;
  transition: transform 0.4s ease-in-out;
}

.nav-links.active {
  transform: translateX(0);
}

@media (max-width: 768px) {
  nav {
    flex-wrap: nowrap;
    justify-content: space-between;
    padding: 15px 20px;
    align-items: center;
  }
  
  .logo {
    font-size: 24px;
  }
  
  .hamburger-menu {
    display: block;
  }
  
.nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--bg-primary);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transform: translateX(100%);
    transition: transform 0.4s ease-in-out;
    z-index: 1000;
    margin: 0;
    border-left: 1px solid var(--border-color);
  }

  .nav-links.active {
    transform: translateX(0);
  }
  
  .nav-links li {
    margin: 30px 0;
  }

  .nav-links a {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--text-primary);
  }

  .theme-toggle {
    margin-left: auto;
    margin-right: 20px;
  }
}

body.menu-open {
    overflow-y: hidden;
}

body.menu-open .why,
body.menu-open .explore,
body.menu-open .featured,
body.menu-open .news-ticker,
body.menu-open footer {
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.4s, visibility 0s 0.4s;
}

nav.scrolled {
  background-color: var(--bg-primary);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* ========================================================
   === FULL-WIDTH SCREEN EDGE-TO-EDGE TICKER STYLES ===
   ======================================================== */
.news-ticker {
  background-color: rgba(0, 0, 0, 0.85);
  color: var(--text-primary);
  padding: 50px 0;
  width: 100%;
  max-width: 100% !important;
  margin: 0;
  overflow: hidden;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

[data-theme="light"] .news-ticker {
  background-color: rgba(255, 255, 255, 0.95);
}

.news-ticker h2 {
  text-align: center;
  margin-bottom: 25px;
}

.ticker-viewport {
  width: 100vw;
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
}

.ticker-track {
  display: inline-flex;
  white-space: nowrap;
  gap: 50px;
  will-change: transform;
  animation: continuousTickerScroll 35s linear infinite;
  align-items: center;
}

.ticker-track:hover {
  animation-play-state: paused;
}

.ticker-item {
  display: inline-block;
  font-size: 1.05em;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
}

.ticker-item:hover {
  color: var(--accent-color);
  text-decoration: underline;
}

.ticker-item::after {
  content: "•";
  color: var(--accent-color);
  margin-left: 50px;
  display: inline-block;
  text-decoration: none;
}

.ticker-skeleton {
  display: inline-flex;
  align-items: center;
  gap: 40px;
}

.skeleton-bar {
  display: inline-block;
  height: 16px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--hover-bg) 25%, rgba(0, 179, 179, 0.18) 50%, var(--hover-bg) 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.4s ease-in-out infinite;
}

.skeleton-bar:nth-child(1) { width: 180px; }
.skeleton-bar:nth-child(2) { width: 260px; }
.skeleton-bar:nth-child(3) { width: 140px; }
.skeleton-bar:nth-child(4) { width: 220px; }

@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes continuousTickerScroll {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* === SURGICAL POPUP MODAL & COLORFUL BADGES FIXES === */

/* Force modal overlay to cover the exact visible screen viewport */
.modal-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background-color: rgba(0, 0, 0, 0.85) !important;
  backdrop-filter: blur(8px);
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  z-index: 10000 !important;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s 0.3s;
}

.modal-overlay.active {
  opacity: 1 !important;
  visibility: visible !important;
  transition: opacity 0.3s ease;
}

/* Modal Content Card Styling */
.modal-content {
  background-color: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
  border-radius: 14px !important;
  width: 90% !important;
  max-width: 680px !important;
  padding: 30px !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7) !important;
  border: 1px solid var(--border-color) !important;
  max-height: 85vh !important;
  overflow-y: auto !important;
  position: relative !important;
}

/* Clean Close Button in Top Right Corner */
.close-modal-btn {
  position: absolute !important;
  top: 20px !important;
  right: 20px !important;
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-primary) !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.4rem !important;
  line-height: 1 !important;
}

.close-modal-btn:hover {
  background-color: var(--accent-color) !important;
  color: #ffffff !important;
}

/* Note Card Header & Badge Styles */
.note-card-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.note-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.badge-windows {
  background-color: rgba(0, 120, 212, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(96, 165, 250, 0.3);
}

.badge-linux {
  background-color: rgba(234, 179, 8, 0.2);
  color: #facc15;
  border: 1px solid rgba(250, 204, 21, 0.3);
}

.badge-web {
  background-color: rgba(168, 85, 247, 0.2);
  color: #c084fc;
  border: 1px solid rgba(192, 132, 252, 0.3);
}

.badge-dev {
  background-color: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.3);
}

.badge-productivity {
  background-color: rgba(236, 72, 153, 0.2);
  color: #f472b6;
  border: 1px solid rgba(244, 114, 182, 0.3);
}

.badge-cybersecurity {
  background-color: rgba(20, 184, 166, 0.2);
  color: #2dd4bf;
  border: 1px solid rgba(45, 212, 191, 0.3);
}

.badge-ai {
  background-color: rgba(99, 102, 241, 0.2);
  color: #818cf8;
  border: 1px solid rgba(129, 140, 248, 0.3);
}

.note-card-title {
  margin: 0 0 12px 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary) !important;
  line-height: 1.35;
}

.card-problem {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  flex-grow: 1;
  margin-bottom: 10px;
}

/* ========================================================
   === SEARCH BAR & MODAL CODE SNIPPET ENHANCEMENTS ===
   ======================================================== */

/* Search Bar Wrapper Fixes */
.search-wrapper {
  position: relative;
  width: 100%;
  max-width: 600px;
}

.search-wrapper .search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent-color);
  font-size: 1rem;
  pointer-events: none;
}

.search-bar {
  width: 100%;
  padding: 14px 20px 14px 48px !important;
  border-radius: 10px !important;
  border: 1px solid var(--border-color) !important;
  background: var(--card-bg) !important;
  color: var(--text-primary) !important;
  font-size: 1rem !important;
  box-sizing: border-box;
  transition: all 0.25s ease;
}

.search-bar:focus {
  border-color: var(--accent-color) !important;
  box-shadow: 0 0 0 3px rgba(0, 128, 128, 0.25) !important;
  outline: none;
  background: var(--bg-secondary) !important;
}

/* Modal Headers & High-Contrast Typography */
.modal-title-group h3 {
  color: var(--accent-color) !important;
  font-size: 1.6rem !important;
  font-weight: 800 !important;
  margin-top: 5px !important;
}

.problem-box {
  background: rgba(0, 128, 128, 0.12) !important;
  border-left: 4px solid var(--scroll-progress-color) !important;
  padding: 14px 18px !important;
  border-radius: 8px !important;
  margin: 15px 0 20px 0 !important;
}

.problem-box p {
  color: var(--text-primary) !important;
  font-size: 1.05rem !important;
  font-weight: 500 !important;
}

.modal-fix-title {
  color: var(--scroll-progress-color) !important;
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  margin: 18px 0 10px 0 !important;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 6px;
}

/* Code Snippet Box & Micro Copy Button */
.code-snippet-box {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  background: rgba(0, 0, 0, 0.6) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 6px !important;
  padding: 6px 12px !important;
  margin: 6px 0 !important;
  max-width: 100% !important;
  gap: 15px !important;
}

[data-theme="light"] .code-snippet-box {
  background: #f1f5f9 !important;
  border-color: rgba(0, 0, 0, 0.15) !important;
}

.code-text-content {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace !important;
  color: #2dd4bf !important;
  font-size: 0.9rem !important;
  word-break: break-all;
}

[data-theme="light"] .code-text-content {
  color: #0f766e !important;
}

.copy-code-btn {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-secondary) !important;
  cursor: pointer !important;
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  padding: 3px 8px !important;
  border-radius: 4px !important;
  transition: all 0.2s ease !important;
  flex-shrink: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
}

.copy-code-btn:hover {
  color: var(--text-primary) !important;
  background: var(--accent-color) !important;
  border-color: var(--accent-color) !important;
}

.copy-code-btn.copied {
  background: #10b981 !important;
  color: #ffffff !important;
  border-color: #10b981 !important;
}

/* ========================================================
   === CATEGORY PILL BUTTONS POLISH & DUPLICATE TEXT FIX ===
   ======================================================== */

.category-filters {
  display: flex !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
  margin-top: 15px !important;
}

/* Ensure only button elements are visible and styled as pills */
.category-filters .category-btn {
  padding: 8px 18px !important;
  background: var(--card-bg) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-secondary) !important;
  border-radius: 20px !important;
  cursor: pointer !important;
  font-weight: 600 !important;
  font-size: 0.9rem !important;
  transition: all 0.25s ease !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

.category-filters .category-btn:hover {
  background: var(--hover-bg) !important;
  color: var(--text-primary) !important;
  border-color: var(--accent-color) !important;
  transform: translateY(-2px) !important;
}

.category-filters .category-btn.active {
  background: var(--accent-color) !important;
  color: #ffffff !important;
  border-color: var(--accent-color) !important;
  box-shadow: 0 4px 12px rgba(0, 128, 128, 0.4) !important;
}

/* Safety rule: Hide any raw text nodes directly inside category-filters */
.category-filters {
  font-size: 0 !important; /* Hides raw text node artifacts */
}

.category-filters button {
  font-size: 0.9rem !important; /* Restores button text size */
}

/* === Phase 4: Copy All Steps & Related Notes UI === */
.copy-all-btn {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.copy-all-btn:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.copy-all-btn.copied {
  background: #10b981;
  border-color: #10b981;
  color: #ffffff;
}

.modal-related-notes {
  margin-top: 30px;
  border-top: 1px solid var(--border-color);
  padding-top: 25px;
}

.related-notes-title {
  font-size: 1.15rem;
  color: var(--text-primary);
  margin: 0 0 15px 0;
  font-weight: 700;
}

.related-notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.related-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.related-card:hover {
  border-color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.related-card h5 {
  margin: 0 0 8px 0;
  font-size: 1rem;
  color: var(--text-primary);
  line-height: 1.3;
}

.related-card p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Phase 4: Highlight.js Code Snippet Updates */
.code-snippet-box pre {
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  flex-grow: 1;
  overflow-x: auto;
}

.code-snippet-box code {
  background: transparent !important;
  padding: 0 !important;
  font-size: 0.9rem !important;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace !important;
}

/* === Phase 8: Print & PDF Export Styles === */
@media print {
  body * {
    visibility: hidden;
  }
  .modal-overlay.active,
  .modal-overlay.active .modal-content,
  .modal-overlay.active .modal-content * {
    visibility: visible;
  }
  .modal-overlay {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: auto !important;
    background: white !important;
    backdrop-filter: none !important;
    display: block !important;
  }
  .modal-content {
    box-shadow: none !important;
    border: none !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    background: white !important;
    color: black !important;
    max-height: none !important;
    overflow: visible !important;
  }
  .close-modal-btn,
  .copy-all-btn,
  .copy-code-btn,
  .modal-related-notes,
  #copyLinkBtn,
  #printNoteBtn {
    display: none !important;
  }
  .problem-box {
    background: #f0f0f0 !important;
    border-left: 4px solid #008080 !important;
    color: black !important;
  }
  .problem-box p, .modal-fix-title, .modal-steps-list li {
    color: black !important;
  }
  .code-snippet-box {
    background: #f8f9fa !important;
    border: 1px solid #ddd !important;
  }
  .code-text-content, .code-snippet-box code {
    color: #333 !important;
  }
}

/* === Phase 9: Bookmarks & Helpful Feedback Styles === */
.card-bookmark-btn, .modal-bookmark-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1.1rem;
  transition: color 0.2s, transform 0.2s;
  padding: 4px;
}

.card-bookmark-btn:hover, .modal-bookmark-btn:hover {
  color: var(--accent-color);
  transform: scale(1.1);
}

.card-bookmark-btn.bookmarked i, .modal-bookmark-btn.bookmarked i {
  font-weight: 900;
  color: #f59e0b;
}

.helpful-btn:hover {
  border-color: var(--accent-color);
  color: var(--accent-color) !important;
}

.helpful-btn.voted {
  background: rgba(0, 128, 128, 0.15) !important;
  border-color: var(--accent-color) !important;
  color: var(--accent-color) !important;
}


/* === Phase 10A: Tag Pills & Search Highlighting === */
.note-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 10px;
}

.tag-pill {
  font-size: 0.72rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 2px 8px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tag-pill:hover {
  background: var(--accent-color);
  color: #ffffff;
  border-color: var(--accent-color);
}

mark {
  background: rgba(0, 128, 128, 0.4);
  color: inherit;
  padding: 0 2px;
  border-radius: 2px;
}

[data-theme="light"] mark {
  background: rgba(0, 115, 115, 0.25);
}
