:root {
        --bg-color: #eeeeee;
        --text-color: #333333;
        --container-bg: #eaeaea;
        --notification-bg: rgba(0, 0, 0, 0.85);
        --notification-text: white;
      }

      [data-theme="dark"] {
        --bg-color: #121212;
        --text-color: #ffffff;
        --container-bg: #1e1e1e;
        --notification-bg: rgba(255, 255, 255, 0.1);
        --notification-text: #ffffff;
      }

      /* Direct theme classes for Safari */
      .light-theme {
        background-color: #eeeeee !important;
        background: #eeeeee !important;
      }

      .dark-theme {
        background-color: #121212 !important;
        background: #121212 !important;
      }

      /* Safari-specific fixes for theme handling */
      @media screen and (-webkit-min-device-pixel-ratio: 0) {
        body {
          background-color: var(--bg-color) !important;
          background: var(--bg-color) !important;
          -webkit-background-color: var(--bg-color) !important;
          /* Disable transitions for Safari to prevent slow theme changes */
          transition: none !important;
          -webkit-transition: none !important;
        }

        [data-theme="dark"] body {
          background-color: #121212 !important;
          background: #121212 !important;
          -webkit-background-color: #121212 !important;
        }

        [data-theme="light"] body {
          background-color: #eeeeee !important;
          background: #eeeeee !important;
          -webkit-background-color: #eeeeee !important;
        }
      }

      body {
        margin: 0;
        padding: 0;
        overflow: hidden;
        background-color: var(--bg-color);
        background: var(
          --bg-color
        ); /* Explicit background property for Safari */
        color: var(--text-color);
        width: 100vw;
        height: 100vh;
        /* background: radial-gradient(circle at center, #1a1a2e 0%, #0f0f1a 100%); */
        position: relative;
        font-family: "Roboto Condensed", -apple-system, BlinkMacSystemFont,
          "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji",
          "Segoe UI Emoji", "Segoe UI Symbol";
        line-height: 1.6;
        /* Add touch handling for mobile */
        touch-action: none;
        -webkit-tap-highlight-color: transparent;
        /* Add immediate background transitions for Safari */
        -webkit-transition: background-color 0s, background 0s !important;
        transition: background-color 0s, background 0s !important;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
      }

      /* Theme toggle styles */
      .theme-toggle {
        position: fixed;
        top: 20px;
        right: 20px;
        z-index: 1001;
        background: none;
        border: none;
        cursor: pointer;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--text-color);
        background-color: var(--container-bg);
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
        transition: all 0.3s ease;
      }

      .theme-toggle:hover {
        transform: scale(1.1);
      }

      .theme-toggle svg {
        width: 24px;
        height: 24px;
        transition: transform 0.3s ease;
      }

      .theme-toggle:hover svg {
        transform: rotate(15deg);
      }

      /* Audio notification banner */
      .audio-notification {
        position: fixed;
        top: 20px;
        left: 50%;
        transform: translateX(-50%);
        background-color: rgba(
          0,
          0,
          0,
          0.85
        ); /* Darker background for better contrast */
        color: white;
        padding: 12px 24px; /* Larger padding for better touch targets */
        border-radius: 8px; /* Slightly larger radius */
        font-size: 16px; /* Larger text for mobile */
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none;
        z-index: 1000;
        max-width: 90%; /* Prevent overflow on mobile */
        text-align: center;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Add subtle shadow */
        backdrop-filter: blur(5px); /* Add blur effect for modern look */
        -webkit-backdrop-filter: blur(5px); /* Safari support */
        -moz-backdrop-filter: blur(5px); /* Firefox support */
        -ms-backdrop-filter: blur(5px); /* Edge support */
        backdrop-filter: blur(5px); /* Standard property */
        -moz-backdrop-filter: blur(5px); /* Firefox support */
        -ms-backdrop-filter: blur(5px); /* Edge support */
        -o-backdrop-filter: blur(5px); /* Opera support */
        will-change: opacity, transform; /* Performance hint */
      }

      /* Mobile device recommendation banner */
      .mobile-notification {
        position: fixed;
        top: 20px;
        left: 50%;
        transform: translateX(-50%);
        background-color: var(--notification-bg);
        color: var(--notification-text);
        padding: 16px 24px;
        border-radius: 8px;
        font-size: 14px;
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none;
        z-index: 1000;
        max-width: 90%;
        text-align: center;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
      }

      .mobile-notification.show {
        opacity: 1;
      }

      @media (min-width: 768px) {
        .mobile-notification {
          display: none;
        }
      }

      .audio-notification.show {
        opacity: 1;
      }

      /* Desktop audio activation banner */
      .desktop-audio-banner {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background-color: var(--notification-bg);
        color: var(--notification-text);
        padding: 16px 24px;
        border-radius: 8px;
        font-size: 16px;
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none;
        z-index: 1000;
        max-width: 90%;
        text-align: center;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
        cursor: pointer;
      }

      .desktop-audio-banner.show {
        opacity: 1;
        pointer-events: auto;
      }

      /* Only show on laptop/desktop, but ensure iOS devices can see it if needed */
      @media (max-width: 768px) {
        .desktop-audio-banner {
          display: none;
        }
      }

      /* Special override for iOS devices to ensure banner works properly */
      .ios-device .desktop-audio-banner.show {
        display: block;
        opacity: 1;
        pointer-events: auto;
      }

      /* --- Container --- */
      .container {
        padding: 5px 20px; /* Adjusted padding for mobile */
        background-color: var(--container-bg);
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
        position: relative;
        z-index: 2;
      }

      h1 {
        text-align: left; /* ADD this */
        color: var(--text-color);
        font-weight: 500; /* Slightly bolder main title */
        font-size: 1.8em;
        line-height: 1.3; /* Adjust line height if needed */
        margin: 0.5em 0;
        word-break: break-word; /* Prevent text overflow */
      }

      /* Styles for the new spans */
      .h1-separator {
        font-weight: 300; /* Lighter weight for the pipe */
        color: #555; /* Use a less prominent color */
        margin: 0 0.2em; /* Add a little space around the pipe */
      }

      .h1-subtitle {
        font-weight: 300; /* Lighter weight for the subtitle */
        color: #555; /* Match separator or use main text color */
        /* color: var(--text-color); */ /* Alternative: Keep main color but lighter weight */
      }

      .h1-link {
        color: inherit; /* Make the link inherit the H1's text color */
        text-decoration: none; /* Remove the default underline */
        transition: color 0.2s ease; /* Add smooth transition for hover */
        padding: 8px 12px; /* Larger touch target */
        margin: -8px -12px; /* Offset padding to maintain layout */
        display: inline-block;
        min-height: 44px; /* Minimum touch target size */
        line-height: 44px;
      }

      .h1-link:hover {
        color: #0077cc; /* Change color on hover (optional, use var(--text-color) to keep it same) */
        /* text-decoration: underline; */ /* Optionally add underline on hover */
      }

      /* Optional: Adjust alignment on very small screens if needed */
      @media (max-width: 768px) {
        h1 {
          font-size: 1.5em;
          margin: 0.4em 0;
        }

        /* Audio notification position for mobile */
        .audio-notification {
          top: 50%;
          transform: translate(-50%, -50%);
          z-index: 5;
          width: 85%;
          text-align: center;
          padding: 16px 24px;
          font-size: 18px;
        }

        /* Enhanced touch targets */
        .h1-link {
          padding: 12px 16px;
          display: inline-block;
          min-width: 48px;
          min-height: 48px;
          line-height: 48px;
        }

        /* Optimized particle animations for mobile */
        .bg-particle {
          animation: float-particle 20s ease-in-out infinite !important;
          opacity: 0.2 !important;
          will-change: transform;
          transform: translateZ(0);
          backface-visibility: hidden;
        }

        /* Improved circle visibility on mobile */
        .circle {
          display: block !important;
          opacity: 0.8 !important;
          animation: appear-disappear 3s ease-in-out forwards !important;
          max-width: 200px !important;
          max-height: 200px !important;
          touch-action: none;
          will-change: transform, opacity;
          transform: translateZ(0);
          backface-visibility: hidden;
        }

        .particle {
          width: 2px !important;
          height: 2px !important;
          opacity: 0.4 !important;
          box-shadow: 0 0 2px var(--particle-color, rgba(255, 255, 255, 0.5)) !important;
          transform: translateZ(0) !important;
          -webkit-transform: translateZ(0) !important;
          backface-visibility: hidden !important;
          -webkit-backface-visibility: hidden !important;
        }

        .ripple {
          display: none !important;
        }

        /* Prevent accidental scrolling during interactions */
        body {
          touch-action: none;
          overflow: hidden;
          -webkit-overflow-scrolling: touch;
        }

        /* Smoother transitions for mobile */
        * {
          transition: all 0.15s ease-out;
          will-change: transform, opacity;
          transition-duration: 0.15s;
          animation-duration: 0.15s;
        }

        /* Performance optimizations */
        .container {
          padding: 10px 20px;
          padding-left: max(20px, env(safe-area-inset-left));
          padding-right: max(20px, env(safe-area-inset-right));
          padding-top: max(12px, env(safe-area-inset-top));
        }
      }

      /* Background particles for ambient effect */
      .bg-particle {
        position: absolute;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.03);
        pointer-events: none;
        z-index: -1;
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
      }
      .circle {
        position: absolute;
        border-radius: 50%; /* Default is circle, can be modified */
        opacity: 0;
        box-shadow: 0 0 30px rgba(255, 255, 255, 0.6);
        animation: appear-disappear 3s ease-in-out forwards;
        background: transparent; /* Hollow circle */
        border: 2px solid var(--circle-color); /* Enhanced border using the circle color */
        transform-origin: center;
        z-index: 10;
      }

      /* Particle trail effect */
      .particle {
        position: absolute;
        border-radius: 50%;
        opacity: 0.7;
        pointer-events: none;
        z-index: 5;
        background: var(--particle-color, white);
        box-shadow: 0 0 4px var(--particle-color, white);
        opacity: 0.6;
        will-change: transform, opacity;
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
      }

      /* Ripple effect when circles appear */
      .ripple {
        position: absolute;
        border-radius: 50%;
        border: 2px solid var(--circle-color, white);
        opacity: 0.8;
        pointer-events: none;
        z-index: 5;
        background: transparent;
        animation: ripple-effect 2s ease-out forwards;
        opacity: 0.4;
        will-change: transform;
      }
      @keyframes appear-disappear {
        0% {
          opacity: 0;
          transform: scale(0) rotate(0deg);
        }
        20% {
          opacity: var(--max-opacity, 0.85);
          transform: scale(1) rotate(5deg);
        }
        50% {
          transform: scale(1.02) rotate(5deg);
        }
        80% {
          opacity: var(--max-opacity, 0.85);
          transform: scale(1) rotate(5deg);
        }
        100% {
          opacity: 0;
          transform: scale(0) rotate(10deg);
        }
      }

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

      @keyframes rotate-cw {
        0% {
          transform: rotate(0deg);
        }
        100% {
          transform: rotate(var(--max-rotation, 360deg));
        }
      }

      @keyframes rotate-ccw {
        0% {
          transform: rotate(0deg);
        }
        100% {
          transform: rotate(var(--max-rotation, -360deg));
        }
      }

      @keyframes ripple-effect {
        0% {
          transform: scale(0.1);
          opacity: 0.8;
        }
        100% {
          transform: scale(2);
          opacity: 0;
        }
      }

      @keyframes float-particle {
        0% {
          transform: translate(0, 0) rotate(0deg);
        }
        25% {
          transform: translate(var(--x-float, 10px), var(--y-float, -10px))
            rotate(var(--rotation, 90deg));
        }
        50% {
          transform: translate(var(--x-float2, -10px), var(--y-float2, -5px))
            rotate(var(--rotation2, 180deg));
        }
        75% {
          transform: translate(var(--x-float3, 5px), var(--y-float3, 10px))
            rotate(var(--rotation3, 270deg));
        }
        100% {
          transform: translate(0, 0) rotate(360deg);
        }
      }

      @keyframes glow-pulse {
        0%,
        100% {
          filter: brightness(1) blur(0px);
        }
        50% {
          filter: brightness(1.5) blur(3px);
        }
      }

      /* High contrast mode support */
      @media (prefers-contrast: more) {
        .audio-notification {
          background-color: #000;
          color: #fff;
          border: 2px solid #fff;
        }
      }

      /* Reduced motion support */
      @media (prefers-reduced-motion: reduce) {
        * {
          animation-duration: 0.01ms !important;
          animation-iteration-count: 1 !important;
          transition-duration: 0.01ms !important;
          scroll-behavior: auto !important;
        }

        .bg-particle,
        .circle,
        .particle,
        .ripple {
          animation: none !important;
          transition: none !important;
        }
      }

      /* Dark mode support */
      @media (prefers-color-scheme: dark) {
        body {
          background-color: #121212;
          color: #ffffff;
        }

        .container {
          background-color: #1e1e1e;
        }

        h1 {
          color: #ffffff;
        }

        .audio-notification {
          background-color: rgba(255, 255, 255, 0.1);
        }
      }