@font-face {
    font-family: 'Pacifico';
    src: url('/fonts/Pacifico-Regular.ttf') format('truetype');
}
@font-face {
    font-family: 'Lobster';
    src: url('/fonts/Lobster-Regular.ttf') format('truetype');
}
@font-face {
    font-family: 'Indie Flower';
    src: url('/fonts/IndieFlower-Regular.ttf') format('truetype');
}
@font-face {
    font-family: 'Poppins-SemiBold';
    src: url('/fonts/Poppins-SemiBold.ttf');
}
@font-face {
    font-family: 'Montserrat';
    src: url('/fonts/Montserrat-Regular.ttf') format('truetype');
}
@font-face {
    font-family: 'Nunito-BlackItalic';
    src: url('/fonts/Nunito-BlackItalic.ttf') format('truetype');
}
@font-face {
    font-family: 'Oswald';
    src: url('/fonts/Oswald-Regular.ttf') format('truetype');
}
@font-face {
    font-family: 'PlayfairDisplay';
    src: url('/fonts/PlayfairDisplay-Regular.ttf') format('truetype');
}


@font-face {
    font-family: 'Acme-Regular';
    src: url('/fonts/Acme-Regular.ttf') format('truetype');
}


@font-face {font-family: 'Anton-Regular'; src: url('/fonts/Anton-Regular.ttf') format('truetype');}
@font-face {font-family: 'BungeeTint-Regular'; src: url('/fonts/BungeeTint-Regular.ttf') format('truetype');}
@font-face {font-family: 'Caveat-VariableFont_wght'; src: url('/fonts/Caveat-VariableFont_wght.ttf') format('truetype');}
@font-face {font-family: 'ConcertOne-Regular'; src: url('/fonts/ConcertOne-Regular.ttf') format('truetype');}
@font-face {font-family: 'DancingScript-Regular'; src: url('/fonts/DancingScript-Regular.ttf') format('truetype');}
@font-face {font-family: 'EduAUVICWANTHand-VariableFont_wght'; src: url('/fonts/EduAUVICWANTHand-VariableFont_wght.ttf') format('truetype');}
@font-face {font-family: 'FascinateInline-Regular'; src: url('/fonts/FascinateInline-Regular.ttf') format('truetype');}
@font-face {font-family: 'GloriaHallelujah-Regular'; src: url('/fonts/GloriaHallelujah-Regular.ttf') format('truetype');}
@font-face {font-family: 'IndieFlower-Regular'; src: url('/fonts/IndieFlower-Regular.ttf') format('truetype');}
@font-face {font-family: 'LobsterTwo-Bold'; src: url('/fonts/LobsterTwo-Bold.ttf') format('truetype');}
@font-face {font-family: 'LobsterTwo-BoldItalic'; src: url('/fonts/LobsterTwo-BoldItalic.ttf') format('truetype');}
@font-face {font-family: 'LobsterTwo-Italic'; src: url('/fonts/LobsterTwo-Italic.ttf') format('truetype');}
@font-face {font-family: 'Merienda-VariableFont_wght'; src: url('/fonts/Merienda-VariableFont_wght.ttf') format('truetype');}
@font-face {font-family: 'OleoScript-Regular'; src: url('/fonts/OleoScript-Regular.ttf') format('truetype');}
@font-face {font-family: 'PermanentMarker-Regular'; src: url('/fonts/PermanentMarker-Regular.ttf') format('truetype');}
@font-face {font-family: 'PlayfairDisplay-BoldItalic'; src: url('/fonts/PlayfairDisplay-BoldItalic.ttf') format('truetype');}
@font-face {font-family: 'PlaywriteCU'; src: url('/fonts/PlaywriteCU.ttf') format('truetype');}
@font-face {font-family: 'ProtestGuerrilla-Regular'; src: url('/fonts/ProtestGuerrilla-Regular.ttf') format('truetype');}
@font-face {font-family: 'Righteous-Regular'; src: url('/fonts/Righteous-Regular.ttf') format('truetype');}
@font-face {font-family: 'Rochester-Regular'; src: url('/fonts/Rochester-Regular.ttf') format('truetype');}
@font-face {font-family: 'SairaCondensed-Regular'; src: url('/fonts/SairaCondensed-Regular.ttf') format('truetype');}
@font-face {font-family: 'Satisfy-Regular'; src: url('/fonts/Satisfy-Regular.ttf') format('truetype');}
@font-face {font-family: 'Sevillana-Regular'; src: url('/fonts/Sevillana-Regular.ttf') format('truetype');}
@font-face {font-family: 'ShadowsIntoLight-Regular'; src: url('/fonts/ShadowsIntoLight-Regular.ttf') format('truetype');}
@font-face {font-family: 'SofadiOne-Regular'; src: url('/fonts/SofadiOne-Regular.ttf') format('truetype');}
@font-face {font-family: 'SpicyRice-Regular'; src: url('/fonts/SpicyRice-Regular.ttf') format('truetype');}



body {
    display: flex;
    justify-content: center;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.55;
}

.tooltip {
    display: none;
    position: absolute;
    background-color: #333;
    color: #fff;
    padding: 5px;
    border-radius: 3px;
    white-space: nowrap;
    z-index: 1000;
    transform: translate(50px, -50px);
}

#response-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.image-bg {
    position: relative;
    width: 300px;
    height: 300px;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    margin-bottom: 10px;
}
.image-bg img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.text-btn-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}
.text-btn-wrapper p {
    margin: 0;
    text-align: left;
}

.number{
    background-color: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
    padding: 0.08rem 0.12rem;
    border-radius: 0.04rem;
    font-size: 0.14rem;
    box-sizing: border-box;
    width: 100%;
    transition: border-color 0.3s;
}
.number:focus {
    border-color: #ff7000;
    outline: none;
}

.number:focus {
    outline: none;
    border-color: #0056b3;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

.container {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    width: 100%;
}
.initial {
    flex: 1 1 auto;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}
canvas {
    border: 1px solid #808080;
    display: block;
    width: 100%;
    height: auto;
}

@media screen and (min-width: 1000px) {
    /* 大屏幕：左右布局 */
    .step-sec {
        display: flex !important;
        flex-direction: row !important;
    }
    .initial {
        max-width: 60%;
        flex: 1;
        width: auto;
    }
    .step-side {
        width: 7.5rem;
        flex-shrink: 0;
        flex-grow: 0;
    }
}
@media screen and (min-width: 768px) and (max-width: 991px) {
    /* 中等屏幕：上下布局 */
    .step-sec {
        flex-direction: column;
    }
    .initial {
        max-width: 100%;
        width: 100%;
        flex: 0 0 auto;
    }
    .step-side {
        width: 100%;
        flex-shrink: 0;
    }
}
@media (max-width: 767px) {
    /* 小屏幕：上下布局 */
    .step-sec {
        flex-direction: column;
    }
    .container {
        flex-direction: column;
    }
    .initial {
        max-width: 100%;
        width: 100%;
        flex: 0 0 auto;
    }
    .step-side {
        width: 100%;
        flex-shrink: 0;
    }
}

.project-controls, .text-controls, .image-controls {
    margin-bottom: 20px;
    padding: 10px;
    border: 1px solid #ccc;
}
.image-list {
    flex-wrap: wrap;
    gap: 10px;
}
.thumbnail-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.1rem;
    margin-top: 0.2rem;
}
.thumbnail-item {
    width: 0.5rem;
    height: 0.5rem;
    background-size: cover;
    background-position: center;
    border: 2px solid #ddd;
    border-radius: 0.04rem;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}
.thumbnail-item:hover {
    border-color: #ff7000;
    transform: scale(1.05);
    box-shadow: 0 0 0.08rem rgba(255, 112, 0, 0.3);
}
.thumbnail-item:hover::after {
    content: attr(data-color);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 0.06rem);
    transform: translateX(-50%);
    background: rgba(30, 33, 38, 0.95);
    color: #fff;
    font-size: 0.11rem;
    line-height: 1.2;
    padding: 0.04rem 0.07rem;
    border-radius: 0.04rem;
    white-space: nowrap;
    pointer-events: none;
    z-index: 20;
    box-shadow: 0 0.03rem 0.12rem rgba(0, 0, 0, 0.25);
}

.control-panel {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-bottom: 0.15rem;
}

.control-row {
    display: flex;
    align-items: center;
    gap: 0.1rem;
    min-height: 0.4rem;
    padding: 0.05rem 0;
}

.control-label {
    font-size: 0.14rem;
    font-weight: 500;
    color: #333;
    width: 35%;
    min-width: 1.2rem;
    flex-shrink: 0;
}
.label{
    font-size: 0.14rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 0.05rem;
}
.control-label.long {
    width: 180px;
}

.control-input {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

input[type="color"] {
    width: 30px;
    height: 30px;
}

input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Shadow slider styles */
.shadow-slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    margin-right: 10px;
}

.shadow-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ff7000;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: background 0.3s;
}

.shadow-slider::-webkit-slider-thumb:hover {
    background: #ff8500;
}

.shadow-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ff7000;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: background 0.3s;
}

.shadow-slider::-moz-range-thumb:hover {
    background: #ff8500;
}

.slider-value {
    min-width: 30px;
    text-align: center;
    font-size: 0.14rem;
    color: #333;
    font-weight: 500;
    padding: 0 5px;
}

#toggle-outline {
    margin-top: 5px;
}

.dropdown {
    position: relative;
    display: inline-block;
    margin-right: 8px;
}
.dropdown-button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 10px;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 90%;
    min-width: 160px;
    font-size: 14px;
}
.dropdown-button::after {
    content: '▼';
    margin-left: 10px;
    font-size: 12px;
}
.dropdown-button:hover {
    background-color: #0056b3;
}
.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 4px;
    overflow: auto;
    margin-top: 5px;
    max-height: 500px;
}

.dropdown-content div {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    cursor: pointer;
    font-size: 14px;
}
.dropdown-content div:hover {
    background-color: #f1f1f1;
}
.show {
    display: block;
}
.font-preview {
    font-size: 48px;
    border: 1px solid #ccc;
    padding: 10px;
    width: fit-content;
    font-family: Pacifico;
    margin-top: 20px;
    color: rgb(255, 128, 0);
}
.font-preview span {
    text-shadow: 
        2px 0px 0px rgb(128, 0, 255),
        0px 2px 0px rgb(128, 0, 255),
        -2px 0px 0px rgb(128, 0, 255),
        0px -2px 0px rgb(128, 0, 255),
        2px 2px 0px rgb(128, 0, 255),
        -2px -2px 0px rgb(128, 0, 255),
        -2px 2px 0px rgb(128, 0, 255),
        2px -2px 0px rgb(128, 0, 255);
}
.current-font {
    font-size: 16px;
}
.selected-font {
    font-family: Arial;
    white-space: nowrap;
    overflow: hidden;
}

.image-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.1rem;
    margin-top: 0.15rem;
}
.image-item {
    width: 0.8rem;
    height: 0.8rem;
    background-size: cover;
    background-position: center;
    display: inline-block;
    position: relative;
    transition: all 0.3s;
    cursor: pointer;
    border: 2px solid #ddd;
    border-radius: 0.04rem;
}

.image-item:hover {
    transform: scale(1.05);
    border-color: #ff7000;
    box-shadow: 0 0 0.08rem rgba(255, 112, 0, 0.3);
}

.close-btn {
    position: absolute;
    top: 0.02rem;
    right: 0.02rem;
    background-color: rgba(255, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 0.2rem;
    height: 0.2rem;
    cursor: pointer;
    text-align: center;
    padding: 0;
    font-size: 0.16rem;
    line-height: 0.2rem;
    transition: all 0.3s;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background-color: rgba(200, 0, 0, 1);
    transform: scale(1.1);
}

.popup {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
    justify-content: center;
    align-items: center;
}

.popup-content {
    background-color: #fefefe;
    padding: 20px;
    border: 1px solid #888;
    width: 50%;
    max-width: 600px;
    box-sizing: border-box;
}

.popup img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
}

.close {
    color: red;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover, .close:focus {
    color: black;
    text-decoration: none;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    float: right;
}

#scale-control-bar {
    display: none;
    position: absolute;
    top: 10px;
    right: 20px;
    left: auto;
    z-index: 100;
    align-items: center;
    gap: 0;
    padding: 4px 6px;
    background: rgba(255, 255, 255, 0.94);
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-sizing: border-box;
}

#scale-control-bar .scale-btn {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.06);
    color: #333;
    font-size: 20px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

#scale-control-bar .scale-btn:hover {
    background: rgba(255, 112, 0, 0.2);
    color: #c55a00;
}

#scale-control-bar .scale-btn:active {
    background: rgba(255, 112, 0, 0.35);
}

#scale-control-bar .scale-btn-minus {
    font-size: 22px;
    font-weight: 400;
    letter-spacing: 0;
}

#scale-control-bar .scale-btn-plus {
    font-weight: 400;
}

#scale-range {
    display: block;
    flex: 1;
    width: 132px;
    min-width: 100px;
    max-width: 180px;
    height: 28px;
    margin: 0 6px;
    padding: 0;
    vertical-align: middle;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
}

#scale-range::-webkit-slider-runnable-track {
    height: 5px;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.12);
}

#scale-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    margin-top: -6.5px;
    border-radius: 50%;
    background: #ff7000;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
    cursor: grab;
}

#scale-range:active::-webkit-slider-thumb {
    cursor: grabbing;
}

#scale-range::-moz-range-track {
    height: 5px;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.12);
}

#scale-range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ff7000;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
    cursor: grab;
}

#delete-button {
    display: none;
    position: absolute;
    top: 54px;
    right: 20px;
    left: auto;
    z-index: 100;
    background-color: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
}

#delete-button img {
    width: 20px;
    height: 20px;
}

#delete-button:hover {
    display: block;
    background-color: #f0f0f0;
    border-radius: 50%;
    box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2);
}

#delete-button:hover img {
    transform: scale(1.2);
    transition: transform 0.3s ease;
}

a.item:hover div {
    transform: scale(1.2);
}

a.item:hover img {
    transform: scale(1.2);
    transition: transform 0.3s ease;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 28px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #4CAF50;
}

input:checked + .slider:before {
    transform: translateX(22px);
}

.button {
    background-color: #FF7000;
    color: #fff;              
    padding: 10px 20px;       
    border: none;             
    border-radius: 5px;       
    cursor: pointer;   
}

.button:hover {
    background-color: #e56600; /* Darker color when hovered */
}

#part1Preview, #part2Preview, #part3Preview, #part4Preview {
    min-height: 75px;
}