      :root {
        --bg-gradient: linear-gradient(135deg, #5d3609 0%, #775126 50%, #975e1e 100%);
        --accent: #fec066;
        --glass-bg: rgba(255, 255, 255, 0.04);
        --glass-border: rgba(255, 255, 255, 0.12);
      }

      html,
      body {
        height: 100%;
        margin: 0;
        font-family: Roboto, system-ui;
        background: var(--bg-gradient);
        color: white;
        position: relative;
        z-index: 0;
        min-height: 100vh;
        background-attachment: fixed;
        background-repeat: no-repeat;
        transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
      }

      body {
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        opacity: 0;
        visibility: hidden;
      }

      body.loaded {
        visibility: visible;
        opacity: 1;
      }

      .layout {
        margin-top: -8vh;
        display: flex;
        align-items: center;
        max-width: 100%;
      }

      h2 {
        font-weight: normal;
        font-size: 1.35rem;
        margin: 0.5rem 0 0 0;
      }

      p {
        line-height: 1.4rem;
      }

      /* ===== LAYOUT ===== */

      .container {
        min-width: 500px;
        width: 100%;
        text-align: center;
        z-index: 2;
      }

      .logo {
        filter: drop-shadow(0px 5px 10px black);
      }

      .logo-sub {
        margin-top: 4px;
        font-size: 0.8rem;
        letter-spacing: 0.2em;
        text-transform: uppercase;
        color: #ffb347;
      }

      /* ===== STAGE ===== */

      .stage {
        position: relative;
        min-height: 250px;
        overflow: hidden;
        padding: 1.5rem 0;
      }

      /* ===== SLIDES ===== */

      /* base slide offscreen right */
      .slide {
        position: absolute;
        inset: 0;

        display: flex;
        flex-direction: column;
        align-items: center; /* horizontal center */
        justify-content: center; /* vertical center */

        text-align: center;

        opacity: 0;
        pointer-events: none;
        transform: translateX(80px);
        transition:
          opacity 0.35s ease,
          transform 0.5s cubic-bezier(0.2, 0.9, 0.3, 1);
      }

      /* slide ready to enter from right */
      .slide.pre-right {
        transform: translateX(60px);
        opacity: 0;
        pointer-events: none;
      }

      /* active slide in place */
      .slide.active {
        transform: translateX(0);
        opacity: 1;
        pointer-events: auto;
      }

      /* exit-left always to left */
      .slide.exit-left {
        transform: translateX(-60px);
        opacity: 0;
        pointer-events: none;
      }

      /* ===== HERO ===== */

      .hero-subtitle {
        font-size: 2.3rem;
        font-weight: 700;
        line-height: 1.15;
        opacity: 0.92;
        margin-bottom: 3.2rem;
      }

      /* ===== BUTTON ===== */

      #start {
        background: var(--accent);
        color: white;
        border: none;
        padding: 1.1rem 3.5rem;
        border-radius: 999px;
        font-size: 1.1rem;
        font-weight: 600;
        cursor: pointer;
        box-shadow: 0 10px 30px #483112;
        transition:
          transform 0.2s ease,
          box-shadow 0.2s ease,
          opacity 0.25s ease;
      }

      #start:hover {
        transform: translateY(-2px);
        box-shadow: 0 14px 40px #af7e36;
      }

      .manual-btn {
        display: inline-block;
        margin-top: 1.5rem;
        background: var(--accent);
        color: white;
        text-decoration: none;
        padding: 1.1rem 3rem;
        border-radius: 999px;
        font-size: 1rem;
        font-weight: 600;
        box-shadow: 0 10px 30px rgba(14, 165, 233, 0.45);
        transition:
          transform 0.2s ease,
          box-shadow 0.2s ease;
      }

      .manual-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 14px 40px rgba(14, 165, 233, 0.65);
      }

      /* ===== STEPPER ===== */

      .stepper {
        display: inline-flex;
        align-items: center;
        background: var(--glass-bg);
        border: 1px solid var(--glass-border);
        padding: 12px 26px;
        border-radius: 999px;
        backdrop-filter: blur(12px);
        justify-content: space-between;
        width: 100%;
        max-width: 350px;
      }

      .stepper .unsupported {
        font-size: 0.85rem;
        opacity: 0.9;
        color: #ffb347;
        text-align: center;
        font-weight: 500;
      }

      .step {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 0.85rem;
        opacity: 0.5;
        transition: all 0.3s ease;
        margin: 0 14px;
        transition:
          opacity 0.35s ease,
          color 0.35s ease,
          transform 0.35s ease;
      }

      .step.active {
        opacity: 1;
        transform: scale(1.05);
      }

      .step.active > .dot {
        background: var(--accent);
        box-shadow:
          0 0 0 2px rgb(0 0 0 / 90%),
          0 0 0 4px var(--accent);
      }

      .step .dot {
        width: 18px;
        height: 18px;
        background: white;
        border-radius: 50%;
        display: grid;
        place-items: center;
        font-size: 0.8rem;
        font-weight: bolder;
        isolation: isolate;
        color: #000000e6;
        mix-blend-mode: screen;

        transition:
          background 0.35s ease,
          box-shadow 0.35s ease,
          opacity 0.35s ease;
      }

      .step.done {
        opacity: 0.8;
        color: var(--accent);
      }

      .step.done .dot {
        opacity: 0.8;
        background: var(--accent);
      }

      .step[data-step="3"].active > .dot {
        background: rgb(122, 193, 66); /* clean green */
        box-shadow:
          0 0 0 2px rgb(0 0 0),
          0 0 0 4px rgb(122, 193, 66);
      }

      .step[data-step="3"].active > .dot {
        animation: completePulse 0.6s ease-out;
      }

      @keyframes completePulse {
        0% {
          transform: scale(1);
        }
        40% {
          transform: scale(1.15);
        }
        100% {
          transform: scale(1);
        }
      }
      .loader {
        width: 48px;
        height: 48px;
        border: 5px solid var(--accent);
        border-bottom-color: transparent;
        border-radius: 50%;
        display: inline-block;
        box-sizing: border-box;
        animation: rotation 1s linear infinite;
        line-height: 1;
      }

      @keyframes rotation {
        0% {
          transform: rotate(0deg);
        }
        100% {
          transform: rotate(360deg);
        }
      }

      .actions {
        justify-content: center;
        display: flex;
        gap: 0.8rem;
      }

      .actions > button {
        margin-top: 0.5rem;
      }

      .actions button {
        background: #eee;
        border: none;
        padding: 0.6rem 1.2rem;
        border-radius: 999px;
        cursor: pointer;
      }

      .actions button:hover {
        background: var(--accent);
        color: white;
        cursor: pointer;
      }

      .github:hover {
        background: rgb(170 60 255) !important;
        color: white;
        cursor: pointer;
      }

      .actions button:not(.primary):hover {
        background: #ff3c3c;
      }

      .progress-ring-wrapper {
        position: relative;
        width: 56px; /* Slightly larger for better visibility */
        height: 56px;
        margin: 0 auto;
        transform: scale(0.9);
        transition:
          opacity 0.35s ease,
          transform 0.35s ease;
      }

      .progress-ring-wrapper.visible {
        opacity: 1;
        transform: scale(1);
      }

      .progress-ring-wrapper svg {
        transform: rotate(
          -90deg
        ); /* Start progress at the 12 o'clock position */
      }

      /* The track (faint circle background) */
      .progress-ring-track {
        stroke: rgba(255, 255, 255, 0.1);
        stroke-width: 4;
        fill: none;
      }

      /* The actual moving progress bar */
      .progress-ring-bar {
        stroke: var(--accent); /* DeepSkyBlue / Accent */
        stroke-width: 4;
        fill: none;
        will-change: stroke-dashoffset;
      }

      .progress-text {
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.75rem;
        color: white;
        z-index: 3;
      }

      .icon > img {
        max-width: 100%;
        height: auto;
        border: 0;
        margin: 0;
        padding: 0;
        vertical-align: middle;
      }

      .device {
        flex: 1 1 450px; /* can shrink */
        position: relative;
        max-width: 500px;
        pointer-events: none;
      }

      .device img {
        max-width: none;
        height: auto;
        display: block;
        left: -46%;
        position: relative;
        overflow: visible;
        width: 955px;

        -webkit-mask-image:
    /* TOP */
          linear-gradient(
            to bottom,
            transparent 0%,
            rgba(0, 0, 0, 0.6) 18%,
            black 32%
          ),
          /* BOTTOM */
          linear-gradient(
              to top,
              transparent 0%,
              rgba(0, 0, 0, 0.6) 22%,
              black 40%
            ),
          /* LEFT */
          linear-gradient(
              to right,
              transparent 0%,
              rgba(0, 0, 0, 0.7) 16%,
              black 28%
            ),
          /* RIGHT */
          linear-gradient(
              to left,
              transparent 0%,
              rgba(0, 0, 0, 0.7) 16%,
              black 28%
            );

        --device-mask:
          linear-gradient(
            to bottom,
            transparent 0%,
            rgba(0, 0, 0, 0.5) 30%,
            black 40%
          ),
          linear-gradient(
            to top,
            transparent 0%,
            rgba(0, 0, 0, 0.5) 25%,
            black 45%
          ),
          linear-gradient(
            to right,
            transparent 0%,
            rgba(0, 0, 0, 0.5) 18%,
            black 32%
          ),
          linear-gradient(
            to left,
            transparent 0%,
            rgba(0, 0, 0, 0.5) 17%,
            black 29%
          );

        -webkit-mask-image: var(--device-mask);
        -webkit-mask-repeat: no-repeat;
        -webkit-mask-composite: intersect;

        mask-image: var(--device-mask);
        mask-repeat: no-repeat;
        mask-composite: intersect;
      }

      .hints {
        margin-top: 0.4rem;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
      }

      .hint {
        position: absolute;
        inset: 0;
        align-items: center;
        justify-content: center;
        text-align: center;

        font-size: 0.8rem;
        line-height: 1.5;

        opacity: 0;
        transform: translateY(6px);
        transition:
          opacity 0.35s ease,
          transform 0.35s ease;

        pointer-events: none;
      }

      .hint.active {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
      }

      .checkmark_wrapper {
        display: flex;
        justify-content: center;
        align-items: center;
        transform-origin: center;
      }

      .checkmark {
        width: 48px;
        height: 48px;
        overflow: visible;
        transform-box: fill-box;
        transform-origin: center;
        shape-rendering: geometricPrecision;
      }

      /* Stroke ring animation */
      .checkmark__circle {
        stroke-dasharray: 166;
        stroke-dashoffset: 166;
        vector-effect: non-scaling-stroke;
      }

      /* Fill starts hidden */
      .checkmark__fill {
        transform-origin: 50% 50%;
        transform: scale(0);
      }

      /* Check path animation */
      .checkmark__check {
        stroke-dasharray: 48;
        stroke-dashoffset: 48;
        vector-effect: non-scaling-stroke;
      }

      /* --- ANIMATIONS --- */

      /* Ring draw */
      .checkmark.animate .checkmark__circle {
        animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
      }

      /* Fill grow */
      .checkmark.animate .checkmark__fill {
        animation: fillGrow 0.4s ease-out 0.5s forwards;
      }

      /* Check draw */
      .checkmark.animate .checkmark__check {
        animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.9s forwards;
      }

      /* Scale now happens on wrapper */
      .checkmark_wrapper.animate {
        animation: scale 0.25s ease-in-out 1.2s both;
      }

      /* --- KEYFRAMES --- */

      @keyframes stroke {
        100% {
          stroke-dashoffset: 0;
        }
      }

      @keyframes fillGrow {
        0% {
          transform: scale(0);
        }
        100% {
          transform: scale(1);
        }
      }

      @keyframes scale {
        50% {
          transform: scale(1.08);
        }
      }

      .footer-icons {
        position: absolute;
        bottom: 2.5rem;
        width: 100%;
        display: flex;
        justify-content: center;
        gap: 1.3rem;
        z-index: 2;
      }

      .icon-btn {
        position: relative;
        width: 2rem;
        height: 2rem;
        opacity: 0.6;
        transition:
          transform 0.25s ease,
          opacity 0.25s ease;
      }

      .icon-btn img {
        width: 100%;
        height: 100%;
        display: block;
        filter: drop-shadow(0 4px 15px rgba(117, 211, 255, 0.45));
        transform: translateZ(0); /* force GPU */
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
        will-change: transform;
      }

      .icon-btn:hover {
        opacity: 1;
        transform: translateY(-3px);
        filter: drop-shadow(0 8px 15px rgba(117, 211, 255, 0.45));
      }

      /* Success background pulse */
      body.success-pulse::after {
        content: "";
        position: fixed;
        inset: -20%;
        pointer-events: none;
        z-index: -1;

        background: radial-gradient(
          circle at center,
          rgba(14, 165, 233, 0.25) 0%,
          rgba(14, 165, 233, 0.15) 30%,
          rgba(14, 165, 233, 0.05) 50%,
          transparent 70%
        );

        animation: bgPulse 1.2s ease-out forwards;
      }

      @keyframes bgPulse {
        0% {
          opacity: 0;
          transform: scale(0.95);
        }
        40% {
          opacity: 1;
          transform: scale(1.05);
        }
        100% {
          opacity: 0;
          transform: scale(1.1);
        }
      }

      /* stagger each icon */
      .footer-icons.animate .icon-btn:nth-child(1) { animation-delay: 0.05s; }
      .footer-icons.animate .icon-btn:nth-child(2) { animation-delay: 0.18s; }
      .footer-icons.animate .icon-btn:nth-child(3) { animation-delay: 0.31s; }
      .footer-icons.animate .icon-btn:nth-child(4) { animation-delay: 0.44s; }
      .footer-icons.animate .icon-btn:nth-child(5) { animation-delay: 0.57s; }
      .footer-icons.animate .icon-btn:nth-child(6) { animation-delay: 0.70s; }
      .footer-icons.animate .icon-btn:nth-child(7) { animation-delay: 0.83s; }

      @keyframes iconRise {
        0% {
          transform: translateY(0) scale(1);
          opacity: 0.6;
        }
        50% {
          transform: translateY(-10px) scale(1.06);
          opacity: 1;
        }
        100% {
          transform: translateY(0) scale(1);
          opacity: 0.6;
        }
      }

      .footer-subtitle {
        position: absolute;
        top: 2.5rem;
        font-size: 0.8rem;
        color: rgba(255, 255, 255, 0.75);
        min-height: 1.2em; /* prevents layout jump */
        opacity: 0;
        transition: opacity 0.5s ease;
      }

      .footer-subtitle.visible {
        opacity: 1;
      }

      .footer-subtitle.visible.default-text {
        opacity: 0.3;
      }

      .footer-icons.animate .icon-btn {
        animation: iconRise 0.85s cubic-bezier(0.2, 0.9, 0.3, 1) forwards;
      }

      @media (max-width: 550px) {
        .layout {
          justify-content: center;
          gap: 0;
        }

        .container {
          width: 100%;
          max-width: unset;
          min-width: unset;
          flex: 0 1 100%;
        }

        .device {
          display: none;
        }

        .stepper {
          width: calc(100% - 57px - 2rem);
        }

        .logo {
          width: calc(100% - 2rem);
        }

        body {
          flex-direction: column;
        }

        .footer-icons {
          bottom: calc(2.5rem + 60px);
        }
      }
      .modal {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.25);
        display: flex;
        align-items: center;
        justify-content: center;
        pointer-events: none;
        opacity: 0; /* hidden initially */
        z-index: 1000;
        transition: opacity 0.3s ease; /* only fades out */
      }

      /* show instantly without fade-in */
      .modal.show {
        opacity: 1;
        pointer-events: auto;
        transition: none; /* no fade on show */
      }

      /* fade-out */
      .modal.hide {
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
      }

      /* --- Modal content --- */
      .modal-content {
        padding: 2rem;
        border-radius: 24px;
        min-width: 300px;
        max-width: 400px;
        text-align: left;
        color: white;
        border: 1px solid var(--glass-border);
        backdrop-filter: blur(15px);
        box-shadow:
          0 20px 36px 0 rgba(40, 170, 255, 0.11),
          0 2px 8px 0 rgba(44, 70, 110, 0.08);

        opacity: 1;
        transform: translateY(0);
        transition:
          opacity 0.3s ease,
          transform 0.3s ease;
      }

      /* fade-out for content */
      .modal.hide .modal-content, 
      .modal.hide .terminal-window {
        opacity: 0;
        transform: translateY(-20px);
        transition: opacity 0.3s ease, transform 0.3s ease;
      }

      .controls-wrapper {
        display: flex;
        align-items: center;
        gap: 3rem;
        justify-content: space-evenly;
        margin-top: 2rem;
      }

      .controls-wrapper .actions button {
        margin-top: 0;
      }

      #close-settings:hover {
        background: #676767;
      }

      /* Toggle wrapper */
      .toggle {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        cursor: pointer;
        position: relative;
      }

      /* Hide default checkbox */
      .toggle input {
        opacity: 0;
        width: 0;
        height: 0;
        position: absolute;
      }

      /* Track */
      .slider {
        position: relative;
        width: 48px;
        height: 24px;
        border-radius: 999px;
        transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);

        /* OFF state (dark UI optimized) */
        background: rgba(255, 255, 255, 0.2);
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
      }

      /* Knob */
      .slider::before {
        content: "";
        position: absolute;
        height: 18px;
        width: 18px;
        left: 3px;
        top: 3px;
        border-radius: 50%;
        background: #ffffff;
        transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
      }

      /* ON state */
      .toggle input:checked + .slider {
        background: var(--accent);
        box-shadow: 0 0 10px rgba(0, 191, 255, 0.35);
      }

      /* Slide knob */
      .toggle input:checked + .slider::before {
        transform: translateX(24px);
      }

      /* Disabled */
      .toggle input:disabled + .slider {
        opacity: 0.4;
        cursor: not-allowed;
        box-shadow: none;
      }

      #confirm-version {
        opacity: 1;
        transition: opacity 0.2s ease;
      }

      #confirm-version.fading {
        opacity: 0;
      }

      /* If also narrow width → move to bottom-right row */
      @media (max-height: 700px) {
        .footer-icons {
          top: auto;
          bottom: 1.5rem;
          right: 1.5rem;
          transform: none;
          flex-direction: row;
          justify-content: flex-end;
          align-items: center;
        }

        .icon-github,
        .icon-reddit,
        .icon-support,
        .icon-cube,
        .icon-instagram {
          display: none;
        }

        .footer-subtitle {
          display: none;
        }
      }

      .terminal-window {
        width: 750px;
        max-width: calc(100% - 2rem);
        height: 450px;
        display: flex;
        flex-direction: column;
        border-radius: 24px;
        border: 1px solid var(--glass-border);
        backdrop-filter: blur(18px);
        box-shadow: 0 20px 36px rgba(40, 170, 255, 0.12), 0 2px 8px rgba(0, 0, 0, 0.25);
        color: white;
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.3s ease, transform 0.3s ease;
      }

        /* HEADER */
        .terminal-header {
            padding: 0.5rem 1rem 0.5rem 1rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .terminal-status {
          display: flex;
          align-items: center;
          gap: 0.6rem;
          font-size: 0.85rem;
          opacity: 0.9;
        }

        /* STATUS DOT */
        .dot {
          width: 10px;
          height: 10px;
          border-radius: 50%;
          background: #888;
          transition: all 0.25s ease;
        }

        .dot.gray {
          background: #888;
        }

        .dot.green {
          background: #2ecc71;
          box-shadow: 0 0 8px rgba(46, 204, 113, 0.7);
        }

        .dot.red {
          background: #ff4d4d;
          box-shadow: 0 0 8px rgba(255, 77, 77, 0.7);
        }


        /* CLOSE BUTTON */

        .terminal-close {
          border: none;
          background: transparent;
          color: white;
          font-size: 1.4rem;
          cursor: pointer;
          opacity: 0.7;
          transition: opacity 0.2s ease, transform 0.2s ease;
        }

        .terminal-close:hover {
          opacity: 1;
          transform: scale(1.1);
        }


        /* TERMINAL OUTPUT */

        .terminal-output {
            flex: 1;
            overflow-y: auto;
            margin: 0.5rem 0 1rem 0;
            padding: 1rem;
            box-shadow: inset 0px 0px 24px #00000054;
            background: rgb(0 0 0 / 20%);
            border: 1px solid rgba(255, 255, 255, 0.08);
            font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
            font-size: 0.78rem;
            line-height: 1.6;
            white-space: pre-wrap;
            word-break: break-word;
        }


        /* FOOTER */

        .terminal-footer {
            padding: 1rem;
            display: flex;
            justify-content: flex-end;
            gap: 0.6rem;
        }

        .terminal-footer button {
          background: rgba(255, 255, 255, 0.12);
          border: none;
          padding: 0.45rem 0.9rem;
          border-radius: 999px;
          color: white;
          cursor: pointer;
          transition: all 0.2s ease;
        }

        .terminal-footer button:hover {
          background: var(--accent);
        }

        .terminal-buttons-wrapper{
            display: flex;
            gap: 0.8rem;
        }

        .terminal-footer > .toggle{
          scale: 0.8;
        }

        #terminalOutput{
          margin: 0;
          margin-block: unset;
        }

        .terminal-toast {
            position: absolute;
            right: 1rem;
            bottom: 4.5rem;
            padding: 6px 10px;
            font-size: 12px;
            border-radius: 6px;
            background: rgba(0,0,0,0.75);
            color: #fff;
            opacity: 0;
            pointer-events: none;
            transform: translateY(6px);
            transition: opacity 0.25s ease, transform 0.25s ease;
            z-index: 5;
        }

        .terminal-toast.show {
            opacity: 1;
            transform: translateY(0);
        }
