/* CSS Variables for Design System */

      /* Dark Mode Variables */
      .dark-mode {
        --text-primary: #f9fafb;
        --text-secondary: #d1d5db;
        --text-light: #9ca3af;
        --bg-primary: #1f2937;
        --bg-secondary: #111827;
        --bg-tertiary: #374151;
        --border-color: #374151;
      }


      /* Additional styles specific to tools page */
      .container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 1rem;
      }

      /* Hero Section */

      .hero-bg {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        z-index: 0;
        pointer-events: none;
        opacity: 0.92;
      }




      .breadcrumb {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        margin-bottom: 2rem;
        font-size: 0.9rem;
        opacity: 0.8;
      }

      .breadcrumb a {
        color: white;
        text-decoration: none;
      }

      /* Sections */
      .section {
        padding: 4rem 0;
      }

      .section-title {
        font-size: 2.5rem;
        font-weight: 700;
        text-align: center;
        margin-bottom: 1rem;
        color: var(--text-primary);
      }

      .section-description {
        text-align: center;
        color: var(--text-secondary);
        margin-bottom: 3rem;
        font-size: 1.1rem;
      }

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

      .tool-card {
        background: var(--bg-primary);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        padding: 2rem;
        box-shadow: var(--shadow-md);
        transition: all 0.3s ease;
        position: relative;
      }

      .tool-card::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: var(--gradient-primary);
        border-radius: 12px 12px 0 0;
        transform: scaleX(0);
        transition: transform 0.3s ease;
      }

      .tool-card:hover {
        transform: translateY(-8px);
        box-shadow: var(--shadow-lg);
      }

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

      .tool-header {
        display: flex;
        align-items: center;
        gap: 1rem;
        margin-bottom: 1.5rem;
      }

      .tool-icon {
        width: 60px;
        height: 60px;
        background: var(--gradient-primary);
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        color: white;
      }

      .tool-title {
        font-size: 1.5rem;
        font-weight: 600;
        color: var(--text-primary);
      }

      .tool-description {
        color: var(--text-secondary);
        margin-bottom: 1.5rem;
      }

      .tool-interface {
        background: var(--bg-secondary);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        padding: 1.5rem;
        margin-bottom: 1rem;
      }

      /* Button Styles */
      .btn {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.75rem 1.5rem;
        background: var(--primary-color);
        color: white;
        border: none;
        border-radius: 8px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        text-decoration: none;
      }

      .btn:hover {
        background: var(--primary-hover);
        transform: translateY(-2px);
      }

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

      .btn-secondary:hover {
        background: var(--primary-color);
        color: white;
      }

      /* Timer Styles */
      .timer-display {
        font-size: 3rem;
        font-weight: 700;
        text-align: center;
        color: var(--primary-color);
        margin-bottom: 1rem;
        font-family: "Courier New", monospace;
      }

      .timer-controls {
        display: flex;
        gap: 0.5rem;
        justify-content: center;
        margin-bottom: 1rem;
      }

      .preset-btn {
        padding: 0.5rem 1rem;
        background: var(--bg-primary);
        border: 1px solid var(--border-color);
        border-radius: 6px;
        cursor: pointer;
        transition: all 0.3s ease;
        font-size: 0.8rem;
      }

      .preset-btn:hover {
        background: var(--primary-color);
        color: white;
      }

      /* Whiteboard Styles */
      .whiteboard {
        width: 100%;
        height: 300px;
        border: 2px solid var(--border-color);
        border-radius: 12px;
        background: white;
        cursor: crosshair;
      }

      .whiteboard-controls {
        display: flex;
        gap: 1rem;
        margin-bottom: 1rem;
        flex-wrap: wrap;
      }

      .color-picker {
        width: 40px;
        height: 40px;
        border: none;
        border-radius: 50%;
        cursor: pointer;
      }

      /* Rewards Chart */
      .rewards-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 1rem;
      }

      .student-card {
        background: var(--bg-primary);
        border: 2px solid var(--border-color);
        border-radius: 12px;
        padding: 1rem;
        text-align: center;
        transition: all 0.3s ease;
      }

      .student-card:hover {
        border-color: var(--primary-color);
      }

      .student-name {
        font-weight: 600;
        margin-bottom: 0.5rem;
      }

      .star-count {
        font-size: 1.5rem;
        color: var(--accent-color);
      }

      /* Typing Test */
      .typing-text {
        background: var(--bg-secondary);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        padding: 1.5rem;
        margin-bottom: 1rem;
        font-size: 1.1rem;
        line-height: 1.8;
      }

      .typing-input {
        width: 100%;
        padding: 1rem;
        border: 2px solid var(--border-color);
        border-radius: 12px;
        font-size: 1rem;
        margin-bottom: 1rem;
      }

      .typing-stats {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 1rem;
        text-align: center;
      }

      .stat-card {
        background: var(--bg-secondary);
        padding: 1rem;
        border-radius: 12px;
      }

      .stat-value {
        font-size: 2rem;
        font-weight: 700;
        color: var(--primary-color);
      }


      /* Footer */
      footer {
        background: var(--text-primary);
        color: white;
        padding: 3rem 0 1rem;
        margin-top: 4rem;
      }

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

      .footer-section h3 {
        color: var(--primary-color);
        margin-bottom: 1rem;
      }

      .footer-section a {
        color: #d1d5db;
        text-decoration: none;
        transition: color 0.3s ease;
      }

      .footer-section a:hover {
        color: var(--primary-color);
      }

      .footer-bottom {
        border-top: 1px solid #374151;
        padding-top: 1rem;
        text-align: center;
        color: #9ca3af;
      }

      /* Mobile Responsive */
      @media (max-width: 768px) {
        .mobile-toggle {
          display: flex;
          background: none;
          border: 2px solid var(--border-color);
          border-radius: 8px;
          color: var(--text-primary);
          cursor: pointer;
          padding: 0.5rem;
        }

        .nav-links {
          position: absolute;
          top: 100%;
          left: 0;
          right: 0;
          background: var(--bg-primary);
          border: 1px solid var(--border-color);
          flex-direction: column;
          padding: 1rem;
          opacity: 0;
          visibility: hidden;
          transform: translateY(-10px);
          transition: all 0.3s ease;
        }

        .nav-links.active {
          opacity: 1;
          visibility: visible;
          transform: translateY(0);
        }

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

        .timer-display {
          font-size: 2rem;
        }

        .rewards-grid {
          grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        }
      }

      .tool-links-row {
        display: flex;
        gap: 2rem;
        justify-content: center;
        margin: 2.5rem 0;
      }

      .tool-link-box {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        background: var(--bg-primary, #fff);
        border: 2px solid var(--primary-color, #46bbe5);
        border-radius: 16px;
        width: 220px;
        height: 140px;
        text-decoration: none;
        color: var(--primary-color, #46bbe5);
        font-size: 1.15rem;
        font-weight: 600;
        box-shadow: 0 4px 16px rgba(70, 187, 229, 0.1);
        transition: all 0.3s ease;
        gap: 0.7rem;
        position: relative;
        overflow: hidden;
      }

      .tool-link-box::before {
        content: "";
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(
          90deg,
          transparent,
          rgba(70, 187, 229, 0.1),
          transparent
        );
        transition: left 0.5s ease;
      }

      /* Center the heading text in tool-link-box */
      .tool-link-box span {
        display: block;
        width: 100%;
        text-align: center;
      }

      .tool-link-box i {
        font-size: 2.2rem;
        margin-bottom: 0.3rem;
      }

      .tool-link-box:hover {
        background: var(--primary-color, #46bbe5);
        color: #fff;
        box-shadow: 0 12px 40px rgba(70, 187, 229, 0.25);
        transform: translateY(-6px) scale(1.05);
        border-color: var(--primary-hover, #05425c);
      }

      .tool-link-box:hover::before {
        left: 100%;
      }

      /* Notification styles */
      .notification {
        position: fixed;
        top: 20px;
        right: 20px;
        padding: 1rem 1.5rem;
        background: var(--primary-color);
        color: white;
        border-radius: 8px;
        box-shadow: var(--shadow-lg);
        transform: translateX(400px);
        transition: transform 0.3s ease;
        z-index: 1000;
        font-weight: 500;
      }

      .notification.show {
        transform: translateX(0);
      }

      .notification.success {
        background: var(--accent-color);
      }

      .notification.error {
        background: var(--error-color);
      }

      @media (max-width: 900px) {
        .tool-links-row {
          flex-direction: column;
          gap: 1.2rem;
          align-items: center;
        }

        .tool-link-box {
          width: 100%;
          max-width: 320px;
        }
      }

      .hero-bg {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        z-index: 1;
      }




      /* Tool Click Ad Styles */
      #toolClickAd {
        transition: all 0.3s ease;
        border: 2px solid var(--primary-color);
        box-shadow: 0 4px 12px rgba(70, 187, 229, 0.2);
      }

      #toolClickAd.show {
        animation: slideIn 0.5s ease-out;
      }


      .continue-btn {
        animation: pulse 2s infinite;
      }

/* Ensure mobile dropdowns work properly */
      @media (max-width: 768px) {
        /* FORCE mobile menu to display full width */
        .nav-links,
        #navLinks,
        ul.nav-links {
          display: flex !important;
          position: fixed !important;
          top: 70px !important;
          left: 0 !important;
          right: 0 !important;
          bottom: 0 !important;
          width: 100vw !important;
          height: auto !important;
          min-height: calc(100vh - 70px) !important;
        }

        .nav-links.active,
        #navLinks.active,
        ul.nav-links.active {
          display: flex !important;
          max-height: calc(100vh - 70px) !important;
          height: auto !important;
        }

        /* Make sure nav links with dropdowns are clearly tappable */
        .nav-item .nav-link {
          position: relative;
          user-select: none;
          -webkit-user-select: none;
          -webkit-tap-highlight-color: rgba(70, 187, 229, 0.2);
          cursor: pointer;
        }

        /* Ensure chevron is visible and clickable */
        .nav-link .fa-chevron-down {
          transition: transform 0.3s ease !important;
          opacity: 1 !important;
          pointer-events: none; /* Let clicks go through to parent link */
        }

        /* Visual feedback when dropdown is open */
        .nav-item.mobile-open > .nav-link,
        .nav-item.mobile-dropdown-open > .nav-link {
          background: rgba(70, 187, 229, 0.15) !important;
          border-color: var(--primary-color, #46bbe5) !important;
        }

        /* Make dropdowns smoother */
        .dropdown {
          transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
            padding 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
        }

        /* Ensure dropdown items are visible when parent is open */
        .nav-item.mobile-open .dropdown,
        .nav-item.mobile-dropdown-open .dropdown {
          display: block !important;
          visibility: visible !important;
          opacity: 1 !important;
          pointer-events: auto !important;
        }

        /* Ensure dropdown items are clickable */
        .dropdown-item,
        .dropdown > a {
          pointer-events: auto !important;
          touch-action: manipulation !important;
          user-select: none;
          -webkit-user-select: none;
        }
      }

