 /* ---------- RESET & GLOBAL ---------- */
      * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
      }

      body {
        font-family:
          "Inter",
          -apple-system,
          BlinkMacSystemFont,
          sans-serif;
        background: var(--bg-gradient);
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        color: var(--text-primary);
        line-height: 1.5;
        transition:
          background-color 0.4s ease,
          color 0.3s ease;
        -webkit-font-smoothing: antialiased;
      }

      /* Custom scrollbar (for rest of page) */
      ::-webkit-scrollbar {
        width: 8px;
        height: 8px;
      }
      ::-webkit-scrollbar-track {
        background: var(--border-light);
        border-radius: 10px;
      }
      ::-webkit-scrollbar-thumb {
        background: var(--accent-light);
        border-radius: 10px;
        transition: background 0.2s;
      }
      ::-webkit-scrollbar-thumb:hover {
        background: var(--accent);
      }

      /* ---------- THEME VARIABLES ---------- */
      body {
        --bg-gradient: radial-gradient(
          circle at 10% 30%,
          #f1f5ff 0%,
          #e6ecf8 100%
        );
        --card-bg: rgba(255, 255, 255, 0.75);
        --card-bg-solid: #ffffff;
        --text-primary: #0f182e;
        --text-secondary: #2a3a5e;
        --border-light: rgba(0, 20, 50, 0.08);
        --chip-bg: rgba(240, 245, 255, 0.7);
        --chip-hover: rgba(220, 235, 255, 0.9);
        --accent: #2b3b6b;
        --accent-light: #4f6f8f;
        --shadow-sm: 0 8px 20px -6px rgba(0, 20, 40, 0.12);
        --shadow-md: 0 16px 30px -8px rgba(0, 30, 60, 0.2);
        --shadow-lg: 0 30px 50px -12px rgba(0, 40, 80, 0.25);
        --header-bg: rgba(255, 255, 255, 0.6);
        --glow: 0 0 0 2px rgba(75, 130, 200, 0.3);

        /* ===== OUTPUT COLORS (light mode) ===== */
        --output-bg: #1e2a3a;
        --output-text: #a8d8a8;
        --output-border: rgba(100, 180, 120, 0.3);
        --output-error: #ff7b7b;
        --output-info: #7ec8e3;
      }

      body.dark {
        --bg-gradient: radial-gradient(
          circle at 20% 30%,
          #1a253b 0%,
          #0f172a 100%
        );
        --card-bg: rgba(25, 35, 55, 0.8);
        --card-bg-solid: #1e293b;
        --text-primary: #edf2f9;
        --text-secondary: #b0c4de;
        --border-light: rgba(255, 255, 255, 0.06);
        --chip-bg: rgba(40, 55, 80, 0.6);
        --chip-hover: rgba(55, 75, 105, 0.8);
        --accent: #7aa2f7;
        --accent-light: #9bb9ff;
        --shadow-sm: 0 8px 20px -6px #030614;
        --shadow-md: 0 16px 30px -8px #020617;
        --shadow-lg: 0 30px 50px -12px #010313;
        --header-bg: rgba(20, 30, 45, 0.7);
        --glow: 0 0 0 2px rgba(120, 170, 250, 0.4);

        /* ===== OUTPUT COLORS (dark mode) ===== */
        --output-bg: #0d1b2a;
        --output-text: #79c99a;
        --output-border: rgba(80, 160, 100, 0.25);
        --output-error: #ff6b6b;
        --output-info: #56c8e8;
      }

      /* ---------- FULL‑WIDTH NAVBAR (W3SCHOOLS STYLE) ---------- */
      .navbar-wrapper {
        width: 100%;
        background: var(--header-bg);
        /* backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px); */
        border-bottom: 1px solid var(--border-light);
        position: sticky;
        top: 0;
        z-index: 9999;
        box-shadow: var(--shadow-md);
        overflow: hidden;
      }

      .navbar-container {
        width: 100%;
        padding: 0.6rem 2rem;
        display: flex;
        flex-wrap: nowrap;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
        position: relative;
        z-index: 9999;
        background: var(--card-bg-solid);
      }

      /* Scrollable language buttons – scrollbar hidden */
      .lang-buttons {
        display: flex;
        gap: 0.4rem;
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
        -webkit-overflow-scrolling: touch;
        flex: 1;
      }

      .lang-buttons::-webkit-scrollbar {
        display: none;
      }

      .lang-btn {
        background: transparent;
        border: none;
        padding: 0.5rem 1.2rem;
        border-radius: 40px;
        font-weight: 600;
        /* font-size: 0.95rem; */
        font-size: 20px;
        color: var(--text-secondary);
        cursor: pointer;
        transition: all 0.2s ease;
        white-space: nowrap;
      }

      .lang-btn:hover {
        background: var(--chip-hover);
        color: var(--accent);
        transform: translateY(-1px);
      }

      .lang-btn.active {
        background: var(--chip-bg);
        color: var(--accent);
        font-weight: 600;
        box-shadow: inset 0 -2px 0 var(--accent);
      }

      /* Disabled language button style */
      .lang-btn.disabled {
        opacity: 0.5;
        cursor: not-allowed;
        pointer-events: auto;
      }
      .lang-btn.disabled:hover {
        background: transparent;
        color: var(--text-secondary);
        transform: none;
      }

      .dark-toggle {
        background: var(--card-bg);
        border: 1px solid var(--border-light);
        border-radius: 40px;
        padding: 0.5rem 1.4rem;
        font-size: 1rem;
        font-weight: 500;
        cursor: pointer;
        color: var(--text-secondary);
        box-shadow: var(--shadow-sm);
        backdrop-filter: blur(4px);
        transition: all 0.2s;
        white-space: nowrap;
      }

      .dark-toggle:hover {
        background: var(--chip-hover);
        transform: scale(0.98);
      }
/* ====== TOAST NOTIFICATION ====== */   /* ← YEH ADD KARO */
#nav-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: white;
  padding: 0.6rem 1.6rem;
  border-radius: 40px;
  font-size: 0.95rem;
  font-weight: 500;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
  white-space: nowrap;
}
      /* Menu toggle button (mobile) */
      .menu-toggle {
        display: none;
        background: var(--accent);
        color: white;
        border: none;
        padding: 0.5rem 1rem;
        border-radius: 10px;
        font-size: 1.2rem;
        cursor: pointer;
        transition: background 0.2s;
      }
      .menu-toggle:hover {
        background: var(--accent-light);
      }

      /* ---------- FULL‑WIDTH MAIN CONTAINER ---------- */
      .main-container {
        width: 100%;
        padding: 1rem 0;
        display: flex;
        gap: 2rem;
        flex: 1;
      }

      /* Sidebar – fixed width */
      .sidebar {
        flex: 0 0 280px;
        background: var(--card-bg);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-radius: 24px;
        padding: 1.8rem 1rem;
        box-shadow: var(--shadow-lg);
        border: 1px solid var(--border-light);
        height: fit-content;
        max-height: calc(100vh - 120px);
        overflow-y: auto;
        position: sticky;
        top: 70px;
        align-self: flex-start;
        transition: left 0.3s ease;
        margin-left: 5px;
      }

      .sidebar::-webkit-scrollbar {
        width: 5px;
      }
      .sidebar::-webkit-scrollbar-track {
        background: var(--border-light);
        border-radius: 10px;
      }
      .sidebar::-webkit-scrollbar-thumb {
        background: var(--accent-light);
        border-radius: 10px;
      }

      .topic-section {
        background: transparent;
        padding: 0;
      }

      .sidebar-heading {
        font-size: 1.5rem;
        font-weight: 700;
        color: var(--accent);
        margin-bottom: 1.5rem;
        padding-bottom: 0.75rem;
        border-bottom: 2px solid var(--accent-light);
        letter-spacing: -0.3px;
      }

      /* Search bar – compact */
      .search-wrapper {
        display: flex;
        align-items: center;
        background: var(--card-bg-solid);
        border-radius: 60px;
        padding: 0.2rem 0.2rem 0.2rem 0.2rem;
        margin-bottom: 1.8rem;
        border: 1px solid var(--border-light);
        box-shadow: var(--shadow-sm);
        transition:
          box-shadow 0.2s,
          border-color 0.2s;
        overflow: hidden;
      }

      .search-wrapper:focus-within {
        box-shadow: 0 0 0 3px rgba(100, 150, 255, 0.25);
        border-color: var(--accent);
      }

      .search-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        padding-left: 1rem;
        color: var(--text-secondary);
        font-size: 1.1rem;
        opacity: 0.7;
      }

      .search-wrapper input {
        flex: 1;
        border: none;
        background: transparent;
        padding: 0.7rem 0.5rem;
        font-size: 0.95rem;
        outline: none;
        color: var(--text-primary);
        min-width: 0;
      }

      .search-wrapper input::placeholder {
        color: var(--text-secondary);
        opacity: 0.7;
        font-weight: 400;
      }

      .search-wrapper button {
        background: var(--accent);
        border: none;
        color: white;
        padding: 0.5rem 1.6rem;
        border-radius: 40px;
        font-weight: 500;
        font-size: 0.9rem;
        cursor: pointer;
        transition: all 0.2s ease;
        letter-spacing: 0.3px;
        box-shadow: 0 4px 10px -4px var(--accent);
        white-space: nowrap;
        margin-left: 0.2rem;
      }

      .search-wrapper button:hover {
        background: var(--accent-light);
        transform: scale(0.96);
        box-shadow: 0 8px 14px -6px var(--accent);
      }

      /* Topics list – vertical menu */
      .topics-grid {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
        margin-bottom: 1.5rem;
      }

      .topic-chip {
        background: transparent;
        padding: 0.7rem 1rem 0.7rem 1.5rem;
        border-radius: 0;
        font-size: 0.95rem;
        font-weight: 500;
        color: var(--text-secondary);
        cursor: pointer;
        transition: all 0.15s ease;
        border: none;
        width: 100%;
        text-align: left;
        word-break: break-word;
        line-height: 1.4;
        position: relative;
        border-left: 3px solid transparent;
      }

      .topic-chip:hover {
        background: var(--chip-hover);
        border-left-color: var(--accent-light);
        color: var(--accent);
      }

      .topic-chip.active {
        background: rgba(100, 150, 255, 0.15);
        border-left-color: var(--accent);
        color: var(--accent);
        font-weight: 600;
        box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
      }

      .topic-chip::before {
        content: "";
        position: absolute;
        left: 0.5rem;
        top: 50%;
        transform: translateY(-50%);
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--accent-light);
        opacity: 0.7;
        transition: all 0.2s ease;
      }

      .topic-chip:hover::before {
        background: var(--accent);
        opacity: 1;
        transform: translateY(-50%) scale(1.2);
      }

      .topic-chip.active::before {
        background: var(--accent);
        opacity: 1;
        box-shadow: 0 0 5px var(--accent);
        width: 10px;
        height: 10px;
      }

      .show-all-btn {
        background: transparent;
        color: var(--accent);
        border: 1px dashed var(--accent-light);
        padding: 0.7rem 1rem;
        border-radius: 30px;
        font-weight: 500;
        font-size: 0.9rem;
        margin-top: 0.5rem;
        cursor: pointer;
        transition: all 0.2s;
        width: 100%;
        letter-spacing: 0.2px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.3rem;
      }

      .show-all-btn:hover {
        background: var(--chip-hover);
        border-color: var(--accent);
        transform: translateY(-1px);
      }

      .empty-message {
        color: var(--text-secondary);
        text-align: center;
        padding: 1.5rem 1rem;
        font-size: 0.9rem;
        background: var(--chip-bg);
        border-radius: 16px;
        border: 1px dashed var(--border-light);
        margin: 1rem 0;
      }

      /* Books button style */
      .books-btn {
        background: var(--accent);
        color: white;
        border: none;
        padding: 0.7rem 1.5rem;
        border-radius: 40px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s;
        white-space: nowrap;
        box-shadow: var(--shadow-sm);
        margin-bottom: 1rem;
      }
      .books-btn:hover {
        background: var(--accent-light);
        transform: scale(0.98);
        box-shadow: var(--shadow-md);
      }

      /* Main content area – takes remaining width */
      .content {
        flex: 1;
        min-width: 0;
        position: relative;
        z-index: 1;
      }

      .questions-area {
        animation: fadeInUp 0.6s ease;
      }

      /* topic group heading */
      .topic-group {
        margin-bottom: 2rem;
      }
      .topic-group h3 {
        font-size: 1.6rem;
        color: var(--accent);
        margin-bottom: 1rem;
        padding-bottom: 0.5rem;
        border-bottom: 2px solid var(--accent-light);
      }

      .question-card {
        background: var(--card-bg);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-radius: 32px;
        padding: 1.8rem 2.2rem;
        margin-bottom: 1.8rem;
        box-shadow: var(--shadow-md);
        border: 1px solid var(--border-light);
        transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
        border-left: 6px solid var(--accent);
        animation: cardEntrance 0.5s ease-out;
        animation-fill-mode: both;
        scroll-margin-top: 100px;
        /* changes for fix header */
        position: relative;
        z-index: 1;
        overflow: hidden;
      }

      @keyframes cardEntrance {
        from {
          opacity: 0;
          transform: translateY(30px);
        }
        to {
          opacity: 1;
          transform: translateY(0);
        }
      }

      .question-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-lg), var(--glow);
      }

      .question-text {
        font-size: 1.25rem;
        font-weight: 600;
        color: var(--text-primary);
        margin-bottom: 1.5rem;
        line-height: 1.5;
      }

      .button-group {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-bottom: 0.5rem;
      }

      .nav-btn,
      .toggle-solution,
      .run-code-btn,
      .hint-btn {
        background: transparent;
        border: 1.5px solid var(--accent);
        color: var(--accent);
        padding: 0.6rem 1.4rem;
        border-radius: 40px;
        font-weight: 600;
        font-size: 0.95rem;
        cursor: pointer;
        transition: all 0.2s ease;
        display: inline-flex;
        align-items: center;
        gap: 0.3rem;
        backdrop-filter: blur(4px);
        letter-spacing: 0.2px;
      }

      .run-code-btn {
        background: var(--accent-light);
        border-color: var(--accent-light);
        color: white;
        box-shadow: 0 6px 14px -6px var(--accent);
      }

      .nav-btn:hover,
      .toggle-solution:hover,
      .hint-btn:hover {
        background: var(--accent);
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 10px 18px -8px var(--accent);
      }

      .run-code-btn:hover {
        opacity: 0.9;
        transform: scale(1.02) translateY(-2px);
        box-shadow: 0 14px 22px -8px var(--accent);
      }

      .solution-panel,
      .code-runner-panel,
      .hint-panel {
        max-height: 0;
        overflow: hidden;
        transition:
          max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1),
          margin 0.3s;
        background: transparent;
        border-radius: 24px;
        margin-top: 0;
      }

      .solution-panel.show,
      .code-runner-panel.show,
      .hint-panel.show {
        max-height: 1000px;
        margin-top: 1.8rem;
        overflow-y: auto;
      }

      .solution-content,
      .code-runner-content,
      .hint-content {
        padding: 1.8rem 2rem;
        border: 1px solid var(--border-light);
        border-radius: 24px;
        background: var(--card-bg-solid);
        box-shadow: var(--shadow-sm);
      }

      .math-solution {
        background: var(--chip-bg);
        padding: 1.2rem 1.6rem;
        border-radius: 20px;
        margin-bottom: 1.8rem;
        font-style: italic;
        color: var(--text-secondary);
        border-left: 5px solid var(--accent-light);
        font-size: 1.05rem;
      }

      .code-solution {
        border-radius: 16px;
        overflow: hidden;
        margin-bottom: 1.5rem;
      }

      .rating {
        display: flex;
        gap: 1.5rem;
        align-items: center;
        margin-top: 1.5rem;
        padding-top: 1rem;
        border-top: 1px dashed var(--border-light);
      }

      .rating-btn {
        background: none;
        border: none;
        font-size: 1.3rem;
        cursor: pointer;
        color: var(--text-secondary);
        display: flex;
        align-items: center;
        gap: 0.5rem;
        transition: all 0.15s;
        padding: 0.3rem 0.8rem;
        border-radius: 40px;
        background: var(--chip-bg);
      }

      .rating-btn:hover {
        transform: scale(1.15);
        color: var(--accent);
        background: var(--chip-hover);
      }

      .rating-btn:active {
        transform: scale(0.95);
      }

      .rating-btn.voted {
        background: var(--accent);
        color: white;
      }

      .rating-count {
        font-size: 1rem;
        font-weight: 600;
      }

      /* CodeMirror editor styling */
      .CodeMirror {
        height: auto;
        min-height: 140px;
        border-radius: 20px;
        border: 1px solid var(--border-light);
        background: var(--chip-bg);
        font-family: "Fira Code", "Courier New", monospace;
        font-size: 0.95rem;
      }

      .code-editor {
        display: none;
      }

      .execute-btn {
        background: var(--accent);
        color: white;
        border: none;
        padding: 0.7rem 2.2rem;
        border-radius: 40px;
        font-weight: 600;
        font-size: 1rem;
        margin: 1.2rem 0;
        cursor: pointer;
        transition: 0.2s;
        box-shadow: 0 8px 16px -8px var(--accent);
        letter-spacing: 0.3px;
      }

      .execute-btn:hover {
        opacity: 0.9;
        transform: scale(0.98);
        box-shadow: 0 12px 22px -8px var(--accent);
      }

      .execute-btn:disabled {
        opacity: 0.4;
        cursor: not-allowed;
      }

      /* ===== OUTPUT AREA - IMPROVED COLORS ===== */
      .output-area {
        background: var(--output-bg);
        border-radius: 20px;
        /* padding: 1.2rem 1.4rem;*/
        padding: 0.6rem 1rem !important;
        font-family: "Fira Code", "Courier New", monospace;
        font-size: 1 rem;
        color: var(--output-text);
        white-space: pre-wrap;
        /* max-height: 250px; */
        min-height: 50px !important;
        max-height: none !important;
        /* overflow-y: auto; */
        overflow-y: auto;
        border: 1px solid var(--output-border);
        /* subtle left glow bar like terminal */
        border-left: 4px solid rgba(100, 200, 130, 0.5);
        line-height: 1 !important;
        letter-spacing: 0.3px;
        /* terminal look */
        box-shadow:
          inset 0 2px 8px rgba(0, 0, 0, 0.3),
          0 4px 12px rgba(0, 0, 0, 0.15);
      }

      /* Error output - red tint */
      .output-area.error-output {
        color: var(--output-error);
        border-left-color: rgba(255, 100, 100, 0.6);
        padding: 0.3rem 1rem !important; /* 🔥 ADD THIS LINE */
        max-height: none !important; /* 🔥 ADD THIS LINE */
      }

      /* Info/waiting output - blue tint */
      .output-area.info-output {
        color: var(--output-info);
        border-left-color: rgba(80, 180, 220, 0.5);
      }

      .empty-code-warning {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        background: linear-gradient(
          135deg,
          rgba(255, 180, 50, 0.15),
          rgba(255, 140, 50, 0.1)
        );
        border: 1px solid rgba(255, 160, 50, 0.4);
        border-left: 4px solid #f5a623;
        border-radius: 10px;
        padding: 1 rem 1rem; /* ← padding kam kiya: pehle 0.9rem, ab 0.4rem */
        color: #e8960a;
        font-size: 1 rem; /* ← font size bhi thoda chota */
        font-weight: 500;
        text-align: center;
        box-sizing: border-box;
        width: 100%;
        animation: warningPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
      }
      body.dark .empty-code-warning {
        background: linear-gradient(
          135deg,
          rgba(255, 180, 50, 0.1),
          rgba(255, 140, 50, 0.08)
        );
        color: #ffc247;
        border-color: rgba(255, 160, 50, 0.35);
        padding: 0.4rem 1rem; /* ← ADD THIS LINE */
      }

      @keyframes warningPop {
        from {
          opacity: 0;
          transform: scale(0.92) translateY(-4px);
        }
        to {
          opacity: 1;
          transform: scale(1) translateY(0);
        }
      }

      .description {
        background: var(--card-bg);
        backdrop-filter: blur(12px);
        border-radius: 48px;
        padding: 2.5rem;
        margin: 2rem 0 2.5rem 0;
        box-shadow: var(--shadow-lg);
        text-align: center;
        font-size: 1.2rem;
        color: var(--text-secondary);
        border-left: 8px solid var(--accent-light);
        border-right: 1px solid var(--border-light);
        animation: fadeInUp 0.8s ease;
      }

      .features-section {
        margin-top: 2.5rem;
        text-align: center;
        animation: fadeInUp 0.8s ease;
      }

      .features-section h2 {
        font-size: 2.3rem;
        font-weight: 700;
        color: var(--accent);
        margin-bottom: 2.5rem;
        position: relative;
        display: inline-block;
        letter-spacing: -0.5px;
      }

      .features-section h2::after {
        content: "";
        position: absolute;
        bottom: -12px;
        left: 50%;
        transform: translateX(-50%);
        width: 90px;
        height: 4px;
        background: var(--accent-light);
        border-radius: 4px;
      }

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

      .feature-card {
        background: var(--card-bg);
        backdrop-filter: blur(12px);
        border-radius: 32px;
        padding: 2.5rem 1.8rem;
        box-shadow: var(--shadow-md);
        transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
        cursor: default;
        border: 1px solid var(--border-light);
        animation: float 6s infinite ease-in-out;
      }

      .feature-card:hover {
        transform: translateY(-12px) scale(1.02);
        box-shadow: var(--shadow-lg), var(--glow);
      }

      @keyframes float {
        0% {
          transform: translateY(0px);
        }
        50% {
          transform: translateY(-6px);
        }
        100% {
          transform: translateY(0px);
        }
      }

      .feature-icon {
        font-size: 3.5rem;
        margin-bottom: 1.2rem;
        display: inline-block;
      }

      .feature-card h3 {
        font-size: 1.6rem;
        font-weight: 700;
        color: var(--text-primary);
        margin-bottom: 0.8rem;
      }

      .feature-card p {
        color: var(--text-secondary);
        line-height: 1.6;
        font-size: 1rem;
      }

      /* ---------- PAGINATION CONTROLS ---------- */
      .pagination-controls {
        margin: 2rem 0;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 1rem;
        flex-wrap: wrap;
      }

      .pagination-btn {
        background: var(--card-bg);
        border: 1px solid var(--border-light);
        color: var(--text-primary);
        padding: 0.6rem 1.5rem;
        border-radius: 40px;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.2s;
        backdrop-filter: blur(4px);
      }

      .pagination-btn:hover:not(:disabled) {
        background: var(--accent);
        color: white;
        transform: translateY(-2px);
        box-shadow: var(--shadow-sm);
      }

      .pagination-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
      }
      /* ========== ENHANCED FOOTER STYLES ========== */
      .footer {
        margin-top: 4rem;
        background: var(--card-bg);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-top: 1px solid var(--border-light);
        padding: 3rem 2rem 1.5rem;
        width: 100%;
        transition: all 0.3s ease;
      }

      .footer-container {
        max-width: 1280px;
        margin: 0 auto;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 2.5rem;
      }

      .footer-col h3 {
        font-size: 1.25rem;
        font-weight: 700;
        color: var(--accent);
        margin-bottom: 1.25rem;
        letter-spacing: -0.2px;
        position: relative;
        display: inline-block;
      }

      .footer-col h3::after {
        content: "";
        position: absolute;
        bottom: -8px;
        left: 0;
        width: 45px;
        height: 3px;
        background: var(--accent-light);
        border-radius: 3px;
        transition: width 0.3s ease;
      }

      .footer-col:hover h3::after {
        width: 70px;
      }

      .footer-col p {
        color: var(--text-secondary);
        font-size: 0.9rem;
        line-height: 1.6;
        margin-bottom: 1rem;
      }

      .since-badge {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        background: var(--chip-bg);
        padding: 0.5rem 1rem;
        border-radius: 40px;
        font-size: 0.8rem;
        color: var(--accent);
        margin-top: 0.75rem;
        backdrop-filter: blur(4px);
      }

      .footer-col ul {
        list-style: none;
        padding: 0;
      }

      .footer-col ul li {
        margin-bottom: 0.75rem;
      }

      .footer-col ul li a {
        color: var(--text-secondary);
        text-decoration: none;
        font-size: 0.9rem;
        display: inline-flex;
        align-items: center;
        gap: 0.6rem;
        transition: all 0.25s ease;
      }

      .footer-col ul li a i {
        width: 22px;
        font-size: 0.9rem;
        color: var(--accent-light);
        transition: all 0.25s ease;
      }

      .footer-col ul li a:hover {
        color: var(--accent);
        transform: translateX(5px);
      }

      .footer-col ul li a:hover i {
        color: var(--accent);
        transform: scale(1.1);
      }

      .contact-info li {
        display: flex;
        align-items: flex-start;
        gap: 0.8rem;
        margin-bottom: 0.9rem;
        color: var(--text-secondary);
        font-size: 0.9rem;
        line-height: 1.5;
      }

      .contact-info li i {
        width: 22px;
        margin-top: 2px;
        color: var(--accent-light);
        font-size: 1rem;
      }

      .contact-info li a {
        color: var(--text-secondary);
        text-decoration: none;
        transition: color 0.25s ease;
      }

      .contact-info li a:hover {
        color: var(--accent);
      }

      .social-links {
        display: flex;
        flex-wrap: wrap;
        gap: 0.8rem;
        margin: 1rem 0 1.2rem;
      }

      .social-links a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: var(--chip-bg);
        border-radius: 50%;
        color: var(--accent);
        font-size: 1.1rem;
        transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
        border: 1px solid var(--border-light);
        text-decoration: none;
      }

      .social-links a:hover {
        background: var(--accent);
        color: white;
        transform: translateY(-4px) scale(1.05);
        box-shadow: 0 8px 20px -8px var(--accent);
      }

      .footer-bottom {
        max-width: 1280px;
        margin: 2rem auto 0;
        padding-top: 1.8rem;
        border-top: 1px solid var(--border-light);
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
        color: var(--text-secondary);
        font-size: 0.85rem;
      }

      .copyright,
      .credit {
        display: flex;
        align-items: center;
        gap: 0.4rem;
      }

      .legal-links {
        display: flex;
        align-items: center;
        gap: 0.8rem;
        flex-wrap: wrap;
      }

      .legal-links a {
        color: var(--text-secondary);
        text-decoration: none;
        display: inline-flex;
        align-items: center;
        gap: 0.3rem;
        transition: color 0.25s ease;
      }

      .legal-links a:hover {
        color: var(--accent);
      }

      .legal-links .separator {
        color: var(--border-light);
      }

      .credit .fa-heart {
        color: #f43f5e;
        animation: heartbeat 1.5s ease infinite;
      }

      @keyframes heartbeat {
        0%,
        100% {
          transform: scale(1);
        }
        50% {
          transform: scale(1.15);
        }
      }
      /* ---------- MOBILE RESPONSIVE STYLES ---------- */
      @media (max-width: 900px) {
        .menu-toggle {
          display: block;
        }

        .main-container {
          flex-direction: column;
          padding: 1rem;
        }

        .sidebar {
          position: fixed;
          left: -100%;
          top: 70px;
          width: 80%;
          max-width: 300px;
          height: calc(100vh - 70px);
          z-index: 1000;
          border-radius: 0 20px 20px 0;
          box-shadow: var(--shadow-lg);
          background: var(--card-bg-solid);
          backdrop-filter: blur(10px);
          transition: left 0.3s ease;
        }

        .sidebar.show {
          left: 0;
        }

        .content {
          width: 100%;
        }

        .question-card {
          padding: 1.2rem;
          border-radius: 24px;
        }

        .button-group {
          flex-direction: column;
          gap: 0.6rem;
        }

        .nav-btn,
        .toggle-solution,
        .run-code-btn,
        .hint-btn {
          width: 100%;
          justify-content: center;
        }

        .description {
          padding: 1.5rem;
          border-radius: 24px;
          font-size: 1rem;
        }

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

      @media (max-width: 600px) {
        .lang-buttons {
          gap: 0.2rem;
        }

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

        .dark-toggle {
          padding: 0.4rem 0.8rem;
          font-size: 0.85rem;
        }

        body {
          font-size: 14px;
        }

        .sidebar-heading {
          font-size: 1.2rem;
        }

        .search-wrapper input {
          font-size: 0.85rem;
        }

        .footer-container {
          grid-template-columns: 1fr;
        }

        .footer-bottom {
          flex-direction: column;
          text-align: center;
        }
      }
      /* Enhanced mobile responsiveness */
      @media (max-width: 768px) {
        .main-container {
          padding: 10px;
        }
        .sidebar {
          top: 70px;
          width: 85%;
          max-width: 280px;
          background: var(--card-bg-solid);
        }
        .question-card {
          padding: 16px;
          border-radius: 18px;
        }
        .question-text {
          font-size: 16px;
          line-height: 1.4;
        }
        .button-group {
          flex-direction: column;
        }
        .button-group button {
          width: 100%;
          justify-content: center;
        }
        .CodeMirror {
          font-size: 13px;
          min-height: 120px;
        }
        .lang-buttons {
          overflow-x: auto;
          white-space: nowrap;
        }
        .lang-btn {
          font-size: 12px;
          padding: 6px 10px;
        }
        .footer-container {
          grid-template-columns: 1fr;
          text-align: center;
        }
        .social-links {
          justify-content: center;
        }
        .pagination-controls {
          flex-direction: column;
          gap: 10px;
        }
        .pagination-btn {
          width: 100%;
        }
      }
      @media (max-width: 768px) {
        .footer {
          padding: 2rem 1.2rem 1rem;
          margin-top: 2.5rem;
        }
        .footer-container {
          gap: 2rem;
        }
        .footer-col {
          text-align: left;
        }
        .footer-col h3::after {
          left: 0;
          transform: none;
        }
        .social-links {
          justify-content: flex-start;
        }
        .footer-bottom {
          flex-direction: column;
          text-align: center;
          gap: 0.8rem;
        }
        .copyright,
        .credit,
        .legal-links {
          justify-content: center;
        }
      }

      @media (max-width: 480px) {
        .footer {
          padding: 1.5rem 1rem 0.8rem;
        }
        .footer-col h3 {
          font-size: 1.1rem;
        }
        .footer-col p,
        .footer-col li,
        .footer-col a {
          font-size: 0.85rem;
        }
        .social-links a {
          width: 36px;
          height: 36px;
          font-size: 1rem;
        }
        .contact-info li {
          gap: 0.6rem;
        }
        .legal-links {
          gap: 0.5rem;
        }
      }

      @keyframes fadeInUp {
        from {
          opacity: 0;
          transform: translateY(20px);
        }
        to {
          opacity: 1;
          transform: translateY(0);
        }
      }

      /* ---------- STDIN INPUT BOX ---------- */
      .stdin-box {
        margin-top: 18px;
      }

      .stdin-box label {
        display: block;
        margin-bottom: 6px;
        font-weight: 600;
        color: var(--text-secondary);
      }

      .input-editor {
        width: 100%;
        min-height: 32px;
        height: 32px;
        padding: 6px 10px;
        border-radius: 8px;
        border: 1px solid var(--border-light);
        background: var(--chip-bg);
        color: var(--text-primary);
        font-family: "Fira Code", monospace;
        font-size: 0.9rem;
        resize: vertical;
        transition: all 0.2s ease;
      }

      .input-editor:focus {
        outline: none;
        border: 1px solid var(--accent);
        box-shadow: 0 0 0 3px rgba(100, 150, 255, 0.2);
      }

      body.dark .input-editor {
        background: rgba(30, 41, 59, 0.6);
      }

      .input-box {
        width: 100%;
        padding: 10px;
        margin-bottom: 8px;
        border-radius: 6px;
        border: 1px solid #ccc;
        font-size: 14px;

        .running-loader {
          color: #00ff88;
          font-weight: 600;
          animation: pulse 1s infinite;
        }

        @keyframes pulse {
          0% {
            opacity: 0.5;
          }
          50% {
            opacity: 1;
          }
          100% {
            opacity: 0.5;
          }
        }
      }
      .practice-hub-btn {
  background: linear-gradient(135deg, #7c3aed, #2563eb);
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  white-space: nowrap;
}

.practice-hub-btn:hover {
  transform: translateY(-2px) scale(1.03);
  opacity: 0.95;
}
.feature-card {
  cursor: pointer;
}
@media (max-width: 700px) {
  .button-group {
    flex-direction: row !important;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  /* Back button: first in row 1 */
  .button-group .back-btn {
    order: 1;
    width: calc(50% - 0.25rem);
    flex: 0 0 auto;
  }

  /* Next button: second in row 1 (moved from last position using order) */
  .button-group .next-btn {
    order: 2;
    width: calc(50% - 0.25rem);
    flex: 0 0 auto;
  }

  /* Solution, Hint, Run Code: row 2, each one‑third width */
  .button-group .toggle-solution {
    order: 3;
    width: calc(33.333% - 0.34rem);
    flex: 0 0 auto;
  }
  .button-group .hint-btn {
    order: 4;
    width: calc(33.333% - 0.34rem);
    flex: 0 0 auto;
  }
  .button-group .run-code-btn {
    order: 5;
    width: calc(33.333% - 0.34rem);
    flex: 0 0 auto;
  }

  /* Ensure text fits well */
  .button-group button {
    white-space: normal;
    word-break: keep-all;
    text-align: center;
    font-size: 0.85rem;
    padding: 0.5rem 0.2rem;
  }
}

/* Extra small devices (below 480px) further reduce font size */
@media (max-width: 480px) {
  .button-group button {
    font-size: 0.75rem;
    padding: 0.4rem 0.1rem;
  }
}
/* ===== END: RESPONSIVE BUTTON LAYOUT ===== */
