


      .game-container {
        background: var(--bg-primary);
        border-radius: 24px;
        box-shadow: var(--shadow-lg);
        padding: 1.5rem;
        max-width: 100%;
        width: min(800px, 100vw - 1rem);
        text-align: center;
        margin: 0 auto;
        position: relative;
        overflow: hidden;
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.2);
      }

      .game-container::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--gradient-secondary);
        opacity: 0.05;
        z-index: 0;
      }

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

      .game-header {
        margin-bottom: 1.5rem;
        animation: fadeInDown 0.8s ease-out;
      }



      @keyframes bounceIn {
        0% {
          opacity: 0;
          transform: scale(0.3);
        }
        50% {
          opacity: 1;
          transform: scale(1.05);
        }
        70% {
          transform: scale(0.9);
        }
        100% {
          opacity: 1;
          transform: scale(1);
        }
      }

      @keyframes pulse {
        0% {
          transform: scale(1);
        }
        50% {
          transform: scale(1.05);
        }
        100% {
          transform: scale(1);
        }
      }

      .game-header h1 {
        font-family: "Poppins", sans-serif;
        font-size: clamp(1.8rem, 4vw, 2.2rem);
        background: linear-gradient(
          135deg,
          var(--primary-color),
          var(--purple-color)
        );
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        margin-bottom: 0.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        animation: pulse 2s ease-in-out infinite;
      }

      .game-header p {
        color: var(--text-secondary);
        font-size: clamp(0.9rem, 2.5vw, 1rem);
        font-weight: 500;
      }

      .balance-area {
        background: linear-gradient(135deg, #a8edea 0%, #fed6e3 50%, #d4fc79 100%);
        border-radius: 20px;
        padding: 1.5rem;
        margin-bottom: 1.5rem;
        min-height: 220px;
        max-height: 270px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.1);
        border: 2px solid rgba(255, 255, 255, 0.5);
        animation: fadeInUp 0.6s ease-out;
        transition: all 0.5s ease;
        position: relative;
        overflow: hidden;
      }

      .balance-area::before {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
        animation: shimmer 6s linear infinite;
        pointer-events: none;
      }

      @keyframes shimmer {
        0% {
          transform: translate(0, 0);
        }
        100% {
          transform: translate(50%, 50%);
        }
      }

      .balance-area.danger-bg {
        background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 50%, #ff9a9e 100%);
        box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1), 0 4px 16px rgba(239, 68, 68, 0.3);
        border-color: rgba(239, 68, 68, 0.3);
        animation: danger-pulse 1s ease-in-out infinite;
      }

      @keyframes danger-pulse {
        0%, 100% {
          box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1), 0 4px 16px rgba(239, 68, 68, 0.3);
        }
        50% {
          box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1), 0 6px 20px rgba(239, 68, 68, 0.5);
        }
      }

      .balanceman {
        font-size: clamp(4rem, 10vw, 6rem);
        transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        margin-bottom: 0.75rem;
        filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.15));
        animation: bounceIn 1s ease-out;
        position: relative;
        display: inline-block;
      }

      .balanceman::after {
        content: '';
        position: absolute;
        bottom: -10px;
        left: 50%;
        transform: translateX(-50%);
        width: 60%;
        height: 8px;
        background: radial-gradient(ellipse, rgba(0, 0, 0, 0.2), transparent);
        border-radius: 50%;
        filter: blur(4px);
        animation: shadow-pulse 3s ease-in-out infinite;
      }

      @keyframes shadow-pulse {
        0%, 100% {
          opacity: 0.3;
          transform: translateX(-50%) scale(1);
        }
        50% {
          opacity: 0.5;
          transform: translateX(-50%) scale(1.1);
        }
      }

      .balanceman.safe {
        color: var(--success-color);
        animation: gentle-sway 3s ease-in-out infinite;
        filter: drop-shadow(0 6px 12px rgba(34, 197, 94, 0.3));
      }

      @keyframes gentle-sway {
        0%,
        100% {
          transform: rotate(-3deg) scale(1);
        }
        50% {
          transform: rotate(3deg) scale(1.02);
        }
      }

      .balanceman.danger {
        color: var(--danger-color);
        animation: shake 0.5s ease-in-out infinite;
        filter: drop-shadow(0 6px 12px rgba(239, 68, 68, 0.4));
      }

      @keyframes shake {
        0%,
        100% {
          transform: translateX(0) rotate(0deg) scale(1);
        }
        25% {
          transform: translateX(-10px) rotate(-8deg) scale(1.05);
        }
        75% {
          transform: translateX(10px) rotate(8deg) scale(1.05);
        }
      }

      .balanceman.wobble {
        animation: wobble 1s ease-in-out infinite;
        color: var(--orange-color);
        filter: drop-shadow(0 6px 12px rgba(247, 114, 22, 0.3));
      }

      @keyframes wobble {
        0%, 100% {
          transform: rotate(-5deg) translateY(0);
        }
        25% {
          transform: rotate(5deg) translateY(-5px);
        }
        50% {
          transform: rotate(-5deg) translateY(0);
        }
        75% {
          transform: rotate(5deg) translateY(-3px);
        }
      }

      .balance-status {
        font-size: clamp(1rem, 2.5vw, 1.1rem);
        font-weight: 600;
        margin-bottom: 0.75rem;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;
      }

      .word-display {
        font-family: "Poppins", sans-serif;
        font-size: clamp(1.5rem, 4vw, 2rem);
        font-weight: bold;
        letter-spacing: clamp(0.2rem, 1vw, 0.4rem);
        margin-bottom: 0.75rem;
        background: linear-gradient(
          135deg,
          var(--primary-color),
          var(--cyan-color)
        );
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        min-height: 2.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        animation: fadeIn 0.5s ease-in;
      }


      .word-hint {
        background: rgba(255, 255, 255, 0.8);
        padding: 0.75rem;
        border-radius: 12px;
        margin-bottom: 0;
        font-style: italic;
        color: var(--text-secondary);
        font-size: clamp(0.8rem, 2vw, 0.9rem);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.3);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
      }

      .game-stats {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 0.75rem;
        background: var(--bg-secondary);
        border-radius: 16px;
        padding: 1rem;
        margin-bottom: 1.5rem;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
        border: 1px solid var(--border-color);
        animation: fadeInUp 0.8s ease-out;
      }

      .stat {
        text-align: center;
        padding: 0.5rem;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.6);
        transition: all 0.3s ease;
        backdrop-filter: blur(5px);
      }

      .stat:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
      }

      .stat-value {
        font-size: clamp(1.2rem, 3vw, 1.4rem);
        font-weight: bold;
        background: linear-gradient(
          135deg,
          var(--primary-color),
          var(--orange-color)
        );
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        transition: all 0.3s ease;
      }


      .alphabet-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(35px, 1fr));
        gap: 0.4rem;
        margin-bottom: 1.5rem;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
        animation: fadeInUp 1s ease-out;
      }

      .letter-btn {
        background: linear-gradient(145deg, #667eea 0%, #764ba2 100%);
        border: 2px solid rgba(255, 255, 255, 0.3);
        color: white;
        padding: clamp(0.5rem, 2vw, 0.65rem);
        border-radius: 12px;
        font-size: clamp(0.9rem, 2.5vw, 1rem);
        font-weight: 700;
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        position: relative;
        overflow: hidden;
        backdrop-filter: blur(5px);
        box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3),
                    inset 0 1px 0 rgba(255, 255, 255, 0.3),
                    inset 0 -2px 0 rgba(0, 0, 0, 0.2);
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
      }

      .letter-btn::before {
        content: "";
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(
          90deg,
          transparent,
          rgba(255, 255, 255, 0.4),
          transparent
        );
        transition: left 0.5s;
      }

      .letter-btn:hover::before {
        left: 100%;
      }

      .letter-btn:hover {
        background: linear-gradient(145deg, #7e92f7 0%, #8b5fcf 100%);
        color: white;
        transform: translateY(-4px) scale(1.08);
        box-shadow: 0 8px 16px rgba(102, 126, 234, 0.5),
                    inset 0 1px 0 rgba(255, 255, 255, 0.4),
                    inset 0 -2px 0 rgba(0, 0, 0, 0.2);
        border-color: rgba(255, 255, 255, 0.5);
      }

      .letter-btn:active {
        transform: translateY(-2px) scale(1.02);
        box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
      }

      .letter-btn:disabled {
        background: linear-gradient(145deg, #9ca3af 0%, #6b7280 100%);
        color: rgba(255, 255, 255, 0.5);
        cursor: not-allowed;
        transform: none;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        opacity: 0.5;
        border-color: rgba(255, 255, 255, 0.1);
      }

      .letter-btn.correct {
        background: linear-gradient(145deg, #34d399 0%, #10b981 100%);
        color: white;
        border-color: rgba(255, 255, 255, 0.5);
        animation: correctGuess 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        box-shadow: 0 6px 16px rgba(16, 185, 129, 0.5),
                    inset 0 1px 0 rgba(255, 255, 255, 0.3);
      }

      @keyframes correctGuess {
        0% {
          transform: scale(1) rotate(0deg);
        }
        25% {
          transform: scale(1.3) rotate(-10deg);
        }
        50% {
          transform: scale(1.3) rotate(10deg);
        }
        75% {
          transform: scale(1.3) rotate(-5deg);
        }
        100% {
          transform: scale(1) rotate(0deg);
        }
      }

      .letter-btn.incorrect {
        background: linear-gradient(145deg, #f87171 0%, #ef4444 100%);
        color: white;
        border-color: rgba(255, 255, 255, 0.3);
        animation: incorrectGuess 0.8s cubic-bezier(.36,.07,.19,.97);
        box-shadow: 0 6px 16px rgba(239, 68, 68, 0.5),
                    inset 0 1px 0 rgba(255, 255, 255, 0.2);
      }

      @keyframes incorrectGuess {
        0%, 100% {
          transform: translateX(0) rotate(0deg);
        }
        10%, 30%, 50%, 70%, 90% {
          transform: translateX(-10px) rotate(-8deg);
        }
        20%, 40%, 60%, 80% {
          transform: translateX(10px) rotate(8deg);
        }
      }

      .game-controls {
        display: flex;
        gap: 0.75rem;
        justify-content: center;
        flex-wrap: wrap;
        margin-bottom: 1rem;
        animation: fadeInUp 1.2s ease-out;
      }

      .btn {
        padding: clamp(0.6rem, 2vw, 0.8rem) clamp(1rem, 3vw, 1.3rem);
        border: none;
        border-radius: 12px;
        font-size: clamp(0.8rem, 2.5vw, 0.9rem);
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        align-items: center;
        gap: 0.5rem;
        position: relative;
        overflow: hidden;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        text-transform: uppercase;
        letter-spacing: 0.5px;
      }

      .btn::before {
        content: "";
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(
          90deg,
          transparent,
          rgba(255, 255, 255, 0.2),
          transparent
        );
        transition: left 0.6s;
      }

      .btn:hover::before {
        left: 100%;
      }

      .btn-primary {
        background: linear-gradient(
          135deg,
          var(--primary-color),
          var(--purple-color)
        );
        color: white;
      }

      .btn-primary:hover {
        background: linear-gradient(135deg, var(--primary-hover), #7c3aed);
        transform: translateY(-3px) scale(1.05);
        box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4);
      }

      .btn-secondary {
        background: linear-gradient(
          135deg,
          var(--bg-tertiary),
          rgba(255, 255, 255, 0.8)
        );
        color: var(--text-primary);
        border: 2px solid var(--border-color);
      }

      .btn-secondary:hover {
        background: linear-gradient(
          135deg,
          var(--secondary-color),
          var(--orange-color)
        );
        color: white;
        border-color: var(--secondary-color);
        transform: translateY(-3px) scale(1.05);
        box-shadow: 0 8px 20px rgba(245, 158, 11, 0.4);
      }

      .btn-success {
        background: linear-gradient(
          135deg,
          var(--success-color),
          var(--accent-color)
        );
        color: white;
      }

      .btn-success:hover {
        transform: translateY(-3px) scale(1.05);
        box-shadow: 0 8px 20px rgba(34, 197, 94, 0.4);
      }

      .btn-danger {
        background: linear-gradient(135deg, var(--danger-color), #f87171);
        color: white;
      }

      .btn-danger:hover {
        transform: translateY(-3px) scale(1.05);
        box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4);
      }

      .btn:active {
        transform: translateY(-1px) scale(0.98);
      }

      .game-message {
        margin: 1rem 0;
        padding: 1rem;
        border-radius: 16px;
        font-weight: 600;
        font-size: clamp(0.9rem, 2.5vw, 1rem);
        animation: messageSlideIn 0.5s ease-out;
        backdrop-filter: blur(10px);
        border: 2px solid transparent;
        position: relative;
        overflow: hidden;
      }

      @keyframes messageSlideIn {
        from {
          opacity: 0;
          transform: translateY(-20px) scale(0.9);
        }
        to {
          opacity: 1;
          transform: translateY(0) scale(1);
        }
      }

      .message-success {
        background: linear-gradient(
          135deg,
          rgba(34, 197, 94, 0.15),
          rgba(16, 185, 129, 0.15)
        );
        color: var(--success-color);
        border-color: rgba(34, 197, 94, 0.3);
        box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
      }

      .message-danger {
        background: linear-gradient(
          135deg,
          rgba(239, 68, 68, 0.15),
          rgba(248, 113, 113, 0.15)
        );
        color: var(--danger-color);
        border-color: rgba(239, 68, 68, 0.3);
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
      }

      .difficulty-selector,
      .category-selector {
        margin-bottom: 1.5rem;
        animation: fadeInUp 0.6s ease-out;
      }

      .difficulty-selector h3,
      .category-selector h3 {
        font-size: clamp(1rem, 2.5vw, 1.1rem);
        margin-bottom: 0.75rem;
        color: var(--text-primary);
        font-weight: 600;
      }

      .difficulty-btn,
      .category-btn {
        margin: 0.25rem;
        padding: clamp(0.4rem, 1.5vw, 0.5rem) clamp(0.8rem, 2.5vw, 1rem);
        border: 2px solid var(--border-color);
        background: linear-gradient(
          135deg,
          var(--bg-secondary),
          rgba(255, 255, 255, 0.8)
        );
        color: var(--text-primary);
        border-radius: 20px;
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        font-size: clamp(0.75rem, 2vw, 0.85rem);
        font-weight: 500;
        position: relative;
        overflow: hidden;
        backdrop-filter: blur(5px);
      }

      .difficulty-btn::before,
      .category-btn::before {
        content: "";
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(
          90deg,
          transparent,
          rgba(255, 255, 255, 0.3),
          transparent
        );
        transition: left 0.5s;
      }

      .difficulty-btn:hover::before,
      .category-btn:hover::before {
        left: 100%;
      }

      .difficulty-btn:hover,
      .category-btn:hover {
        transform: translateY(-2px) scale(1.05);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
      }

      .difficulty-btn.active {
        background: linear-gradient(
          135deg,
          var(--primary-color),
          var(--purple-color)
        );
        color: white;
        border-color: var(--primary-color);
        box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
      }

      .category-btn.active {
        background: linear-gradient(
          135deg,
          var(--secondary-color),
          var(--orange-color)
        );
        color: white;
        border-color: var(--secondary-color);
        box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
      }

      @media (max-width: 768px) {
        .game-container {
          padding: 1rem;
          margin: 0.5rem;
          border-radius: 20px;
        }

        .game-header h1 {
          font-size: clamp(1.5rem, 5vw, 1.8rem);
        }

        .word-display {
          font-size: clamp(1.2rem, 5vw, 1.6rem);
          letter-spacing: clamp(0.1rem, 1.5vw, 0.3rem);
        }

        .balanceman {
          font-size: clamp(2.5rem, 10vw, 3.5rem);
        }

        .alphabet-grid {
          grid-template-columns: repeat(6, 1fr);
          gap: 0.3rem;
        }

        .letter-btn {
          padding: clamp(0.4rem, 2vw, 0.5rem);
          font-size: clamp(0.8rem, 3vw, 0.9rem);
          border-radius: 8px;
        }

        .game-stats {
          grid-template-columns: repeat(2, 1fr);
          gap: 0.5rem;
          padding: 0.75rem;
        }

        .balance-area {
          padding: 1rem;
          min-height: 180px;
          max-height: 200px;
        }

        .game-controls {
          gap: 0.5rem;
        }

        .btn {
          padding: clamp(0.5rem, 2vw, 0.6rem) clamp(0.8rem, 3vw, 1rem);
          font-size: clamp(0.7rem, 2.5vw, 0.8rem);
        }

        .difficulty-btn,
        .category-btn {
          padding: clamp(0.3rem, 1.5vw, 0.4rem) clamp(0.6rem, 2.5vw, 0.8rem);
          font-size: clamp(0.7rem, 2vw, 0.75rem);
          margin: 0.2rem;
        }
      }

      @media (max-width: 480px) {
        body {
          padding: 0.5rem 0.25rem;
        }

        .game-container {
          padding: 0.75rem;
          margin: 0.25rem;
        }

        .balance-area {
          padding: 0.75rem;
          min-height: 160px;
          max-height: 180px;
        }

        .alphabet-grid {
          grid-template-columns: repeat(5, 1fr);
          gap: 0.25rem;
        }

        .game-stats {
          grid-template-columns: repeat(4, 1fr);
          gap: 0.3rem;
          padding: 0.5rem;
        }

        .stat {
          padding: 0.3rem;
        }

        .category-selector,
        .difficulty-selector {
          margin-bottom: 1rem;
        }
      }

      @media (min-width: 1200px) {
        .game-container {
          max-width: 900px;
        }

        .alphabet-grid {
          grid-template-columns: repeat(13, 1fr);
          max-width: 700px;
        }
      }

      /* Enhanced animations for better UX */
      @keyframes letterReveal {
        from {
          opacity: 0;
          transform: scale(0.5) rotate(180deg);
        }
        to {
          opacity: 1;
          transform: scale(1) rotate(0deg);
        }
      }

      .word-display .letter-reveal {
        animation: letterReveal 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
      }

      @keyframes scoreIncrease {
        0% {
          transform: scale(1);
        }
        50% {
          transform: scale(1.3);
          color: var(--success-color);
        }
        100% {
          transform: scale(1);
        }
      }

      .score-animation {
        animation: scoreIncrease 0.6s ease-out;
      }

      /* Loading state for better UX */
      .loading {
        opacity: 0.7;
        pointer-events: none;
        position: relative;
      }

      .loading::after {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        width: 20px;
        height: 20px;
        margin: -10px 0 0 -10px;
        border: 2px solid transparent;
        border-top: 2px solid var(--primary-color);
        border-radius: 50%;
        animation: spin 1s linear infinite;
      }

      @keyframes spin {
        to {
          transform: rotate(360deg);
        }
      }

      /* Confetti animation */
      @keyframes confetti-fall {
        0% {
          transform: translateY(-100vh) rotate(0deg);
          opacity: 1;
        }
        100% {
          transform: translateY(100vh) rotate(720deg);
          opacity: 0;
        }
      }

      /* Improved accessibility */
      @media (prefers-reduced-motion: reduce) {
        *,
        *::before,
        *::after {
          animation-duration: 0.01ms !important;
          animation-iteration-count: 1 !important;
          transition-duration: 0.01ms !important;
        }
      }

      /* Focus states for keyboard navigation */
      .letter-btn:focus,
      .btn:focus,
      .difficulty-btn:focus,
      .category-btn:focus {
        outline: 3px solid var(--primary-color);
        outline-offset: 2px;
      }

      /* Screen reader only class */
      .sr-only {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border-width: 0;
      }

      /* Enhanced hint button */
      .btn-hint {
        background: linear-gradient(
          135deg,
          var(--cyan-color),
          var(--accent-color)
        );
        color: white;
        position: relative;
        overflow: hidden;
      }

      .btn-hint:hover {
        background: linear-gradient(135deg, #0891b2, #059669);
        transform: translateY(-3px) scale(1.05);
        box-shadow: 0 8px 20px rgba(6, 182, 212, 0.4);
      }

      .btn-hint:disabled {
        background: var(--bg-tertiary);
        color: var(--text-secondary);
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
      }

      /* Progress indicator for wrong guesses */
      .progress-bar {
        width: 100%;
        height: 8px;
        background: var(--bg-tertiary);
        border-radius: 4px;
        margin: 1rem 0;
        overflow: hidden;
        box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
      }

      .progress-fill {
        height: 100%;
        background: linear-gradient(
          90deg,
          var(--success-color),
          var(--secondary-color),
          var(--danger-color)
        );
        border-radius: 4px;
        transition: width 0.3s ease;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
      }

/* 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;
        }

        /* Override any conflicting hover states */
        .nav-item:hover .dropdown {
          max-height: 0 !important;
          padding: 0 !important;
        }

        .nav-item.mobile-open:hover .dropdown,
        .nav-item.mobile-dropdown-open:hover .dropdown {
          max-height: 600px !important;
          padding: 0.75rem 0.5rem !important;
        }
      }

