:root {
    --StraftatGrn: #acdaa6;
}

body {
    font-family: Inter, sans-serif;
    background: #090909;
    color: #e8e8e8;
    margin: 0;
    display: flex;
    justify-content: center;
}

body.theme-light {
    --StraftatGrn: #347a4d;
    background:
        radial-gradient(circle at 16% 8%, rgba(172, 218, 166, 0.18), transparent 26%),
        radial-gradient(circle at 84% 2%, rgba(255, 184, 88, 0.08), transparent 22%),
        linear-gradient(180deg, #fbfcfa 0%, #f2f5f0 48%, #e9eee7 100%);
    color: #18251d;
}

body.theme-light .container {
    color: #18251d;
}

body.theme-light #textInput,
body.theme-light .guide-btn,
body.theme-light .github-link,
body.theme-light .random-quips,
body.theme-light .advanced-panel,
body.theme-light .intensity-panel,
body.theme-light .effects-panel,
body.theme-light .temperature-panel,
body.theme-light .output-wrapper,
body.theme-light .saved-item,
body.theme-light .preset-popup-card,
body.theme-light .guide-content {
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(49, 77, 57, 0.18);
    color: #18251d;
    box-shadow: 0 14px 34px rgba(42, 65, 48, 0.12);
}

body.theme-light #textInput {
    background: #ffffff;
    border-color: rgba(40, 66, 48, 0.22);
    color: #18251d;
    box-shadow: 0 10px 24px rgba(42, 65, 48, 0.1);
}

body.theme-light #textInput::placeholder {
    color: rgba(24, 37, 29, 0.48);
}

body.theme-light .random-quips-header span,
body.theme-light .effects-section-title,
body.theme-light .saved-title,
body.theme-light .temperature-panel label,
body.theme-light .temperature-scale {
    color: rgba(24, 37, 29, 0.78);
}

body.theme-light .random-quip,
body.theme-light .random-quip-category,
body.theme-light .color-count-btn,
body.theme-light .mode,
body.theme-light .gradient-btn,
body.theme-light .advanced-tab,
body.theme-light #refreshQuipsBtn,
body.theme-light #toggleQuipsBtn,
body.theme-light .feedback-link,
body.theme-light .save-actions button {
    background: #f7faf6;
    color: #24372b;
    border-color: rgba(48, 84, 58, 0.18);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.72);
}

body.theme-light .random-quip:hover,
body.theme-light .random-quip-category.active,
body.theme-light .color-count-btn.active,
body.theme-light .mode.active,
body.theme-light .advanced-tab.active {
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.42);
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.2), transparent 38%, rgba(0, 0, 0, 0.18)),
        var(--guide-gradient);
    background-size: 230% 100%, 100% 100%;
    border-color: rgba(25, 60, 35, 0.28);
}

body.theme-light .preset-popup {
    background:
        radial-gradient(circle at top, rgba(63, 127, 82, 0.08), transparent 30%),
        rgba(239, 244, 237, 0.72);
}

body.theme-light .preset-popup-card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 247, 0.94));
    border-color: rgba(42, 65, 48, 0.22);
    box-shadow: 0 28px 72px rgba(42, 65, 48, 0.22);
}

body.theme-light .preset-dock-title,
body.theme-light .preset-detail-name,
body.theme-light .handle-hex,
body.theme-light #temperatureValue {
    color: #18251d;
}

body.theme-light .preset-dock-subtitle,
body.theme-light .preset-section-label {
    color: rgba(24, 37, 29, 0.68);
}

body.theme-light .preset-close-btn {
    background: #f4f8f3;
    border-color: rgba(49, 77, 57, 0.18);
    color: #2d4334;
}

body.theme-light .preset-close-btn:hover {
    background: #eaf4e8;
    border-color: rgba(52, 122, 77, 0.32);
    color: #102016;
}

body.theme-light .preset-category {
    background: #f5f8f4;
    border-color: rgba(49, 77, 57, 0.18);
    color: #263a2d;
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.82);
}

body.theme-light .preset-category:hover {
    background: #ffffff;
    border-color: rgba(52, 122, 77, 0.3);
    color: #102016;
    box-shadow: 0 9px 18px rgba(42, 65, 48, 0.1);
}

body.theme-light .preset-category.active {
    background: #ffffff;
    border-color: rgba(52, 122, 77, 0.36);
    color: #174626;
    box-shadow: inset 0 -3px rgba(52, 122, 77, 0.72), 0 10px 22px rgba(42, 65, 48, 0.12);
}

body.theme-light .preset-detail {
    background: #ffffff !important;
    border-color: rgba(42, 65, 48, 0.2);
    box-shadow: 0 14px 32px rgba(42, 65, 48, 0.12), inset 0 1px rgba(255, 255, 255, 0.9);
}

body.theme-light .preset-detail::before {
    background:
        radial-gradient(circle at top left, rgba(172, 218, 166, 0.18), transparent 34%),
        linear-gradient(180deg, rgba(52, 122, 77, 0.05), transparent 36%);
}

body.theme-light .preset-detail-hero {
    background: #f4f8f3;
    box-shadow: 0 0 0 1px rgba(49, 77, 57, 0.14), 0 12px 24px rgba(42, 65, 48, 0.12);
}

body.theme-light .preset-favorite-btn {
    background: #f7faf6 !important;
    border-color: rgba(49, 77, 57, 0.2);
    color: #263a2d;
    box-shadow: 0 8px 18px rgba(42, 65, 48, 0.08) !important;
}

body.theme-light .preset-favorite-btn:hover {
    background: #ffffff !important;
    border-color: rgba(52, 122, 77, 0.32);
    color: #102016;
    box-shadow: 0 12px 24px rgba(42, 65, 48, 0.12) !important;
}

body.theme-light .preset-favorite-btn.active {
    background: rgba(255, 214, 94, 0.16) !important;
    border-color: rgba(168, 118, 22, 0.28);
    color: #7a5200;
}

body.theme-light .preset-empty {
    background: #f7faf6;
    border-color: rgba(49, 77, 57, 0.14);
    color: rgba(24, 37, 29, 0.62);
}

body.theme-light .preset-theme {
    border-color: rgba(42, 65, 48, 0.16);
    box-shadow: 0 8px 18px rgba(42, 65, 48, 0.08);
}

body.theme-light .preset-theme:hover {
    border-color: rgba(42, 65, 48, 0.22);
    box-shadow: 0 14px 26px rgba(42, 65, 48, 0.14);
}

body.theme-light .preset-theme.active {
    border-color: rgba(52, 122, 77, 0.5);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.18),
        inset 0 -4px rgba(52, 122, 77, 0.82),
        0 16px 30px rgba(42, 65, 48, 0.18),
        0 0 0 3px rgba(172, 218, 166, 0.18);
}

body.theme-light .preset-theme-name {
    background: rgba(8, 8, 8, 0.42);
    color: #ffffff;
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.72);
}

body.theme-light .preset-theme.active .preset-theme-content::after {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(52, 122, 77, 0.36);
    color: #174626;
    box-shadow: 0 8px 18px rgba(42, 65, 48, 0.16);
}

body.theme-light .preset-detail-name,
body.theme-light .preset-color-chip {
    background: rgba(8, 8, 8, 0.4);
    border-color: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.55);
}

body.theme-light .advanced-toggle,
body.theme-light .intensity-toggle,
body.theme-light .effect-control,
body.theme-light .effect-control span,
body.theme-light .option-effect,
body.theme-light .count-pill,
body.theme-light .output-space {
    color: rgba(24, 37, 29, 0.82);
}

body.theme-light .effect-control input,
body.theme-light .effect-control select,
body.theme-light .option-effect,
body.theme-light .effects-option-row {
    background: #ffffff;
    border-color: rgba(49, 77, 57, 0.18);
    color: #18251d;
}

body.theme-light .output-wrapper,
body.theme-light .saved-block {
    border-color: rgba(49, 77, 57, 0.2);
}

body.theme-light .input-wrap::before {
    opacity: 0.14;
    filter: blur(8px);
}

body.theme-light .random-quips,
body.theme-light .advanced-panel {
    background: linear-gradient(180deg, #ffffff, #f7faf6);
    border-color: rgba(42, 65, 48, 0.22);
    box-shadow: 0 12px 28px rgba(42, 65, 48, 0.11);
}

body.theme-light .random-quips:hover,
body.theme-light .advanced-panel:hover {
    border-color: rgba(52, 122, 77, 0.28);
    box-shadow: 0 14px 30px rgba(42, 65, 48, 0.14);
}

body.theme-light .random-quips:has(.random-quips-body:not(.hidden)),
body.theme-light .advanced-panel:has(.advanced-content:not(.hidden)) {
    background: #ffffff;
    border-color: rgba(52, 122, 77, 0.3);
    box-shadow: 0 16px 34px rgba(42, 65, 48, 0.15);
}

body.theme-light .random-quips-header,
body.theme-light .advanced-toggle {
    color: #1f3025;
}

body.theme-light .intensity-current {
    background: #edf5eb;
    border: 1px solid rgba(49, 77, 57, 0.14);
    color: #31533c;
}

body.theme-light .effects-panel .intensity-current.active {
    background: rgba(52, 122, 77, 0.14);
    border-color: rgba(52, 122, 77, 0.32);
    color: #174626;
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.78), 0 0 0 2px rgba(172, 218, 166, 0.12);
}

body.theme-light .effects-section {
    background: #ffffff;
    border: 1px solid rgba(49, 77, 57, 0.14);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.86), 0 8px 18px rgba(42, 65, 48, 0.06);
}

body.theme-light .effects-section:has(.has-value, .option-effect.active, input:checked) {
    border-color: rgba(52, 122, 77, 0.24);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.9), 0 10px 22px rgba(42, 65, 48, 0.1);
}

body.theme-light .effect-control span,
body.theme-light .effects-section-title {
    color: rgba(24, 37, 29, 0.82);
    font-weight: 800;
}

body.theme-light .effect-control.has-value > span {
    color: #174626;
}

body.theme-light .effect-control.has-value input,
body.theme-light .effect-control.has-value select {
    background: #f0f8ee;
    border-color: rgba(52, 122, 77, 0.32);
    color: #102016;
    box-shadow: 0 0 0 2px rgba(172, 218, 166, 0.12);
}

body.theme-light .inline-effect,
body.theme-light .option-effect {
    background: #f5f8f4;
    color: #314339;
}

body.theme-light .inline-effect:hover,
body.theme-light .option-effect:hover {
    background: #edf5eb;
    color: #102016;
}

body.theme-light .inline-effect:has(input:checked),
body.theme-light .toggle-effect:has(input:checked),
body.theme-light .option-effect.active {
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.16), transparent 38%, rgba(0, 0, 0, 0.12)),
        var(--guide-gradient);
    border-color: rgba(30, 75, 42, 0.34);
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.42);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2), 0 8px 18px rgba(42, 65, 48, 0.16);
}

body.theme-light .inline-effect:has(input:checked) b,
body.theme-light .toggle-effect:has(input:checked) b {
    color: #ffffff;
}

body.theme-light .intensity-panel,
body.theme-light .effects-panel,
body.theme-light .temperature-panel {
    background: #f9fbf8;
    border: 1px solid rgba(49, 77, 57, 0.12);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.8);
}

body.theme-light .advanced-tab {
    background: #eef4ec;
    color: rgba(24, 37, 29, 0.74);
}

body.theme-light .output-wrapper {
    background: #ffffff;
    border-color: rgba(42, 65, 48, 0.28);
    box-shadow: 0 18px 42px rgba(42, 65, 48, 0.16), 0 0 0 3px rgba(172, 218, 166, 0.08);
}

body.theme-light #outputDisplay {
    color: #223428;
}

body.theme-light .count-pill {
    background: #f0f5ef;
    border-color: rgba(49, 77, 57, 0.16);
    color: #3a4f41;
    opacity: 1;
}

body.theme-light .saved-block {
    border-top-color: rgba(49, 77, 57, 0.16);
}

body.theme-light .saved-item {
    background: linear-gradient(180deg, #ffffff, #f8fbf7);
    border-color: rgba(49, 77, 57, 0.2);
    color: #24372b;
    box-shadow: 0 9px 20px rgba(42, 65, 48, 0.1), inset 0 1px rgba(255, 255, 255, 0.9);
}

body.theme-light .saved-item:hover {
    background: #ffffff;
    border-color: rgba(52, 122, 77, 0.36);
    color: #102016;
    box-shadow: 0 14px 28px rgba(42, 65, 48, 0.15), 0 0 0 2px rgba(172, 218, 166, 0.1);
}

body.theme-light .saved-title {
    color: rgba(24, 37, 29, 0.84);
}

body.theme-light .saved-text-content {
    color: #24372b;
}

body.theme-light .save-actions button:hover,
body.theme-light .feedback-link:hover,
body.theme-light .guide-btn:hover,
body.theme-light .github-link:hover {
    background: #edf5eb;
    border-color: rgba(52, 122, 77, 0.28);
    color: #122117;
}

body.theme-light .gradient-btn {
    background: #ffffff;
    color: #24372b;
    border: 1px solid rgba(49, 77, 57, 0.16);
    box-shadow: 0 8px 20px rgba(42, 65, 48, 0.12), inset 0 1px rgba(255, 255, 255, 0.9);
}

body.theme-light .gradient-btn:hover {
    background: #f1f7ef;
    color: #102016;
    box-shadow: 0 12px 24px rgba(42, 65, 48, 0.16), 0 0 18px rgba(52, 122, 77, 0.12);
}

body.theme-light .gradient-btn-label {
    background: rgba(22, 33, 26, 0.94);
    color: #ffffff;
}

body.theme-light .color-count-btn:not(.active):not(:disabled) {
    background: linear-gradient(180deg, #ffffff, #f1f6ef);
    background-clip: border-box;
    border: 1px solid rgba(49, 77, 57, 0.18);
    color: #2d4334;
    box-shadow: 0 6px 16px rgba(42, 65, 48, 0.08), inset 0 1px rgba(255, 255, 255, 0.92);
}

body.theme-light .color-count-btn:not(.active):not(:disabled):hover {
    background: #ffffff;
    background-clip: border-box;
    border-color: rgba(52, 122, 77, 0.3);
    color: #102016;
    box-shadow: 0 10px 22px rgba(42, 65, 48, 0.13);
}

body.theme-light #autoCopyBtn,
body.theme-light #copyBtn {
    background: #f5f9f4;
    border-color: rgba(49, 77, 57, 0.18);
    color: #2b4032;
}

body.theme-light #autoCopyBtn:hover,
body.theme-light #copyBtn:hover {
    background: #eaf4e8;
    border-color: rgba(52, 122, 77, 0.3);
    color: #102016;
}

body.theme-light #autoCopyBtn.active {
    background: rgba(52, 122, 77, 0.12);
    border-color: rgba(52, 122, 77, 0.28);
    color: #1f6b3b;
}

body.theme-light .output-generated-space {
    background: repeating-linear-gradient(
        90deg,
        rgba(52, 122, 77, 0.18) 0,
        rgba(52, 122, 77, 0.18) 2px,
        transparent 2px,
        transparent 5px
    );
    outline-color: rgba(49, 77, 57, 0.16);
}

body.theme-light .preview-generated-space {
    background: rgba(52, 122, 77, 0.2);
}

body.theme-light .guide-view {
    background: rgba(239, 244, 237, 0.72);
}

body.theme-light .guide-content h3,
body.theme-light .guide-content li {
    color: #223428;
}

body.theme-light .guide-content p,
body.theme-light .guide-subtitle {
    color: rgba(24, 37, 29, 0.72);
}

body.theme-light .close-guide {
    color: rgba(24, 37, 29, 0.62);
}

body.theme-light .close-guide:hover {
    color: #102016;
}

.theme-dock {
    position: fixed;
    top: 14px;
    right: 14px;
    z-index: 35;
    display: flex;
    gap: 8px;
    padding: 6px;
    border-radius: 999px;
    background: rgba(8, 8, 8, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.theme-mode {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.theme-mode img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    pointer-events: none;
    filter: drop-shadow(0 5px 8px rgba(0, 0, 0, 0.45));
}

.theme-mode:hover,
.theme-mode.active {
    transform: translateY(-1px);
    background: rgba(172, 218, 166, 0.16);
    box-shadow: 0 0 0 1px rgba(172, 218, 166, 0.22), 0 10px 20px rgba(0, 0, 0, 0.25);
}

body.theme-light .theme-dock {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(49, 77, 57, 0.18);
    box-shadow: 0 14px 30px rgba(42, 65, 48, 0.14);
}

body.theme-light .theme-mode {
    background: #f2f7f0;
}

body.theme-light .theme-mode:hover,
body.theme-light .theme-mode.active {
    background: rgba(172, 218, 166, 0.28);
    box-shadow: 0 0 0 1px rgba(52, 122, 77, 0.22), 0 10px 20px rgba(42, 65, 48, 0.14);
}

body.theme-light .floating-item {
    opacity: 0.2;
    filter: drop-shadow(0 10px 18px rgba(42, 65, 48, 0.16)) saturate(0.92);
}

.preset-popup {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 84px 16px 24px;
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.06), transparent 30%),
        rgba(4, 4, 4, 0.48);
    backdrop-filter: blur(9px);
    -webkit-backdrop-filter: blur(9px);
}

.preset-popup-card {
    display: flex;
    flex-direction: column;
    width: min(900px, calc(100vw - 28px));
    max-height: min(730px, calc(100vh - 78px));
    overflow: hidden;
    padding: 22px;
    border-radius: 10px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03)),
        linear-gradient(145deg, rgba(18, 18, 18, 0.86), rgba(8, 8, 8, 0.82));
    border: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.preset-popup-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.preset-popup-heading {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.preset-dock-title {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.86);
}

.preset-dock-subtitle {
    color: rgba(255, 255, 255, 0.64);
    font-size: 12px;
    letter-spacing: 0.2px;
}

.preset-close-btn {
    width: 30px;
    height: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: #d8d8d8;
    font-size: 18px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.16s ease;
}

.preset-close-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.preset-section-label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.54);
}

.preset-categories {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    padding: 0 0 4px;
}

.preset-category {
    flex: 0 0 auto;
    min-width: 96px;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.045);
    color: #cfcfcf;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.45px;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
    outline: none;
}

.preset-category:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.13);
    border-color: rgba(255, 255, 255, 0.14);
    color: #fff;
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.1), 0 12px 20px rgba(0, 0, 0, 0.22);
}

.preset-category.active {
    transform: none;
    background: rgba(255, 255, 255, 0.11);
    border-color: rgba(255, 255, 255, 0.16);
    color: #fff;
    box-shadow: inset 0 -2px rgba(172, 218, 166, 0.72);
}

.preset-category:focus,
.preset-category:focus-visible {
    outline: none;
}

.preset-browser {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 14px;
    min-height: 0;
}

.preset-themes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
    max-height: 310px;
    overflow: auto;
    padding-right: 4px;
    align-content: start;
    padding-bottom: 4px;
}

.preset-theme {
    position: relative;
    width: 100%;
    min-height: 112px;
    padding: 0;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.045);
    color: #f4f4f4;
    cursor: pointer;
    overflow: hidden;
    isolation: isolate;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, filter 0.2s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    outline: none;
}

.preset-theme-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: rgba(120, 18, 18, 0.82);
    border: 1px solid rgba(255, 120, 120, 0.42);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    z-index: 2;
}

.preset-theme::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--preset-theme-bg, linear-gradient(135deg, #3d3d3d, #1f1f1f));
    transition: transform 0.3s ease, filter 0.3s ease;
    z-index: -2;
}

.preset-theme::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 24%),
        linear-gradient(180deg, rgba(12, 12, 12, 0.06), rgba(8, 8, 8, 0.56));
    transition: background 0.24s ease;
    z-index: -1;
}

.preset-theme:hover {
    transform: translateY(-2px) scale(1.01);
    border-color: rgba(255, 255, 255, 0.09);
    box-shadow:
        inset 0 1px rgba(255, 255, 255, 0.08),
        0 18px 28px rgba(0, 0, 0, 0.28),
        0 0 18px rgba(255, 255, 255, 0.05);
    color: #fff;
}

.preset-theme:hover::before {
    transform: scale(1.04);
    filter: saturate(1.08);
}

.preset-theme.active {
    transform: translateY(-1px);
    border-color: rgba(172, 218, 166, 0.34);
    background: rgba(255, 255, 255, 0.055);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.045),
        inset 0 -3px rgba(172, 218, 166, 0.72),
        0 16px 28px rgba(0, 0, 0, 0.28),
        0 0 20px rgba(172, 218, 166, 0.08);
    color: #fff;
}

.preset-theme.active::before {
    transform: scale(1.015);
    filter: saturate(1.04) brightness(1.04);
}

.preset-theme.active::after {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent 26%),
        linear-gradient(180deg, rgba(8, 8, 8, 0.03), rgba(8, 8, 8, 0.46));
}

.preset-theme.active .preset-theme-content::after {
    content: "\2713";
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 10, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}

.preset-theme:focus,
.preset-theme:focus-visible {
    outline: none;
}

.preset-theme-content {
    position: relative;
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    min-height: 96px;
    padding: 12px;
}

.preset-theme-meta {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
}

.preset-theme-name {
    display: inline-flex;
    max-width: calc(100% - 36px);
    padding: 4px 7px;
    border-radius: 6px;
    background: rgba(8, 8, 8, 0.34);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.3px;
    text-align: left;
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.72);
    line-height: 1.2;
}

.preset-theme-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-width: 100%;
    align-items: center;
}

.preset-theme-swatch {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: none;
    overflow: hidden;
    background-clip: padding-box;
    transform: translateZ(0);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05), 0 6px 10px rgba(0, 0, 0, 0.2);
}

.preset-empty {
    padding: 14px 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #9f9f9f;
    font-size: 12px;
    text-align: center;
}

.preset-detail {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 6px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    z-index: 2;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 -1px 0 rgba(255, 255, 255, 0.03),
        0 18px 38px rgba(0, 0, 0, 0.3);
}

.preset-detail::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.1), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 36%);
    opacity: 1;
}

.preset-detail > * {
    position: relative;
}

.preset-detail-hero {
    position: relative;
    border-radius: 8px;
    border: none;
    background: rgba(0, 0, 0, 0.12);
    min-height: 132px;
    overflow: hidden;
    background-clip: padding-box;
    transform: translateZ(0);
    isolation: isolate;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05), 0 12px 22px rgba(0, 0, 0, 0.18);
}

.preset-detail-preview {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    overflow: hidden;
    background-clip: padding-box;
    transform: translateZ(0);
    transition: opacity 0.25s ease, transform 0.25s ease, filter 0.25s ease;
}

.preset-detail-preview.is-updating {
    opacity: 0.78;
    filter: saturate(1.08);
}

.preset-detail-overlay {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 132px;
    padding: 14px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 22%),
        linear-gradient(180deg, rgba(8, 8, 8, 0.04), rgba(8, 8, 8, 0.44) 50%, rgba(8, 8, 8, 0.68));
}

.preset-detail-name {
    align-self: flex-start;
    max-width: 100%;
    padding: 6px 10px;
    border-radius: 7px;
    background: rgba(8, 8, 8, 0.34);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 8px 28px rgba(0, 0, 0, 0.55);
}

.preset-detail-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 10px;
}

.preset-color-chip {
    font-family: monospace;
    font-size: 11px;
    padding: 6px 9px;
    border-radius: 6px;
    background: rgba(8, 8, 8, 0.32);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #e7e7e7;
    backdrop-filter: blur(8px);
}

.preset-detail-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.preset-favorite-btn {
    width: 100%;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.06);
    color: #ececec;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.preset-favorite-btn:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.11);
    border-color: rgba(255, 255, 255, 0.2);
}

.preset-favorite-btn.active {
    background: rgba(255, 214, 94, 0.12);
    border-color: rgba(255, 214, 94, 0.32);
    color: #ffe49a;
}

.preset-apply-btn {
    width: 100%;
    padding: 12px 14px;
    border-radius: 8px;
    border: none;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.preset-apply-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.28);
}

.preset-categories::-webkit-scrollbar,
.preset-themes::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

.preset-categories::-webkit-scrollbar-thumb,
.preset-themes::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.14);
    border-radius: 999px;
}

.preset-categories::-webkit-scrollbar-track,
.preset-themes::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
}

@media (max-width: 680px) {
    .preset-popup {
        padding-top: 58px;
    }

    .preset-popup-card {
        padding: 16px;
        border-radius: 8px;
    }

    .preset-themes {
        grid-template-columns: 1fr;
        max-height: 250px;
    }

    .preset-theme {
        min-height: 102px;
    }

    .preset-theme-content {
        min-height: 102px;
    }

    .preset-detail-name {
        font-size: 20px;
    }

    .preset-detail-actions {
        grid-template-columns: 1fr;
    }
}

.container {
    width: 100%;
    max-width: 1100px;
    padding: 14px 20px 22px;
    box-sizing: border-box;
    overflow-x: hidden;
}

h1 {
    margin-bottom: 24px;
    font-family: 'Montserrat', sans-serif;
    font-size: 3rem;
    font-weight: 600;
    letter-spacing: 3.5px;
    color: var(--StraftatGrn); 
    transform: skewX(-7deg);
}

.version-mark {
    display: inline-block;
    margin-left: 8px;
    font-size: 0.34em;
    font-weight: 700;
    letter-spacing: 1px;
    color: rgba(172, 218, 166, 0.72);
    transform: translateY(-0.42em);
}

.header {
    display: flex;
    align-items: center;
    justify-content: center; 
    gap: 10px;
    min-height: 78px;
}

.logo-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.logo {
    width: 50px;
    height: auto;
    max-height: 50px;
    object-fit: contain;
    border-radius: 10px;
    transform: scaleX(-1);
    margin-right: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.logo-wrap:hover .logo {
    transform: scaleX(-1) scale(1.08);
    filter: drop-shadow(0 0 8px rgba(172, 218, 166, 0.6));
}


.logo-tooltip {
    position: absolute;
    right: 100%; 
    top: 50%;
    transform: translateY(-50%) translateX(-10px); 
    margin-left: 8px;

    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--StraftatGrn);

    opacity: 0;
    pointer-events: none;

    transition: all 0.25s ease;
    text-shadow: 0 0 6px rgba(172, 218, 166, 0.5);
    white-space: nowrap;
}

.logo-wrap:hover .logo-tooltip {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

.guide-btn {
    position: relative;
    background: #121212;
    border-radius: 8px;
    padding: 5px 12px;
    cursor: pointer;
    color: #fff;
    border: 1px solid transparent;
    font-weight: 600;
    margin: 4px 7px auto
}

.guide-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 8px;
    padding: 1px;
    background: var(--guide-gradient);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.github-link {
    background: #111;
    border: 1px solid #2a2a2a;
    color: #bbb;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.15s ease;
}

.github-link:hover {
    background: #1d1d1d;
    border-color: #444;
    color: #fff;
}

.guide-view {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.guide-content {
    position: relative;
    background: #111;
    padding: 28px;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 90%;
    overflow-y: auto;
}

.close-guide {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 22px;
    color: #aaa;
    cursor: pointer;
}

.close-guide:hover {
    color: #fff;
}

.guide-content h3 {
    margin-top: 18px;
    margin-bottom: 6px;
    color: #ddd;
}

.guide-content p {
    color: #aaa;
    line-height: 1.5;
}

.guide-logo-demo {
    display: flex;
    justify-content: center;
    margin: 10px 0 18px;
}

.guide-logo-tooltip {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--StraftatGrn);
    opacity: 1;
    transform: none;
    max-width: none;
    padding: 2px 4px;
    text-align: center;
    white-space: nowrap;
    line-height: 1.4;
    text-shadow: 0 0 6px rgba(172, 218, 166, 0.5);
}

.guide-content li {
    color: #bbb;
    margin-bottom: 4px;
}

.fx-title {
    font-size: 2.4rem;
    margin-bottom: 2px;
}

.guide-subtitle {
    color: #888;
    margin-bottom: 14px;
}

.guide-gradient span {
    font-weight: 600;
}

.input-wrap {
    width: 100%;
    max-width: 1100px;
    margin: 8px auto 10px;
    position: relative;
}

.input-wrap::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 10px;
    background: var(--guide-gradient);
    filter: blur(10px);
    opacity: 0.3;
    z-index: 0;
}

#textInput {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #2a2a2a;
    background: #121212;
    color: white;
    font-size: 15px;
    position: relative;
    z-index: 1;
}

#textInput {
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #2a2a2a;
    background: #121212;
    color: white;
    font-size: 15px;
    position: relative;
    z-index: 1;
}

.random-quips {
    margin: -5px auto 12px;
    padding: 6px 9px;
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(172, 218, 166, 0.045), rgba(255, 255, 255, 0.015)),
        rgba(12, 12, 12, 0.66);
    border: 1px solid rgba(172, 218, 166, 0.075);
    box-shadow: none;
}

.random-quips-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 30px;
    margin-bottom: 0;
}

.random-quips:has(.random-quips-body:not(.hidden)) {
    padding: 9px 10px;
}

.random-quips:has(.random-quips-body:not(.hidden)) .random-quips-header {
    margin-bottom: 6px;
}

.random-quips-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.random-quips-header span {
    color: rgba(232, 232, 232, 0.54);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.random-quips-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 6px;
}

.random-quip-category {
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.045);
    background: rgba(255, 255, 255, 0.025);
    color: #868686;
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.16s ease;
}

.random-quip-category:hover,
.random-quip-category.active {
    transform: translateY(-1px);
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent 38%, rgba(255, 255, 255, 0.1)),
        var(--guide-gradient);
    background-size: 220% 100%, 100% 100%;
    border-color: rgba(172, 218, 166, 0.24);
    color: #f4fff2;
    box-shadow: 0 0 0 1px rgba(172, 218, 166, 0.16), 0 8px 20px rgba(0, 0, 0, 0.24);
    animation: arsenalFlow 4.5s linear infinite;
}

#refreshQuipsBtn,
#toggleQuipsBtn {
    width: 23px;
    height: 23px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.035);
    color: #a8a8a8;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.16s ease;
}

#toggleQuipsBtn i {
    transition: transform 0.18s ease;
}

#toggleQuipsBtn.active i {
    transform: rotate(180deg);
}

#refreshQuipsBtn:hover,
#toggleQuipsBtn:hover,
#toggleQuipsBtn.active {
    transform: translateY(-1px);
    background: rgba(172, 218, 166, 0.14);
    border-color: rgba(172, 218, 166, 0.28);
    color: #f4fff2;
}

.random-quips-body {
    display: grid;
    gap: 0;
}

.random-quips-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.random-quip {
    position: relative;
    overflow: hidden;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.045);
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.055), transparent 38%, rgba(255, 255, 255, 0.07)),
        rgba(255, 255, 255, 0.026);
    background-size: 230% 100%, 100% 100%;
    color: #a8a8a8;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transform: translateZ(0);
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.random-quip:hover {
    transform: translateY(-2px) translateZ(0);
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.14), transparent 36%, rgba(255, 255, 255, 0.16)),
        var(--guide-gradient);
    background-size: 230% 100%, 100% 100%;
    border-color: rgba(172, 218, 166, 0.36);
    color: #fff;
    filter: saturate(1.08);
    box-shadow: 0 0 0 1px rgba(172, 218, 166, 0.18), 0 10px 24px rgba(0, 0, 0, 0.28);
    animation: arsenalFlow 4.5s linear infinite;
}

.random-quip::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-120%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
    pointer-events: none;
}

.random-quip:hover::after {
    animation: arsenalShimmer 1.8s ease infinite;
}

@keyframes arsenalFlow {
    from { background-position: 0% 50%, center; }
    to { background-position: 220% 50%, center; }
}

@keyframes arsenalShimmer {
    0% { transform: translateX(-120%); }
    55%, 100% { transform: translateX(120%); }
}

.char-warning {
    margin-top: 10px;
    padding: 12px;
    background: #2a0000;
    border: 1px solid #ff3b3b;
    color: #ff6b6b;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
}

.gradient-header {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gradient-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.color-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 74px;
    flex-shrink: 0;
}

.color-trigger {
    width: 45px;
    height: 45px;
    border-radius: 16px;
    border: 2px solid #2a2a2a;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6), inset 0 0 12px rgba(0, 0, 0, 0.4);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.color-trigger:hover {
    transform: scale(1.05);
}

.pickr {
    display: none;
}

.hex-label {
    min-width: 62px;
    text-align: center;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 13px;
    border: 1px solid #2a2a2a;
    position: relative;
    overflow: hidden;
    transition: 0.15s ease;
}

.gradient-bar {
    width: 100%;
    height: 78px;
    border-radius: 999px;
    border: none;
    position: relative;
    overflow: hidden;
    background-clip: padding-box;
    transform: translateZ(0);
    isolation: isolate;
    clip-path: inset(0 round 999px);
    contain: paint;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
    margin-top: 4px;
}

.gradient-bar::after {
    display: none;
}

.recent-gradients {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 28px;
    margin: 8px auto 0;
}

.recent-gradient-swatch {
    width: 46px;
    height: 16px;
    border-radius: 999px;
    border: none;
    overflow: hidden;
    background-clip: padding-box;
    transform: translateZ(0);
    clip-path: inset(0 round 999px);
    box-shadow: 0 0 0 1px rgba(255,255,255,0.05), 0 4px 14px rgba(0,0,0,0.45);
    cursor: pointer;
    transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

.recent-gradient-swatch:hover {
    transform: translateY(-1px) scale(1.04) translateZ(0);
    filter: saturate(1.1);
    box-shadow: 0 0 0 1px rgba(255,255,255,0.09), 0 6px 16px rgba(0,0,0,0.48);
}

.gradient-handles {
    position: absolute;
    inset: 0;
    z-index: 5;
}

.gradient-toolbar {
    margin-top: 14px;
    display: flex;
    flex-direction: row;
    gap: 12px;
    align-items: center;
    justify-content: center;
}

.gradient-btn {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, .08);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    transition: .25s ease;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .45), inset 0 1px rgba(255, 255, 255, .2);
}

.gradient-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: inherit;
    opacity: .6;
    filter: blur(8px);
    z-index: -1;
}

.gradient-btn::after {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: var(--guide-gradient);
    opacity: 0.32;
    filter: blur(14px);
    z-index: -2;
}

.gradient-btn:hover {
    transform: scale(1.08);
    background: rgba(255, 255, 255, .18);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .5), 0 0 22px rgba(255, 255, 255, .08), inset 0 1px rgba(255, 255, 255, .24);
}

.gradient-btn:active {
    transform: scale(.92);
}

.gradient-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
    transform: none;
}

.gradient-btn:disabled:hover {
    transform: none;
    background: rgba(255, 255, 255, .08);
}

.gradient-btn i {
    font-size: 14px;
    pointer-events: none;
    transition: .2s ease;
}

.gradient-btn:hover i {
    transform: scale(1.15);
}

.gradient-btn-label {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 9px);
    z-index: 4;
    max-width: 150px;
    padding: 6px 8px;
    border-radius: 6px;
    background: rgba(10, 10, 10, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f4f4f4;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(4px);
    transition: opacity 0.16s ease, transform 0.16s ease;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.28);
}

.gradient-btn-label::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 100%;
    width: 7px;
    height: 7px;
    background: inherit;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -4px) rotate(45deg);
}

.gradient-btn:hover .gradient-btn-label,
.gradient-btn:focus-visible .gradient-btn-label {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.mode-group {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.advanced-panel {
    width: 100%;
    margin: 7px auto 0;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.032);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: none;
}

.advanced-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 32px;
    padding: 6px 11px;
    background: transparent;
    border: 0;
    color: #e2e2e2;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease;
}

.advanced-toggle.open {
    border-bottom: 0;
    background: rgba(172, 218, 166, 0.06);
}

.advanced-content {
    display: grid;
    gap: 7px;
    padding: 7px;
}

.intensity-panel,
.effects-panel,
.temperature-panel {
    margin-top: 0;
    background: rgba(255, 255, 255, 0.024);
    border: 0;
    border-radius: 8px;
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.035);
    overflow: hidden;
}

.temperature-panel {
    padding: 8px 9px;
}

.advanced-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 0;
    border-radius: 8px;
    background: transparent;
}

.advanced-tab {
    min-height: 25px;
    border: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.025);
    color: rgba(232, 232, 232, 0.68);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.advanced-tab.active {
    background: rgba(172, 218, 166, 0.13);
    color: #f4fff2;
    box-shadow: inset 0 0 0 1px rgba(172, 218, 166, 0.12);
}

.advanced-tab-panel {
    display: grid;
    gap: 7px;
}

.temperature-panel label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.35px;
    text-transform: none;
    color: rgba(232, 232, 232, 0.58);
}

.temperature-panel {
    display: grid;
    gap: 7px;
}

.temperature-panel label,
.temperature-scale {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

#temperatureValue {
    font-family: monospace;
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

#temperatureSlider {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, #46a8ff, #e8e8e8, #ff7a35);
    outline: none;
    cursor: pointer;
}

#temperatureSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #f7f7f7;
    border: 2px solid #111;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.32), 0 0 0 3px rgba(255, 255, 255, 0.055);
}

#temperatureSlider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #f7f7f7;
    border: 2px solid #111;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.32), 0 0 0 3px rgba(255, 255, 255, 0.055);
}

.temperature-scale {
    color: rgba(232, 232, 232, 0.45);
    font-size: 10px;
    font-weight: 700;
}

.effects-panel {
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.024);
}

.effects-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 28px;
    align-items: stretch;
    padding: 4px 5px 0;
    gap: 4px;
}

.intensity-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 24px;
    padding: 3px 8px;
    background: transparent;
    border: 0;
    color: #e2e2e2;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
}

.effects-panel .intensity-toggle {
    min-height: 23px;
    padding: 2px 7px;
    font-size: 9px;
}

.effects-toggle {
    min-width: 0;
}

.effects-reset-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    border: 0;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.032);
    color: #cfcfcf;
    cursor: pointer;
    transition: 0.16s ease;
}

.effects-reset-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.effects-reset-btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.intensity-toggle.open {
    border-bottom: 0;
}

.intensity-current {
    font-family: monospace;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.055);
}

.effects-panel .intensity-current {
    font-size: 9px;
    padding: 1px 5px;
    max-width: min(42vw, 260px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.effects-panel .intensity-current.active {
    background: rgba(172, 218, 166, 0.16);
    border-color: rgba(172, 218, 166, 0.28);
    color: #f4fff2;
    box-shadow: inset 0 0 0 1px rgba(172, 218, 166, 0.08);
}

.intensity-content,
.effects-content {
    padding: 8px;
}

.effects-content {
    display: grid;
    grid-template-columns: minmax(190px, 0.9fr) minmax(220px, 1fr) minmax(330px, 1.45fr);
    align-items: start;
    gap: 7px;
    padding: 7px 8px 8px;
}

.effects-section {
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: 7px;
    border-radius: 8px;
    background: rgba(8, 8, 8, 0.16);
    border: 1px solid transparent;
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.025);
}

.effects-section:has(.has-value, .option-effect.active, input:checked) {
    border-color: rgba(172, 218, 166, 0.16);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.04), 0 0 0 1px rgba(172, 218, 166, 0.06);
}

.effects-section-style {
    grid-column: 1 / -1;
}

.effects-section:nth-child(3) {
    grid-column: 2 / -1;
}

.effects-section + .effects-section {
    border-top: 0;
    border-left: 0;
}

.effects-section-title {
    color: rgba(244, 255, 242, 0.82);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.8px;
    line-height: 1;
    text-transform: uppercase;
}

.effects-inline-row {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 2px;
    overflow: hidden;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.035);
}

.effects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
    gap: 6px 7px;
}

.effects-grid-dense {
    grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
}

.style-options-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
}

.effect-control {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: 0;
    color: #d0d0d0;
    transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.effect-control:hover {
    color: #fff;
}

.effect-control span {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.15px;
    text-transform: none;
    color: rgba(232, 232, 232, 0.48);
}

.effect-control.has-value span {
    color: rgba(244, 255, 242, 0.86);
}

.effect-control input,
.effect-control select {
    width: 100%;
    box-sizing: border-box;
    border-radius: 7px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.04);
    color: #e8e8e8;
    min-height: 21px;
    padding: 2px 6px;
    font-size: 10px;
    outline: none;
    transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.effect-control.has-value input,
.effect-control.has-value select {
    background: rgba(172, 218, 166, 0.1);
    border-color: rgba(172, 218, 166, 0.28);
    box-shadow: 0 0 0 2px rgba(172, 218, 166, 0.055);
}

.effect-control input:hover,
.effect-control select:hover,
.effect-control input:focus,
.effect-control select:focus {
    background: rgba(255, 255, 255, 0.07);
    border-color: transparent;
    box-shadow: 0 0 0 2px rgba(172, 218, 166, 0.055);
}

.effect-control input[type="color"] {
    min-height: 26px;
    padding: 3px;
}

.effect-control input[type="range"] {
    min-height: 20px;
    padding: 0;
}

.effect-control input[type="hidden"] {
    display: none;
}

.effects-option-row {
    display: grid;
    gap: 1px;
    overflow: hidden;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.035);
}

.case-option-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.align-option-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.option-effect {
    min-width: 0;
    min-height: 21px;
    padding: 2px 5px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.04);
    color: #d8d8d8;
    cursor: pointer;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.1;
    text-align: center;
    transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.option-effect:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.07);
}

.option-effect.active {
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent 38%, rgba(255, 255, 255, 0.1)),
        var(--guide-gradient);
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.42);
    box-shadow: inset 0 0 0 1px rgba(172, 218, 166, 0.28), 0 7px 16px rgba(0, 0, 0, 0.16);
}

.inline-effect,
.toggle-effect {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    padding: 2px 5px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, color 0.16s ease;
}

.inline-effect input,
.toggle-effect input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.inline-effect b,
.toggle-effect b {
    min-width: 0;
    min-height: 0;
    padding: 0;
    border-radius: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    color: #f1f1f1;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
}

.inline-effect span,
.toggle-effect span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.inline-effect:has(input:checked),
.toggle-effect:has(input:checked) {
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent 38%, rgba(255, 255, 255, 0.1)),
        var(--guide-gradient);
    border-color: rgba(172, 218, 166, 0.32);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), 0 7px 16px rgba(0, 0, 0, 0.16);
}

.inline-effect:has(input:checked) b,
.toggle-effect:has(input:checked) b {
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.42);
}

.highlight-effect {
    position: relative;
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas:
        "label custom state"
        "swatches swatches swatches";
    align-items: center;
    gap: 6px;
    min-height: 66px;
    padding: 0;
}

.highlight-effect > span {
    grid-area: label;
}

.highlight-effect input[type="checkbox"],
.highlight-effect input[type="color"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.highlight-effect b {
    grid-area: state;
    min-width: 34px;
    min-height: 28px;
    padding: 0 7px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #f1f1f1;
    font-size: 11px;
    line-height: 1;
}

.highlight-effect:has(input[type="checkbox"]:checked) {
    color: #e7ffe5;
}

.highlight-effect:has(input[type="checkbox"]:checked) b {
    background: rgba(172, 218, 166, 0.18);
    border-color: rgba(172, 218, 166, 0.36);
    color: #f4fff2;
}

.highlight-swatches {
    grid-area: swatches;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
}

.highlight-swatch,
.highlight-custom {
    height: 28px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    cursor: pointer;
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.18), 0 6px 12px rgba(0, 0, 0, 0.16);
    transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.highlight-swatch {
    background: var(--highlight-swatch);
}

.highlight-swatch:hover,
.highlight-custom:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.28);
}

.highlight-swatch.active {
    box-shadow: inset 0 0 0 2px rgba(8, 8, 8, 0.56), 0 0 0 1px rgba(255, 255, 255, 0.3), 0 8px 16px rgba(0, 0, 0, 0.2);
}

.highlight-custom {
    grid-area: custom;
    width: 34px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent),
        var(--highlight-current, #ffff00);
}

.mode {
    flex: 1;
    min-width: 76px;
    background: rgba(255, 255, 255, 0.04);
    border: 0;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    color: #a8a8a8;
    font-size: 11px;
    font-weight: 700;
}

.mode.active {
    background: rgba(172, 218, 166, 0.11);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(172, 218, 166, 0.16);
}

.color-count-group {
    margin-top: 13px;
    display: flex;
    align-items: stretch;
    gap: 6px;
    justify-content: stretch;
}

.color-count-btn {
    flex: 1 1 0;
    position: relative;
    background: rgba(255, 255, 255, 0.028);
    border: 1px solid transparent;
    border-radius: 8px;
    background-clip: border-box;
    overflow: hidden;
    isolation: isolate;
    contain: paint;
    transform: translateZ(0);
    padding: 7px 8px;
    color: #aaa;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.65px;
    text-transform: uppercase;
    cursor: pointer;
    transition: 0.18s ease;
    box-shadow: none;
}

.color-count-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: transparent;
    background-clip: border-box;
    transform: translateZ(0);
}

.color-count-btn:hover {
    transform: translateY(-1px) translateZ(0);
    border-color: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.color-count-btn.active {
    background: transparent;
    color: #fff;
    border-color: transparent;
    box-shadow: none;
}

.color-count-btn.active::before {
    inset: 0;
    background: var(--slider-gradient);
    border-radius: inherit;
    clip-path: inset(0 round 8px);
}

.color-count-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.color-count-btn:disabled:hover {
    transform: none;
    border-color: rgba(255, 255, 255, 0.08);
    color: #cfcfcf;
}

.color-count-btn.hidden-option {
    display: none;
}

.slider-group {
    margin-top: 5px;
    background: rgba(255, 255, 255, 0.018);
    border: 1px solid rgba(255, 255, 255, 0.045);
    border-radius: 8px;
    padding: 6px 8px 8px;
    box-shadow: none;
}

.slider-group label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 5px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #d8d8d8;
}

.slider-group label span {
    min-width: 32px;
    text-align: center;
    font-family: monospace;
    font-size: 10px;
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
}

.hidden {
    display: none;
}

.slider-group input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    cursor: pointer;
    background: transparent;
}

@media (max-width: 900px) {
    .effects-content {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .effects-section-style {
        grid-column: 1 / -1;
    }

    .effects-section:nth-child(3) {
        grid-column: auto;
    }

    .effects-section:nth-child(2) {
        padding-left: 0;
        border-left: 0;
    }
}

@media (max-width: 680px) {
    .effects-content {
        grid-template-columns: minmax(0, 1fr);
    }

    .effects-section + .effects-section {
        border-top: 0;
        border-left: 0;
    }

    .effects-inline-row {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .effects-grid {
        grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
    }

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

.output-wrapper {
    margin-top: 12px;
    background: rgba(255, 255, 255, 0.022);
    border: 1px solid rgba(255, 255, 255, 0.055);
    border-radius: 10px;
    font-family: monospace;
    position: relative;
    min-height: 58px;
    padding: 10px;
    overflow: hidden;
}

#outputDisplay {
    font-size: 11px;
    line-height: 1.4;
    word-break: break-word;
    overflow-wrap: anywhere;
    overflow: hidden;
    margin: 22px 150px 0 0;
    padding: 0;
}

.output-space {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0.55em;
    color: rgba(255, 255, 255, 0.34);
    border-bottom: 1px dotted rgba(255, 255, 255, 0.18);
}

.output-generated-space {
    display: inline-block;
    min-width: 4px;
    height: 0.85em;
    margin-inline: 2px;
    vertical-align: -0.12em;
    border-radius: 3px;
    background: repeating-linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.12) 0,
        rgba(255, 255, 255, 0.12) 2px,
        transparent 2px,
        transparent 5px
    );
    outline: 1px solid rgba(255, 255, 255, 0.08);
}

.preview-generated-space {
    display: inline-block;
    min-width: 4px;
    height: 0.72em;
    margin-inline: 0.08em;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
}

.output-count {
    position: absolute;
    top: 10px;
    left: 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    pointer-events: none;
    font-family: monospace;
}

.count-pill {
    font-size: 10px;
    color: #777;
    opacity: 0.7;
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.count-pill.steam {
    color: #8ad7a7;
    opacity: 0.95;
}

.count-pill.warn {
    background: rgba(255, 139, 94, 0.12);
    border-color: rgba(255, 139, 94, 0.35);
}

#output {
    display: none;
}

#preview {
    margin-top: 16px;
    margin-bottom: 12px;
    text-align: center;
    font-size: clamp(42px, 4.6vw, 60px);
    line-height: 1.2;
    min-height: 1.18em;
    max-width: 100%;
    overflow: hidden;
    overflow-wrap: anywhere;
    box-sizing: border-box;
}

.preview-text {
    display: inline-block;
    max-width: 100%;
    transform-origin: center;
}

#autoCopyBtn::before,
#copyBtn::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 8px;
    background: var(--guide-gradient);
    opacity: 0.06;
    filter: blur(6px);
    z-index: -1;
}

#autoCopyBtn {
    position: absolute;
    top: 9px;
    right: 72px;
    padding: 5px 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.45px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.035);
    color: #aaa;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: none;
}

#autoCopyBtn:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border-color: rgba(255,255,255,0.3);
}

#autoCopyBtn.active {
    background: rgba(140, 255, 187, 0.1);
    border-color: rgba(140, 255, 187, 0.24);
    color: #c9ffd9;
    box-shadow: none;
}

#copyBtn {
    position: absolute;
    top: 9px;
    right: 9px;

    padding: 5px 11px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;

    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.12);

    background: rgba(255,255,255,0.05);
    color: #ddd;

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    cursor: pointer;
    transition: all 0.2s ease;

    box-shadow: none;
}

#copyBtn:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border-color: rgba(255,255,255,0.3);
    transform: translateY(-1px);
}

#copyBtn:active {
    transform: scale(0.95);
}

.save-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 9px;
    flex-wrap: wrap;
}

.save-actions button,
.feedback-link {
    padding: 6px 11px;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.032);
    border: 1px solid rgba(255, 255, 255, 0.055);
    border-radius: 7px;
    color: #aaa;
    cursor: pointer;
    transition: 0.15s ease;
    text-decoration: none;
    line-height: 1.2;
}

.save-actions button.active {
    background: rgba(239, 68, 68, 0.075);
    border-color: rgba(239, 68, 68, 0.26);
    color: #e8a6a6;
    box-shadow: none;
}

.save-actions button:hover,
.feedback-link:hover {
    background: #2a2a2a;
    color: #fff;
    transform: translateY(-1px);
}

.feedback-link {
    color: rgba(172, 218, 166, 0.78);
    border-color: rgba(172, 218, 166, 0.12);
    background: rgba(172, 218, 166, 0.045);
}

.feedback-link:hover {
    border-color: rgba(172, 218, 166, 0.26);
    background: rgba(172, 218, 166, 0.09);
}

.save-actions button.active:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(255, 122, 122, 0.5);
}

#removeModeBtn {
    color: #8d7777;
}

#removeModeBtn:hover {
    color: #ffc7c7;
    border-color: rgba(239, 68, 68, 0.24);
    background: rgba(239, 68, 68, 0.065);
}

.saved-sections {
    margin-top: 12px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.saved-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.saved-block-wide {
    grid-column: auto;
}

.saved-block-gradients {
    max-width: 300px;
}

.saved-block {
    padding: 10px 0 0;
    border-radius: 0;
    background: transparent;
    border-top: 1px solid rgba(255, 255, 255, 0.055);
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    box-shadow: none;
    box-sizing: border-box;
}

.saved-title {
    font-size: 11px;
    color: #777;
    margin-bottom: 7px;
    align-self: flex-start;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.saved-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 6px;
    width: 100%;
}

.saved-item {
    position: relative;
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
    padding: 7px 10px;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.026);
    border: 1px solid transparent;
    border-radius: 7px;
    color: #9f9f9f;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    cursor: pointer;
    transition: 0.15s ease;
    box-shadow: none;
}

.saved-item:hover {
    background: rgba(255, 255, 255, 0.055);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.075);
    transform: translateY(-1px);
}

.saved-item-clipboard {
    flex: 1 1 190px;
    align-items: flex-start;
}

.saved-text-content {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
    white-space: normal;
    line-height: 1.38;
    max-width: 100%;
}

.saved-item button {
    position: absolute;
    top: -8px;
    right: -6px;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    border: 1px solid rgba(255, 120, 120, 0.45);
    background: linear-gradient(145deg, #521212, #871a1a);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35);
}

.saved-item button:hover {
    background: linear-gradient(145deg, #ef4444, #b91c1c);
    border-color: #ff7b7b;
    color: #fff;
}

.remove-mode .saved-item button {
    display: flex;
}

.remove-mode .saved-item {
    border-color: rgba(239, 68, 68, 0.16);
    box-shadow: none;
}

.remove-mode .saved-title {
    color: #ff9a9a;
}

#depth {
    -webkit-appearance: none;
    width: 100%;
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    background-clip: padding-box;
    transform: translateZ(0);
    outline: none;
    cursor: pointer;
    background: var(--slider-gradient);
    border: none;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.05), 0 4px 14px rgba(0,0,0,0.28);
}

.saved-item-gradient {
    min-height: 64px;
    justify-content: center;
}

.saved-gradient {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.saved-gradient-preview {
    width: 94px;
    height: 18px;
    border-radius: 999px;
    border: none;
    overflow: hidden;
    background-clip: padding-box;
    transform: translateZ(0);
    clip-path: inset(0 round 999px);
    box-shadow: 0 0 0 1px rgba(255,255,255,0.05), 0 4px 14px rgba(0,0,0,0.45);
}

.saved-gradient-label {
    font-size: 11px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #d6d6d6;
}

@media (max-width: 700px) {
    .preset-popup {
        padding-top: 72px;
    }

    .preset-popup-card {
        width: min(100%, calc(100vw - 20px));
        max-height: calc(100vh - 80px);
        padding: 14px;
    }

    .preset-category {
        flex-basis: 100%;
    }

    .preset-theme-preview {
        width: 76px;
        flex-basis: 76px;
    }

    .color-count-group {
        flex-wrap: wrap;
    }

    .color-count-btn {
        min-width: calc(50% - 5px);
    }

    .saved-sections {
        grid-template-columns: 1fr;
    }

    .saved-block-wide {
        grid-column: auto;
    }

    .header {
        flex-wrap: wrap;
    }

    h1 {
        font-size: 2.6rem;
    }

    .logo {
        width: 38px;
        max-height: 38px;
    }

    .random-quips-list {
        max-height: 58px;
        overflow: hidden;
    }

    #outputDisplay {
        margin-right: 0;
        padding-top: 28px;
    }

    #autoCopyBtn {
        right: 68px;
        max-width: 112px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

#depth::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #f7f7f7;
    border: 2px solid #111;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.38), 0 0 0 4px rgba(255, 255, 255, 0.08);
    margin-top: -6px;
}

#depth::-moz-range-track {
    height: 10px;
    border-radius: 999px;
    background: var(--slider-gradient);
    border: none;
    overflow: hidden;
    background-clip: padding-box;
    box-shadow: none;
}

#depth::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #f7f7f7;
    border: 2px solid #111;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.38), 0 0 0 4px rgba(255, 255, 255, 0.08);
}

.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #111;
    border: 1px solid #2a2a2a;
    padding: 10px 16px;
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    opacity: 0;
    pointer-events: none;
    transition: .25s ease;
    z-index: 99999;
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, -6px);
}

.gradient-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    min-width: 72px;
    padding: 0;
    border: 0;
    background: transparent;
    display: flex;
    align-items: center;
    cursor: pointer;
    z-index: 5;
    transform: translateX(-50%);
}

.gradient-handle.edge-left {
    transform: none;
}

.gradient-handle.edge-right {
    transform: translateX(-100%);
}

.handle-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.handle-line {
    width: 2px;
    height: 60%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.46), rgba(255, 255, 255, 0.08));
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.18);
}

.handle-hex {
    font-family: monospace;
    font-size: 13px;
    letter-spacing: 0.5px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(8, 8, 8, 0.48);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: #fff;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28), inset 0 1px rgba(255, 255, 255, 0.14);
}

#floating-bg {
    position: fixed;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.container {
    position: relative;
    z-index: 2;
}

.floating-item {
    position: absolute;
    opacity: 0.15;
    pointer-events: none;
    will-change: transform;
}

.floating-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@keyframes floatY {
    from { transform: translateY(0px); }
    to   { transform: translateY(-80px); }
}
