/* ===== Section Background Colors for Contrast for about, blog, work, game, FAQ, contact ===== line-332*/

/* ===== Variables & Themes ===== */
:root {
  /* Light theme variables */
  --primary: #2d3a4b;
  --primary-hover: #1e2a3a;
  --text: #2d3a4b;
  --text-secondary: #6b7280;
  --text-light: #9ca3af;
  --text-on-primary: #ffffff;
  --background: #ffffff;
  --card-bg: #f8fafc;
  --border: #e2e8f0; 
  --accent: #3b82f6; 
  --accent-hover: #2563eb; 
  --success: #10b981;
  --error: #ef4444;
  --warning: #f59e0b;
  --shadow: rgba(0, 0, 0, 0.1);
  --shadow-hover: rgba(0, 0, 0, 0.15);
}



/* ===== Global Styles ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Roboto', Arial, sans-serif;
  background-color: var(--background);
  color: var(--text);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden; /* prevent horizontal scrolling */
  padding-top: 80px; /* Account for fixed header */
}

html {
  scroll-behavior: smooth;
  transition: background-color 0.4s ease, color 0.4s ease;
  overflow-x: hidden;
}

/* ===== Header ===== */
header {
  background-color: var(--primary);
  color: #fff;
  padding: 1rem 2rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Site logo */
.site-logo {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.25rem;
}

.site-logo img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.2));
}

.logo-text {
  color: #ffffff;       
    letter-spacing: 0px;  
    font-size: 25px;      
    /* font-weight: bold;  */
}

header h1 {
  margin: 0 0 0.5rem;
  font-size: 2.5rem;
  letter-spacing: 1px;
  font-weight: 700;
}

header p {
  margin: 0 auto;
  font-size: 1.1rem;
  color: var(--text-light);
  max-width: 600px;
}

/* ===== Header Right Side Container ===== */
.header-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* ===== Navigation ===== */
nav {
  margin: 0;
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* Mobile nav */
.nav-toggle {
  position: absolute;
  left: 58px;
  top: 12px;
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 8px;
  padding: 0.3rem 0.5rem;
  cursor: pointer;
  display: none;
}

@media (max-width: 720px) {
  nav {
    display: none;
  }
  nav.open {
    display: flex;
  }
  .nav-toggle { display: inline-block; }
}

nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  padding: 0.5rem 1.2rem;
  border-radius: 20px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

nav a.active,
nav a:hover {
  background-color: var(--accent);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(79, 140, 255, 0.3);
}

/* Focus styles - keyboard navigation */
nav a:focus-visible,
.card a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

nav a:focus:not(:focus-visible),
.card a:focus:not(:focus-visible) {
  outline: none;
}

/* ===== Hero (Home) ===== */
.hero {
  background: linear-gradient(180deg, rgba(79,140,255,0.15), rgba(79,140,255,0.05));
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 2rem 1.25rem;
  margin-bottom: 1.25rem;
}

.hero-content { text-align: center; max-width: 1200px; margin: 0 auto; }
.hero-title { margin: 0 0 0.5rem; font-size: 2.2rem; color: var(--primary); }
.hero-subtitle { margin: 0 auto 1rem; color: var(--text-secondary); max-width: 720px; }
.hero-actions { display: flex; justify-content: center; gap: 0.75rem; flex-wrap: wrap; }

@media (max-width: 600px) {
  header {
    padding: 0.75rem 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .header-right {
    width: 100%;
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 0.75rem;
  }

  .searchbar {
    flex-direction: column;
    align-items: stretch;
    padding: 0;
  }

  .searchbar .btn {
    width: 100%;
  }

  .hero-title {
    font-size: 1.7rem;
  }
}

/* ===== Theme Toggle Button ===== */
/* Theme Toggle */


/* Scroll progress */
.scroll-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,0.25); }
.scroll-progress .bar { height: 100%; width: 0%; background: #fff; transition: width 0.1s linear; }



/* ===== Search Bar ===== */
.searchbar {
  margin: 1rem auto 0;
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  max-width: 720px;
  padding: 0 1rem;
}

.input-search {
  flex: 1;
  min-width: 220px;
}

.search-results {
  position: fixed;
  top: 100px; /* Below the fixed header */
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 1280px;
  max-height: 70vh;
  overflow-y: auto;
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  padding: 1rem;
  z-index: 999;
  backdrop-filter: blur(10px);
  animation: searchResultsSlideIn 0.3s ease-out;
}

@keyframes searchResultsSlideIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.search-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  position: sticky;
  top: 0;
  background-color: var(--card-bg);
  padding: 0.5rem 0;
  z-index: 1;
}

.results-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.result-item {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
}

.result-item:hover {
  background-color: rgba(79, 140, 255, 0.08);
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.result-item::after {
  content: 'Click to read more →';
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary);
  font-size: 0.85rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.result-item:hover::after {
  opacity: 1;
}

.result-item .where {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ===== Main Content & Sections ===== */
main {
  width: 100%;
  max-width: none;
  margin: 2rem 0;
  padding: 0;
}

/* Single-page layout: all sections visible; rely on smooth scroll */
section {
  display: block;
  animation: fadeIn 0.5s ease-out;
  scroll-margin-top: 80px; /* offset for header */
  padding: 1.25rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  margin-bottom: 1.25rem;
}

/* Full-bleed sections requested */
#home,
#blogs,
#work,
#games,
#faq,
#contact {
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  border-radius: 0;
}

section h2 {
  color: var(--primary);
  font-size: 2rem;
  margin-bottom: 1.5rem;
  text-align: center;
  position: relative;
}

section h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

/* ===== Section Background Colors for Contrast ===== */
#home {
  background: linear-gradient(135deg, #fcf9f8 0%, #f0e2e2 100%);
  border-bottom: 3px solid #d8e1f0;
}

#blogs {
  background: linear-gradient(135deg, #fcf9f8 0%, #f0e2e2 100%);
  border-bottom: 3px solid #d8e1f0;
}

#work {
  background: linear-gradient(135deg, #fcf9f8 0%, #f0e2e2 100%);
  border-bottom: 3px solid #d8e1f0;
}

#games {
  background: linear-gradient(135deg, #fcf9f8 0%, #f0e2e2 100%);
  border-bottom: 3px solid #d8e1f0;
}

#faq {
  background: linear-gradient(135deg, #fcf9f8 0%, #f0e2e2 100%);
  border-bottom: 3px solid #d8e1f0;
}

#contact {
  background: linear-gradient(135deg, #fcf9f8 0%, #f0e2e2 100%);
  border-bottom: 3px solid #d8e1f0;
}

/* Games section constrained within main width */
#games { 
  border: none; 
  box-shadow: none; 
  background: linear-gradient(135deg, #fefce8 0%, #fef3c7 100%);
  border-bottom: 3px solid #f59e0b;
  padding-left: 0; 
  padding-right: 0; 
}

/* ===== Card Grid & Cards ===== */
.card-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.card {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 1.5rem;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  min-height: 200px;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  transform: scaleX(0);
  transition: transform 0.3s ease;
  transform-origin: left center;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(44, 62, 80, 0.15);
  border-color: var(--accent);
}

.card:hover::before {
  transform: scaleX(1);
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.3rem;
  color: var(--accent);
  font-weight: 600;
}

.card .meta {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.8rem;
  font-style: italic;
}

.card p {
  flex-grow: 1;
  margin: 0 0 1rem;
  color: var(--primary);
  line-height: 1.6;
}

.card a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  margin-top: auto;
  align-self: flex-start;
  transition: all 0.3s ease;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  background: rgba(79, 140, 255, 0.1);
}



.card a:hover {
  background: var(--accent);
  color: #fff;
  transform: translateX(5px);
}

/* Clarify action links on cards */
.card a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.card a::after {
  content: '→';
  transition: transform 0.2s ease;
}
.card a:hover::after { transform: translateX(3px); }

/* ===== Games Section ===== */
.games-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.games-top-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.typing-race-full-width {
  grid-column: 1 / -1;
}

.game-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 6px 20px var(--shadow);
  padding: 1.25rem;
}

/* Unified game layout */
.game-card { display: block; }
.game-card .game-body { display: grid; grid-template-columns: 1fr; gap: 0.75rem; }
.game-card .leaderboard { margin-top: 0.75rem; }
.game-card h4 { margin: 0.5rem 0 0.25rem; }

/* Responsive adjustments for games */
@media (max-width: 768px) {
  .games-top-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .games-grid {
    gap: 1rem;
  }
  
  .game-card {
    padding: 1rem;
  }
}

/* Typing Race */
.typing-text { background: rgba(79,140,255,0.08); border: 1px dashed var(--border); border-radius: 8px; padding: 0.6rem; min-height: 64px; }
.typing-text .ok { color: #16a34a; }
.typing-text .bad { color: #dc2626; text-decoration: underline; }
.typing-text .word { display: inline-block; padding: 0.1rem 0.2rem; border-bottom: 2px solid transparent; border-radius: 4px; transition: background 0.2s, border-color 0.2s; }
.typing-text .word.current { border-color: #4f8cff; background: rgba(79,140,255,0.18); }
.typing-text .word.bad.current { border-color: #dc2626; }
.typing-input { width: 100%; margin-top: 0.6rem; }
.typing-stats { display: flex; gap: 1rem; align-items: center; }

.game-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin: 0.75rem 0 1rem 0;
}

/* Larger click/guess targets */
#reactionStart, #reactionSave, #guessNew, #guessSubmit, #guessSave, #typingStart, #typingSave {
  padding: 0.8rem 1.25rem;
  font-size: 1.05rem;
}

#guessInput {
  flex: 1 1 260px;
  min-width: 240px;
}

.btn {
  background-color: var(--accent);
  color: #fff;
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn.small {
  padding: 0.4rem 0.7rem;
  font-size: 0.9rem;
}

.btn.secondary {
  background-color: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn.danger {
  background-color: #dc2626;
  color: #fff;
  border: 1px solid #dc2626;
}

.btn.danger:hover {
  background-color: #b91c1c;
  border-color: #b91c1c;
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.35);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(79, 140, 255, 0.35);
}

/* Inputs */
.input {
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background-color: var(--card-bg);
  color: var(--primary);
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

/* ===== Reaction Game Panel ===== */
.reaction-panel {
  height: 110px;
  border-radius: 12px;
  border: 1px dashed var(--border);
  display: grid;
  place-items: center;
  font-size: 1rem;
  width: 100%;
  user-select: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.reaction-panel.wait {
  background-color: #fbeecc;
  color: #7a5e00;
}

.reaction-panel.ready {
  background-color: #dcfce7;
  color: #14532d;
}



/* Leaderboard Table */
.leaderboard {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.leaderboard th,
.leaderboard td {
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.leaderboard th {
  color: var(--text-secondary);
  font-weight: 600;
  background-color: var(--card-bg);
}

/* Leaderboard top 3 styling */
.leaderboard .gold { background: #fff9db; }
.leaderboard .silver { background: #eef1f7; }
.leaderboard .bronze { background: #f6ebe0; }
.leaderboard .medal {
  font-size: 1.1rem;
  margin-right: 0.4rem;
}

/* Limit table body height and allow scroll for remaining rows */
.leaderboard tbody {
  display: block;
  max-height: 132px; /* ~3 rows visible */
  overflow-y: auto;
  scrollbar-width: thin;
}
.leaderboard, .leaderboard tbody { overflow-x: hidden; }
.leaderboard thead, .leaderboard tbody tr {
  display: table;
  width: 100%;
  table-layout: fixed;
}

/* Subtle fade at bottom to hint scroll */
.leaderboard tbody::-webkit-scrollbar { height: 6px; width: 6px; }
.leaderboard tbody::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.leaderboard tbody {
  -webkit-mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
          mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
}

/* ===== Modal Styles ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 1000;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  width: min(720px, 95vw);
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 1.2rem 1rem 1rem;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: transparent;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--primary);
  transition: color 0.3s ease;
}

.modal-close:hover {
  color: var(--accent);
}

.modal-body {
  margin-top: 0.5rem;
  color: var(--primary);
}

/* ===== Back to Top Button ===== */
.back-to-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background-color: var(--accent);
  color: #fff;
  box-shadow: 0 8px 20px rgba(79, 140, 255, 0.35);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 900;
  transition: background-color 0.3s ease;
}

.back-to-top.show {
  display: inline-flex;
}

.back-to-top:hover {
  background-color: var(--accent-hover);
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  background: var(--card-bg);
  color: var(--primary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.6rem 0.9rem;
  box-shadow: var(--shadow);
  display: none;
  z-index: 1000;
}
.toast.show { display: block; }

.contact-quick { margin-top: 0.8rem; display: flex; align-items: center; gap: 0.6rem; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 1rem; align-items: start; }
.contact-card, .contact-info-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; padding: 1.25rem; box-shadow: var(--shadow); }
.contact-card h3 { margin: 0 0 0.5rem; }
.contact-form .field { display: grid; gap: 0.35rem; margin-bottom: 0.7rem; }
.contact-form textarea { resize: vertical; }
.form-actions { display: flex; align-items: center; gap: 0.75rem; margin-top: 0.6rem; }
.form-status { color: var(--text-secondary); }
.contact-list { list-style: none; padding: 0; margin: 0.4rem 0 0; display: grid; gap: 0.5rem; }
.contact-list .ci { width: 1.4rem; display: inline-block; }
.contact-info-card .social-icons a {
  color: var(--primary);
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
}
.contact-info-card .social-icons a:hover {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* ===== Social Footer ===== */
.site-footer {
  background: var(--primary);
  color: #fff;
  padding: 2.5rem 0 1.5rem;
  margin-top: 3rem;
}

.footer-inner { max-width: 1280px; margin: 0 auto; padding: 0 1rem; }
.footer-brand { margin-bottom: 1rem; }
.footer-tag { color: var(--text-light); margin: 0.4rem 0 1rem; }

.footer-columns { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 1rem; align-items: start; }
.footer-col h4 { margin: 0 0 0.5rem; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin: 0.35rem 0; }
.footer-col a { color: #fff; text-decoration: none; opacity: 0.9; }
.footer-col a:hover { text-decoration: underline; opacity: 1; }

.social-icons { display: flex; gap: 0.8rem; }
.social-icons a { color: #fff; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: rgba(255,255,255,0.15); transition: transform 0.2s ease, background 0.2s ease; }
.social-icons a:hover { transform: translateY(-2px); background: var(--accent); }

.newsletter { display: flex; gap: 0.5rem; }
.newsletter .input { background: #fff; color: #222; }
.muted { color: var(--text-light); }

.footer-legal { display: flex; gap: 0.6rem; align-items: center; justify-content: center; margin-top: 1.2rem; color: var(--text-light); }
.footer-legal a { color: #fff; text-decoration: none; }
.footer-legal .sep { opacity: 0.7; }

.site-footer .site-logo { position: static; color: #fff; }
.site-footer .site-logo img { width: 28px; height: 28px; }

@media (max-width: 900px) {
  .footer-columns { grid-template-columns: 1fr; }
}

/* ===== About Section ===== */
.about {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 2.5rem 2rem;
  margin-bottom: 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.about::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200px;
  height: 200px;
  background: linear-gradient(45deg, rgba(79, 140, 255, 0.1), rgba(79, 140, 255, 0.05));
  border-radius: 50%;
  z-index: 0;
}

.about > * {
  position: relative;
  z-index: 1;
}

.about img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1.5rem;
  border: 4px solid var(--accent);
  box-shadow: 0 4px 15px rgba(79, 140, 255, 0.3);
  transition: transform 0.3s ease;
}

.about img:hover {
  transform: scale(1.05);
}

.about h2 {
  color: var(--primary);
  margin-bottom: 1rem;
  font-size: 1.8rem;
}

.about p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.about ul {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  color: var(--accent);
  font-size: 1.1rem;
}

.about li {
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.about li b {
  color: var(--primary);
}

/* ===== Testimonials ===== */
.testimonials {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.testimonial {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 1rem;
}

.testimonial .quote {
  font-style: italic;
  margin: 0 0 0.8rem;
}

.testimonial .person {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.testimonial .person img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.testimonial .role {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ===== FAQ Section ===== */
.faq details {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.6rem 0.8rem;
  margin-bottom: 0.6rem;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
}

.faq .content {
  color: var(--text-secondary);
  margin-top: 0.5rem;
  font-size: 0.95rem;
}

/* ===== Animations ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Content Page Overlay ===== */
.content-page-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.content-page-overlay.show {
  opacity: 1;
  visibility: visible;
}

.content-page {
  background: var(--card-bg);
  color: var(--primary);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.content-page-overlay.show .content-page {
  transform: translateY(0);
}

.content-page-header {
  padding: 2rem 2rem 1rem;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.content-page-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: all 0.2s ease;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.content-page-close:hover {
  background: var(--border);
  color: var(--text);
}

.content-page-header h2 {
  margin: 0 0 0.5rem;
  color: var(--primary);
  font-size: 1.8rem;
}

.content-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-style: italic;
}

.content-page-body {
  padding: 2rem;
  color: var(--primary);
}

.content-page-body p {
  margin: 0 0 1.25rem;
  line-height: 1.7;
  color: var(--primary);
  font-size: 1.05rem;
}

.content-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* Responsive adjustments for content page */
@media (max-width: 768px) {
  .content-page {
    margin: 1rem;
    max-height: calc(100vh - 2rem);
  }
  
  .content-page-header,
  .content-page-body {
    padding: 1.5rem;
  }
  
  .content-actions {
    flex-direction: column;
  }
  
  .content-page-header h2 {
    font-size: 1.5rem;
    padding-right: 3rem;
  }
}

/* Resources Section */
.course-selection {
  margin-bottom: 2rem;
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 1.5rem;
}

.semester-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.course-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border-color);
}

.course-section-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-color);
  margin: 0;
}

.course-section-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.add-course-btn {
  background: var(--accent-color);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.add-course-btn:hover {
  background: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.add-course-btn:active {
  transform: translateY(0);
}

.back-btn {
  background: var(--text-muted);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.back-btn:hover {
  background: #6b7280;
  transform: translateY(-1px);
}

.course-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
  position: relative;
  overflow: hidden;
}

.course-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-color), #8ab4ff);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.course-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
  border-color: var(--accent-color);
}

.course-card:hover::before {
  transform: scaleX(1);
}

.course-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.course-header h4 {
  margin: 0;
  color: var(--text-color);
  font-size: 1.3rem;
  font-weight: 600;
}

.course-badge {
  background: var(--accent-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
}

.course-stats {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stat-icon {
  font-size: 1.1rem;
  opacity: 0.8;
}

.stat-value {
  font-weight: 600;
  color: var(--text-color);
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.course-preview {
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
}

.course-preview p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-style: italic;
}

.course-content {
  margin-top: 2rem;
}

.course-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.course-header h3 {
  margin: 0;
  color: var(--text-color);
}

.semester-selection {
  margin-bottom: 2rem;
}

.semester-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.semester-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
  position: relative;
  overflow: hidden;
}

.semester-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #4ade80, #22c55e);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.semester-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
  border-color: #4ade80;
}

.semester-card:hover::before {
  transform: scaleX(1);
}

.semester-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.semester-header h5 {
  margin: 0;
  color: var(--text-color);
  font-size: 1.1rem;
  font-weight: 600;
}

.semester-badge {
  background: #4ade80;
  color: white;
  padding: 0.2rem 0.6rem;
  border-radius: 16px;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
}

.semester-stats {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.semester-stat-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.semester-stat-icon {
  font-size: 1rem;
  opacity: 0.8;
}

.semester-stat-value {
  font-weight: 600;
  color: var(--text-color);
  font-size: 0.9rem;
}

.semester-stat-label {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.semester-preview {
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
}

.semester-preview p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-style: italic;
}

.semester-content {
  margin-top: 2rem;
}

.semester-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.semester-header h4 {
  margin: 0;
  color: var(--text-color);
}

.materials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.material-category {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
}

.material-category.full-width {
  grid-column: 1 / -1;
}

.material-category h5 {
  margin: 0 0 1rem 0;
  color: var(--text-color);
  font-size: 1.1rem;
}

.material-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.material-list {
  min-height: 100px;
  max-height: 300px;
  overflow-y: auto;
}

.material-item {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
}

.material-item:hover {
  border-color: var(--accent-color);
}

.material-item h6 {
  margin: 0 0 0.5rem 0;
  color: var(--text-color);
  font-size: 1rem;
}

.material-item p {
  margin: 0 0 0.5rem 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.material-item .material-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.material-item .material-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.material-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.material-form .input {
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: var(--bg-color);
  color: var(--text-color);
}

.material-form textarea.input {
  resize: vertical;
  min-height: 60px;
}

.material-form .btn {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

/* File Management Styles */
.file-upload-area {
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  margin-bottom: 1rem;
}

.file-upload-area:hover,
.file-upload-area.dragover {
  border-color: var(--accent-color);
  background: rgba(var(--accent-color-rgb), 0.05);
}

.file-input {
  position: relative;
}

.file-input input[type="file"] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.file-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: var(--text-muted);
}

.file-icon {
  font-size: 2rem;
}

.file-list {
  max-height: 300px;
  overflow-y: auto;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 0.5rem;
}

.file-icon-small {
  font-size: 1.5rem;
}

.file-info {
  flex: 1;
}

.file-info h6 {
  margin: 0 0 0.25rem 0;
  color: var(--text-color);
  font-size: 0.9rem;
}

.file-details {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.file-actions {
  display: flex;
  gap: 0.5rem;
}

.btn.small {
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
}

.empty-state p {
  margin: 0.5rem 0;
}

/* Completed Assignment State */
.material-item.completed {
  opacity: 0.7;
  background: rgba(var(--accent-color-rgb), 0.05);
}

.material-item.completed h6 {
  text-decoration: line-through;
}

/* Animation for slide in */
@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .course-grid,
  .semester-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .materials-grid {
    grid-template-columns: 1fr;
  }
  
  .course-header,
  .semester-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .course-section-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .course-section-actions {
    width: 100%;
    justify-content: space-between;
  }

  .add-course-btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }

  .back-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .course-card,
  .semester-card {
    padding: 1rem;
  }

  .course-header h4 {
    font-size: 1.1rem;
  }

  .semester-header h5 {
    font-size: 1rem;
  }

  .course-stats,
  .semester-stats {
    gap: 0.5rem;
  }

  .stat-item,
  .semester-stat-item {
    font-size: 0.85rem;
  }
}

.search-filter-controls {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.search-filter-controls .input {
  flex: 1;
  min-width: 200px;
}

.search-filter-controls select.input {
  min-width: 150px;
}

.search-filter-controls .btn {
  white-space: nowrap;
}

@media (max-width: 768px) {
  .search-filter-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-filter-controls .input,
  .search-filter-controls select.input {
    min-width: auto;
  }
}

.progress-stats {
  padding: 1rem 0;
}

.progress-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.progress-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-align: center;
}

.progress-icon {
  font-size: 1.5rem;
  opacity: 0.8;
}

.progress-info {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.progress-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
}

.progress-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.completion-bar {
  margin-top: 1rem;
}

.completion-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.completion-track {
  width: 100%;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.completion-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  border-radius: 4px;
  transition: width 0.3s ease;
}

@media (max-width: 768px) {
  .progress-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .progress-item {
    padding: 0.75rem;
  }
  
  .progress-icon {
    font-size: 1.25rem;
  }
  
  .progress-value {
    font-size: 1.1rem;
  }
}

.data-controls {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.data-controls .btn {
  white-space: nowrap;
}

.data-info {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.4;
}

.data-info small {
  opacity: 0.8;
}

@media (max-width: 768px) {
  .data-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .data-controls .btn {
    width: 100%;
  }
}

/* Notification System */
.notification-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 400px;
}

.notification {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateX(100%);
  opacity: 0;
  animation: slideIn 0.3s ease forwards;
  position: relative;
  overflow: hidden;
}

.notification.success {
  border-left: 4px solid #10b981;
}

.notification.error {
  border-left: 4px solid #ef4444;
}

.notification.info {
  border-left: 4px solid #3b82f6;
}

.notification.warning {
  border-left: 4px solid #f59e0b;
}

.notification-content {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.notification-icon {
  font-size: 1.25rem;
  margin-top: 0.125rem;
}

.notification-message {
  flex: 1;
  color: var(--text);
  line-height: 1.4;
}

.notification-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.notification-close:hover {
  background: var(--border);
  color: var(--text);
}

.notification-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--accent);
  animation: progressBar 5s linear forwards;
}

@keyframes slideIn {
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

@keyframes progressBar {
  from {
    width: 100%;
  }
  to {
    width: 0%;
  }
}

.notification.removing {
  animation: slideOut 0.3s ease forwards;
}

@media (max-width: 768px) {
  .notification-container {
    left: 20px;
    right: 20px;
    max-width: none;
  }
}

/* Help Section */
.help-content {
  padding: 1rem 0;
}

.shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.shortcut-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.shortcut-item kbd {
  background: var(--primary);
  color: var(--text-on-primary);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  font-weight: 600;
  min-width: 80px;
  text-align: center;
}

.shortcut-item span {
  color: var(--text);
  font-size: 0.9rem;
}

.help-tip {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(147, 197, 253, 0.1));
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 8px;
  padding: 1rem;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.5;
}

.help-tip strong {
  color: var(--accent);
}

.help-tip kbd {
  background: var(--primary);
  color: var(--text-on-primary);
  padding: 0.125rem 0.375rem;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  font-weight: 600;
}

@media (max-width: 768px) {
  .shortcuts-grid {
    grid-template-columns: 1fr;
  }
  
  .shortcut-item {
    padding: 0.5rem;
  }
  
  .shortcut-item kbd {
    min-width: 70px;
    font-size: 0.8rem;
  }
}

/* Smooth theme transitions */
* {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* ===== Print: keep headings with following content ===== */
@media print {
  header, nav, .searchbar, .site-footer, .scroll-progress, .notification-container { display: none !important; }
  body { color: #000; }
  section { display: block !important; break-inside: avoid; page-break-inside: avoid; }
  h1, h2, h3, h4, h5, h6 {
    break-after: avoid;
    page-break-after: avoid;
  }
  h2 + *, h3 + *, h4 + *, h5 + *, h6 + * {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .card, .about, .game-card, .course-card, .semester-card, .material-category {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

/* ===== Go to Top Button ===== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  z-index: 1000;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.back-to-top:active {
  transform: translateY(0);
}

@media (max-width: 768px) {
  .back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 45px;
    height: 45px;
  }
  
  header {
    padding: 0.75rem 1rem;
    flex-direction: column;
    gap: 1rem;
  }
  
  .header-right {
    flex-direction: column;
    gap: 1rem;
    width: 100%;
  }
  
  body {
    padding-top: 120px; /* More space for mobile header */
  }
  
  nav {
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .search-results {
    top: 140px; /* More space for mobile header */
    width: 95%;
    max-height: 60vh;
  }
}

/* ===== Content Page Styles ===== */
.content-page-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.content-page-overlay.show {
  opacity: 1;
  visibility: visible;
}

.content-page {
  background: #ffffff;
  color: #333333;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.content-page-overlay.show .content-page {
  transform: scale(1);
}

.content-page-header {
  padding: 2rem 2rem 1rem;
  border-bottom: 1px solid #e0e0e0;
  position: relative;
}

.content-page-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #333333;
  padding: 0.5rem;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

.content-page-close:hover {
  background: #f0f0f0;
}

.content-type-badge {
  display: inline-block;
  background: #3b82f6; 
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
}

.content-page-header h2 {
  margin: 0 0 0.5rem 0;
  color: #333333;
  font-size: 1.75rem;
  line-height: 1.3;
}

.content-meta {
  color: #666666;
  font-size: 0.9rem;
  margin-bottom: 0;
}

.content-page-body {
  padding: 1rem 2rem 2rem;
  overflow-y: auto;
  flex: 1;
}

.content-text {
  line-height: 1.7;
  color: #333333;
}

.content-text h2 {
  color: #3b82f6;
  margin: 1rem 0 0.75rem 0;
  font-size: 1.5rem;
  border-bottom: 2px solid #9e9e9e;
  padding-bottom: 0.5rem;
}

.content-text h3 {
  color: #3b82f6;
  margin: 1rem 0 0.5rem 0;
  font-size: 1.25rem;
}

.content-text h4 {
  color: #3b82f6;
  margin: 0.75rem 0 0.5rem 0;
  font-size: 1.1rem;
}

.content-text p {
  margin: 1rem 0;
  color: #333333;
}

.content-text ul, .content-text ol {
  margin: 1rem 0;
  padding-left: 2rem;
}

.content-text li {
  margin: 0.5rem 0;
  color: #333333;
}

.content-text strong {
  color: #333333;
  font-weight: 600;
}

.content-text pre {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 1rem;
  overflow-x: auto;
  margin: 1rem 0;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  color: #333333;
}

.content-text code {
  background: #f8f9fa;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  color: #333333;
}

.content-actions {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e0e0e0;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.content-actions .btn {
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
}

/* Responsive design for content page */
@media (max-width: 768px) {
  .content-page-overlay {
    padding: 1rem;
  }
  
  .content-page {
    max-height: 95vh;
  }
  
  .content-page-header {
    padding: 1.5rem 1.5rem 1rem;
  }
  
  .content-page-header h2 {
    font-size: 1.5rem;
    padding-right: 3rem;
  }
  
  .content-page-body {
    padding: 1.5rem;
  }
  
  .content-actions {
    flex-direction: column;
  }
  
  .content-actions .btn {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .content-page-overlay {
    padding: 0.5rem;
  }
  
  .content-page-header {
    padding: 1rem 1rem 0.75rem;
  }
  
  .content-page-header h2 {
    font-size: 1.25rem;
  }
  
  .content-page-body {
    padding: 1rem;
  }
  
  .content-text h2 {
    font-size: 1.25rem;
  }
  
  .content-text h3 {
    font-size: 1.1rem;
  }
}