/** 
 * 悠字库主题 - 字体预览样式 
 */ 

.yoofont-font-preview-container { 
    margin: 20px 0; 
    padding: 20px; 
    border: 1px solid #e2e4e7; 
    border-radius: 4px; 
    background: #fff; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.1); 
} 

.font-preview-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 15px; 
} 

.yoofont-font-preview-container h3 { 
    margin-top: 0; 
    color: #1d2327; 
    font-size: 16px; 
    font-weight: 600; 
} 

.font-preview-input { 
    width: 100%; 
    padding: 8px 12px; 
    border: 1px solid #ccc; 
    border-radius: 4px; 
    font-size: 14px; 
    margin-bottom: 15px; 
    box-sizing: border-box; 
    transition: border-color 0.2s ease; 
    height: 38px;
    vertical-align: middle;
} 

.font-preview-input:focus { 
    border-color: #0073aa; 
    outline: none; 
}

.font-style-selector {
    display: flex;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 15px;
}

.font-preview-input {
    flex: 1;
    height: 38px;
    box-sizing: border-box;
    vertical-align: middle;
}

.font-style-select {
    height: 38px;
    box-sizing: border-box;
    vertical-align: middle;
    padding: 8px 35px 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: white;
    min-width: 120px;
    font-size: 14px;
    margin: 0;
    line-height: 1;
    transition: border-color 0.2s ease;
    color: #1d2327;
    box-shadow: none !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23646970' d='M3 4.5L6 7.5L9 4.5H3Z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
}

.font-style-select:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: none !important;
}

.font-style-select:hover {
    border-color: #999;
}

/* 下拉框选项样式 */
.font-style-select option {
    background: white;
    color: #1d2327;
    padding: 8px 12px;
    font-size: 14px;
}

.font-style-select option:hover,
.font-style-select option:focus {
    background: #f0f0f1;
}

.font-style-select option:checked {
    background: #0073aa;
    color: white;
}

/* 为不支持样式化的下拉框提供备用方案 */
.font-style-select::-ms-expand {
    display: none;
}

/* 针对不同浏览器的下拉框样式 */
@media screen and (-webkit-min-device-pixel-ratio:0) {
    .font-style-select {
        padding-right: 35px;
    }
    
    .font-style-select:focus {
        outline: none;
    }
}

/* 下拉框展开时的样式 */
.font-style-select:active,
.font-style-select:focus {
    border-color: #0073aa;
}

/* 为下拉框添加一些额外的美化 */
.font-style-select {
    font-family: inherit;
    font-weight: 400;
}

/* 自定义下拉框样式 */
.custom-select {
    position: relative;
    display: inline-block;
    min-width: 120px;
    height: 38px;
    vertical-align: middle;
}

.custom-select-selected {
    height: 38px;
    padding: 8px 35px 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: white;
    font-size: 14px;
    line-height: 1;
    color: #1d2327;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23646970' d='M3 4.5L6 7.5L9 4.5H3Z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
    display: flex;
    align-items: center;
}

.custom-select-selected:hover {
    border-color: #999;
}

.custom-select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 1000;
    display: none;
    max-height: 200px;
    overflow-y: auto;
}

.custom-select-option {
    padding: 8px 12px;
    font-size: 14px;
    color: #1d2327;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f1;
    transition: background-color 0.2s ease;
}

.custom-select-option:hover {
    background-color: #f8f9fa !important;
}

.custom-select-option:last-child {
    border-bottom: none;
}

/* 隐藏原生select */
.font-style-select {
    display: none !important;
} 

.font-size-controls { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
} 

.font-size-label { 
    font-size: 14px; 
    color: #646970; 
    min-width: 80px; 
} 

.font-size-slider-container { 
    flex: 1; 
    position: relative; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
} 

.font-size-indicator { 
    font-size: 12px; 
    color: #8c8f94; 
    font-weight: 600; 
    min-width: 20px; 
} 

.font-size-indicator.left { 
    text-align: right; 
} 

.font-size-indicator.right { 
    text-align: left; 
} 

.font-size-slider-wrapper { 
    flex: 1; 
    position: relative; 
    display: flex; 
    align-items: center; 
    height: 20px; 
} 

.font-size-slider { 
    padding: 0 !important; 
    width: 100%; 
    height: 4px; 
    border-radius: 2px; 
    background: #0066ff!important; 
    outline: none; 
    -webkit-appearance: none; 
    cursor: pointer; 
    margin: 0; 
    position: relative; 
    z-index: 1; 
} 

.font-size-slider::-webkit-slider-thumb { 
    -webkit-appearance: none; 
    width: 16px; 
    height: 16px; 
    border-radius: 50%; 
    background: #0066ff; 
    cursor: pointer; 
    border: 3px solid #fff; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.3); 
    transition: all 0.3s ease; 
    position: relative; 
    top: -6px; 
    z-index: 2; 
} 

.font-size-slider::-webkit-slider-thumb:hover { 
    width: 24px; 
    height: 16px; 
    border-radius: 8px; 
    background: #0055cc; 
    transform: none; 
    top: -6px; 
} 

.font-size-slider::-webkit-slider-thumb:active { 
    background: #0044aa; 
} 

.font-size-slider::-moz-range-thumb { 
    width: 16px; 
    height: 16px; 
    border-radius: 50%; 
    background: #0066ff; 
    cursor: pointer; 
    border: 3px solid #fff; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.3); 
    transition: all 0.3s ease; 
} 

.font-size-slider::-moz-range-thumb:hover { 
    width: 24px; 
    height: 16px; 
    border-radius: 8px; 
    background: #0055cc; 
} 

.font-size-slider::-webkit-slider-runnable-track { 
    width: 100%; 
    height: 4px; 
    border-radius: 2px; 
    background: transparent; 
    border: none; 
} 

.font-size-slider::-moz-range-track { 
    width: 100%; 
    height: 4px; 
    border-radius: 2px; 
    background: transparent; 
    border: none; 
} 

.font-size-value { 
    font-size: 14px; 
    color: #1d2327; 
    min-width: 50px; 
    text-align: center; 
    background: #f8f9fa; 
    padding: 6px 10px; 
    border-radius: 4px; 
    border: 1px solid #e2e4e7; 
    font-weight: 600; 
} 

.font-preview-display { 
    min-height: 200px; 
    padding: 20px; 
    background: #f8f9fa; 
    border: 1px solid #e2e4e7; 
    border-radius: 4px; 
    position: relative; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    text-align: center; 
} 

.preview-text { 
    margin: 0; 
    line-height: 1.6; 
    transition: all 0.3s ease; 
    max-width: 100%; 
    word-wrap: break-word; 
    overflow-wrap: break-word; 
    text-align: center; 
    white-space: normal; 
    color: #1d2327; 
    padding: 10px; 
    box-sizing: border-box; 
    position: absolute; 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
    width: calc(100% - 40px); 
    max-height: calc(100% - 40px); 
    overflow: auto; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    flex-direction: column; 
} 

/* 响应式设计 */ 
@media (max-width: 768px) { 
    .yoofont-font-preview-container { 
        padding: 15px; 
        margin: 15px 0; 
    } 
    
    .font-size-controls { 
        flex-direction: column; 
        align-items: flex-start; 
        gap: 8px; 
    } 
    
    .font-size-slider { 
        width: 100%; 
    } 
    
    .font-preview-display { 
        min-height: 150px; 
        padding: 15px; 
    } 
    
 
}