:root {
    /* Base Colors */
    --rr-custom-color: rgb(163, 161, 161);
    --rr-custom-color-text: rgb(30, 30, 30);
    --rr-custom-color-text-light: rgb(244, 238, 238);
    --rr-custom-color-text-dark: rgb(30, 30, 30);
    --rr-background-color: #1a1a1a;

    /* Font Sizes */
    --font-size-xs: 0.85rem;    /* 12px - Small text, footnotes */
    --font-size-sm: 1rem;   /* 14px - Secondary text */
    --font-size-base: 1.25rem;     /* 16px - Body text */
    --font-size-lg: 1.5rem;   /* 18px - Large text */
    --font-size-xl: 1.75rem;    /* 20px - h4 */
    --font-size-2xl: 1.8rem;    /* 24px - h3 */
    --font-size-3xl: 1.875rem;  /* 30px - h2 */
    --font-size-4xl: 2.25rem;   /* 36px - h1 */

    /* Create lighter and darker variations of --rr-custom-color */
    --rr-custom-color-lighter: color-mix(in srgb, var(--rr-custom-color) 5%, white);
    --rr-custom-color-light: color-mix(in srgb, var(--rr-custom-color) 30%, white);
    --rr-custom-color-dark: color-mix(in srgb, var(--rr-custom-color) 50%, black);
    --rr-custom-color-darker: color-mix(in srgb, var(--rr-custom-color) 10%, black);
    --wheel-size: 300px;
    --center-size: 100px;
    --rr-custom-background-image: none;
    --rr-custom-background-size: cover;
    --rr-custom-background-position: center center;
    --rr-custom-background-repeat: no-repeat;
    --rr-custom-background-opacity: 1;
    --panel-bg: #1a1a1a;
    --panel-text: #ffffff;
    --handle-bg: #2d2d2d;
    --handle-hover: #3d3d3d;
}

    .survey-page {
        background: var(--rr-background-color);
    }
    a { color: var(--rr-custom-color); }

    /* Form Elements */
    input[type=text]:focus:not(.dropdown),
    input[type=number]:focus:not(.dropdown),
    textarea:focus:not(.dropdown),
    .dropdown:focus:not(.dropdown),
    html:not(.lte-ie9) .fir-select .input.dropdown:focus:not(.dropdown) {
        border: 1px solid var(--rr-custom-color);
    }

    /* Progress Indicators */
    .rr-progress-bar,
    .progress-box-completed { 
        background: var(--rr-custom-color); 
    }

    /* Buttons */
    .button,
    .button.back,
    .button.randomize {
        background-color: var(--rr-custom-color);
        color: var(--rr-custom-contrast);
    }

    .button:hover,
    .button:focus,
    .button.back:hover,
    .button.randomize:hover,
    .button.back:focus,
    .button.randomize:focus {
        background-color: var(--rr-custom-color-dark);
        color: var(--rr-custom-color-text-light) !important;
    }

    .button:active,
    .button.back:active,
    .button.randomize:active {
        background-color: var(--rr-custom-color-dark);
    }

    .button[disabled] {
        background-color: var(--rr-custom-color);
    }

    /* Headers */
    .exit-message-header { color: var(--rr-custom-color); }

    /* Survey Theme Colors */
    .survey-theme-colors-selected {
        color: #fff;
        background-color: var(--rr-custom-color);
    }

    /* Icons and Icon States */
    .fir-icon.selected .rounded .fir-selected,
    .fir-icon.selected .square .fir-selected,
    .fir-icon.selected .scale .fir-large,
    .fir-icon.selected i {
        fill: var(--rr-custom-color);
        color: var(--rr-custom-color);
    }

    .non-touch .fir-icon.selected:hover .rounded .fir-selected,
    .non-touch .fir-icon.selected:hover .square .fir-selected,
    .non-touch .grid-table-mode .clickableCell:hover .fir-icon.selected .rounded .fir-selected,
    .non-touch .grid-table-mode .clickableCell:hover .fir-icon.selected .square .fir-selected,
    .non-touch .fir-icon:hover:active .scale .fir-large,
    .non-touch .grid-table-mode .clickableCell:hover:active .fir-icon .scale .fir-large,
    .non-touch .fir-icon .scale:hover:active .fir-large {
        fill: var(--rr-custom-color-dark);
    }

    .non-touch .fir-icon.focus,
    .non-touch .fir-select.focus,
    .non-touch .fir-select .select2-container--focus,
    .non-touch .survey-buttons .button:focus,
    .non-touch .footer a:focus,
    .non-touch a[href]:focus {
        box-shadow: 0 0 3px 2px var(--rr-custom-color) !important;
    }

    /* Form Elements - Checkboxes and Radio Buttons */
    fieldset.atm1d .answers>div label {
        background-color: var(--rr-custom-color);
    }

    fieldset.atm1d .answers>div label>span>span {
        color: var(--rr-custom-contrast) !important 
    }

    fieldset.atm1d .answers > div input[type=checkbox]:checked ~ div > label,
    fieldset.atm1d .answers > div input[type=radio]:checked ~ div > label {
        background-color: var(--rr-custom-color-dark);
    }

    fieldset.atm1d .answers>div label:hover {
        background-color: var(--rr-custom-color-light);
    }

    /* ATM Table Buttons */

    .sq-atmtable-btn {
        background-color: var(--rr-custom-color-lighter)!important;
    }

    .sq-atmtable-btn-selected {
        background-color: var(--rr-custom-color-darker)!important;
    }

    .sq-atmtable-btn-hover {
        background-color: var(--rr-custom-color)!important;
    }

    /* Rating Elements */
    .atmrating-hover,
    .atmrating-selected {
        background-color: var(--rr-custom-color) !important;
    }

    /* Star Rating */
    .sq-starrating-stars .sq-starrating-star,
    .sq-starrating-stars .sq-starrating-star-highlighted {
        color: var(--rr-custom-color) !important;
    }

    /* Rating Scale */
    .sq-ratingscale-use-icon .sq-ratingscale-row.sq-ratingscale-starting .sq-ratingscale-bubble-inner,
    .sq-ratingscale-use-icon .sq-ratingscale-row.sq-ratingscale-answered .sq-ratingscale-bubble-inner,
    .sq-ratingscale-containment .clickableCell .sq-ratingscale-radio {
        color: var(--rr-custom-color) !important;
    }

    /* Rank Sort Container */

    .sq-ranksort-container {
        /* Cards */
        .sq-ranksort-cards .sq-ranksort-card,
        #question_q7 .sq-ranksort-container .sq-ranksort-buckets .sq-ranksort-card {
            background-color: var(--rr-custom-color-lighter) !important;
        }

        .sq-ranksort-cards .sq-ranksort-card:hover,
        .sq-ranksort-buckets .sq-ranksort-card:hover {
            background-color: var(--rr-custom-color-darker) !important;
            border-color: var(--rr-custom-color-darker) !important;
        }

        .sq-ranksort-buckets .sq-ranksort-card.sq-ranksort-card-dropped,
        .sq-ranksort-cards .sq-ranksort-card.sq-ranksort-card-dropped,
        .ui-draggable-helper,
        .sq-ranksort-buckets .sq-ranksort-card.ui-sortable-placeholder {
            background-color: var(--rr-custom-color-dark) !important;
            border-color: var(--rr-custom-color-dark) !important;
        }

        /* Icons */
        .sq-ranksort-icon-add,
        .sq-ranksort-icon-remove,
        .sq-ranksort-icon-rank {
            color: var(--rr-custom-color) !important;
            background-color: var(--rr-custom-color) !important;
            border-color: var(--rr-custom-color) !important;
        }
    }

    #survey .sq-ranksort-container .sq-ranksort-cards .sq-ranksort-card.sq-ranksort-card-dropped.ui-draggable-disabled.ui-state-disabled {
        color: var(--rr-custom-color-lighter);
    }

    /* Slider Elements */
    .ui-slider {
        .ui-slider-handle,
        .ui-slider-range {
            background: var(--rr-custom-color) !important;
        }
        
        .ui-slider-handle {
            border: 1px solid var(--rr-custom-color) !important;
        }
    }

    /* Value Handle States */
    .valueOffHandle .ui-slider .ui-slider-handle {
        &.offScale,
        &.ui-state-focus,
        &.ui-state-hover,
        &.ui-state-active {
            background: var(--rr-custom-color) !important;
            border: 0px solid var(--rr-custom-color) !important;
        }

        &.ui-state-hover {
            background: var(--rr-custom-color-dark) !important;
            border: 0px solid var(--rr-custom-color-dark) !important;
        }
    }

    .valueOnHandle .ui-slider .ui-slider-handle.offScale {
        background: var(--rr-custom-color) !important;
        border: 0px solid var(--rr-custom-color) !important;
    }

    /* Card Rating and Sorting */

    li.sq-cardrating-button {
        color: var(--rr-custom-color) !important;
        background-color: var(--rr-custom-color-lighter) !important;
    }

    .sq-cardrating-bar[data-active],
    .sq-cardrating-button[data-hovered],
    .sq-cardrating-button[data-selected] {
        background-color: var(--rr-custom-color-darker) !important;
    }

    .sq-cardsort-cards-view {
        .sq-cardsort-previous,
        .sq-cardsort-next {
            background: var(--rr-custom-color) !important;
        }
    }

    p.sq-cardsort-bucket-legend.sq-cardsort-bucket-legend-top {
        color: var(--rr-custom-contrast) !important
    }

    .sq-cardsort-buckets .sq-cardsort-bucket.sq-cardsort-state-selected {
        background: var(--rr-custom-color) !important;
    }


    .nps-hover,.nps-selected {
        background-color: var(--rr-custom-color) !important;
        color: #ffffff;
    }

    /* Headings */
    h1 { font-size: var(--font-size-4xl) !important; }
    h2 { font-size: var(--font-size-3xl) !important; }
    h3 { font-size: var(--font-size-2xl) !important; }
    h4 { font-size: var(--font-size-xl) !important; }
    h5, h6 { font-size: var(--font-size-lg) !important; }

    h1, h2, h3, h4, h5, h6 {
        color: var(--rr-custom-color-text) !important;
    }

    /* Text Elements */
    p, span, div {
        font-size: var(--font-size-base) !important;
       /* color: var(--rr-custom-color-text-dark);*/
    }

    /* List Elements */
    ol, ul, li, dt, dd {
        font-size: var(--font-size-base) !important;
        color: var(--rr-custom-color-text) !important;
    }

    /* Table Elements */
    caption, th, td {
        font-size: var(--font-size-base) !important;
        color: var(--rr-custom-color-text-dark) !important;
    }

    /* Inline Text Elements */
    a, abbr, acronym, cite, code, del, dfn, em, ins, kbd, q, samp, small, strike, strong, sub, sup, tt, var, b, u, i {
        font-size: var(--font-size-base) !important;
        color: var(--rr-custom-color-text-dark) !important;
    }

    /* Form Elements (that display text) */
    td label {
        font-size: var(--font-size-base) !important;
        color: var(--rr-custom-contrast) !important  
    }

    legend {
        font-size: var(--font-size-base) !important;
        color: var(--rr-custom-color-text-dark) !important;
    }

    /* Blockquote & Preformatted */
    blockquote, pre {
        font-size: var(--font-size-base) !important;
        color: var(--rr-custom-color-text-dark) !important;
    }

    /* Semantic Elements */
    article, aside, figcaption, footer, header, nav, section, summary, mark, time {
        font-size: var(--font-size-base) !important;
        color: var(--rr-custom-color-text-dark) !important;
    }

    body {
        margin: 0;
        padding: 0;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    }

    .rr-control-panel {
        display: flex;
        flex-direction: column;
        gap: 2rem;
        padding: 2rem;
        max-width: 1200px;
        margin: 0 auto;
        transform: scale(0.85);
        transform-origin: top;
        min-width: 550px;
        border-radius: 20px;
        font-family: monospace !important;
    }

    .widget-container {
        padding: 1rem;
        border-radius: 8px;
        background: #2a2a2a5c;
        padding: 40px;
        min-width: 500px;
    }

    .widget-title {
        font-size: 2.2rem !important;
        font-weight: bold;
        margin-bottom: 1rem;
        color: #ffffff63;
        padding-bottom: 0.5rem;

        font-family: monospace;
        text-align: center;
        text-decoration: overline;
    }

    /* Demo text to show color changes */
    .demo-text {
        margin: 1rem 0;
        padding: 1rem;
        border-radius: 4px;
        background-color: var(--rr-background-color);
        color: var(--rr-custom-color);
    }

    .color-pickers-container {
        display: flex;
        gap: 2rem;
        justify-content: center;
        flex-wrap: wrap;
        padding: 2rem;
        background: #1a1a1a;
    }

    .picker-section {
        flex: 1;
        min-width: 300px;
        max-width: 400px;
    }

    .picker-section h3 {
        color: white;
        text-align: center;
        margin-bottom: 1rem;
        font-size: 1.5rem;
    }

    .color-picker-container {
        position: relative;
        padding: 2rem;
        background: #2a2a2a;
        border-radius: 20px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.3);
        display: flex;
        flex-direction: column;
        align-items: center;
        max-width: 400px;
        margin: 2rem auto;
    }

    .color-wheel {
        position: relative;
        width: 300px;
        height: 300px;
    }

    .color-wheel canvas {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border-radius: 50%;
        cursor: crosshair;
        transition: transform 0.3s ease;
    }

    .color-wheel canvas:active {
        transform: scale(1.02);
    }

    .center-preview {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 100px;
        height: 100px;
        background: #2a2a2a;
        border-radius: 50%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        box-shadow: 0 5px 15px rgba(0,0,0,0.2);
        z-index: 1;
    }

    #textColorPreview {
        width: 60%;
        height: 60%;
        border-radius: 50%;
        margin-bottom: 0px;
        border: 2px solid rgba(255, 255, 255, 0.1);
        transition: background-color 0.2s ease;
        background: var(--color);
    }

    #textColorValue {
        position: absolute;
        bottom: -25px;
        font-size: 15px !important;
        color: #2a2a2a;
        font-family: monospace;
    }

    .controls {
        margin-top: 2rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 1rem;
    }

    .brightness-control {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        position: relative;
    }

    .brightness-control label {
        color: #fff;
        font-size: 14px;
    }

    input[type="range"] {
        width: 80%;
        margin: 10px auto;
        background: transparent;
        position: relative;
    }

    input[type="range"]::-webkit-slider-runnable-track {
        width: 100%;
        height: 4px;
        background: #444;
        border-radius: 2px;
    }

    input[type="range"]::-webkit-slider-thumb {
        -webkit-appearance: none;
        height: 16px;
        width: 16px;
        border-radius: 50%;
        background: #007bff;
        margin-top: -6px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        cursor: pointer;
        transition: transform 0.1s ease;
    }

    input[type="range"]::-webkit-slider-thumb:active {
        transform: scale(1.1);
    }

    input[type="range"]::-moz-range-track {
        width: 100%;
        height: 4px;
        background: #444;
        border-radius: 2px;
    }

    input[type="range"]::-moz-range-thumb {
        height: 16px;
        width: 16px;
        border-radius: 50%;
        background: #007bff;
        margin-top: -6px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        cursor: pointer;
        transition: transform 0.1s ease;
        border: none;
    }

    input[type="range"]::-ms-track {
        width: 100%;
        height: 4px;
        background: #444;
        border-radius: 2px;
    }

    input[type="range"]::-ms-thumb {
        height: 16px;
        width: 16px;
        border-radius: 50%;
        background: #007bff;
        margin-top: -6px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        cursor: pointer;
        transition: transform 0.1s ease;
    }

    button {
        padding: 12px 24px;
        border: none;
        border-radius: 25px;
        background: #444;
        color: white;
        font-size: 16px;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    button:hover {
        background: #555;
        transform: translateY(-2px);
    }

    button:active {
        transform: translateY(0);
    }

    /* Font size controls */
    .font-size-controls {
        flex: 1;
        min-width: 300px;
        max-width: 400px;
        background: #2a2a2a;
        padding: 2rem;
        border-radius: 20px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    }

    .font-size-controls h3 {
        color: white;
        text-align: center;
        margin-bottom: 1rem;
        font-size: 1.5rem;
    }

    .size-control {
        margin-bottom: 1rem;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .size-control label {
        color: white;
        font-size: 14px;
    }

    .size-control .size-value {
        color: #999;
        font-size: 12px;
        font-family: monospace;
    }

    .background-customizer {
        width: 400px;
        background: #1a1a1a;
        border-radius: 16px;
        padding: 30px;
        color: #fff;
        margin: 0 auto;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
        max-width: 400px;
        margin-top: 20px;
    }

    .tabs {
        display: flex;
        gap: 0.5rem;
        margin-bottom: 1.5rem;
        background: #3b3b3b;
        padding: 0.75rem;
        border-radius: 8px;
    }

    .tab-btn {
        flex: 1;
        padding: 0.75rem;
        border: none;
        border-radius: 4px;
        background: #1a1a1a;
        color: #fff;
        cursor: pointer;
        transition: background-color 0.2s ease;
        font-size: 14px;
    }

    .tab-btn:hover {
        background: #3a3a3a;
    }

    .tab-btn.active {
        background: #007bff;
    }

    .pattern-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        margin-bottom: 1.5rem;
    }

    .pattern-btn {
        aspect-ratio: 1;
        padding: 1rem;
        border: none;
        border-radius: 8px;
        background: #2a2a2a;
        color: #fff;
        cursor: pointer;
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 0.5rem;
    }

    .pattern-btn:hover {
        background: #3a3a3a;
    }

    .pattern-btn.active {
        background: #007bff;
    }

    .pattern-btn svg {
        width: 24px;
        height: 24px;
    }

    .pattern-btn span {
        font-size: 14px;
        opacity: 0.8;
    }

    .pattern-controls {
        background: #2a2a2a;
        border-radius: 8px;
        padding: 15px;
        display: flex;
        flex-direction: column;
        gap: 15px;
        padding-bottom: 32px;
    }

    .pattern-controls .control {
        margin-bottom: 15px;
    }

    .pattern-controls .control:last-child {
        margin-bottom: 0;
    }

    .pattern-controls .control label {
        display: block;
        color: #888;
        margin-bottom: 8px;
        font-size: 14px;
    }

    .pattern-controls .control input[type="range"] {
        width: 100%;
        height: 6px;
        background: #1a1a1a;
        border-radius: 3px;
        -webkit-appearance: none;
    }

    .pattern-controls .control input[type="range"]::-webkit-slider-thumb {
        -webkit-appearance: none;
        width: 16px;
        height: 16px;
        background: #4a90e2;
        border-radius: 50%;
        cursor: pointer;
    }

    .image-upload {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 16px;
        padding: 24px;
        border: 2px dashed rgba(255, 255, 255, 0.2);
        border-radius: 8px;
        margin-bottom: 24px;
    }

    .image-upload input[type="file"] {
        display: none;
    }

    .image-upload label {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        cursor: pointer;
        color: #fff;
    }

    .upload-icon {
        font-size: 24px;
    }

    .image-controls {
        margin-top: 1.5rem;
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .image-controls .control {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .image-controls .control label {
        color: #fff;
        font-size: 14px;
        opacity: 0.8;
    }

    .image-controls .control select {
        width: 100%;
        padding: 8px 12px;
        background: #2a2a2a;
        border: none;
        border-radius: 6px;
        color: #fff;
        cursor: pointer;
        font-size: 14px;
        -webkit-appearance: none;
        appearance: none;
        background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23ffffff%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.4-12.8z%22%2F%3E%3C%2Fsvg%3E");
        background-repeat: no-repeat;
        background-position: right 12px center;
        background-size: 12px;
        padding-right: 32px;
    }

    .image-controls .control select:hover {
        background-color: #3a3a3a;
    }

    .image-controls .control select:focus {
        outline: none;
        box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.4);
    }

    .image-controls .control input[type="range"] {
        width: 100%;
        margin: 0;
        background: transparent;
        -webkit-appearance: none;
    }

    .image-controls .control input[type="range"]::-webkit-slider-runnable-track {
        width: 100%;
        height: 4px;
        background: #1a1a1a;
        border-radius: 2px;
    }

    .image-controls .control input[type="range"]::-webkit-slider-thumb {
        -webkit-appearance: none;
        height: 16px;
        width: 16px;
        border-radius: 50%;
        background: #007bff;
        margin-top: -6px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        cursor: pointer;
        transition: transform 0.1s ease;
    }

    .image-controls .control input[type="range"]::-webkit-slider-thumb:active {
        transform: scale(1.1);
    }

    .sections {
        position: relative;
        height: 450px;
        overflow: hidden;
        background: transparent;
        padding: 0;
    }

    .section {
        display: none;
        height: 100%;
        overflow-y: auto;
    }

    .section::-webkit-scrollbar {
        width: 8px;
    }

    .section::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 4px;
    }

    .section::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.2);
        border-radius: 4px;
    }

    .section::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 255, 255, 0.3);
    }

    .section.active {
        display: block;
    }

    @keyframes pattern-rotate {
        from { transform: rotate(0deg); }
        to { transform: rotate(360deg); }
    }

    @keyframes pattern-pulse {
        0% { opacity: 0.5; }
        50% { opacity: 1; }
        100% { opacity: 0.5; }
    }

    @keyframes pattern-float {
        0% { transform: translateY(0); }
        50% { transform: translateY(-10px); }
        100% { transform: translateY(0); }
    }

    .pattern-animate-rotate {
        animation: pattern-rotate 10s linear infinite;
    }

    .pattern-animate-pulse {
        animation: pattern-pulse 2s ease-in-out infinite;
    }

    .pattern-animate-float {
        animation: pattern-float 3s ease-in-out infinite;
    }

    .type-buttons {
        display: flex;
        gap: 10px;
        margin-bottom: 20px;
        padding-bottom: 10px;
        border-bottom: 1px solid #333;
    }

    .type-btn {
        background: none;
        border: none;
        color: #fff;
        padding: 10px 15px;
        cursor: pointer;
        opacity: 0.6;
        transition: all 0.2s;
        position: relative;
    }

    .type-btn:hover {
        opacity: 0.8;
    }

    .type-btn.active {
        opacity: 1;
    }

    .type-btn.active::after {
        content: '';
        position: absolute;
        bottom: -11px;
        left: 0;
        width: 100%;
        height: 2px;
        background: #4a90e2;
    }

    .preset-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-bottom: 20px;
    }

    .preset-item {
        background: #333;
        padding: 15px;
        border-radius: 4px;
        cursor: pointer;
        text-align: center;
        transition: all 0.2s;
    }

    .preset-item:hover {
        background: #444;
        transform: translateY(-2px);
    }

    .preset-controls {
        display: flex;
        gap: 10px;
    }

    .preset-controls button,
    .preset-controls input {
        padding: 8px;
        border: none;
        border-radius: 4px;
    }

    .preset-controls button {
        background: #444;
        color: #fff;
        cursor: pointer;
    }

    .preset-controls input {
        background: #333;
        color: #fff;
        flex: 1;
    }

    .gradient-preview {
        height: 100px;
        border-radius: 4px;
        margin-bottom: 20px;
        background: linear-gradient(90deg, #ff0000 0%, #00ff00 100%);
    }

    .gradient-controls {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .gradient-type,
    .gradient-angle {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .gradient-stops {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .gradient-stop {
        display: flex;
        gap: 10px;
        align-items: center;
    }

    .color-schedule {
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid #333;
    }

    .time-slots {
        margin: 15px 0;
    }

    .time-slot {
        display: flex;
        gap: 10px;
        margin-bottom: 10px;
    }

    .image-controls {
        display: flex;
        flex-direction: column;
    }

    .control {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }

    .control label {
        font-size: 12px;
        opacity: 0.8;
    }

    .control input[type="range"] {
        width: 100%;
    }

    .control select,
    .control input[type="color"] {
        background: #333;
        border: none;
        padding: 5px;
        border-radius: 4px;
        color: #fff;
    }

    .pattern-animate-rotate {
        animation: pattern-rotate 10s linear infinite;
    }

    .pattern-animate-pulse {
        animation: pattern-pulse 2s ease-in-out infinite;
    }

    .pattern-animate-float {
        animation: pattern-float 3s ease-in-out infinite;
    }

    #background-pattern {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: -1;
        pointer-events: none;
        transition: all 0.3s ease;
    }

    .control {
        margin-bottom: 15px;
    }

    .control:last-child {
        margin-bottom: 0;
    }

    .control label {
        display: block;
        margin-bottom: 8px;
        font-size: 14px;
        opacity: 0.8;
    }

    input[type="range"] {
        width: 100%;
        height: 4px;
        -webkit-appearance: none;
    }

    input[type="range"]::-webkit-slider-runnable-track {
        width: 100%;
        height: 4px;
        background: #444;
        border-radius: 2px;
    }

    input[type="range"]::-webkit-slider-thumb {
        -webkit-appearance: none;
        width: 12px;
        height: 12px;
        background: var(--rr-custom-color, #4a90e2);
        border-radius: 50%;
        cursor: pointer;
    }

    .image-grid::-webkit-scrollbar,
    .pattern-grid::-webkit-scrollbar {
        width: 8px;
    }

    .image-grid::-webkit-scrollbar-track,
    .pattern-grid::-webkit-scrollbar-track {
        background: #1a1a1a;
        border-radius: 4px;
    }

    .image-grid::-webkit-scrollbar-thumb,
    .pattern-grid::-webkit-scrollbar-thumb {
        background: #444;
        border-radius: 4px;
    }

    #background-pattern {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        pointer-events: none;
        z-index: -1;
        transition: all 0.3s ease;
    }

    .control {
        margin-bottom: 15px;
    }

    .control:last-child {
        margin-bottom: 0;
    }

    .control label {
        display: block;
        margin-bottom: 8px;
        font-size: 14px;
        opacity: 0.8;
    }

    input[type="range"] {
        width: 100%;
        height: 4px;
        -webkit-appearance: none;
    }

    input[type="range"]::-webkit-slider-thumb {
        -webkit-appearance: none;
        width: 12px;
        height: 12px;
        background: var(--rr-custom-color, #4a90e2);
        border-radius: 50%;
        cursor: pointer;
    }

    .type-buttons {
        display: flex;
        gap: 10px;
        margin-bottom: 20px;
        padding-bottom: 10px;
        border-bottom: 1px solid #333;
    }

    .demo-text {
        background: rgba(255, 255, 255, 0.9);
        padding: 20px;
        border-radius: 8px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        margin-top: 20px;
    }

    .color-picker-container {
        margin-bottom: 16px;
    }

    .color-wheel {
        position: relative;
        width: 100%;
        height: auto;
        aspect-ratio: 1;
        margin: 0 auto;
    }

    .color-wheel canvas {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border-radius: 50%;
        cursor: crosshair;
    }

    .controls {
        background: rgba(255, 255, 255, 0.08);
        border-radius: 12px;
        padding: 16px;
    }

    #background-image {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        z-index: -1;
        pointer-events: none;
        background-image: var(--rr-custom-background-image);
        background-size: var(--rr-custom-background-size);
        background-position: var(--rr-custom-background-position);
        background-repeat: var(--rr-custom-background-repeat);
        opacity: var(--rr-custom-background-opacity);
        transition: all 0.3s ease;
    }

    .color-pickers-container {
        display: flex;
        gap: 2rem;
        justify-content: center;
        flex-wrap: wrap;
        padding: 2rem;
        background: #1a1a1a;
    }

    .picker-section {
        flex: 1;
        min-width: 300px;
        max-width: 400px;
    }

    .picker-section h3 {
        color: white;
        text-align: center;
        margin-bottom: 1rem;
        font-size: 1.5rem;
    }

    .color-picker-container {
        position: relative;
        padding: 2rem;
        background: #2a2a2a;
        border-radius: 20px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.3);
        display: flex;
        flex-direction: column;
        align-items: center;
        max-width: 400px;
        margin: 2rem auto;
    }

    .color-wheel {
        position: relative;
        width: 300px;
        height: 300px;
    }

    .color-wheel canvas {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border-radius: 50%;
        cursor: crosshair;
        transition: transform 0.3s ease;
    }

    .color-wheel canvas:active {
        transform: scale(1.02);
    }

    .center-preview {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 100px;
        height: 100px;
        background: #2a2a2a;
        border-radius: 50%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        box-shadow: 0 5px 15px rgba(0,0,0,0.2);
        z-index: 1;
    }

    #colorPreview {
        width: 60%;
        height: 60%;
        border-radius: 50%;
        margin-bottom: 5px;
        border: 2px solid rgba(0,0,0,0.1);
        transition: background-color 0.2s ease;
    }

    #colorValue {
        font-size: 12px;
        color: #666;
        font-family: monospace;
    }

    .controls {
        margin-top: 2rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 1rem;
    }

    .brightness-control {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        position: relative;
    }

    .brightness-control label {
        color: #fff;
        font-size: 14px;
    }

    input[type="range"] {
        width: 80%;
        margin: 10px auto;
        background: transparent;
        position: relative;
    }

    input[type="range"]::-webkit-slider-runnable-track {
        width: 100%;
        height: 4px;
        background: #444;
        border-radius: 2px;
    }

    input[type="range"]::-webkit-slider-thumb {
        -webkit-appearance: none;
        height: 16px;
        width: 16px;
        border-radius: 50%;
        background: #007bff;
        margin-top: -6px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        cursor: pointer;
        transition: transform 0.1s ease;
    }

    input[type="range"]::-webkit-slider-thumb:active {
        transform: scale(1.1);
    }

    input[type="range"]::-moz-range-track {
        width: 100%;
        height: 4px;
        background: #444;
        border-radius: 2px;
    }

    input[type="range"]::-moz-range-thumb {
        height: 16px;
        width: 16px;
        border-radius: 50%;
        background: #007bff;
        margin-top: -6px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        cursor: pointer;
        transition: transform 0.1s ease;
        border: none;
    }

    input[type="range"]::-ms-track {
        width: 100%;
        height: 4px;
        background: #444;
        border-radius: 2px;
    }

    input[type="range"]::-ms-thumb {
        height: 16px;
        width: 16px;
        border-radius: 50%;
        background: #007bff;
        margin-top: -6px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        cursor: pointer;
        transition: transform 0.1s ease;
    }

    button {
        padding: 12px 24px;
        border: none;
        border-radius: 25px;
        background: #444;
        color: white;
        font-size: 16px;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    button:hover {
        background: #555;
        transform: translateY(-2px);
    }

    button:active {
        transform: translateY(0);
    }

    /* Font size controls */
    .font-size-controls {
        flex: 1;
        min-width: 300px;
        max-width: 400px;
        background: #2a2a2a;
        padding: 2rem;
        border-radius: 20px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    }

    .font-size-controls h3 {
        color: white;
        text-align: center;
        margin-bottom: 1rem;
        font-size: 1.5rem;
    }

    .size-control {
        margin-bottom: 1rem;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .size-control label {
        color: white;
        font-size: 14px;
    }

    .size-control .size-value {
        color: #999;
        font-size: 12px;
        font-family: monospace;
    }

    .background-customizer {
        width: 400px;
        background: #1a1a1a;
        border-radius: 16px;
        padding: 30px;
        color: #fff;
        margin: 0 auto;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
        max-width: 400px;
        margin-top: 20px;
    }

    .tabs {
        display: flex;
        gap: 0.5rem;
        margin-bottom: 1.5rem;
        background: #3b3b3b;
        padding: 0.75rem;
        border-radius: 8px;
    }

    .tab-btn {
        flex: 1;
        padding: 0.75rem;
        border: none;
        border-radius: 4px;
        background: var(--handle-bg);
        color: #fff;
        cursor: pointer;
        transition: background-color 0.2s ease;
        font-size: 14px;
        opacity:0.7;

    }

    .tab-btn:hover {
        background: #3a3a3a;
    }

    .tab-btn.active {
        background: #007bff;
    }

    .pattern-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        margin-bottom: 1.5rem;
    }

    .pattern-btn {
        aspect-ratio: 1;
        padding: 1rem;
        border: none;
        border-radius: 8px;
        background: #2a2a2a;
        color: #fff;
        cursor: pointer;
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 0.5rem;
    }

    .pattern-btn:hover {
        background: #3a3a3a;
    }

    .pattern-btn.active {
        background: #007bff;
    }

    .pattern-btn svg {
        width: 24px;
        height: 24px;
    }

    .pattern-btn span {
        font-size: 14px;
        opacity: 0.8;
    }

    .pattern-controls {
        background: #2a2a2a;
        border-radius: 8px;
        padding: 15px;
        display: flex;
        flex-direction: column;
        gap: 15px;
        padding-bottom: 32px;
    }

    .pattern-controls .control {
        margin-bottom: 15px;
    }

    .pattern-controls .control:last-child {
        margin-bottom: 0;
    }

    .pattern-controls .control label {
        display: block;
        color: #888;
        margin-bottom: 8px;
        font-size: 14px;
    }

    .pattern-controls .control input[type="range"] {
        width: 100%;
        height: 6px;
        background: #1a1a1a;
        border-radius: 3px;
        -webkit-appearance: none;
    }

    .pattern-controls .control input[type="range"]::-webkit-slider-thumb {
        -webkit-appearance: none;
        width: 16px;
        height: 16px;
        background: #4a90e2;
        border-radius: 50%;
        cursor: pointer;
    }

    .image-upload {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 16px;
        padding: 24px;
        border: 2px dashed rgba(255, 255, 255, 0.2);
        border-radius: 8px;
        margin-bottom: 24px;
    }

    .image-upload input[type="file"] {
        display: none;
    }

    .image-upload label {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        cursor: pointer;
        color: #fff;
    }

    .upload-icon {
        font-size: 24px;
    }

    .image-controls {
        margin-top: 1.5rem;
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .image-controls .control {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .image-controls .control label {
        color: #fff;
        font-size: 14px;
        opacity: 0.8;
    }

    .image-controls .control select {
        width: 100%;
        padding: 8px 12px;
        background: #2a2a2a;
        border: none;
        border-radius: 6px;
        color: #fff;
        cursor: pointer;
        font-size: 14px;
        -webkit-appearance: none;
        appearance: none;
        background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23ffffff%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.4-12.8z%22%2F%3E%3C%2Fsvg%3E");
        background-repeat: no-repeat;
        background-position: right 12px center;
        background-size: 12px;
        padding-right: 32px;
    }

    .image-controls .control select:hover {
        background-color: #3a3a3a;
    }

    .image-controls .control select:focus {
        outline: none;
        box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.4);
    }

    .image-controls .control input[type="range"] {
        width: 100%;
        margin: 0;
        background: transparent;
        -webkit-appearance: none;
    }

    .image-controls .control input[type="range"]::-webkit-slider-runnable-track {
        width: 100%;
        height: 4px;
        background: #1a1a1a;
        border-radius: 2px;
    }

    .image-controls .control input[type="range"]::-webkit-slider-thumb {
        -webkit-appearance: none;
        height: 16px;
        width: 16px;
        border-radius: 50%;
        background: #007bff;
        margin-top: -6px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        cursor: pointer;
        transition: transform 0.1s ease;
    }

    .image-controls .control input[type="range"]::-webkit-slider-thumb:active {
        transform: scale(1.1);
    }

    .sections {
        position: relative;
        height: 450px;
        overflow: hidden;
        background: transparent;
        padding: 0;
    }

    .section {
        display: none;
        height: 100%;
        overflow-y: auto;
    }

    .section::-webkit-scrollbar {
        width: 8px;
    }

    .section::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 4px;
    }

    .section::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.2);
        border-radius: 4px;
    }

    .section::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 255, 255, 0.3);
    }

    .section.active {
        display: block;
    }

    @keyframes pattern-rotate {
        from { transform: rotate(0deg); }
        to { transform: rotate(360deg); }
    }

    @keyframes pattern-pulse {
        0% { opacity: 0.5; }
        50% { opacity: 1; }
        100% { opacity: 0.5; }
    }

    @keyframes pattern-float {
        0% { transform: translateY(0); }
        50% { transform: translateY(-10px); }
        100% { transform: translateY(0); }
    }

    .pattern-animate-rotate {
        animation: pattern-rotate 10s linear infinite;
    }

    .pattern-animate-pulse {
        animation: pattern-pulse 2s ease-in-out infinite;
    }

    .pattern-animate-float {
        animation: pattern-float 3s ease-in-out infinite;
    }

    .type-buttons {
        display: flex;
        gap: 10px;
        margin-bottom: 20px;
        padding-bottom: 10px;
        border-bottom: 1px solid #333;
    }

    .type-btn {
        background: none;
        border: none;
        color: #fff;
        padding: 10px 15px;
        cursor: pointer;
        opacity: 0.6;
        transition: all 0.2s;
        position: relative;
    }

    .type-btn:hover {
        opacity: 0.8;
    }

    .type-btn.active {
        opacity: 1;
    }

    .type-btn.active::after {
        content: '';
        position: absolute;
        bottom: -11px;
        left: 0;
        width: 100%;
        height: 2px;
        background: #4a90e2;
    }

    .preset-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-bottom: 20px;
    }

    .preset-item {
        background: #333;
        padding: 15px;
        border-radius: 4px;
        cursor: pointer;
        text-align: center;
        transition: all 0.2s;
    }

    .preset-item:hover {
        background: #444;
        transform: translateY(-2px);
    }

    .preset-controls {
        display: flex;
        gap: 10px;
    }

    .preset-controls button,
    .preset-controls input {
        padding: 8px;
        border: none;
        border-radius: 4px;
    }

    .preset-controls button {
        background: #444;
        color: #fff;
        cursor: pointer;
    }

    .preset-controls input {
        background: #333;
        color: #fff;
        flex: 1;
    }

    .gradient-preview {
        height: 100px;
        border-radius: 4px;
        margin-bottom: 20px;
        background: linear-gradient(90deg, #ff0000 0%, #00ff00 100%);
    }

    .gradient-controls {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .gradient-type,
    .gradient-angle {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .gradient-stops {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .gradient-stop {
        display: flex;
        gap: 10px;
        align-items: center;
    }

    .color-schedule {
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid #333;
    }

    .time-slots {
        margin: 15px 0;
    }

    .time-slot {
        display: flex;
        gap: 10px;
        margin-bottom: 10px;
    }

    .image-controls {
        display: flex;
        flex-direction: column;
    }

    .control {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }

    .control label {
        font-size: 12px;
        opacity: 0.8;
    }

    .control input[type="range"] {
        width: 100%;
    }

    .control select,
    .control input[type="color"] {
        background: #333;
        border: none;
        padding: 5px;
        border-radius: 4px;
        color: #fff;
    }

    .pattern-animate-rotate {
        animation: pattern-rotate 10s linear infinite;
    }

    .pattern-animate-pulse {
        animation: pattern-pulse 2s ease-in-out infinite;
    }

    .pattern-animate-float {
        animation: pattern-float 3s ease-in-out infinite;
    }

    #background-pattern {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: -1;
        pointer-events: none;
        transition: all 0.3s ease;
    }

    .control {
        margin-bottom: 15px;
    }

    .control:last-child {
        margin-bottom: 0;
    }

    .control label {
        display: block;
        margin-bottom: 8px;
        font-size: 14px;
        opacity: 0.8;
    }

    input[type="range"] {
        width: 100%;
        height: 4px;
        -webkit-appearance: none;
    }

    input[type="range"]::-webkit-slider-thumb {
        -webkit-appearance: none;
        width: 12px;
        height: 12px;
        background: var(--rr-custom-color, #4a90e2);
        border-radius: 50%;
        cursor: pointer;
    }

    .type-buttons {
        display: flex;
        gap: 10px;
        margin-bottom: 20px;
        padding-bottom: 10px;
        border-bottom: 1px solid #333;
    }

    .demo-text {
        background: rgba(255, 255, 255, 0.9);
        padding: 20px;
        border-radius: 8px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        margin-top: 20px;
    }

    .color-picker-container {
        margin-bottom: 16px;
    }

    .color-wheel {
        position: relative;
        width: 100%;
        height: auto;
        aspect-ratio: 1;
        margin: 0 auto;
    }

    .color-wheel canvas {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border-radius: 50%;
        cursor: crosshair;
    }

    .controls {
        background: rgba(255, 255, 255, 0.08);
        border-radius: 12px;
        padding: 16px;
    }

    #background-image {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        z-index: -1;
        pointer-events: none;
        background-image: var(--rr-custom-background-image);
        background-size: var(--rr-custom-background-size);
        background-position: var(--rr-custom-background-position);
        background-repeat: var(--rr-custom-background-repeat);
        opacity: var(--rr-custom-background-opacity);
        transition: all 0.3s ease;
    }

    .color-pickers-container {
        display: flex;
        gap: 2rem;
        justify-content: center;
        flex-wrap: wrap;
        padding: 2rem;
        background: #1a1a1a;
    }

    .picker-section {
        flex: 1;
        min-width: 300px;
        max-width: 400px;
    }

    .picker-section h3 {
        color: white;
        text-align: center;
        margin-bottom: 1rem;
        font-size: 1.5rem;
    }

    .color-picker-container {
        position: relative;
        padding: 2rem;
        background: #2a2a2a;
        border-radius: 20px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.3);
        display: flex;
        flex-direction: column;
        align-items: center;
        max-width: 400px;
        margin: 2rem auto;
    }

    .color-wheel {
        position: relative;
        width: 300px;
        height: 300px;
    }

    .color-wheel canvas {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border-radius: 50%;
        cursor: crosshair;
        transition: transform 0.3s ease;
    }

    .color-wheel canvas:active {
        transform: scale(1.02);
    }

    .center-preview {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 100px;
        height: 100px;
        background: #2a2a2a;
        border-radius: 50%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        box-shadow: 0 5px 15px rgba(0,0,0,0.2);
        z-index: 1;
    }

    #colorPreview {
        width: 60%;
        height: 60%;
        border-radius: 50%;
        margin-bottom: 5px;
        border: 2px solid rgba(0,0,0,0.1);
        transition: background-color 0.2s ease;
    }

    #colorValue {
        font-size: 12px;
        color: #666;
        font-family: monospace;
    }

    .controls {
        margin-top: 2rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 1rem;
    }

    .brightness-control {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        position: relative;
    }

    .brightness-control label {
        color: #fff;
        font-size: 14px;
    }

    input[type="range"] {
        width: 80%;
        margin: 10px auto;
        background: transparent;
        position: relative;
    }

    input[type="range"]::-webkit-slider-runnable-track {
        width: 100%;
        height: 4px;
        background: #444;
        border-radius: 2px;
    }

    input[type="range"]::-webkit-slider-thumb {
        -webkit-appearance: none;
        height: 16px;
        width: 16px;
        border-radius: 50%;
        background: #007bff;
        margin-top: -6px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        cursor: pointer;
        transition: transform 0.1s ease;
    }

    input[type="range"]::-webkit-slider-thumb:active {
        transform: scale(1.1);
    }

    input[type="range"]::-moz-range-track {
        width: 100%;
        height: 4px;
        background: #444;
        border-radius: 2px;
    }

    input[type="range"]::-moz-range-thumb {
        height: 16px;
        width: 16px;
        border-radius: 50%;
        background: #007bff;
        margin-top: -6px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        cursor: pointer;
        transition: transform 0.1s ease;
        border: none;
    }

    input[type="range"]::-ms-track {
        width: 100%;
        height: 4px;
        background: #444;
        border-radius: 2px;
    }

    input[type="range"]::-ms-thumb {
        height: 16px;
        width: 16px;
        border-radius: 50%;
        background: #007bff;
        margin-top: -6px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        cursor: pointer;
        transition: transform 0.1s ease;
    }

    button {
        padding: 12px 24px;
        border: none;
        border-radius: 25px;
        background: #444;
        color: white;
        font-size: 16px;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    button:hover {
        background: #555;
        transform: translateY(-2px);
    }

    button:active {
        transform: translateY(0);
    }

    /* Font size controls */
    .font-size-controls {
        flex: 1;
        min-width: 300px;
        max-width: 400px;
        background: #2a2a2a;
        padding: 2rem;
        border-radius: 20px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    }

    .font-size-controls h3 {
        color: white;
        text-align: center;
        margin-bottom: 1rem;
        font-size: 1.5rem;
    }

    .size-control {
        margin-bottom: 1rem;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .size-control label {
        color: white;
        font-size: 14px;
    }

    .size-control .size-value {
        color: #999;
        font-size: 12px;
        font-family: monospace;
    }

    .background-customizer .color-picker-container {
        position: relative;
        padding: 1rem!important;
        border-radius: 20px;
        box-shadow: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        max-width: 400px;
        margin: 0 auto;
        height: 386px;
    }

    .background-customizer .color-wheel {
        position: relative;
        width: 300px;
        height: 300px;
    }

    .background-customizer canvas#backgroundColorWheel {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border-radius: 50%;
        cursor: crosshair;
    }

    .background-customizer .center-preview {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 100px;
        height: 100px;
        background: #2a2a2a;
        border-radius: 50%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        box-shadow: 0 5px 15px rgba(0,0,0,0.2);
        z-index: 1;
    }

    .background-customizer #backgroundColorPreview {
        width: 60%;
        height: 60%;
        border-radius: 50%;
        margin-bottom: 0px;
        border: 2px solid rgba(255, 255, 255, 0.1);
        transition: background-color 0.2s ease;
    }

    .background-customizer #backgroundColorValue {
        position: absolute;
        bottom: -25px;
        font-size: 15px!important;
        color: #2a2a2a;
        font-family: monospace;
    }

    .background-customizer .controls {
        margin-top: 2rem;
    }

    .background-customizer .brightness-control {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .background-customizer .brightness-control input {
        width: 100%;
        max-width: 200px;
    }

    .background-customizer .brightness-control label {
        color: #fff;
        font-size: 14px;
    }

    /* Tab styling */
    .background-customizer .tabs {
        display: flex;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }

    .background-customizer .tab-btn {
        padding: 0.5rem 1rem;
        border: none;
        border-radius: 4px;
        background: #2a2a2a;
        color: #fff;
        cursor: pointer;
        transition: background-color 0.2s ease;
    }

    .background-customizer .tab-btn:hover {
        background: #3a3a3a;
    }

    .background-customizer .tab-btn.active {
        background: #007bff;
    }

    .background-customizer .sections {
        padding: 1rem;
        max-width: 100%;
        overflow-x: hidden;
    }

    .background-customizer .section {
        display: none;
        width: 100%;
    }

    .background-customizer .section.active {
        display: block;
    }

    .background-customizer .image-section {
        width: 100%;
    }

    .background-customizer .background-images-list {
        max-height: 300px;
        overflow-y: auto;
        overflow-x: hidden;
        padding: 0.5rem;
        background: #2a2a2a;
        border-radius: 10px;
        margin-bottom: 1rem;
        width: 90%;
    }

    .background-customizer .image-controls {
        width: 100%;
    }

    .background-customizer .image-controls .control {
        margin-bottom: 1rem;
        width: 100%;
    }

    .background-customizer .image-controls .control select,
    .background-customizer .image-controls .control input {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .background-customizer .image-controls .control label {
        display: block;
        margin-bottom: 0.5rem;
        color: #fff;
    }

    .background-customizer .pattern-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
        gap: 2rem;
        margin-bottom: 1rem;
        background: #3b3b3b;
        padding: 23px;
    }

    .background-customizer .pattern-btn {
        aspect-ratio: 1;
        padding: 2.5rem;
        border: none;
        border-radius: 4px;
        background: #2a2a2a;
        color: #fff;
        cursor: pointer;
        transition: background-color 0.2s ease;
    }

    .background-customizer .pattern-btn:hover {
        background: #3a3a3a;
    }

    .background-customizer .pattern-btn.active {
        background: #007bff !important;
    }

    .background-customizer .pattern-btn svg {
        width: 100%;
        height: 100%;
    }

    .background-customizer .pattern-controls {
        padding: 1rem;
        background: #2a2a2a;
        border-radius: 8px;
    }

    .background-customizer .control {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }

    .background-customizer .control:last-child {
        margin-bottom: 0;
    }

    .background-customizer .control label {
        color: #fff;
        font-size: 14px;
    }

    .background-customizer .control input[type="range"] {
        width: 100%;
        margin: 0;
        background: transparent;
    }

    .background-customizer .control input[type="range"]::-webkit-slider-runnable-track {
        width: 100%;
        height: 4px;
        background: #1a1a1a;
        border-radius: 2px;
    }

    .background-customizer .control input[type="range"]::-webkit-slider-thumb {
        height: 16px;
        width: 16px;
        border-radius: 50%;
        background: #007bff;
        margin-top: -6px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        cursor: pointer;
        transition: transform 0.1s ease;
    }

    .background-customizer .control input[type="range"]::-webkit-slider-thumb:active {
        transform: scale(1.1);
    }

    /* Image section styling */
    .background-customizer .image-upload {
        border: 2px dashed #ddd;
        border-radius: 4px;
        padding: 2rem;
        text-align: center;
        margin-bottom: 1rem;
    }

    .background-customizer .image-upload input[type="file"] {
        display: none;
    }

    .background-customizer .image-upload label {
        cursor: pointer;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .background-customizer .upload-icon {
        font-size: 2rem;
    }

    /* Control styling */
    .background-customizer .control {
        margin-bottom: 1rem;
    }

    .background-customizer .control label {
        display: block;
        margin-bottom: 0.5rem;
    }

    .background-customizer .control select,
    .background-customizer .control input[type="range"],
    .background-customizer .control input[type="color"] {
        width: 100%;
        padding: 0.5rem;
        border-radius: 4px;
    }

    .background-customizer .control select {
        border: 1px solid #ddd;
    }

    .background-customizer .control input[type="color"] {
        height: 40px;
        padding: 0;
    }

    .background-customizer .background-images-list {
        max-height: 300px;
        overflow-y: auto;
        padding: 1rem;
        background: #2a2a2a;
        border-radius: 10px;
        margin-bottom: 1rem;
    }

    .background-customizer .background-image-item {
        display: flex;
        align-items: center;
        padding: 0.5rem;
        cursor: pointer;
        border-radius: 5px;
        margin-bottom: 0.5rem;
        background: #3a3a3a;
        transition: background-color 0.2s;
    }

    .background-customizer .background-image-item:hover {
        background: #4a4a4a;
    }

    .background-customizer .background-image-item.selected {
        background: #5a5a5a;
    }

    .background-customizer .background-image-item img {
        width: 60px;
        height: 60px;
        object-fit: cover;
        border-radius: 5px;
        margin-right: 1rem;
    }

    .background-customizer .background-image-item .image-name {
        color: #fff;
        font-size: 0.9rem;
    }

    .background-customizer .background-images-list::-webkit-scrollbar {
        width: 8px;
    }

    .background-customizer .background-images-list::-webkit-scrollbar-track {
        background: #2a2a2a;
        border-radius: 4px;
    }

    .background-customizer .background-images-list::-webkit-scrollbar-thumb {
        background: #4a4a4a;
        border-radius: 4px;
    }

    .background-customizer .background-images-list::-webkit-scrollbar-thumb:hover {
        background: #5a5a5a;
    }

    .background-customizer .loading-indicator {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 2rem;
        color: #fff;
        font-size: 0.9rem;
    }

    .background-customizer .loading-indicator span {
        opacity: 0.8;
    }

    .font-size-picker-container {
        position: relative;
        padding: 2rem;
        background: #2a2a2a;
        border-radius: 20px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.3);
        display: flex;
        flex-direction: column;
        gap: 2rem;
        max-width: 400px;
        margin: 2rem auto;
        color: white;
    }

    .font-preview {
        padding: 1.5rem;
        background: rgba(0, 0, 0, 0.2);
        border-radius: 10px;
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }

    /* Sample text styles */
    .sample-text {
        color: white;
        transition: font-size 0.3s ease;
        line-height: 1.2;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Font sizes */
    .sample-text.xs {
        font-size: var(--font-size-xs, 0.75rem) !important;
    }

    .sample-text.sm {
        font-size: var(--font-size-sm, 0.875rem) !important;
    }

    .sample-text.base {
        font-size: var(--font-size-base, 1rem) !important;
    }

    .sample-text.lg {
        font-size: var(--font-size-lg, 1.125rem) !important;
    }

    .sample-text.xl {
        font-size: var(--font-size-xl, 1.25rem) !important;
    }

    .sample-text.xxl {
        font-size: var(--font-size-2xl, 1.5rem) !important;
    }

    .sample-text.xxxl {
        font-size: var(--font-size-3xl, 1.875rem) !important;
    }

    .sample-text.xxxxl {
        font-size: var(--font-size-4xl, 2.25rem) !important;
    }

    .controls {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    .size-control {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .size-control label {
        font-size: 14px;
        color: #fff;
        letter-spacing: 1px;
        font-weight: bold;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .size-control span {
        color: #aaa;
        font-weight: normal;
    }

    .size-control>span {
        font-size: 14px !important;
        text-transform: uppercase;
    }

    input[type="range"] {
        width: 100%;
        margin: 10px 0;
        background: transparent;
        -webkit-appearance: none;
    }

    input[type="range"]::-webkit-slider-runnable-track {
        width: 100%;
        height: 4px;
        background: #444;
        border-radius: 2px;
        cursor: pointer;
    }

    input[type="range"]::-webkit-slider-thumb {
        -webkit-appearance: none;
        height: 16px;
        width: 16px;
        border-radius: 50%;
        background: #007bff;
        margin-top: -6px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        cursor: pointer;
        transition: transform 0.1s ease;
    }

    input[type="range"]::-webkit-slider-thumb:active {
        transform: scale(1.1);
    }

    /* Firefox styles */
    input[type="range"]::-moz-range-track {
        width: 100%;
        height: 4px;
        background: #444;
        border-radius: 2px;
        cursor: pointer;
    }

    input[type="range"]::-moz-range-thumb {
        height: 16px;
        width: 16px;
        border-radius: 50%;
        background: #007bff;
        border: none;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        cursor: pointer;
        transition: transform 0.1s ease;
    }

    .saved-indicator {
        height: min-content;
        position: fixed;
        top: 0px;
        right: 78px;
        color: #0d6efd;
        opacity: 0;
        transition: all 0.3s ease;
        z-index: 1000;
        text-align: center;
        font-size: 12px !important;
        width: 400px;
    }

    .saved-indicator.show {
        opacity: 1;
    }

        .panel-handle {
            position: fixed;
            left: 0;
            top: 50vh;
            transform: translateY(-50%);
            width: 40px;
            height: 100px;
            background: var(--handle-bg);
            border-radius: 0 8px 8px 0;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background 0.3s;
            z-index: 1045;
            opacity: .7;
        }

        .panel-handle:hover {
            background: var(--handle-hover);
        }

        .panel-handle .hamburger {
            display: flex;
            flex-direction: column;
            gap: 6px;
            transform: rotate(-90deg);
        }

        .panel-handle .hamburger span {
            display: block;
            width: 24px;
            height: 2px;
            background: var(--panel-text);
            transition: transform 0.3s;
        }

        .panel-handle.in-panel .hamburger span {
            width: 20px;
        }

        .offcanvas {
            background-color: var(--panel-bg) !important;
            color: var(--panel-text) !important;
            max-width: 520px !important;
            border-right: 1px solid #333 !important;
        }

        .offcanvas-header {
            border-bottom: 1px solid #333;
            padding-right: 0;
        }

        .offcanvas-title {
            color: var(--panel-text);
        }

        /* Custom scrollbar styles */
        .offcanvas-body {
            overflow-y: overlay;
            scrollbar-width: thin;
            scrollbar-color: #666 transparent;
        }

        .offcanvas-body::-webkit-scrollbar {
            width: 8px;
        }

        .offcanvas-body::-webkit-scrollbar-track {
            background: transparent;
        }

        .offcanvas-body::-webkit-scrollbar-thumb {
            background-color: #666;
            border-radius: 4px;
        }

        .offcanvas-body::-webkit-scrollbar-thumb:hover {
            background-color: #888;
        }

        /* Widget container styles */
        
        .widget-container {
            background: transparent;
            border-radius: 8px;
            padding: 15px;
            margin: 0px !important;
            margin-left: -12px !important;
            margin-top: -30px !important;
        }

        .widget-title {
            color: #fff;
            font-weight: 600;
            margin-bottom: 10px;
        }

        #controlPanelTabs .nav-item {
            margin: 0;
        }

        #controlPanelTabs .nav-link {
            color: #fff;
            background: #3d3d3d;
            border: none;
            padding: 8px 16px;
            margin: 0;
            border-radius: 4px;
            transition: background-color 0.2s;
            font-size: 14px!important;
        }

        #controlPanelTabs .nav-link:hover {
            background: #4d4d4d;
        }

        #controlPanelTabs .nav-link.active {
            color: #fff;
            background: #0d6efd;
            border: none;
        }

        .color-picker-container,
        .background-customizer {
            background: #2d2d2d;
        }

        .tabs button {
            background: #333;
            color: #fff;
            border: none;
            padding: 8px 16px;
        }

        .tabs button.active {
            background: #4a90e2;
        }

        /* Base styles for survey page */
        .survey-page {
            position: relative;
            margin-left: 40px; /* Initial margin for handle */
            width: calc(100% - 40px); /* Full width minus handle */
            min-height: 100vh;
            transition: all 0.3s ease;
        }
        
        .offcanvas-body {
            overflow-y: overlay;
            scrollbar-width: thin;
            scrollbar-color: #666 transparent;
            white-space: nowrap;
            overflow-x: hidden !important;
        }
        
        .font-size-picker-container, .color-picker-container, .background-customizer {
            width: 500px;
            max-width: 500px;
            height: 100vh;
        }

        .offcanvas-body{
            margin-bottom: -10px;
        }
        
        .background-customizer .section {
            height: 65vh!important;
        }

          /* Base styles for survey page */
        .survey-page {
            position: relative;
            margin-left: 40px; /* Initial margin for handle */
            width: calc(100% - 40px); /* Full width minus handle */
            min-height: 100vh;
            transition: all 0.3s ease;
        }

        /* Styles when panel is expanded */
        .survey-page.panel-expanded {
            margin-left: 522px; /* panel width (550px) + handle (40px) */
            width: calc(100% - 536px); /* Adjust width to account for panel */
        }

        .offcanvas-backdrop {
            background-color: transparent;
        }

        .rr-control-panel {
            min-width: 550px;
            height: 100%
        }

        .widget-container {
            min-width: 450px;
        }

        .offcanvas {
            width: min-content !important;
            z-index: 9999999999 !important;
        }

        .font-preview {
            text-align: left!important;
        }

        .background-customizer .background-images-list {
            max-height: unset!important;
        }

        li.nav-item {
            width: 33%;
            padding: 5px;
            padding-bottom: 0px;
        }

        .nav-tabs {
            border:none;
        }
        
        button {
            width: 100% !important;
        }

        .sections {
            height: 100%;
        }
        
         .clear-storage-btn {
            display: block;
            width: 100%;
            padding: 10px;
            margin-top: 20px;
            background-color: #dc3545;
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 14px;
            transition: background-color 0.3s ease;
        }

        .clear-storage-btn:hover {
            background-color: #c82333;
        }

        .clear-storage-btn:active {
            transform: scale(0.98);
        }

        .reset-button {
            width: 150px;
            margin: auto;
        }

        .nav-tabs {
            border-bottom: none!important;
        }

        .offcanvas-backdrop.show {
            opacity: 0 !important;
        }
        
        .background-images-list {
            width: 100% !important;
        }


        body{
            background-color: #1a1a1a;
        }

        .offcanvas-backdrop.show {
            opacity: 0 !important;
        }

        .progress-bar {
            display: unset !important;
        }


        .color-inputs {
            margin-top: 10px;
            text-align: center;
        }

        .hex-input-container {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            margin-bottom: 10px;
        }

        .hex-input {
            background: #1a1a1a;
            border: 1px solid #333;
            color: #fff;
            padding: 5px 10px;
            border-radius: 4px;
            width: 100px;
            text-align: center;
            font-family: monospace;
            font-size: 14px;
        }

        .input-label {
            color: #666;
            font-size: 12px;
            text-transform: uppercase;
        }

        .background-customizer #backgroundColorValue, #textColorValue {
            color: #eeeeee !important;
            font-weight: 800;
            font-size: 25px !important;
            text-transform: uppercase;
            opacity: .75;
        }

        [data-viewsize=large] [data-viewmode=horizontal] .sq-cardrating-button {
            color: var(--rr-custom-contrast) !important;
        }
    
        #survey .sq-ranksort-container .sq-ranksort-cards .sq-ranksort-card .sq-ranksort-card-text, #survey .sq-ranksort-container .sq-ranksort-buckets .sq-ranksort-card .sq-ranksort-card-text {
            color: var(--rr-custom-contrast) !important;
        }    

       .fa-icon-circle.sliderpoints-hover, 
       .fa-icon-circle.sliderpoints-selected,
       .sliderpoints-legenditem.sliderpoints-hover, 
       .sliderpoints-legenditem.sliderpoints-selected, 
       .sliderpoints-oolegenditem.sliderpoints-selected {
            color: var(--rr-custom-color)!important;
        }
        
        [class^="fa-icon-"], [class*=" fa-icon-"] {
            color: var(--rr-custom-contrast) !important;
        }

        .fa-icon-circle:before {
            color: var(--rr-custom-color-darker)!important;
        }

        .fa-icon-chevron-right:before, .fa-icon-chevron-left:before {
            color: var(--rr-custom-contrast) !important;
        }

        .fa-icon-circle-o:before, .fa-icon-dot-circle-o:before {
            color: var(--rr-custom-contrast) !important;
        }

        .fa-icon-square-o:before, .fa-icon-check-square-o:before {
            color: var(--rr-custom-contrast) !important;
        }

        span.sq-ratingscale-radio, .sq-ratingscale {
            font-size: 31.5px !important;
        }

        .sq-ratingscale {
            margin-left: 6.5px!important;
            margin-top: 0px!important;
        }

        /*Mobile*/
        @media screen and (max-width: 768px) {
            .rr-control-panel {
                transform: scale(.65);
                transform-origin: top left;
                margin-left: 0px;
            }

            .panel-handle {
                left: -22px;
            }

            .offcanvas-body {
                overflow-x: hidden;
                width: 100vw;
            }

            .survey-body {
                margin-right: 45px;
                margin-top: 5px;
                margin-left: 5px;
            }

            body.survey-page.touch.panel-expanded{
                    .footer, .reset-button, .survey-body {
                        display: none;
                    }
            }

        }

