:root {
            --bg-color: #07101b;
            --text-color: #f1f8ff;
            --text-muted: #c6d8eb;
            --accent-color: #22d3ee;
            --secondary-bg: rgba(9, 20, 32, 0.58);
            --border-color: rgba(255, 255, 255, 0.26);
            --hover-blue: #3b82f6;
            --dropdown-bg: rgba(7, 15, 26, 0.94);
            --glass-highlight: rgba(255, 255, 255, 0.35);
            --shadow-color: rgba(0, 0, 0, 0.45);
            --rgb-red: rgba(255, 77, 77, 0.6);
            --rgb-blue: rgba(59, 130, 246, 0.6);
            --rgb-green: rgba(0, 245, 160, 0.6);
        }

        * {
            box-sizing: border-box;
        }

        html, body {
            width: 100%;
        }

        body {
            margin: 0;
            min-height: 100vh;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            line-height: 1.5;
            background-color: var(--bg-color);
            background-image: url('ym-bg.gif');
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
            background-attachment: fixed;
            color: var(--text-color);
            position: relative;
        }

        body::before,
        body::after {
            content: "";
            position: fixed;
            inset: 0;
            pointer-events: none;
            z-index: 0;
        }

        body::before {
            background:
                linear-gradient(165deg, rgba(3, 8, 14, 0.86) 15%, rgba(9, 22, 36, 0.52) 55%, rgba(3, 8, 14, 0.9) 100%);
        }

        body::after {
            background:
                radial-gradient(circle at 18% 20%, rgba(59, 130, 246, 0.16), transparent 40%),
                radial-gradient(circle at 84% 25%, rgba(0, 245, 160, 0.16), transparent 38%),
                radial-gradient(circle at 50% 85%, rgba(255, 77, 77, 0.14), transparent 42%);
            animation: bgDrift 16s ease-in-out infinite alternate;
        }

        @keyframes bgDrift {
            0% {
                transform: translateY(0) scale(1);
            }
            100% {
                transform: translateY(-12px) scale(1.02);
            }
        }

        @keyframes rgbGlow {
            0% {
                box-shadow: 0 22px 40px var(--shadow-color), 0 0 0 1px var(--rgb-red);
            }
            33% {
                box-shadow: 0 22px 40px var(--shadow-color), 0 0 0 1px var(--rgb-blue);
            }
            66% {
                box-shadow: 0 22px 40px var(--shadow-color), 0 0 0 1px var(--rgb-green);
            }
            100% {
                box-shadow: 0 22px 40px var(--shadow-color), 0 0 0 1px var(--rgb-red);
            }
        }

        @keyframes rgbSheen {
            0% {
                background-position: 0% 50%;
            }
            100% {
                background-position: 200% 50%;
            }
        }

        @keyframes buttonPulse {
            0%, 100% {
                transform: translateY(0);
            }
            50% {
                transform: translateY(-1px);
            }
        }

        /* Topbar */
        .topbar {
            position: relative;
            z-index: 1;
            width: min(1050px, 92vw);
            margin: 1.5rem auto 0.75rem;
            padding: 0.6rem 0.9rem;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.8rem;
            border: 1px solid rgba(34, 211, 238, 0.8);
            border-radius: 14px;
            background: rgba(2, 9, 13, 0.72);
            backdrop-filter: blur(12px) saturate(150%);
            -webkit-backdrop-filter: blur(12px) saturate(150%);
            box-shadow: 0 0 18px rgba(34, 211, 238, 0.28);
            overflow: hidden;
        }

        .topbar::before {
            content: "";
            position: absolute;
            inset: 0;
            pointer-events: none;
            border-radius: inherit;
            background: linear-gradient(
                120deg,
                rgba(88, 246, 255, 0.22) 0%,
                rgba(99, 196, 255, 0.16) 28%,
                rgba(255, 121, 210, 0.12) 62%,
                rgba(102, 239, 255, 0.18) 100%
            );
        }

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

        .brand {
            color: #42f5ef;
            font-weight: 700;
            letter-spacing: 0.02em;
            text-shadow: 0 0 10px rgba(66, 245, 239, 0.45);
        }

        .top-links {
            display: flex;
            align-items: center;
            gap: 0.55rem;
        }

        .home-btn {
            display: inline-block;
            color: #03090d;
            background: linear-gradient(90deg, #42f5ef, #18b7d6);
            text-decoration: none;
            border: 1px solid rgba(255, 255, 255, 0.18);
            padding: 0.45rem 0.9rem;
            border-radius: 10px;
            font-weight: 700;
            font-size: 0.92rem;
            box-shadow: 0 0 14px rgba(66, 245, 239, 0.34);
            transition: transform 0.16s ease, filter 0.16s ease;
        }

        .home-btn:hover {
            transform: translateY(-1px);
            filter: brightness(1.08);
        }

        .home-btn:active {
            transform: translateY(0);
        }

        /* Main Content */
        .content {
            position: relative;
            z-index: 1;
            padding: clamp(1rem, 2.5vw, 2rem);
            text-align: center;
        }

        .title {
            margin: 0 0 0.85rem;
            font-size: clamp(1.65rem, 3.8vw, 2.55rem);
            line-height: 1.2;
            text-wrap: balance;
            text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
        }

        .title-wrap {
            display: inline-flex;
            align-items: center;
            gap: 0.7rem;
            margin-bottom: 0.2rem;
        }

        .title-wrap .title {
            margin: 0;
        }

        .title-cube {
            width: 52px;
            height: 52px;
            border-radius: 12px;
            object-fit: cover;
            border: 1px solid rgba(255, 255, 255, 0.32);
            box-shadow:
                0 0 12px rgba(59, 130, 246, 0.45),
                0 0 18px rgba(0, 245, 160, 0.25);
            animation: cubeRgbPulse 3.8s ease-in-out infinite;
        }

        .description {
            margin: 0 auto 2rem;
            max-width: 70ch;
            color: var(--text-muted);
            font-size: clamp(0.95rem, 1.8vw, 1.03rem);
        }

        /* Generator Container (Form + Output) */
        .generator-container {
            display: grid;
            grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
            gap: 1.2rem;
            max-width: 1240px;
            margin: 0 auto;
            text-align: left;
        }

        .generator-form {
            position: relative;
            display: flex;
            flex-direction: column;
            min-width: 0;
            min-height: 500px;
            background: var(--secondary-bg);
            padding: clamp(0.85rem, 1.8vw, 1.2rem);
            border-radius: 18px;
            border: 1px solid var(--border-color);
            backdrop-filter: blur(14px) saturate(150%);
            -webkit-backdrop-filter: blur(14px) saturate(150%);
            box-shadow: 0 22px 40px var(--shadow-color), inset 0 1px 0 var(--glass-highlight);
            overflow: hidden;
            animation: rgbGlow 10s linear infinite;
        }

        .output-container {
            position: relative;
            min-width: 0;
            display: flex;
            flex-direction: column;
            background: var(--secondary-bg);
            padding: clamp(1rem, 2.4vw, 2rem);
            border-radius: 18px;
            border: 1px solid var(--border-color);
            backdrop-filter: blur(14px) saturate(150%);
            -webkit-backdrop-filter: blur(14px) saturate(150%);
            box-shadow: 0 22px 40px var(--shadow-color), inset 0 1px 0 var(--glass-highlight);
            overflow: hidden;
            animation: rgbGlow 10s linear infinite;
            animation-delay: -5s;
        }

        .generator-form::before,
        .output-container::before {
            content: "";
            position: absolute;
            inset: 0;
            background:
                linear-gradient(140deg, rgba(255, 255, 255, 0.12), transparent 46%, rgba(255, 255, 255, 0.07)),
                radial-gradient(circle at 88% 12%, rgba(255, 255, 255, 0.12), transparent 28%);
            pointer-events: none;
        }

        /* Form Styles */
        .form-group {
            margin-bottom: 0.25rem;
            display: flex;
            flex-direction: column;
            flex: 1 1 auto;
            min-width: 0;
        }

        .form-group label {
            margin-bottom: 0.24rem;
            font-size: 0.74rem;
            font-weight: 700;
            letter-spacing: 0.06em;
            color: var(--text-muted);
        }

        .form-group input {
            width: 100%;
            min-height: 46px;
            padding: 0.64rem 0.82rem;
            font-size: 1rem;
            background: rgba(8, 18, 29, 0.52);
            border: 1px solid rgba(255, 255, 255, 0.24);
            border-radius: 12px;
            color: var(--text-color);
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
            outline: none;
            transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
        }

        .form-group input::placeholder {
            color: rgba(198, 216, 235, 0.75);
        }

        .form-group input:focus {
            border-color: rgba(34, 211, 238, 0.85);
            box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.26);
            background: rgba(8, 18, 29, 0.65);
        }

        .form-row {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 0.5rem;
            align-items: flex-end;
            margin-bottom: 0.28rem;
        }

        .form-row.form-row-bin {
            grid-template-columns: minmax(280px, 620px);
            justify-content: center;
            margin-bottom: 0.5rem;
        }

        .form-group-bin label {
            font-size: 0.88rem;
            margin-bottom: 0.34rem;
        }

        .form-group-bin input {
            min-height: 54px;
            padding: 0.78rem 1rem;
            font-size: 1.18rem;
            border-radius: 14px;
        }

        .form-group-bin .error-message {
            display: none;
            margin-top: 0.42rem;
            font-size: 0.82rem;
            font-weight: 600;
            color: #ff9aaa;
        }

        .form-group-bin.has-error .error-message {
            display: block;
        }

        .form-group-bin input.error {
            border-color: rgba(255, 77, 77, 0.9);
            box-shadow: 0 0 0 3px rgba(255, 77, 77, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.18);
            background: rgba(42, 12, 20, 0.52);
        }

        .bin-insight {
            margin-top: 0.52rem;
            display: grid;
            gap: 0.42rem;
        }

        .card-icon-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(44px, 1fr));
            gap: 0.32rem;
        }

        .card-icon-chip {
            min-height: 40px;
            border-radius: 10px;
            border: 1px solid rgba(255, 255, 255, 0.2);
            background: rgba(8, 18, 29, 0.38);
            color: var(--text-muted);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
        }

        .card-icon-chip i {
            font-size: 1.22rem;
            line-height: 1;
        }

        .card-icon-chip.is-active {
            border-color: rgba(34, 211, 238, 0.82);
            color: #f6feff;
            background: linear-gradient(120deg, rgba(59, 130, 246, 0.4), rgba(0, 245, 160, 0.3));
            transform: translateY(-1px);
        }

        .card-icon-chip.is-dim {
            opacity: 0.5;
        }

        .bin-country {
            min-height: 42px;
            border-radius: 10px;
            border: 1px solid rgba(255, 255, 255, 0.2);
            background: rgba(8, 18, 29, 0.38);
            color: var(--text-muted);
            display: grid;
            grid-template-columns: auto 1fr;
            align-items: center;
            gap: 0.5rem;
            padding: 0.36rem 0.56rem;
        }

        .bin-country-flag {
            min-width: 32px;
            min-height: 32px;
            border-radius: 8px;
            border: 1px solid rgba(255, 255, 255, 0.2);
            background: rgba(11, 22, 36, 0.64);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
        }

        .bin-country-flag img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: none;
        }

        .bin-country-flag.has-image img {
            display: block;
        }

        .bin-country-flag-code {
            font-size: 0.74rem;
            font-weight: 700;
            letter-spacing: 0.06em;
            line-height: 1;
        }

        .bin-country-flag.has-image .bin-country-flag-code {
            display: none;
        }

        .bin-country-text {
            font-size: 0.84rem;
            font-weight: 600;
            letter-spacing: 0.01em;
        }

        .form-row.compact-row {
            grid-template-columns: 118px minmax(0, 1fr) minmax(0, 1fr);
            gap: 0.45rem 0.55rem;
            align-items: end;
        }

        .form-row.compact-row .form-group {
            margin-bottom: 0;
            flex: initial;
            min-width: 0;
            max-width: none;
        }

        /* Toggle Styles */
        .toggle-label {
            display: flex;
            align-items: center;
            cursor: pointer;
            font-weight: 700;
            color: var(--text-color);
            min-width: 0;
            margin-top: 0;
            letter-spacing: 0.04em;
            white-space: nowrap;
            align-self: end;
            padding-bottom: 0.34rem;
        }

        .form-row.compact-row .toggle-label {
            padding-bottom: 0.2rem;
        }

        .toggle-label input {
            display: none;
        }

        .toggle-slider {
            position: relative;
            width: 43px;
            height: 23px;
            background: rgba(93, 112, 132, 0.55);
            border-radius: 999px;
            margin-right: 0.7rem;
            border: 1px solid rgba(255, 255, 255, 0.24);
            transition: background 0.25s ease, border-color 0.25s ease;
        }

        .toggle-slider:before {
            content: '';
            position: absolute;
            width: 17px;
            height: 17px;
            background-color: #ffffff;
            border-radius: 50%;
            top: 2px;
            left: 2px;
            transition: transform 0.25s ease;
        }

        input:checked + .toggle-slider {
            background: linear-gradient(120deg, rgba(34, 211, 238, 0.75), rgba(0, 245, 160, 0.75));
            border-color: rgba(255, 255, 255, 0.44);
        }

        input:checked + .toggle-slider:before {
            transform: translateX(20px);
        }

        /* Buttons */
        .generate-btn {
            width: 100%;
            margin-top: 0.7rem;
            min-height: 56px;
            padding: 1rem 1.2rem;
            border: 1px solid rgba(255, 255, 255, 0.38);
            border-radius: 14px;
            font-size: 1.08rem;
            font-weight: 700;
            letter-spacing: 0.03em;
            color: #f5feff;
            cursor: pointer;
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 0.45rem;
            background: linear-gradient(120deg, rgba(255, 77, 77, 0.34), rgba(59, 130, 246, 0.34), rgba(0, 245, 160, 0.34), rgba(255, 204, 76, 0.33));
            background-size: 240% 240%;
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32), 0 14px 24px rgba(0, 0, 0, 0.3);
            transition: transform 0.2s ease, box-shadow 0.25s ease, filter 0.25s ease;
            animation: rgbSheen 5.5s linear infinite, buttonPulse 3.2s ease-in-out infinite;
        }

        .generate-btn:hover {
            transform: translateY(-2px);
            filter: brightness(1.08);
            box-shadow: 0 14px 26px rgba(0, 0, 0, 0.36), 0 0 20px rgba(34, 211, 238, 0.34);
        }

        .generate-btn:active {
            transform: translateY(0);
        }

        .generate-btn i {
            margin-right: 0.1rem;
        }

        .form-gif-wrap {
            margin-top: auto;
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 0.9rem 0 0.25rem;
        }

        .form-gif {
            width: clamp(180px, 32vw, 270px);
            max-width: 82%;
            border-radius: 14px;
            border: 1px solid rgba(255, 255, 255, 0.28);
            box-shadow:
                0 0 12px rgba(255, 77, 77, 0.26),
                0 0 18px rgba(59, 130, 246, 0.22),
                0 0 24px rgba(0, 245, 160, 0.2);
            image-rendering: auto;
        }

        .output-text {
            position: absolute;
            width: 1px;
            height: 1px;
            opacity: 0;
            pointer-events: none;
            border: 0;
            padding: 0;
            margin: 0;
        }

        .output-lines {
            flex: 1;
            min-height: 320px;
            background: rgba(8, 18, 29, 0.52);
            border: 1px solid rgba(255, 255, 255, 0.24);
            border-radius: 12px;
            color: var(--text-color);
            padding: 0.95rem;
            margin-bottom: 1rem;
            overflow: auto;
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
            display: flex;
            flex-direction: column;
            gap: 0.32rem;
        }

        .output-line-item {
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto;
            align-items: center;
            gap: 0.58rem;
            width: max-content;
            min-width: 100%;
        }

        .output-line-text {
            font-family: Consolas, "Courier New", monospace;
            font-size: 1.18rem;
            line-height: 1.65;
            text-align: center;
            white-space: nowrap;
            overflow-wrap: normal;
        }

        .line-copy-btn {
            min-width: 34px;
            min-height: 34px;
            padding: 0.28rem;
            border-radius: 10px;
            border: 1px solid rgba(255, 255, 255, 0.32);
            color: var(--text-color);
            background: linear-gradient(120deg, rgba(59, 130, 246, 0.3), rgba(0, 245, 160, 0.24));
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.2s ease;
        }

        .line-copy-btn:hover {
            transform: translateY(-1px);
            filter: brightness(1.1);
            box-shadow: 0 0 12px rgba(34, 211, 238, 0.3);
        }

        .line-copy-btn:active {
            transform: translateY(0);
        }

        .line-copy-btn:focus-visible {
            outline: 2px solid rgba(34, 211, 238, 0.92);
            outline-offset: 2px;
        }

        .output-buttons {
            display: flex;
            justify-content: flex-end;
            gap: 0.85rem;
            flex-wrap: wrap;
        }

        .copy-btn, .reset-btn {
            min-height: 50px;
            padding: 0.68rem 1.2rem;
            border: 1px solid rgba(255, 255, 255, 0.35);
            color: var(--text-color);
            border-radius: 12px;
            font-size: 0.98rem;
            font-weight: 700;
            letter-spacing: 0.02em;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.45rem;
            background: linear-gradient(120deg, rgba(255, 77, 77, 0.25), rgba(59, 130, 246, 0.24), rgba(0, 245, 160, 0.24));
            background-size: 220% 220%;
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
            transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.25s ease;
            animation: rgbSheen 7.2s linear infinite;
        }

        .copy-btn:hover, .reset-btn:hover {
            transform: translateY(-2px);
            filter: brightness(1.08);
            box-shadow: 0 10px 16px rgba(0, 0, 0, 0.28), 0 0 16px rgba(34, 211, 238, 0.24);
        }

        .copy-btn:active, .reset-btn:active {
            transform: translateY(0);
        }

        /* Custom Select CSS */
        .custom-select-wrapper {
            position: relative;
            user-select: none;
            flex: 1 1 auto;
            min-width: 0;
        }

        .custom-select {
            position: relative;
            display: flex;
            flex-direction: column;
        }

        .custom-select__trigger {
            position: relative;
            display: flex;
            align-items: center;
            justify-content: space-between;
            min-height: 46px;
            padding: 0.64rem 0.82rem;
            font-size: 1rem;
            font-weight: 500;
            color: var(--text-color);
            line-height: 1.4;
            background: rgba(8, 18, 29, 0.52);
            border: 1px solid rgba(255, 255, 255, 0.24);
            border-radius: 12px;
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
            cursor: pointer;
            transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
        }

        .custom-select__trigger:hover {
            border-color: rgba(34, 211, 238, 0.64);
        }

        .custom-select.open .custom-select__trigger {
            border-color: rgba(34, 211, 238, 0.85);
            box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.18);
            background: rgba(8, 18, 29, 0.66);
        }

        .custom-select__options {
            position: absolute;
            display: block;
            top: calc(100% + 6px);
            left: 0;
            right: 0;
            border: 1px solid rgba(255, 255, 255, 0.3);
            background: var(--dropdown-bg);
            backdrop-filter: blur(14px) saturate(145%);
            -webkit-backdrop-filter: blur(14px) saturate(145%);
            border-radius: 12px;
            transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
            opacity: 0;
            visibility: hidden;
            transform: translateY(-4px);
            pointer-events: none;
            z-index: 20;
            max-height: 300px;
            overflow-y: auto;
            box-shadow: 0 16px 30px rgba(0, 0, 0, 0.35);
        }

        .custom-select.open .custom-select__options {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
            pointer-events: all;
        }

        .custom-option {
            position: relative;
            display: block;
            padding: 0.5rem 0.64rem;
            font-size: 0.85rem;
            font-weight: 500;
            color: var(--text-color);
            cursor: pointer;
            transition: background 0.2s ease, color 0.2s ease;
        }

        .custom-option:hover,
        .custom-option.selected {
            background: linear-gradient(120deg, rgba(59, 130, 246, 0.4), rgba(0, 245, 160, 0.24));
            color: #ffffff;
        }

        .arrow {
            position: relative;
            height: 15px;
            width: 15px;
            flex: 0 0 15px;
        }
        .arrow::before, .arrow::after {
            content: "";
            position: absolute;
            bottom: 1px;
            width: 0.14rem;
            height: 100%;
            transition: transform 0.25s ease;
            background-color: var(--text-muted);
        }
        .arrow::before {
            left: -4px;
            transform: rotate(45deg);
        }
        .arrow::after {
            left: 4px;
            transform: rotate(-45deg);
        }
        .open .arrow::before {
            transform: rotate(-45deg);
        }
        .open .arrow::after {
            transform: rotate(45deg);
        }

        /* Scrollbar */
        .custom-select__options::-webkit-scrollbar,
        .output-lines::-webkit-scrollbar {
            width: 8px;
        }

        .custom-select__options::-webkit-scrollbar-track,
        .output-lines::-webkit-scrollbar-track {
            background: rgba(10, 20, 31, 0.7);
            border-radius: 10px;
        }

        .custom-select__options::-webkit-scrollbar-thumb,
        .output-lines::-webkit-scrollbar-thumb {
            background: linear-gradient(180deg, rgba(59, 130, 246, 0.7), rgba(0, 245, 160, 0.7));
            border-radius: 10px;
        }

        /* Disabled state */
        .custom-select-wrapper.disabled {
            opacity: 0.55;
            pointer-events: none;
            filter: grayscale(0.18);
        }

        :is(.home-btn, .generate-btn, .copy-btn, .reset-btn, .custom-select__trigger, .form-group input):focus-visible {
            outline: 2px solid rgba(34, 211, 238, 0.92);
            outline-offset: 2px;
        }

        button,
        input,
        .custom-select__trigger {
            -webkit-tap-highlight-color: transparent;
        }

        @media (max-width: 1080px) {
            body {
                background-attachment: scroll;
            }

            .generator-container {
                grid-template-columns: 1fr;
                max-width: 860px;
            }

            .generator-form {
                min-height: 0;
            }

            .output-lines {
                min-height: 250px;
            }
        }

        @media (max-width: 768px) {
            .topbar {
                width: min(96vw, 768px);
                margin-top: 0.9rem;
                padding: 0.58rem 0.66rem;
                gap: 0.5rem;
                flex-wrap: wrap;
            }

            .brand {
                font-size: 0.84rem;
                word-break: break-word;
            }

            .top-links {
                width: 100%;
                justify-content: flex-start;
            }

            .content {
                padding: 0.85rem;
            }

            .toggle-label {
                margin-top: 0;
                min-width: auto;
                padding-bottom: 0.22rem;
            }

            .form-row {
                gap: 0.55rem;
                margin-bottom: 0.35rem;
            }

            .form-row.form-row-bin {
                grid-template-columns: minmax(0, 1fr);
            }

            .form-group,
            .custom-select-wrapper {
                flex: 1 1 auto;
                min-width: 0;
            }

            .form-row.compact-row .form-group {
                min-width: 0;
                max-width: none;
            }

            .form-row.compact-row {
                grid-template-columns: 102px minmax(0, 1fr) minmax(0, 1fr);
            }

            .output-buttons {
                justify-content: stretch;
            }

            .copy-btn,
            .reset-btn {
                flex: 1 1 calc(50% - 0.4rem);
            }
        }

        @media (max-width: 520px) {
            .title {
                line-height: 1.24;
            }

            .title-wrap {
                gap: 0.55rem;
            }

            .title-cube {
                width: 42px;
                height: 42px;
                border-radius: 10px;
            }

            .description {
                margin-bottom: 1.35rem;
                font-size: 0.94rem;
            }

            .generator-form,
            .output-container {
                border-radius: 14px;
                padding: 0.8rem;
            }

            .form-gif {
                width: clamp(150px, 52vw, 220px);
            }

            .generate-btn,
            .copy-btn,
            .reset-btn {
                font-size: 1rem;
            }

            .copy-btn,
            .reset-btn {
                flex: 1 1 100%;
            }

            .output-lines {
                min-height: 205px;
            }

            .output-line-text {
                font-size: 1.08rem;
            }
        }

        @media (max-width: 620px) {
            .form-row {
                grid-template-columns: 1fr;
            }

            .form-row.compact-row {
                grid-template-columns: 1fr;
            }

            .form-row.compact-row .toggle-label {
                justify-self: start;
                padding-bottom: 0.08rem;
            }
        }

        @media (max-width: 420px) {
            .top-links {
                flex-direction: column;
            }

            .home-btn {
                width: 100%;
                text-align: center;
            }
        }

        @supports not ((-webkit-backdrop-filter: blur(2px)) or (backdrop-filter: blur(2px))) {
            .topbar,
            .generator-form,
            .output-container,
            .custom-select__trigger,
            .output-lines,
            .form-group input {
                background: rgba(8, 16, 26, 0.88);
            }
        }

        @media (prefers-reduced-motion: reduce) {
            *,
            *::before,
            *::after {
                animation: none !important;
                transition: none !important;
            }
        }

        @keyframes cubeRgbPulse {
            0%, 100% {
                box-shadow:
                    0 0 10px rgba(255, 77, 77, 0.55),
                    0 0 18px rgba(255, 77, 77, 0.35);
                filter: hue-rotate(0deg) saturate(1.05);
            }
            33% {
                box-shadow:
                    0 0 10px rgba(59, 130, 246, 0.6),
                    0 0 18px rgba(59, 130, 246, 0.36);
                filter: hue-rotate(55deg) saturate(1.18);
            }
            66% {
                box-shadow:
                    0 0 10px rgba(0, 245, 160, 0.62),
                    0 0 18px rgba(0, 245, 160, 0.36);
                filter: hue-rotate(110deg) saturate(1.22);
            }
        }