@font-face {
    font-family: ChenYuluoyan;
    src: url('./fonts/Chenyuluoyan-Thin.woff2') format('woff2');
    font-display: swap;
}
@font-face {
    font-family: AllSeto;
    src: url('./fonts/cjkFonts_allseto_v1.11_subset.woff2') format('woff2');
    font-display: swap;
}
@font-face {
    font-family: GenRyuMin;
    src: url('./fonts/GenRyuMin-SB_0_subset.woff2') format('woff2');
    font-display: swap;
}
@font-face {
    font-family: Iansui;
    src: url('./fonts/Iansui-Regular_subset.woff2') format('woff2');
    font-display: swap;
}
@font-face {
    font-family: IBMPlexBold;
    src: url('./fonts/IBMPlexSansTC-Bold_subset.woff2') format('woff2');
    font-display: swap;
}
@font-face {
    font-family: IBMPlexLight;
    src: url('./fonts/IBMPlexSansTC-Light_subset.woff2') format('woff2');
    font-display: swap;
}
@font-face {
    font-family: IBMPlexMedium;
    src: url('./fonts/IBMPlexSansTC-Medium_subset.woff2') format('woff2');
    font-display: swap;
}
@font-face {
    font-family: OpenHuninn;
    src: url('./fonts/jf-openhuninn-2.0_subset.woff2') format('woff2');
    font-display: swap;
}
@font-face {
    font-family: KingHwa;
    src: url('./fonts/KingHwa_OldSong-Regular.woff2') format('woff2');
    font-display: swap;
}
@font-face {
    font-family: oh;
    src: url('./fonts/OH_Handwriting-Regular_subset.woff2') format('woff2');
    font-display: swap;
}

body {
    padding: 0px;
    margin: 0px;
    width: 100%;
    display: flex;
    justify-content: center;
    font-family: "LINE_Seed_TW", sans-serif;
    min-height: 100vh;
    background-color: #ffffff;
    color: #68463A;
    background-image: linear-gradient(#f4f4f4 1px, transparent 1px), linear-gradient(90deg, #f4f4f4 1px, transparent 1px);
    background-size: 40px 40px;
    background-attachment: fixed;
}

.introduceBox {
    min-width: 240px;
    width: 50%;
    display: flex;
justify-content: flex-end;
}

.introduceContent {
    background-color: #f6efe9ff;
    min-width: 240px;
    width: 100%;
    max-width: 400px;
    padding: 20px 0;
    text-align: center;
    position: relative;
}

.introduceContent h2 {
    color: #5d4037;
    margin: 20px 0;
    font-size: 1.5rem;
}

.imgBox {
    padding: 10px 40px;
}

.imgBox>img {
    border-radius: 25px;
    width: 100%;
}

.dowloadImg {
    border-radius: 0px;
    height: 40px;
}

img {
    width: 100%;
    border-radius: 25px;
}

/* Slider Styles */
.slider-container {
    position: relative;
    width: 100%;
    height: 550px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.slides {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.slide {
    position: absolute;
    width: 220px;
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    opacity: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: translateX(0) scale(0.8);
}

.slide img {
    width: 100%;
    border-radius: 12px;
}

.slide h3 {
    margin-top: 15px;
    color: #8d6e63;
    font-size: 1.1rem;
    font-weight: normal;
}

/* States */
.slide.active {
    opacity: 1;
    transform: translateX(0) scale(1);
    z-index: 10;
}

.slide.prev {
    opacity: 0.1;
    transform: translateX(-75%) scale(0.85);
    /* Slightly visible on left */
    z-index: 5;
    pointer-events: none;
}

.slide.next {
    opacity: 0.1;
    transform: translateX(75%) scale(0.85);
    /* Slightly visible on right */
    z-index: 5;
    pointer-events: none;
}

/* Navigation Buttons */
.nav-btn {
    position: absolute;
    top: 45%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 2rem;
    color: #5d4037;
    cursor: pointer;
    z-index: 20;
    opacity: 0.8;
    padding: 10px;
}

.nav-btn:hover {
    opacity: 1;
}

.prev-btn {
    left: 5px;
}

.next-btn {
    right: 5px;
}

/* Gradient Masks */
.slider-container::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 60px;
    background: linear-gradient(to right, #f6efe9ff, transparent);
    z-index: 15;
    pointer-events: none;
}

.slider-container::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 60px;
    background: linear-gradient(to left, #f6efe9ff, transparent);
    z-index: 15;
    pointer-events: none;
}

.mainBox {
    width: 50%;
    height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px 0;
    box-sizing: border-box;
}

.top-icon {
    align-self: flex-end;
    padding-right: 20px;
}

.top-icon img {
    width: 50px;
    height: auto;
    border-radius:0px;
}

.center-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    margin-bottom: 50px; /* Slight offset to visually center */
}

.mainBox h1 {
    color: #5d4037;
    margin: 0;
    font-weight: bold;
    letter-spacing: 2px;
}

.download-btn {
    display: inline-block;
    background-color: #6d4c41;
    color: white;
    text-decoration: none;
    padding: 5px 30px;
    border-radius: 50px;
    font-weight: bold;
    transition: transform 0.2s, background-color 0.2s;
}

.download-btn:hover {
    transform: scale(1.05);
    background-color: #5d4037;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 40px;
    width: 100%;
}

.footer-links a {
    text-decoration: none;
    color: #444;
    font-size: 0.9rem;
    font-weight: 500;
}

.footer-links a:hover {
    color: #6d4c41;
}

/* User requested ToolBar Styles */
.toolBar {
    background-color: #ffffff; /* Light gray background like the image */
    border-radius: 100px;
    padding: 5px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 85%;
    max-width: 400px; /* Ensure it doesn't get too wide */
    margin: 10px auto;
}

.toolBar button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btnIcon {
    width: 24px !important; /* Override general img width */
    height: auto;
    border-radius: 0 !important; /* Override general img border-radius */
    display: block;
}

#textEditorArea {
    width: 90%;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    background-color: white;
    background-image: 
        linear-gradient(to right, #eee 1px, transparent 1px),
        linear-gradient(to bottom, #eee 1px, transparent 1px);
    background-size: 24px 24px;
    border-radius: 20px;
    position: relative;
    padding: 24px;
    box-sizing: border-box;
}

#displayText {
    margin: 0;
    padding: 4px 8px;
    line-height: 1.4;
    transition: all 0.2s;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

#displayText[contenteditable="true"]:focus {
    outline: 2px solid #8d6e6333;
    border-radius: 4px;
}

.panel-container {
    width: 95%;
    max-width: 400px;
    margin-bottom: 20px;
    z-index: 100;
}

.active-panel {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    padding: 12px;
    text-align: left;
    animation: slideUp 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.panel-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #8d6e63;
    margin-bottom: 15px;
}

/* Tab Header for Stroke Panel */
.panel-tabs {
    display: flex;
    background-color: #f5f5f5;
    border-radius: 30px;
    padding: 4px;
    margin-bottom: 20px;
}

.tab-item {
    flex: 1;
    text-align: center;
    padding: 8px 0;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 25px;
    color: #666;
    transition: all 0.2s;
}

.tab-item.active {
    background-color: white;
    color: #333;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.font-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    font-size: 1.25rem;
    font-weight: normal;
    color: #333;
}

.font-list-expanded {
    max-height: 250px;
    overflow-y: auto;
    margin-top: 10px;
    padding-right: 5px;
}

.font-item {
    padding: 12px 10px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background-color 0.1s;
    border-radius: 8px;
    color: #444;
}

.font-item:hover {
    background-color: #fcfcfc;
}

/* Color Selection Grid */
.color-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.color-swatch {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    border: 1px solid rgba(0,0,0,0.05);
}

.color-swatch.active::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.8rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.color-swatch.none {
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.color-swatch.none::before {
    content: '';
    width: 100%;
    height: 1px;
    background: #ff4d4f;
    transform: rotate(45deg);
}

.color-swatch.custom {
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #999;
}

/* Sliders */
.slider-group {
    margin-top: 15px;
}

.slider-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.slider-label-row label {
    font-size: 0.85rem;
    color: #999;
}

.slider-label-row .value {
    font-size: 0.85rem;
    color: #999;
}

.range-slider {
    width: 100%;
    height: 4px;
    background: #f5dcd4;
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #8d6e63;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* ToolBar updates */
.toolBar {
    background-color: #f7f7f7;
    border-radius: 50px;
    padding: 8px 16px;
    display: flex;
    gap: 5px;
    width: 90%;
    max-width: 450px;
}

.toolBar button {
    flex: 1;
    height: 44px;
    border-radius: 22px;
    transition: background-color 0.2s;
}

.toolBar button.active {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
dl {
    margin: 20px 0;
}

dt {
    cursor: pointer;
    font-weight: bold;
    padding: 10px;
    background-color: var(--sidebar-bg);
    border-radius: 5px;
    margin-bottom: 5px;
    position: relative;
    padding-left: 30px;
    transition: background-color 0.3s;
    user-select: none;
}

dt::before {
    content: '▶';
    font-size: 0.8em;
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s;
}

dt.active::before {
    transform: translateY(-50%) rotate(90deg);
}

dt:hover {
    filter: brightness(0.95);
}

dd {
    display: none;
    padding: 10px 20px;
    margin: 0 0 10px 0;
    border-left: 3px solid var(--sidebar-bg);
}

dd.active {
    display: block;
    animation: slideDown 0.3s ease-in-out;
}
.faq-list{
    text-align: left;
}
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 870px) {
    body {
        flex-direction: column-reverse;
    }
    .introduceBox,
    .mainBox {
        width: 100%;
    }
    .mainBox {
        height: calc(80vh);
        position: relative;
        padding: 20px 0;
    }
    .introduceBox {
        justify-content: center;
    }
    .top-icon {
        align-self: center;
        padding-right: 0px;
    }
    .top-icon img {
        width: 60px;
    }
    
.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    width: 100%;
}
}


