:root {
  /* ===== Primary Theme Colors ===== */
  --primary: #6a0dad;
  --primary-light: #a16eff;
  --secondary: #00c896;
  --light-gray: #dee2ec;
  --medium-gray: #b4b8c5;
  --dark-gray: #505468;
  --dark: #1b1d2a;
  --code-text: #e0e2ff;
  --sidebar-width: 380px;
  --header-height: 70px;

  /* ===== Navbar Colors ===== */
  --navbar-bg: #1f2235;
  --navbar-text: #ffffff;
  --navbar-hover: #a16eff;

  /* ===== Header Colors ===== */
  --header-bg: #2a2d42;
  --header-text: #e3e6ed;
  --header-shadow: rgba(0, 0, 0, 0.2);

  /* ===== Footer Colors ===== */
  --footer-bg: #12141f;
  --footer-text: #9fa3b9;
  --footer-link: #00c896;

  /* ===== Glow Effect ===== */
  --glow: 0 0 10px rgba(161, 110, 255, 0.5);
}

/* ===== Navbar Style ===== */
.navbar {
  background-color: var(--navbar-bg);
  color: var(--navbar-text);
  padding: 1rem 2rem;
  box-shadow: 0 2px 4px var(--header-shadow);
}

.navbar a {
  color: var(--navbar-text);
  text-decoration: none;
  margin: 0 1rem;
  transition: 0.3s;
}

.navbar a:hover {
  color: var(--navbar-hover);
  text-shadow: var(--glow);
}

* {
  box-sizing: border-box;
  font-weight: 400;


}

p {
  color: #163849;
  font-size: 110%;
}

.container {
  width: 100%;
  max-width: 1450px !important;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  height: var(--header-height);
  display: flex;
  align-items: center;
  background-color: #c7ccd8de;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

body {
  padding-top: var(--header-height);
  font-family: 'Times New Roman', Times, serif
}

.header-content {
  width: 100%;
  max-width: 1630px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-icon {
  left: 5%;
  font-size: 2rem;
  color: var(--primary);
  margin-right: 25px;
  margin-left: 10px;
}

.logo-text {
  font-size: 2.2rem;
  font-weight: 700;
  color: rgb(73, 69, 78);
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-right: 1%;
}

.header-btn {
  background: none;
  border: none;
  font-size: 1.7rem;
  color: var(--dark-gray);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 59px;
  height: 59px;
  border-radius: 50%;
}

#treeToggleBtn i {
  pointer-events: none;
}

.header-btn:hover {
  background-color: var(--medium-gray);
  color: var(--primary);
}

/* Main Content */
main {
  padding: 2rem 0;
  margin-left: var(--sidebar-width);
  transition: margin-left 0.3s ease;
}

main.full-width {
  margin-left: 0;
}

.hero {
  background: #ffffff;
  width: 99% !important;
  margin: auto auto 5% auto !important;
  position: relative;
  overflow: hidden;
  padding: 3rem 2rem;
  color: #111;
  background-size: cover;
  border-top: 2px inset rgb(170, 140, 221);
  border-bottom: 5px inset rgb(123, 87, 185);
  border-bottom-left-radius: 140px;
  border-bottom-right-radius: 10px;
}

.hero-content {
  max-width: 950px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  font-weight: 700 !important;
  color: var(--primary-light);

}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  margin-top: 1rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 1.2rem 6rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.dark-mode .btn-primary {
  background-color: rgba(95, 71, 71, 0.248);
  color: var(--primary);
}

.dark-mode .btn-primary:hover {
  background-color: rgba(194, 108, 108, 0.692);
  transform: translateY(-3px);
}


/* Interactive Code Editor Section */
.editor-container {
  background-color: rgba(255, 255, 255);
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  margin-bottom: 3rem;
  border: 1px solid var(--medium-gray);
  max-height: 1000px;
  overflow: auto;

}

.editor-header {
  padding: 0.5rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 8px 8px 0 0;
  border: 1px solid var(--medium-gray);
}

.editor-dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot.red {
  background-color: #ff5f56;
}

.dot.yellow {
  background-color: #ffbd2e;
}

.dot.green {
  background-color: #27c93f;
}

.language-select {
  background-color: white;
  color: var(--dark);
  border: 1px solid var(--medium-gray);
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  font-size: 0.9rem;
}

.code-display {
  background-color: var(--code-bg);
  color: var(--code-text);
  padding: 1rem;
  font-family: 'Courier New', Courier, monospace;
  white-space: pre-wrap;
  min-height: 200px;
  max-height: 400px;
  overflow-y: auto;
  tab-size: 4;
  border: 1px solid var(--medium-gray);
  border-top: none;
}

.code-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 0 0 8px 8px;
  border: 1px solid var(--medium-gray);
  border-top: none;
}

.code-btn {
  background-color: var(--primary);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.code-btn:hover {
  background-color: var(--primary-light);
}

.code-btn.secondary {
  background-color: var(--medium-gray);
  color: var(--dark);
}

.code-btn.secondary:hover {
  background-color: #d1d7e0;
}

.output-container {

  padding: 1rem;
  margin-top: 1rem;
  border-radius: 8px;
  border: 1px solid var(--medium-gray);
}

.output-container h4 {
  color: var(--dark);
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

#code-output {
  color: var(--code-text);
  font-family: 'Courier New', Courier, monospace;
  white-space: pre-wrap;
  min-height: 50px;
  background-color: white;
  padding: 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--medium-gray);
}

/* Cheatsheet Section */
.cheatsheet-categories {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
}

.cheatsheet-categories::-webkit-scrollbar {
  height: 5px;
}

.cheatsheet-categories::-webkit-scrollbar-thumb {
  background-color: var(--medium-gray);
  border-radius: 5px;
}

.cheatsheet-category {
  background-color: var(--medium-gray);
  padding: 0.7rem 1.2rem;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.3s;
  font-size: 0.9rem;
  color: var(--dark);
  justify-content: center;
  display: flex;
}

.cheatsheet-category.active {
  background-color: var(--primary);
  color: white;
}

.cheatsheet-content {
  display: none;
}

.cheatsheet-content.active {
  display: block;
}

.cheatsheet-item {
  margin-bottom: 1rem;
  padding: 1.5rem;
  background-color: white;
  border-radius: 8px;
  border: 1px solid var(--medium-gray);
}

.cheatsheet-item h5 {
  color: var(--primary);
  margin-bottom: 0.8rem;
  font-size: 1.1rem;
}

.cheatsheet-item pre {
  background-color: var(--code-bg);
  color: var(--code-text);
  padding: 1rem;
  border-radius: 4px;
  overflow-x: auto;
  font-family: 'Courier New', Courier, monospace;
  border: 1px solid var(--medium-gray);
  font-size: 0.9rem;
}

.tree-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 230px;
  padding: 1rem;
  background: #fff;
  transform: translateX(-100%);
  transition: transform 0.5s cubic-bezier(0.25, 1.25, 0.5, 1.05);
  z-index: 999;
}

.tree-sidebar.collapsed {
  transform: translateX(0);
}

.tree-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--medium-gray);
}

.tree-header h3 {
  color: var(--primary);
  font-size: 1.5rem;
  margin-right: 15%;
  margin-left: 6%;
}

.sidebar-toggle {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--dark-gray);
  transition: all 0.3s ease;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.sidebar-toggle:hover {
  background-color: var(--medium-gray);
  color: var(--primary);
}

.tree-menu {
  list-style: none;
  margin-left: 5px;
  padding-left: 0;
}

.tree-item {
  margin-bottom: 0.3rem;
}

.tree-item>a {
  display: flex;
  align-items: center;
  padding: 0.8rem 0.8rem;
  color: var(--dark);
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s;
  font-size: 0.95rem;
}

.tree-item>a:hover {
  background-color: var(--light-gray);
  color: var(--primary);
}

.tree-item>a.active {
  background-color: rgba(74, 111, 165, 0.1);
  color: var(--primary);
  font-weight: 500;
}

.tree-item>a i {
  margin-right: 0.6rem;
  color: var(--dark-gray);
  width: 20px;
  text-align: center;
  font-size: 0.9rem;
}

.tree-item>a:hover i {
  color: var(--primary);
}

.tree-toggle {
  margin-left: auto;
  cursor: pointer;
  transition: transform 0.2s;
  color: var(--dark-gray);
  font-size: 0.8rem;
  width: 20px;
  height: 20px;
  float: right;
  right: 10px;

  border-radius: 50%;
}

.tree-toggle:hover {
  background-color: var(--medium-gray);
}

.tree-toggle.active {
  transform: rotate(90deg);
}

.tree-submenu {
  list-style: none;
  padding-left: 1.8rem;
  margin-top: 0.3rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.tree-submenu.active {
  max-height: 1000px;
}

.tree-submenu a {
  display: block;
  padding: 0.5rem 0.8rem;
  color: var(--dark-gray);
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s;
  font-size: 0.9rem;
}

.tree-submenu a:hover {
  color: var(--primary);
  background-color: var(--light-gray);
}

.tree-submenu a.active {
  color: var(--primary);
  font-weight: 500;
}

/* Footer */
footer {
  background: #649adb41;
  color: rgb(22, 8, 8);
  padding: 2rem 0 1.5rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 0.5rem !important;
  text-align: center;
}

.footer-column h4 {
  margin-bottom: 1.2rem;
  font-size: 1.1rem;
  color: white;
  text-align: center;
}

.footer-column ul {
  list-style: none;
}

.footer-column li {
  text-align: center;
  margin-bottom: 0.6rem;
}

.footer-column a {
  color: #adb5bd;
  text-align: center;
  text-decoration: none;
  transition: color 0.2s;
  font-size: 0.9rem;
}

.footer-column a:hover {
  color: white;
}

.footer-bottom {
  text-align: center;
  padding: 1% !important;
  color: #2c343b;
  font-size: 0.9rem;
}

.social-links {
  display: flex;
  justify-content: center;
}

.social-links a {
  color: #adb5bd;
  font-size: 1.2rem;
  transition: color 0.2s;
}

.social-links a:hover {
  color: white;
}

/* Responsive Design */
@media (min-width: 200px) {
  .tree-sidebar {
    transform: translateX(-100%);
    z-index: 1000;
  }

  .tree-sidebar.active {
    transform: translateX(0);
  }

  .tree-toggle-btn {
    display: flex;
  }
}

@media (max-width: 768px) {
  .hero h2 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .language-grid {
    grid-template-columns: 1fr;
  }

  .section-title {
    font-size: 1.4rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 40%;
    font-size: 14px;
    padding: 1rem;
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fadeIn {
  animation: fadeIn 0.6s ease forwards;
}

/* Utility Classes */

.mt-3 {
  margin-top: 1rem;
}

.text-center {
  text-align: center;
}

.status-success {
  color: #28a745;
}

.status-error {
  color: #dc3545;
}

@media (min-width: 500px) and (max-width: 800px) {
  * {
    min-width: 0;
  }

  .logo-text {
    font-size: 1.4rem;
  }

  .logo-icon {
    font-size: 1.3rem;
  }

  .header-btn {
    width: 33px;
    height: 33px;
    font-size: 1.3rem;
  }

  .hero {
    padding: 2rem 1rem;
    margin: 0 -10px 1.2rem -10px;
    width: calc(100% + 20px);
  }

  .hero h2 {
    font-size: 1.6rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .btn {
    width: 40%;
    font-size: 14px;
    padding: 1rem;
  }

  .feature-card,
  .language-card,
  .editor-container,
  .quiz-question,
  .cheatsheet-item {
    padding: 1rem;
    font-size: 0.9rem;
  }

  .feature-card h3,
  .language-card h3 {
    font-size: 1.2rem;
  }

  .features-grid,
  .language-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem;
  }

  .feature-icon,
  .language-icon {
    font-size: 1.7rem;
  }

  .editor-header {
    padding: 0.5rem 0.8rem;
  }

  .code-display {
    padding: 0.8rem;
    font-size: 0.8rem;
    max-height: 300px;
  }

  .code-btn {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
  }

  #notepad-content {
    font-size: 0.85rem;
    padding: 0.8rem;
  }

  .quiz-option {
    font-size: 1rem;
  }

  .cheatsheet-category {
    font-size: 0.7rem;
    padding: 0.4rem 2rem;
  }

  .cheatsheet-item h5 {
    font-size: 1rem;
  }

  .cheatsheet-item pre {
    font-size: 0.8rem;
    padding: 0.8rem;
  }

  .footer-column h4 {
    font-size: 1rem;
  }

  .footer-column a {
    font-size: 0.9rem;
  }

  .section-title {
    font-size: 1.2rem;
  }
}

/* Ultra-compact mobile styles for 300-500dp screens */
@media (max-width: 500px) {
  :root {
    --header-height: 70px;
    --primary: #3a5f8d;
  }

  * {
    min-width: 0;
  }

  body {
    padding-top: var(--header-height);
    line-height: 1.3;
    -webkit-text-size-adjust: 100%;
  }

  .logo-text {
    font-size: 1.3rem;
    white-space: nowrap;
    left: 5%;
  }

  .logo-icon {
    font-size: 1.5rem;
    margin-right: 5px;
  }

  .header-btn {
    width: 32px;
    height: 32px;
    font-size: 1.5rem;
  }

  /* Hero section - minimal */
  .hero {
    padding: 1.6rem 0.2rem;
    margin: 0 -8px 1rem -8px;
    width: 100%;
    margin: 0 -8px;
  }

  .hero h2 {
    margin-bottom: 0.8rem;
  }

  .hero p {
    font-size: 0.9rem;
    margin-bottom: 1.2rem;
  }

  .btn {
    width: 50%;
    font-size: 14px;
    padding: 1rem;
  }

  /* Cards - flat design */
  .language-card,
  .editor-container,
  .quiz-question,
  .cheatsheet-item {
    padding: 0.8rem;
    margin-bottom: 0.8rem;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  }

  .feature-card {
    padding: 0.8rem 1rem;
    margin-bottom: 6px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-size: 10px;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    border-bottom-color: rgb(74, 91, 105);
  }

  /* Features - single column tight */
  .features,
  .language-grid {
    gap: 0.8rem;
  }

  .feature-icon,
  .language-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }

  .feature-card h3,
  .language-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
  }

  /* Code editor - compact */
  .editor-header {
    padding: 0.3rem 0.6rem;
  }

  .code-display {
    padding: 0.6rem;
    font-size: 0.75rem;
    min-height: 150px;
    max-height: 250px;
  }

  .code-actions {
    padding: 0.3rem;
  }

  .code-btn {
    padding: 0.3rem 0.6rem;
    font-size: 0.7rem;
  }

  /* Notepad - minimal */
  #notepad-content {
    min-height: 150px;
    padding: 0.6rem;
    font-size: 0.8rem;
  }

  /* Quiz - compact */
  .quiz-options {
    gap: 0.5rem;
  }

  .quiz-option {
    font-size: 0.9rem;
  }

  /* Cheatsheet - tight */
  .cheatsheet-category {
    padding: 0.3rem 1.5rem;
    font-size: 0.6rem;
    text-align: center;
  }

  .cheatsheet-item h5 {
    font-size: 0.9rem;
  }

  .cheatsheet-item pre {
    padding: 0.6rem;
    font-size: 0.7rem;
  }

  /* Footer - stacked */
  .footer-column {
    margin-bottom: 0.3rem;
  }

  .footer-column h4 {
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
  }

  .footer-column a {
    font-size: 0.8rem;
  }

  /* Utility adjustments */
  .section-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
  }

  .section-title::after {
    height: 2px;
    bottom: -6px;
  }
}

/* Extreme small screen adjustments (300-350px) */
@media (max-width: 350px) {
  body {
    font-size: 16px;
  }

  .logo-text {
    max-width: 120px;
    font-size: 1.2rem;
  }

  .hero h2 {
    font-size: 2rem;
  }

  .hero p {
    font-size: smaller;
  }

  .feature-card,
  .language-card {
    padding: 0.3rem;
  }

  .code-display {
    font-size: 0.7rem;
  }

  .section-title {
    font-size: 1rem;
  }
}

/* Footer as borderless table */
@media (max-width: 2000px) {
  footer {
    height: auto;
    padding: 1.5rem 0.5rem 1rem;
    background: #649adb41;
  }

  .footer-content {
    display: table;
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
  }

  .footer-column {
    display: table-cell;
    vertical-align: top;
    padding: 0 0.3rem;
    width: 33.33%;
  }

  .footer-column h4 {
    font-size: 0.75rem;
    margin-bottom: 0.3rem;
    color: white;
    text-align: center;
  }

  .footer-column ul {
    padding-left: 0;
    margin: 0;
  }

  .footer-column li {
    margin-bottom: 0.21em;
    text-align: center;
    list-style: none;
  }

  .footer-column a {
    font-size: 0.65rem;
    color: #adb5bd;
    text-decoration: none;
    display: block;
    padding: 0.1rem 0;
  }

  .footer-bottom {
    font-size: 0.5rem;
    padding-top: 0.2rem;
    margin-bottom: 0;
  }
}

/* Adjust for very small screens */
@media (max-width: 350px) {
  .footer-column {
    width: 50%;
  }

  .footer-column:nth-child(3) {
    display: none;
  }

  .footer-column a {
    font-size: 0.6rem;
  }

  .footer-bottom {
    font-size: 0.55rem;
  }
}

.dark-mode {
  --primary: #7c8ca5;
  --primary-light: #616b79;
  --primary-dark: #756f5a;
  --primary-gradient: linear-gradient(135deg, var(--primary), var(--primary-light));
  --secondary: #7cc47c;
  --accent: #ff8e8e;
  --light-gray: #342138;
  --medium-gray: #4a5568;
  --dark-gray: #556479;
  --dark: #554f5f;
  --code-bg: #021433c4;
  --code-text: #5c6064;
  --bg-color: #1a202c9c;
  --text-color: #9299a0;
  --card-bg: #2d3748;
  --border-color: #4a5568;
  --header-bg: rgba(45, 55, 72, 0.95);
  --glass-bg: rgba(45, 55, 72, 0.85);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.4);
  --nav-link: #657386;
}

/* Apply to components */
.dark-mode .feature-card,
.dark-mode .language-card,
.dark-mode .editor-container,
.dark-mode .cheatsheet-item,
.dark-mode .quiz-question,
.dark-mode .quiz-result,
.dark-mode .tree-sidebar,
.dark-mode .quiz-option input {
  --text-color: var(--text-primary);
}

.dark-mode .quiz-question,
.dark-mode .tree-sidebar {
  --text-color: var(--text-secondary);
}

.dark-mode #code-output {
  background-color: var(--code-bg);
}

.dark-mode #notepad-content {
  background-color: var(--card-bg);
}

.dark-mode .language-select,
.dark-mode .notepad-btn {
  color: var(--text-primary);
}

/* Special cases for colored text */
.dark-mode .quiz-result.correct {
  color: #50fa7b !important;
}

.dark-mode .quiz-result.incorrect {
  color: #ff6e6e !important;
}

/* ===== Dark Mode Styles for Specific Components ===== */
.dark-mode .feature-card {
  background-color: rgba(30, 30, 51, 0.64);
  border: 1px solid var(--border-color);
  color: var(--text-color);
}

.dark-mode .feature-card:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.dark-mode .language-card {
  background-color: rgba(30, 30, 51, 0.64);
  border-color: var(--border-color);
}

.dark-mode .language-card:hover {
  border-color: var(--primary);
}

.dark-mode .editor-container {
  background-color: var(--code-bg);
  border-color: var(--border-color);
}

.dark-mode .language-select {
  background-color: var(--medium-gray);
  color: var(--text-color);
  border-color: var(--border-color);
}

.dark-mode .notepad-btn:hover {
  background-color: rgba(127, 156, 245, 0.2);
  color: var(--primary-light);
}

.dark-mode .quiz-question {
  background-color: var(--card-bg);
  border-color: var(--border-color);
}

.dark-mode .quiz-result.incorrect {
  background-color: rgba(245, 101, 101, 0.2);
  color: #feb2b2;
}

.dark-mode .quiz-result.correct {
  background-color: rgba(72, 187, 120, 0.2);
  color: #9ae6b4;
}

.dark-mode .cheatsheet-item {
  background-color: var(--card-bg);
  border-color: var(--border-color);
}

.dark-mode .cheatsheet-item h5 {
  color: var(--primary-light);
}

.dark-mode .hero {
  background: #14101f;
}

.dark-mode .tree-item>a {
  color: var(--dark-gray);
}

.dark-mode .tree-sidebar {
  opacity: 1 !important;
}

.dark-mode .tree-item>a:hover {
  background-color: rgba(127, 156, 245, 0.1);
  color: var(--primary-light);
}

.dark-mode .tree-item>a.active {
  background-color: rgba(127, 156, 245, 0.2);
  color: var(--primary);
}

.dark-mode .tree-submenu a {
  color: var(--dark-gray);
}

.dark-mode .tree-submenu a:hover {
  color: var(--primary-light);
}

.dark-mode header {
  background-color: var(--header-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--shadow-sm);
}

.dark-mode header h1 {
  color: var(--primary-light);
  background: none;
  -webkit-background-clip: text;
  background-clip: text;
}

.dark-mode .tree-sidebar {
  background-color: #24323dfa;
}

.dark-mode button {
  background-color: var(--card-bg);
  color: var(--text-color);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

:root {
  /* ===== Core Colors ===== */
  --primary-500: #6D28D9;
  --primary-400: #8B5CF6;
  --primary-600: #5B21B6;
  --accent-400: #00E0F5;
  --accent-500: #00B4C6;
  --secondary-400: #10B981;
  --secondary-500: #059669;

  /* ===== Adaptive Grayscale ===== */
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;

  /* ===== Semantic Colors ===== */
  --success: #10B981;
  --warning: #F59E0B;
  --error: #EF4444;
  --info: #3B82F6;

  /* ===== Special Effects ===== */
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.1);
}

/* ===== Light Mode ===== */
:root,
[data-theme="light"] {
  --bg: var(--gray-50);
  --surface: var(--gray-100);
  --text-primary: var(--gray-900);
  --text-secondary: var(--gray-600);
  --border: var(--gray-200);
  --primary: var(--primary-500);
  --primary-hover: var(--primary-400);
  --accent: var(--accent-500);
}

/* ===== Dark Mode ===== */
[data-theme="dark"] {
  --bg: var(--gray-800);
  --surface: var(--gray-700);
  --text-primary: var(--gray-50);
  --text-secondary: var(--gray-300);
  --border: var(--gray-600);
  --primary: var(--primary-400);
  --primary-hover: var(--primary-500);
  --accent: var(--accent-400);
}

/* Apply to all elements */
* {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
}

/* ===== ENTRANCE ANIMATIONS ===== */
/* Main container entrance */
@keyframes slideInFromBottom {
  0% {
    transform: translateY(20px);
    opacity: 0;
  }

  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Sidebar entrance */
@keyframes slideInFromLeft {
  0% {
    transform: translateX(-100%);
    opacity: 0;
  }

  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Card entrance */
@keyframes cardAppear {
  0% {
    transform: scale(0.9) translateY(20px);
    opacity: 0;
  }

  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

/* ===== ELEMENT-SPECIFIC ANIMATIONS ===== */
/* Main content container */
.container {
  animation: slideInFromBottom 0.3s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

/* Cards animation */
.feature-card,
.language-card,
.editor-container,
.cheatsheet-item {
  animation: cardAppear 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  opacity: 0;
}

/* Staggered card animations */
.feature-card:nth-child(1) {
  animation-delay: 0.3s;
}

.feature-card:nth-child(2) {
  animation-delay: 0.4s;
}

.feature-card:nth-child(3) {
  animation-delay: 0.5s;
}

.language-card:nth-child(1) {
  animation-delay: 0.3s;
}

.language-card:nth-child(2) {
  animation-delay: 0.4s;
}

.language-card:nth-child(3) {
  animation-delay: 0.5s;
}

.language-card:nth-child(4) {
  animation-delay: 0.6s;
}

/* ===== HOVER ANIMATIONS ===== */
/* Card hover effect */
.feature-card:hover,
.language-card:hover {
  transform: translateY(-5px) scale(1.02);
  transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Button hover effect */
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ===== SCROLL-BASED ANIMATIONS ===== */
/* Fade-in as elements come into view */
[data-animate="fadeIn"] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

[data-animate="fadeIn"].animate {
  opacity: 1;
  transform: translateY(0);
}

/* ===== SPECIAL EFFECTS ===== */
/* Subtle floating animation for hero section */
@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

/* Pulse animation for CTA buttons */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
}

/* Quick Access Toolbar */
#quickAccessToolbar button {
  transition: all 0.2s ease;
}

/* Theme Color Picker */
#themeColorPicker {
  transition: all 0.3s ease;
}

/* Menu Panel */
#menuPanel {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Search Popup */
#searchPopup {
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* For mobile sidebar */
.mobile-view {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 1000;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.mobile-view.active {
  transform: translateX(0);
}

/* Overlay for mobile */
.mobile-view::after {
  content: '';
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-view.active::after {
  opacity: 1;
}

/* Animation classes */
[data-animate] {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

[data-animate].animate {
  opacity: 1;
  transform: translateY(0);
}

:root {
  /* ===== Brand Colors ===== */
  --primary: #6a0dad;
  --primary-light: #a16eff;
  --secondary: #00c896;

  /* ===== Neutrals ===== */
  --light-gray: #f5f7fa;
  --medium-gray: #cfd3e3;
  --dark-gray: #444a66;
  --dark: #1b1d2a;

  /* ===== Code Colors ===== */
  --code-bg: #f0f0f5;
  --code-text: #1e1e2f;

  /* ===== Navbar ===== */
  --navbar-bg: #ffffff;
  --navbar-text: #1b1d2a;
  --navbar-hover: #6a0dad;

  /* ===== Header ===== */
  --header-bg: #ffffff;
  --header-text: #6a0dad;
  --header-shadow: rgba(106, 13, 173, 0.1);

  /* ===== Footer ===== */
  --footer-bg: #594081;
  --footer-text: #6a6f85;
  --footer-link: #00c896;

  /* ===== Hero Section ===== */
  --hero-bg: linear-gradient(135deg, #6a0dad, #a16eff);
  --hero-text: #ffffff;

  /* ===== Glow ===== */
  --glow: 0 0 10px rgba(161, 110, 255, 0.4);
}

.dark-mode {
  /* ===== Dark Backgrounds ===== */
  --primary: #8f5fff;
  --primary-light: #b79aff;
  --secondary: #00ffbb;
  --light-gray: #2e3246;
  --medium-gray: #3e435b;
  --dark-gray: #bbbfd1;
  --dark: #0e101c;
  --code-bg: #111320;
  --code-text: #e0e2ff;
  --navbar-bg: #1f2235;
  --navbar-text: #f5f7fa;
  --navbar-hover: #b79aff;
  --header-bg: #181b2f;
  --header-text: #dcdfff;
  --header-shadow: rgba(0, 0, 0, 0.4);
  --footer-bg: #0a0c14;
  --footer-text: #9fa3b9;
  --footer-link: #00ffbb;
  --hero-bg: linear-gradient(135deg, #1e1f31, #2a2d42);
  --hero-text: #eaeaff;
  --glow: 0 0 12px rgba(183, 154, 255, 0.6);
}

/* ===== CORE ANIMATION SYSTEM ===== */
:root {
  --ease-super: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-bounce: cubic-bezier(0.68, -0.6, 0.32, 1.6);
  --anim-duration: 1s;
  --anim-stagger: 0.15s;
}

/* ===== SMOOTH SCROLL & PERFORMANCE ===== */
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}


@keyframes bodyFadeIn {
  to {
    opacity: 1;
  }
}

/* ===== AUTO-ANIMATE ALL SECTIONS & CARDS ===== */
header,
footer,
section,
.hero,
.card,
.feature,
[class*="container"],
[class*="grid"] {
  animation-fill-mode: forwards;
}

/* ===== ENTRANCE ANIMATIONS ===== */
/* Slide Up (Default for most content) */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(40px) rotateX(5deg);
    filter: blur(4px);
  }

  to {
    opacity: 1;
    transform: none;
    filter: blur(0);
  }
}

/* Hero/Header Animation */
@keyframes heroIntro {
  from {
    opacity: 0;
    transform: scale(0.98) translateY(20px);
    clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0% 100%);
  }

  to {
    opacity: 1;
    transform: none;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
  }
}

/* 3D Flip (Cards, Features) */
@keyframes flipIn {
  from {
    opacity: 0;
    transform: perspective(1000px) rotateY(-15deg) scale(0.95);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* ===== SCROLL-BASED PARALLAX ===== */
[data-parallax] {
  will-change: transform;
  transition: transform 0.6s var(--ease-super);
}

/* ===== HOVER MAGIC ===== */
.card:hover,
.feature:hover {
  transform: translateY(-8px) rotateZ(0.5deg) scale(1.02);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
  transition: all 0.4s var(--ease-bounce);
}

:root {
  --bg: #f8f5f5;
  --text: #111;
  --subtext: #444;
  --primary: #1a73e8;
  --accent: #ff6f00;
  --card-bg: #fff;
  --card-shadow: rgba(0, 0, 0, 0.1);
  --card-gradient: linear-gradient(145deg, #f0f0f0, #ffffff);
}

.dark-mode {
  --bg: #0e0e13;
  --text: #f4f4f4;
  --subtext: #a0a0a0;
  --primary: #82b1ff;
  --accent: #ffb74d;
  --card-bg: #1a1a1f;
  --card-shadow: rgba(0, 0, 0, 0.4);
  --card-gradient: linear-gradient(145deg, #1e1e25, #141418);
}

body {
  background: var(--bg);
  color: var(--text);
}

.section-title {
  text-align: center;
  font-size: 1.7rem;
  color: var(--primary);
  margin-bottom: 2rem;
}

.features-grid,
.language-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 24px;
  padding: 0 20px;
}

/* Card styles */
.feature-card,
.language-card {
  border-radius: 18px;
  box-shadow: 6px 6px 15px var(--card-shadow);
  padding: 12px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 2px solid transparent;
}

.language-card {
  border-radius: 18px;
  box-shadow: 6px 6px 15px var(--card-shadow);
  padding: 12px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 2px solid transparent;
}

.feature-card:hover,
.language-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 10px 10px 20px var(--card-shadow);
  border-color: var(--accent);
}

.feature-icon,
.language-icon {
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 12px;
}

.feature-card h3,
.language-card h3 {
  margin-bottom: 6px;
  font-size: 1.2rem;
  color: var(--text);
}

.feature-card p,
.language-card p {
  color: var(--subtext);
  font-size: 0.95rem;
}

.language-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--subtext);
}

/* ===== FOOTER STYLES ===== */
.footer {
  position: relative;
  overflow: hidden;
  border-top-left-radius: 50% !important;
  border-top-right-radius: 20px;
  background-color: rgb(231, 229, 240, 0.3);
  background-size: cover;
  margin-left: 2%;
  margin-right: 2%;
  border-top: 4px inset rgb(157, 102, 252);
  text-align: center;
}

@media (min-width:1701px) {
  .footer {
    position: relative;
    overflow: hidden;
    width: 90%;
    height: auto;
    border-top-left-radius: 80% !important;
    border-top-right-radius: 120px;
    background-color: rgb(231, 229, 240, 0.3);
    background-size: cover;
    margin-right: auto;
    margin-left: auto;
    border-top: 4px inset rgb(157, 102, 252);
    text-align: center;
  }

  .hero {
    height: auto;
    width: 90%;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    overflow: hidden;
    padding: 3rem 2rem;
    color: #111;
    background-size: cover;
    border-top: 2px outset rgb(170, 140, 221);
    border-bottom: 5px inset rgb(123, 87, 185);
    border-bottom-right-radius: 60%;
    border-bottom-left-radius: 120px;
  }
}

@media (min-width:1201px) {
  .footer {
    position: relative;
    overflow: hidden;
    width: 92%;
    height: auto;
    border-top-left-radius: 60% !important;
    border-top-right-radius: 120px;
    background-color: rgb(231, 229, 240, 0.3);
    background-size: cover;
    margin-right: auto;
    margin-left: auto;
    border-top: 4px inset rgb(157, 102, 252);
    text-align: center;
  }

  .hero {
    height: auto;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    overflow: hidden;
    padding: 3rem 2rem;
    color: #111;
    background-size: cover;
    border-top: 2px inset rgb(170, 140, 221);
    border-bottom: 5px inset rgb(123, 87, 185);
    border-bottom-right-radius: 40%;
    border-bottom-left-radius: 120px;
  }
}

@media (min-width:721px) {
  .footer {
    position: relative;
    overflow: hidden;
    width: 95%;
    height: auto;
    border-top-left-radius: 50% !important;
    border-top-right-radius: 120px;
    background: #c4d8f034;
    background-size: cover;
    margin-right: auto;
    margin-left: auto;
    border-top: 4px inset rgb(157, 102, 252);
    text-align: center;
  }

  .hero {
    height: auto;
    width: 95%;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    overflow: hidden;
    padding: 3rem 2rem;
    color: #111;
    background-size: cover;
    border-top: 4px inset rgb(170, 140, 221);
    border-bottom: 5px inset rgb(123, 87, 185);
    border-bottom-right-radius: 40%;
    border-bottom-left-radius: 120px;
  }
}

.footer-content {
  display: flex;
  justify-content: center;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  max-width: 1300px;
  margin: auto;
  padding: 0 1rem;
  height: auto;
  text-align: center;
}

.footer-column h4 {
  margin-bottom: 0.4rem;
  font-size: 1.2rem;
  text-align: center;
  color: #0c0202;
}

.footer-column ul {
  text-align: center;
  list-style: none;
  padding: 0;
}

.footer-column li {
  margin: 0.2rem 0;
  text-align: center;
  font-size: 0.95rem;
  color: #220c0c;
  transition: color 0.2s ease;
  scale: 1.2;
}

.footer-column li:hover {
  color: var(--neon-blue, #ff7300);
  cursor: pointer;
}

.feature-card {
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
}

.footer-column a {
  text-align: center;
  color: inherit;
  text-decoration: none;
}

.footer-column a:hover {
  text-decoration: underline;
  color: #ee0505;
}

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid #1278df;
  color: #0a121b;
  font-size: 0.9rem;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.social-links a {
  color: #200303;
  font-size: 1rem;
  transition: color 0.2s, transform 0.3s ease;
}

.social-links a:hover {
  color: rgb(243, 10, 10);
  transform: translateY(-4px);
  scale: 1.2;
}

/* Responsive adjustments */
@media (max-width: 1000px) {
  body {

    font-size: clamp(14px, 1.2vw + 0.5rem, 20px);

  }

  .footer {
    border-top-left-radius: 200px;
    height: auto;
  }

  .footer-content {
    display: table;
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
  }

  .footer-column {
    display: table-cell;
    vertical-align: top;
    padding: 0 0.3rem;
    width: 33.33%;
  }

  .footer-column h4 {
    font-size: 0.75rem;
    margin-bottom: 0.4rem;
    text-align: center;
  }

  .footer-column ul {
    padding-left: 0;
    margin: 0;
  }

  .footer-column li {
    text-align: center;
    list-style: none;
    font-size: 0.65rem;
  }

  .social-links a {
    font-size: 0.9rem;
  }

  .footer-bottom {
    font-size: 0.6rem;
    padding-top: 0.1rem;
  }
}

/* Adjust for very small screens */
@media (max-width: 350px) {
  .footer-column {
    width: 50%;
  }

  .footer-column:nth-child(3) {
    display: none;
  }

  .footer-column a {
    font-size: 0.6rem;
  }

  .footer-bottom {
    font-size: 0.55rem;
  }
}

/* Dark mode adjustments */
.dark-mode .footer {
  background-color: #12151d;
}

.dark-mode .footer-column h4 {
  color: var(--text-light, #e6f7ff);
}

.dark-mode .footer-column li {
  color: var(--text-muted, #a0aec0);
}

.dark-mode .footer-column li:hover {
  color: var(--primary-light, #7f9cf5);
}

.dark-mode .footer-bottom {
  color: var(--text-muted, #a0aec0);
  border-top-color: var(--border-color, #2d3748);
}

.dark-mode .social-links a {
  color: var(--text-muted, #a0aec0);
}

.dark-mode .social-links a:hover {
  color: var(--primary-light, #7f9cf5);
}

.dark-mode .category-card {
  background-color: #26232bd5;
}

.dark-mode .use-case-card {
  background-color: #393146da;
}

.language-resources {
  margin-left: 5%;
}

/* Base transition for body */
body {

  position: relative;
  overflow-x: hidden;
}

/* Fullscreen animation overlay */
#dark-mode-transition {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  background: radial-gradient(circle, #00f5ff88 0%, #000000cc 100%);
  opacity: 0;
  transition: opacity 0.1s ease-in-out;
}

/* Trigger animation */
.dark-mode #dark-mode-transition {
  animation: darkBoom 0.1s ease forwards;
}

/* Keyframes: Ultra Boom Animation */
@keyframes darkBoom {
  0% {
    opacity: 1;
    filter: blur(3px) brightness(2);
    transform: scale(1.1);
  }

  50% {
    opacity: 0.8;
    filter: blur(2px) brightness(1.5);
    transform: scale(1.05);
  }

  100% {
    opacity: 0;
    filter: none;
    transform: scale(1);
  }
}

.dark-mode {
  animation: darkModeFade 0.1s ease-in-out;
}

@keyframes darkModeFade {
  0% {
    opacity: 0.4;
    filter: blur(3px) brightness(1.3);
  }

  100% {
    opacity: 1;
    filter: blur(0) brightness(1);
  }
}

h1,
.card,
.section-title {
  transition: all 0.3s ease;
}

.dark-mode h1,
.dark-mode .card,
.dark-mode .section-title {
  transform: scale(1.01);
  text-shadow: 0 0 10px rgba(0, 255, 200, 0.3);
}

/* ===== RESPONSIVE BREAKPOINTS ===== */
/* 1. Ultra Large Desktop (1920px+) */
@media (min-width: 1920px) {
  .container {
    margin: 0 auto;
  }

  .hero h2 {
    font-size: 3.5rem;
  }
}

/* 2. Large Desktop (1440px-1919px) */
@media (min-width: 1440px) and (max-width: 1919px) {
  .container {
    max-width: 1800px;
  }

  .hero h2 {
    font-size: 3rem;
  }
}

/* 3. Standard Desktop (1200px-1439px) */
@media (min-width: 1200px) and (max-width: 1439px) {
  .container {
    max-width: 1340px;
  }

  .hero h2 {
    font-size: 2.8rem;
  }
}

/* 4. Small Desktop (992px-1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
  .hero h2 {
    font-size: 2.5rem;
  }
}

/* 5. Tablet Landscape (768px-991px) */
@media (min-width: 768px) and (max-width: 991px) {
  .hero h2 {
    font-size: 2.2rem;
  }
}

/* 6. Tablet Portrait (576px-767px) */
@media (min-width: 576px) and (max-width: 767px) {
  .hero h2 {
    font-size: 2rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .header-actions {
    gap: 10px;
  }

  .tree-sidebar {
    transform: translateX(-100%);
  }
}

/* 7. Large Mobile (480px-575px) */
@media (min-width: 480px) and (max-width: 575px) {
  .container {
    max-width: 100%;
    padding: 0 15px;
  }

  .hero h2 {
    font-size: 1.8rem;
  }

  .btn {
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
  }

  .logo {
    margin-left: -1px;
  }

  .logo-text {
    font-size: 1.4rem;
  }
}

/* 8. Medium Mobile (400px-479px) */
@media (min-width: 400px) and (max-width: 479px) {
  .logo {
    margin-left: -10px;
  }

  .hero h2 {
    font-size: 1.6rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .header-content {
    flex-wrap: wrap;
  }
}

/* 9. Small Mobile (320px-399px) */
@media (min-width: 320px) and (max-width: 399px) {
  .logo {
    margin-left: -15px;
  }

  .hero h2 {
    font-size: 1.4rem;
  }

  .hero p {
    font-size: 0.9rem;
  }

  .logo-text {
    font-size: 1.3rem;
  }

  .header-btn {
    width: 32px;
    height: 32px;
  }
}

/* 10. Ultra Small Mobile (under 320px) */
@media (max-width: 319px) {
  .hero h2 {
    font-size: 1.2rem;
  }

  .hero-buttons .btn {
    width: 50%;
    padding: 0.7rem;
    font-size: 11px;
  }
}

/* ===== DEVELOPER MODE STYLES ===== */
.developer-mode {
  --dev-primary: #1a1a2e;
  --dev-secondary: #16213e;
  --dev-accent: #0f3460;
  --dev-text: #e94560;
  --dev-border: #533483;

  background-color: var(--dev-primary);
  color: var(--dev-text);
  position: relative;
}

.developer-mode::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(rgba(25, 25, 25, 0.8) 1px, transparent 1px),
    linear-gradient(90deg, rgba(25, 25, 25, 0.8) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
  z-index: 0;
}

.developer-mode * {
  position: relative;
  z-index: 1;
}

.developer-mode .container {
  border: 1px dashed var(--dev-border);
  padding: 15px;
  background-color: var(--dev-secondary);
}

.developer-mode .card {
  background-color: var(--dev-accent);
  border: 1px solid var(--dev-border);
  box-shadow: 0 0 10px rgba(233, 69, 96, 0.3);
}

.developer-mode .code-display {
  background-color: #000;
  color: #0f0;
  font-family: 'Courier New', monospace;
}

.developer-mode .btn {
  background-color: var(--dev-text);
  color: var(--dev-primary);
  border: 1px solid var(--dev-border);
}

.developer-mode .tree-sidebar {
  background-color: var(--dev-accent);
  border-right: 2px solid var(--dev-text);
}

/* Developer mode responsive adjustments */
@media (max-width: 768px) {
  .developer-mode .container {
    padding: 10px;
  }

  .developer-mode .tree-sidebar {
    width: 200px;
  }
}

@media (max-width: 576px) {
  .developer-mode::before {
    background-size: 15px 15px;
  }

  .developer-mode .card {
    padding: 10px;
  }
}

/* Debugging outlines (toggle with JS) */
.debug-outlines * {
  outline: 1px solid rgba(255, 0, 0, 0.2);
}

/* Grid overlay helper */
.grid-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(255, 0, 0, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 0, 0, 0.1) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
  z-index: 9999;
  display: none;
}

/* Console-like footer */
.developer-console {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #000;
  color: #0f0;

  padding: 10px;
  height: auto;
  overflow-y: auto;
  border-top: 2px solid #0f0;
  display: none;
  z-index: 10000;
}

/* Responsive developer console */
@media (max-width: 768px) {
  .developer-console {
    font-size: 0.8rem;
    max-height: 150px;
  }
}

/* Header */
header {
  background-color: #fffffff5;
  height: 69px;
  border-bottom: 1px solid #e1e4e8 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
  top: 0 !important;
  z-index: 100 !important;
}

/* Navigation */
nav a {
  color: #24292e !important;
  padding: 8px 12px !important;
  border-radius: 4px !important;
  text-decoration: none !important;
}

nav a:hover {
  background-color: #f3f4f6 !important;
  color: #0366d6 !important;
}

.sidebar-item {
  color: #24292e !important;
  padding: 8px 16px !important;
  display: block !important;
}

.sidebar-item:hover {
  background-color: #f6f8fa !important;
  color: #0366d6 !important;
}

/* Code Blocks */
pre,
code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace !important;
  border-radius: 4px !important;
  padding: 12px !important;
  overflow-x: auto !important;
}

/* Cards */
.card {
  background-color: #ffffff !important;
  border: 1px solid #e1e4e8 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
  border-radius: 6px !important;
  padding: 16px !important;
  margin-bottom: 16px !important;
}

/* Syntax Highlighting */
.comment {
  color: #6a737d !important;
}

.keyword {
  color: #d73a49 !important;
  font-weight: bold !important;
}

.string {
  color: #032f62 !important;
}

.number {
  color: #005cc5 !important;
}

.function {
  color: #6f42c1 !important;
}

/* Status Indicators */
.success {
  color: #22863a !important;
  background-color: #f0fff4 !important;
}

.error {
  color: #cb2431 !important;
  background-color: #ffebee !important;
}

.warning {
  color: #b08800 !important;
  background-color: #fff8e6 !important;
}

.info {
  color: #0366d6 !important;
  background-color: #f1f8ff !important;
}

/* Main Content */
.main-content {
  margin-left: 280px !important;
  padding: 24px !important;
  min-height: calc(100vh - 60px) !important;
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
  .sidebar {
    width: 100% !important;
    position: relative !important;
    height: auto !important;
    border-right: none !important;

  }

  .main-content {
    margin-left: 0 !important;
    padding: 16px !important;
  }
}

/* Dark Mode - HERO */
.dark-mode .hero {
  background-size: cover;
  color: #eee;
  position: relative;
}

.dark-mode .hero>* {
  position: relative;
  z-index: 1;
}

/* Dark Mode - FOOTER */
.dark-mode .footer {
  background-size: cover;
  color: #eee;
  position: relative;
}

/* ===== VARIABLES ===== */
:root {
  --auth-bg: rgba(226, 225, 225, 0.9);
  --auth-text: rgb(20, 20, 20);
  --auth-border: rgb(230, 230, 230);
  --auth-primary: rgb(78, 83, 116);
  --auth-primary-hover: rgb(55, 80, 220);
  --auth-secondary: rgb(245, 245, 245);
  --auth-tab-inactive: rgb(150, 150, 150);
  --auth-alert-success: rgb(45, 175, 85);
  --auth-alert-error: rgb(235, 50, 50);
  --auth-alert-info: rgb(50, 145, 255);
  --auth-alert-warning: rgb(255, 165, 0);
  --auth-glass-bg: rgba(255, 255, 255, 0.92);
  --auth-glass-border: rgba(200, 200, 200, 0.3);
}

.dark-mode {
  --auth-bg: rgb(18, 18, 18);
  --auth-text: rgb(240, 240, 240);
  --auth-border: rgb(60, 60, 60);
  --auth-primary: rgb(90, 120, 255);
  --auth-primary-hover: rgb(70, 100, 235);
  --auth-secondary: rgb(30, 30, 30);
  --auth-tab-inactive: rgb(140, 140, 140);
  --auth-alert-success: rgb(65, 185, 95);
  --auth-alert-error: rgb(255, 70, 70);
  --auth-alert-info: rgb(70, 155, 255);
  --auth-alert-warning: rgb(255, 180, 50);
  --auth-glass-bg: rgba(30, 30, 30, 0.95);
  --auth-glass-border: rgba(100, 100, 100, 0.2);
}

/* ===== ANIMATIONS ===== */
@keyframes modalFadeIn {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@keyframes modalFadeOut {
  0% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

@keyframes modalSlideUp {
  0% {
    transform: translateY(30px);
    opacity: 0;
  }

  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes modalSlideDown {
  0% {
    transform: translateY(0);
    opacity: 1;
  }

  100% {
    transform: translateY(30px);
    opacity: 0;
  }
}

@keyframes tabSwitch {
  0% {
    opacity: 0;
    transform: translateX(-20px);
  }

  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes swipeLeft {
  0% {
    transform: translateX(40%);
    opacity: 0;
  }

  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes swipeRight {
  0% {
    transform: translateX(-40%);
    opacity: 0;
  }

  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes shakeError {

  0%,
  100% {
    transform: translateX(0);
  }

  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-2px);
  }

  20%,
  40%,
  60%,
  80% {
    transform: translateX(2px);
  }
}

@keyframes floatIn {
  0% {
    transform: translateY(10px);
    opacity: 0;
  }

  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes pulseAttention {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.03);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 0.4;
  }

  100% {
    transform: scale(4);
    opacity: 0;
  }
}

@keyframes smoothDarken {
  0% {
    opacity: 0.95 !important;
  }

  100% {
    opacity: 1 !important;
  }
}

/* ===== MODAL BASE ===== */
.auth-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 40, 80, 0.8);
  backdrop-filter: blur(6px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  opacity: 0;
  transition: all 0.3s ease;
}

.auth-modal.active {
  display: flex;
  animation: modalFadeIn 0.6s ease forwards;
}

.auth-modal.closing {
  animation: modalFadeOut 0.6s ease forwards !important;
}

.auth-modal-content {
  width: 90%;
  max-width: 400px;
  background: var(--auth-bg);
  border-top: 4px inset rgb(118, 89, 197);
  border-bottom: 4px inset rgb(118, 89, 197);
  border-top-left-radius: 30px;
  border-bottom-right-radius: 30px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  transform: translateY(30px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.auth-modal.active .auth-modal-content {
  animation: modalSlideUp 0.6s ease forwards;
}

.auth-modal.closing .auth-modal-content {
  animation: modalSlideDown 0.6s ease forwards !important;
}

/* ===== HEADER ===== */
.auth-modal-header {
  padding: 12px;
  background: linear-gradient(135deg, var(--auth-primary), var(--auth-primary-hover));
  color: white;
  text-align: center;
  position: relative;
}

.auth-modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
}

/* ===== CLOSE BUTTON ===== */
.auth-close-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.1);
  color: rgb(10, 1, 1);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.auth-close-btn:hover {
  color: white;
  transform: rotate(1190deg);
  background: rgba(0, 0, 0, 0.2);
}

/* ===== TABS ===== */
.auth-tabs {
  display: flex;
  background: var(--auth-secondary);
  border-bottom: 1px solid var(--auth-border);
}

.auth-tab {
  flex: 1;
  padding: 8px 0;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  background: none;
  border: none;
  color: var(--auth-tab-inactive);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.auth-tab.active {
  color: var(--auth-primary);
}

.auth-tab.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 25%;
  width: 50%;
  height: 2px;
  background: var(--auth-primary);
  border-radius: 2px 2px 0 0;
  animation: tabSwitch 0.4s ease both;
}

/* ===== FORMS ===== */
.auth-form {
  display: none;
  padding: 25px;
  animation-duration: 0.5s;
  animation-fill-mode: both;
}

.auth-form.active {
  display: block;
  animation: tabSwitch 0.5s ease forwards;
}

.auth-form.login {
  animation-name: swipeLeft;
}

.auth-form.register {
  animation-name: swipeRight;
}

.form-group {
  margin-bottom: 8px;
  position: relative;
}

.form-group label {
  display: block;
  margin-bottom: 3px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--auth-text);
}

.form-group input {
  width: 100%;
  padding: 13px;
  background: var(--auth-secondary);
  border-top: 2px solid var(--auth-border);
  border-radius: 6px;
  color: var(--auth-text);
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.dark-mode .form-group input {
  width: 100%;
  padding: 13px;
  background: var(--auth-secondary);
  border-top: 2px solid var(--auth-border);
  border-radius: 6px;
  color: aliceblue !important;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.form-group input:focus {
  outline: none;
  border-color: var(--auth-primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
  transform: translateY(-1px);
}

.password-toggle {
  position: absolute;
  right: 34px;
  top: 34px;
  background: none;
  border: none;
  font-size: 1rem;
  color: var(--auth-tab-inactive);
  cursor: pointer;
}

.password-toggle:hover {
  color: var(--auth-primary);
  transform: scale(1.1);
}

/* ===== BUTTONS ===== */
.auth-btn {
  width: 60%;
  margin: 8px auto;
  padding: 0.5rem;
  background: var(--auth-primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
}

.auth-btn:hover {
  background: var(--auth-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 5px 10px rgba(79, 70, 229, 0.2);
}

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

/* ===== FORM OPTIONS ===== */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 8px 0;
  font-size: 0.85rem;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 4px;
}

.form-check input {
  width: auto;
  accent-color: var(--auth-primary);
}

/* ===== DIVIDER ===== */
.auth-divider {
  position: relative;
  margin: 12px 0;
  text-align: center;
  color: var(--auth-tab-inactive);
  font-size: 0.85rem;
}

.auth-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--auth-border);
}

.auth-divider span {
  position: relative;
  background: var(--auth-bg);
  padding: 0 8px;
  font-weight: 500;
}

.terms {
  margin: 12px 0;
  font-size: 0.8rem;
  color: var(--auth-tab-inactive);
  display: flex;
  align-items: flex-start;
  gap: 6px;
  line-height: 1.3;
}

.terms input {
  margin-top: 2px;
  accent-color: var(--auth-primary);
}

.terms a {
  color: var(--auth-primary);
  text-decoration: none;
  font-weight: 500;
}

.terms a:hover {
  text-decoration: underline;
}

/* ===== ALERTS ===== */
.auth-alert {
  display: none;
  padding: 8px;
  border-radius: 6px;
  margin-bottom: 12px;
  font-size: 0.85rem;
  align-items: center;
  gap: 6px;
  border-left: 3px solid transparent;
}

.auth-alert.showing {
  display: flex;
  animation: floatIn 0.6s ease forwards;
}

.auth-alert i {
  font-size: 1rem;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  border-left-color: var(--auth-alert-success);
  color: var(--auth-alert-success);
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border-left-color: var(--auth-alert-error);
  color: var(--auth-alert-error);
}

.alert-info {
  background: rgba(59, 130, 246, 0.1);
  border-left-color: var(--auth-alert-info);
  color: var(--auth-alert-info);
}

.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  border-left-color: var(--auth-alert-warning);
  color: var(--auth-alert-warning);
}

.header-auth-btn {
  margin-left: 8px;
  padding: 6px 12px;
  background: var(--auth-primary);
  color: #fff;
  border: none;
  border-radius: 5px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 5px rgba(79, 70, 229, 0.2);
  transition: all 0.3s ease;
}

.header-auth-btn:hover {
  background: var(--auth-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(79, 70, 229, 0.3);
}

.header-auth-btn:active {
  transform: translateY(0);
}

.header-auth-btn i {
  font-size: 1rem;
}

.auth-action-btn {
  background: linear-gradient(45deg, #858199, #6a89cc);
  border: none;
  color: #fff;
  padding: 3px 8px;
  font-size: 15px;
  border-radius: 20px 7px 7px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
  margin-left: auto;
  margin-right: auto;
  width: 150px;
  height: 50px;
}

.auth-action-btn:hover {
  transform: scale(1.1);
  opacity: 0.9;
}

/* DARK MODE */
.dark-mode .auth-action-btn {
  background: linear-gradient(45deg, #44415c, #2b3a6f);
  color: #eee;
}

/* Optional hover variation for dark mode */
.dark-mode .auth-action-btn:hover {
  background: linear-gradient(45deg, #55516d, #3a4d8c);
  color: #fff;
}

/* --------------------------
   RESPONSIVENESS
-------------------------- */

/* Medium screens (tablets) */
@media (max-width: 992px) {
  .auth-action-btn {
    font-size: 15px;
    padding: 6px 12px;
    width: 130px;
    height: 45px;
  }
}

/* Small screens (mobiles) */
@media (max-width: 768px) {
  .auth-action-btn {
    font-size: 14px;
    padding: 6px 10px;
    gap: 6px;
    width: 125px;
    height: 45px;
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  .auth-action-btn {
    font-size: 13px;
    padding: 5px 8px;
    gap: 5px;
    border-radius: 15px 6px 6px 15px;
    width: 110px;
    height: 41px;
  }
}

/* Extra small screens */
@media (max-width: 350px) {
  .auth-action-btn {
    font-size: 12px;
    padding: 3px 6px;
    gap: 3px;
    border-radius: 15px 6px 6px 15px;
    width: 92px;
    height: 33px;
  }
}

/* Animated glow for locked section */
.lock-section {
  position: relative;
  text-align: center;
  background: #ffffff;
  color: #333;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 0 95px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}


@keyframes glowingBorder {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* Dark Mode */
.dark-mode .lock-section {
  background: linear-gradient(135deg, rgba(34, 34, 34, 0.404), rgba(17, 17, 17, 0.39));
  color: #ddd;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.dark-mode .lock-section::before {
  background: linear-gradient(270deg,
      #2d2d3d86, #19131b54, #2c1c3a56, #35283b7c);
  color: #38ada9;
}

.unlock-section {
  position: relative;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  border-radius: 24px;
  padding: 2rem;
  margin: 2rem auto;
  box-shadow: 10px 5px 10px 10px rgba(33, 33, 31, 0.107);
  max-width: 800px;
  border: 2px solid transparent;
  transition: all 0.4s ease;
}



@keyframes glowingGreenBorder {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* Dark Mode */
.dark-mode .unlock-section {
  background: linear-gradient(135deg, rgba(34, 34, 34, 0.336), rgba(17, 17, 17, 0.582));
  color: #ddd;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.dark-mode .unlock-section::before {
  background: linear-gradient(270deg, #1e1e2b5b, #2d21314b, #26202b77, #21192554);
}

/* Auth Modal */
.auth-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.auth-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.auth-modal-content {
  width: 100%;
  max-width: 340px;
  background: var(--auth-bg);
  border-radius: 16px;
  border-top: 6px inset rgb(118, 89, 197);
  border-bottom: 6px inset rgb(118, 89, 197);
  border-top-left-radius: 40px;
  border-bottom-right-radius: 40px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  transform: translateY(30px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.auth-modal.active .auth-modal-content {
  transform: translateY(0);
  opacity: 1;
}

.auth-modal-header {
  padding: 24px;
  background: linear-gradient(135deg, var(--auth-primary), var(--auth-gradient));
  color: white;
  text-align: center;
  position: relative;
}

.auth-modal-header h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.auth-close-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: rgb(0, 0, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.auth-tabs {
  display: flex;
  background: var(--auth-secondary);
  position: relative;
}

.auth-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  font-weight: 600;
  color: var(--auth-tab-inactive);
  cursor: pointer;
  transition: color 0.2s ease;
  position: relative;
  z-index: 1;
}

.auth-tab.active {
  color: var(--auth-primary);
}

.auth-tab-indicator {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--auth-primary);
  border-radius: 3px 3px 0 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.form-group {
  position: relative;
}

.form-group input {
  width: 95%;
  padding: 10px 12px;
  background: var(--auth-input-bg);
  border: 1px solid var(--auth-border);
  border-radius: 12px;
  font-size: 0.8rem;
  transition: all 0.2s ease;
}

.form-group input:focus {
  border-color: var(--auth-primary);
  box-shadow: 0 0 0 3px rgba(var(--auth-primary-rgb), 0.1);
  transform: translateY(-2px);
}

/* Dark Mode Toggle */
#darkModeToggle {
  position: fixed;
  top: 1.2rem;
  right: 1rem;
  width: 45px;
  height: 45px;
  background: var(--surface);
  border: 2px solid var(--primary);
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.4);
  transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

#darkModeToggle:hover {
  background: linear-gradient(135deg, #666, #333);
  border-color: #9c88ff;
  box-shadow: 0 0 8px #9c88ff, 0 0 24px rgba(156, 136, 255, 0.4);
  transform: scale(1.1);
}

#darkModeToggle:active {
  transform: scale(0.95);
  box-shadow: 0 0 5px #9c88ff;
}

/* Color Variables */
:root {
  /* Auth Colors */
  --auth-bg: #fff5f0;
  --auth-text: #2a2a2a;
  --auth-border: rgba(255, 105, 97, 0.3);
  --auth-primary: #9394da;
  --auth-gradient: #ff9a8b;
  --auth-secondary: #ffe8e0;
  --auth-tab-inactive: #a8a8a8;
  --auth-input-bg: #ffffff;
  --auth-alert-error: #ff4d6d;
  --auth-alert-success: #70e000;

  /* Main Colors */
  --primary: #6C4DF6;
  --primary-light: #8D7AFF;
  --primary-dark: #5A3FCC;
  --secondary: #00D1B2;
  --accent: #FF7E5F;

  /* Backgrounds */
  --bg: #F9F5FF;
  --surface: #FFFFFF;
  --card-bg: #FFFFFF;

  /* Text */
  --text-primary: #2E2A3B;
  --text-secondary: #6B7280;

  /* Borders/Shadows */
  --border: #E5E7EB;
  --shadow: 0 4px 20px rgba(108, 77, 246, 0.1);
  --glow: 0 0 15px rgba(108, 77, 246, 0.3);
}

.dark-mode {
  /* Primary Colors */
  --primary: #8A63F2;
  --primary-light: #A78BFA;
  --primary-dark: #6D28D9;
  --secondary: #00F5D4;
  --accent: #FF9F1C;

  /* Backgrounds */
  --bg: #0F0F1A;
  --surface: #1A1A2E;
  --card-bg: #1E1E30;

  /* Text */
  --text-primary: #E2E8F0;
  --text-secondary: #94A3B8;

  /* Borders/Shadows */
  --border: #2D3748;
  --shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
  --glow: 0 0 20px rgba(138, 99, 242, 0.4);

  * {
    color: #d4d9faec !important;
  }

  #hiden {
    background: transparent;
    opacity: 0.99;
  }

  .lock-section {
    background: rgba(30, 30, 48, 0.6);
  }

  .btn-primary {
    background: linear-gradient(135deg, rgba(40, 40, 90, 0.9), rgba(30, 30, 60, 0.95)) !important;
    color: #f8f9fa !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 4px 20px rgba(30, 30, 60, 0.6), inset 0 1px 3px rgba(255, 255, 255, 0.1) !important;
  }
}

/* Lock/Unlock Sections */
.lock-section {
  position: relative;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  border-radius: 24px;
  padding: 2rem;
  margin: 2rem auto;
  max-width: 800px;
  border: 2px solid transparent;
  transition: all 0.4s ease;
}

.lock-section[data-locked="true"] .unlocked-content {
  display: none;
}

.lock-section[data-locked="false"] .lock-content {
  display: none;
}



/* Buttons */
.btn-primary {
  display: inline-block !important;
  position: relative !important;
  overflow: hidden !important;
  padding: 1.1rem 2.2rem !important;

  font-size: 1.1rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.5px !important;
  color: #fff !important;
  text-align: center !important;
  text-decoration: none !important;
  cursor: pointer !important;
  background: rgba(89, 109, 201, 0.85) !important;
  border: 2px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 36px !important;
  box-shadow: 0 4px 20px rgba(67, 97, 238, 0.4), inset 0 1px 3px rgba(255, 255, 255, 0.2) !important;
  backdrop-filter: blur(8px) !important;
  transition: all 0.3s ease !important;
}

.btn-primary::before {
  content: "" !important;
  position: absolute !important;
  left: 0;
  bottom: -100% !important;
  width: 100% !important;
  height: 100% !important;
  background: linear-gradient(to top, rgba(104, 36, 187, 0.8), rgba(67, 97, 238, 0.8)) !important;
  transition: all 0.4s ease !important;
  z-index: 0 !important;
}

.btn-primary span {
  position: relative !important;
  z-index: 1 !important;
}

.btn-primary:hover::before {
  bottom: 0 !important;
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.03) !important;
  box-shadow: 0 10px 30px rgba(67, 97, 238, 0.5), inset 0 1px 5px rgba(255, 255, 255, 0.3) !important;
}

.btn-primary:active {
  transform: translateY(1px) scale(0.97) !important;
  box-shadow: 0 2px 8px rgba(67, 97, 238, 0.3), inset 0 2px 6px rgba(255, 255, 255, 0.3) !important;
}

.btn-primary:focus-visible {
  outline: 3px solid #4361ee !important;
  outline-offset: 4px !important;
}

/* Responsive Styles */
@media (min-width: 900px) and (max-width:2100px) {
  .footer {
    height: auto;
  }

  * {
    font-size: 107%;
  }

  .container {
    min-width: 90% !important;
  }



  .hero {
    border-bottom: 10px inset rgb(110, 168, 219) !important;
  }

  .footer {
    border-top: 10px outset rgb(110, 168, 219) !important;
    height: 100% !important;
    padding-top: 2.8% !important;
  }

  .tree-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 400px;
    padding: 2.2rem !important;
    background: #fff;
    transform: translateY(-100%);
    transition: transform 0.5s cubic-bezier(0.25, 1.25, 0.5, 1.05);
    z-index: 999;
  }

  .tree-sidebar.collapsed {
    transform: translateY(0) !important;
  }
}

@media (min-width: 270px) and (max-width:900px) {
  .footer {
    height: auto;
  }

  .container {
    min-width: 100% !important;
  }

  .lock-section {
    max-width: 92% !important;
    padding: 4% !important;
    margin-top: 4% !important;
    margin-bottom: 6% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .unlock-section {
    max-width: 92% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 5% !important;
    margin-bottom: 6% !important;
  }
}

@media (min-width: 768px) {
  .btn-primary {
    font-size: 1.1rem !important;
    border-radius: 45px !important;
    border-bottom: #ce8f8f 11px outset !important;
    width: 45% !important;
  }

  .tree-sidebar {
    width: 280px;
    padding: 2rem;
  }
}

@media (max-width: 768px) {
  .btn-primary {
    font-size: 0.9rem !important;
    padding: 0.7rem 1rem !important;
    width: 50% !important;
    border-radius: 40px !important;
    border-bottom: #ce8f9f 8px outset !important;
  }
}


@media (min-width: 1500px) and (max-width: 1999px) {
  .hero h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    font-weight: 700 !important;
    color: var(--primary-light);
  }


}

@media (min-width: 1000px) and (max-width: 1499px) {

  .hero h1 {
    font-size: 3.1rem;
    margin-bottom: 1rem;
    font-weight: 700 !important;
    color: var(--primary-light);
  }
}

@media (min-width: 768px) and (max-width: 999px) {

  .hero h1 {
    font-size: 2.7rem;
    margin-bottom: 1rem;
    font-weight: 700 !important;
    color: var(--primary-light);
  }
}

.code-editor {
  min-height: 320px;
  padding: 12px;
  background: #e9eff4;
  color: #0b0c0e;
  font-family: 'Fira Code', monospace !important;
  font-size: 90%;
  line-height: 1.5;
  border-radius: 0 0 6px 6px;
  max-height: 320px;
  white-space: pre-wrap;
  overflow: auto;
  height: auto;
  border: 1px solid rgba(148, 143, 152, 0.403);

}

.dark-mode .code-editor {
  background: #131923;
  color: #abb2bf;
}

.clear-btn {
  background: transparent;
  border: none;
  color: #5a5555;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}

.clear-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #0e0c0c;
}

.clear-btn.small {
  padding: 2px 6px;
  font-size: 12px;
}

#code-output {

  max-height: 300px;
  overflow-y: auto;
  padding: 10px;
  font-size: 16px;
  background: #e7eaec;
  border-radius: 4px;
  margin-top: 8px;
  overflow: auto;
}

.console-log {
  color: #333;
  padding: 4px 0;
  border-bottom: 1px solid #eee;
}

.error {
  color: #dc3545;
  padding: 4px 0;
}

.clear-btn.small {
  background: rgba(84, 71, 71, 0.025);
  border-bottom: 2px solid rgba(124, 77, 255, 0.5);
  border-top: 2px solid rgba(255, 77, 77, 0.5);
  border-radius: 20%;
  color: #393232;
  font-size: 12px;
  font-weight: bold;
  width: 45px;
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: all 0.25s ease;
}

.clear-btn.small:hover {
  background: rgba(255, 77, 77, 0.051);
  border-color: rgba(255, 77, 77, 0.8);
  transform: rotate(360deg) scale(1.05);
}


@media (min-width: 1200px) {
  .container {
    display: flex;
    justify-content: space-between;

  }

  .left-side {
    width: 49%;
    float: left;
  }

  .right-side {
    width: 49%;
    float: right;
  }

  .footer-column {
    border-bottom: 2px solid #4B5563;
  }

  .editor-container {
    background-color: rgba(255, 255, 255);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 3rem;
    border: 1px solid var(--medium-gray);
    max-height: 1100px;
    overflow-x: auto;
  }

  #code-output {
    height: 295px;
    max-height: 300px;
    overflow-x: auto;
    padding: 10px;
    font-size: 16px;
    background: #e7eaec;
    border-radius: 4px;
    margin-top: 8px;
    overflow: auto;
  }
}

[data-protected] {
  transition: opacity 0.3s ease;
}

[data-protected]:not(.lock-section):not(.unlock-section) {
  display: none;
}

[data-protected]:not(.lock-section):not(.unlock-section) {
  display: block;
  /* or whatever display value it should have */

}

.sidebar-logout-btn {
  background-color: #ffffff8a;
  color: rgb(41, 40, 46);
  border-radius: 5px;
  padding: 6px 30px;
  border: 2px solid rgb(106, 91, 180);
  transition: all ease-in-out 0.2s;
}

.sidebar-logout-btn:hover {
  color: #5740bd;
  background: #6745c587;
  transform: scale(0.95);
}

/* ===== Code Editor Scrollbar ===== */
.code-editor::-webkit-scrollbar {
  width: 8px;
}

.code-editor::-webkit-scrollbar-track {
  background: #8a8a8b;
  /* dark background */
  border-radius: 10px;
}

.code-editor::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #978fd0, #7f76b7);
  /* purple gradient */
  border-radius: 10px;
  border: 2px solid #1a1a2e;
}

.code-editor::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #7b68ee, #6a5acd);
}

/* ===== Code Output Scrollbar ===== */
#code-output::-webkit-scrollbar {
  width: 8px;
}

#code-output::-webkit-scrollbar-track {
  background: #777878;
  /* dark teal background */
  border-radius: 10px;
}

#code-output::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #98aedb, #7a86ca);
  /* teal to cyan */
  border-radius: 10px;
  border: 2px solid #102020;
}

#code-output::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #0dcaf0, #20c997);
}

@media (max-width: 700px){
#quiz-btn {
  background: linear-gradient(45deg, #6a89cc, #8f95c5);
  border: none;
  color: #fff;
  padding: 0 4px;
  width: 40px;
  height: 35px;
  font-size: 25px;
  font-weight: bold;
   border-top-right-radius: 8px;
   border-bottom-right-radius: 8px;
  text-align: center;
  cursor: pointer;
  position: fixed;
  top: 78%;
  text-decoration: none;
  transition: all 0.3s ease;
}

@keyframes slideInLeft {
  0% {
    transform: translateX(-100%);
    opacity: 0;
  }

  100% {
    transform: translateX(0);
    opacity: 1;
  }
}
#quiz-text {
  background: linear-gradient(45deg, #6a89cc, #8f95c5);
  border: none;
  color: #fff;
  padding: 3px 3px;
  width: 50px;
  height: 30px;
  font-size: 17px;
  font-weight: bold;
   border-top-right-radius: 8px;
   border-bottom-right-radius: 8px;
  text-align: center;
  position: fixed;
  top: 79%;
  display: none;
  max-width: fit-content;
}
}
@media(min-width:701px){
  .quiz-btn{
    display: none;
  }

  .quiz-text{
    display: none;
  }
}

@media (max-width: 700px) {
.code-editor {
  min-height: 220px;
  
}
}
