/* 通用样式重置 */
.yfx-admin-box, .yfx-fixed-expand-box, [id^="sc_"], .yfx-alert {
    box-sizing: border-box;
}

/* ======================== 管理员可见区域样式 ======================== */
.yfx-admin-box {
    background-color: #f0f7f4;
    border: 1px solid #d1e7dd;
    margin: 20px 0;
    color: #333;
}
.yfx-admin-header {
    padding: 12px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    background-color: #e8f5e9;
    color: #2e7d32;
    font-weight: bold;
    font-size: 16px;
    user-select: none;
}
.yfx-icon-title {
    margin-right: 10px; 
    font-size: 15px; 
    line-height: 1;
    display: inline-flex;
    align-items: center;
}
.yfx-text-title {
    flex-grow: 1;
}
.yfx-toggle-icon {
    font-size: 20px;
    color: #2e7d32;
    margin-left: 12px;
    line-height: 1;
    transition: transform 0.3s ease, color 0.3s ease;
    display: inline-block;
}
.yfx-admin-header:hover .yfx-toggle-icon {
    color: #43a047;
}
.yfx-admin-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    background: linear-gradient(to bottom, #ffffff 0%, #f0f7f4 100%);
}
.yfx-admin-inner-wrapper {
    padding: 15px;
}
.yfx-admin-box.open .yfx-admin-content {
    border-top: 1px solid #d1e7dd;
}
.yfx-admin-box.open .yfx-toggle-icon {
    transform: rotate(180deg);
}

/* ======================== 内容展开Box样式 ======================== */
.yfx-fixed-expand-box {
    margin: 20px 0;
    overflow: hidden;
    position: relative;
}
.yfx-fixed-title {
    padding: 10px 15px;
    font-size: 14px;
    font-weight: bold;
    color: #495057;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
/* 核心：合并过渡时长，放在初始定义处，无重复 */
.yfx-fixed-content-wrapper {
    position: relative;
    overflow: hidden;
    z-index: 1;
    padding-bottom: 60px;
    /* 统一过渡时长（与JS的400ms完全匹配），仅定义一次 */
    transition: max-height 400ms cubic-bezier(0.25, 1, 0.5, 1);
    -webkit-transition: max-height 400ms cubic-bezier(0.25, 1, 0.5, 1);
}
.yfx-fixed-inner {
    font-size: 15px;
    color: #333;
    line-height: 1.7;
    padding: 0;
}
.yfx-fixed-inner.has-style {
    padding: 10px 15px;
}
.yfx-fixed-content-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,1));
    pointer-events: none;
    z-index: 2;
    display: none;
}
.yfx-fixed-content-wrapper.has-fade::after {
    display: block;
}
.yfx-fixed-toggle {
    text-align: center;
    padding: 0;
    position: relative;
    z-index: 3;
    display: none;
    margin-top: -12px;
}
.yfx-fixed-expand-box.yfx-is-expanded .yfx-fixed-toggle {
    margin-top: -60px;
}
.yfx-fixed-btn {
    background-color: #fff;
    border: 1px solid #ced4da;
    color: #495057;
    padding: 6px 18px;
    font-size: 13px;
    border-radius: 20px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
    border-color: #adb5bd;
    transition: all 0.3s ease;
    position: relative;
    z-index: 4;
}
.yfx-fixed-btn:hover {
    border-color: #86efac;
    color: #16a34a;
    background-color: #f0fdf4;
    box-shadow: 0 4px 6px rgba(0,0,0,0.08);
}
.yfx-fixed-btn svg {
    transition: transform 0.3s ease;
}

/* ======================== Alert提示框通用样式 ======================== */
.yfx-alert {
    margin-bottom: 20px;
    padding: 15px 20px;
    border-radius: 4px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.yfx-alert-icon {
    font-size: 1.4em;
    line-height: 1.2;
    flex-shrink: 0;
}
.yfx-alert-title {
    font-weight: 600;
    margin: 0 0 4px 0;
    font-size: 1.1em;
}
.yfx-alert-text {
    line-height: 1.6;
    font-size: 0.95em;
}
/* 列表样式优化 */
.yfx-alert-text ul, .yfx-alert-text ol {
    margin: 8px 0 0 20px;
    padding: 0;
}
.yfx-alert-text li {
    margin-bottom: 4px;
}

/* ======================== Alert默认样式（与code.html完全一致） ======================== */
.yfx-alert-default {
    flex-direction: row;
    align-items: center;
}

/* 优化：去除标题和内容的默认间距 */
.yfx-alert-default .yfx-alert-title {
    margin: 0;          /* 去除标题外边距 */
    font-size: 1em;
    line-height: 1.4;   /* 稍微收紧行高，让文字更紧凑 */
}

.yfx-alert-default .yfx-alert-text {
    font-size: 1em;
    line-height: 1.4;   /* 内容行高与标题保持一致 */
}

/* 基础清新系列 */
.yfx-alert-default.yfx-alert-notice {
    background-color: #e8f5e9;
    color: #2e7d32;
    border-left: 5px solid #66bb6a;
}
.yfx-alert-default.yfx-alert-warn {
    background-color: #fff3e0;
    color: #ef6c00;
    border-left: 5px solid #ffb74d;
}
.yfx-alert-default.yfx-alert-error {
    background-color: #ffebee;
    color: #c62828;
    border-left: 5px solid #ef5350;
}
.yfx-alert-default.yfx-alert-tips {
    background-color: #e3f2fd;
    color: #1565c0;
    border-left: 5px solid #42a5f5;
}
/* 进阶个性系列 */
.yfx-alert-default.yfx-alert-violet {
    background-color: #f3e5f5;
    color: #6a1b9a;
    border-left: 5px solid #ba68c8;
}
.yfx-alert-default.yfx-alert-mint {
    background-color: #e0f2f1;
    color: #00695c;
    border-left: 5px solid #4db6ac;
}
.yfx-alert-default.yfx-alert-sakura {
    background-color: #fce4ec;
    color: #ad1457;
    border-left: 5px solid #f06292;
}
.yfx-alert-default.yfx-alert-amber {
    background-color: #fff8e1;
    color: #f57f17;
    border-left: 5px solid #ffd54f;
}
.yfx-alert-default.yfx-alert-indigo {
    background-color: #e8eaf6;
    color: #283593;
    border-left: 5px solid #7986cb;
}

/* ======================== Alert演示版样式（demo）- 配色与code.html完全一致 ======================== */
.yfx-alert-demo {
    border-left: 4px solid; /* 保留装饰性边框宽度调整 */
    box-shadow: 0 2px 8px rgba(0,0,0,0.08); /* 保留装饰性阴影 */
}
/* 基础清新系列 - 配色与code.html一致 */
.yfx-alert-demo.yfx-alert-notice {
    border-left-color: #66bb6a;
    color: #2e7d32;
    background-color: #e8f5e9; /* 修正为code.html原生值 */
}
.yfx-alert-demo.yfx-alert-warn {
    border-left-color: #ffb74d;
    color: #ef6c00;
    background-color: #fff3e0; /* 修正为code.html原生值 */
}
.yfx-alert-demo.yfx-alert-error {
    border-left-color: #ef5350;
    color: #c62828;
    background-color: #ffebee; /* 修正为code.html原生值 */
}
.yfx-alert-demo.yfx-alert-tips {
    border-left-color: #42a5f5;
    color: #1565c0;
    background-color: #e3f2fd; /* 修正为code.html原生值 */
}
/* 进阶个性系列 - 补充配色与code.html一致 */
.yfx-alert-demo.yfx-alert-violet {
    border-left-color: #ba68c8;
    color: #6a1b9a;
    background-color: #f3e5f5;
}
.yfx-alert-demo.yfx-alert-mint {
    border-left-color: #4db6ac;
    color: #00695c;
    background-color: #e0f2f1;
}
.yfx-alert-demo.yfx-alert-sakura {
    border-left-color: #f06292;
    color: #ad1457;
    background-color: #fce4ec;
}
.yfx-alert-demo.yfx-alert-amber {
    border-left-color: #ffd54f;
    color: #f57f17;
    background-color: #fff8e1;
}
.yfx-alert-demo.yfx-alert-indigo {
    border-left-color: #7986cb;
    color: #283593;
    background-color: #e8eaf6;
}
/* 演示版装饰性样式（保留） */
.yfx-alert-demo .yfx-alert-icon {
    font-size: 1.3em;
    margin-top: 2px;
}
.yfx-alert-demo .yfx-alert-title {
    font-size: 1.05em;
    margin-bottom: 6px;
}

/* ======================== Alert卡片版样式（card） ======================== */
.yfx-alert-card {
    border: 1px solid transparent;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.yfx-alert-card.yfx-alert-notice {
    background-color: #e8f5e9;
    color: #2e7d32;
    border-color: #d1e7dd;
}
.yfx-alert-card.yfx-alert-warn {
    background-color: #fff3e0;
    color: #ef6c00;
    border-color: #ffe0b2;
}
.yfx-alert-card.yfx-alert-error {
    background-color: #ffebee;
    color: #c62828;
    border-color: #f8bbd0;
}
.yfx-alert-card .yfx-alert-icon {
    font-size: 1.2em;
}

/* ======================== Alert扁平版样式（flat） ======================== */
.yfx-alert-flat {
    border: none;
    border-radius: 6px;
    background-color: rgba(0,0,0,0.02);
}
.yfx-alert-flat.yfx-alert-notice {
    color: #2e7d32;
    background-color: rgba(102, 187, 106, 0.1);
}
.yfx-alert-flat.yfx-alert-warn {
    color: #ef6c00;
    background-color: rgba(255, 183, 77, 0.1);
}
.yfx-alert-flat.yfx-alert-error {
    color: #c62828;
    background-color: rgba(239, 83, 80, 0.1);
}
.yfx-alert-flat .yfx-alert-icon {
    opacity: 0.8;
}

/* ======================== Alert渐变版样式（gradient） ======================== */
.yfx-alert-gradient {
    border: none;
    color: #fff;
    background: linear-gradient(135deg, var(--bg-start), var(--bg-end));
}
.yfx-alert-gradient.yfx-alert-notice {
    --bg-start: #66bb6a;
    --bg-end: #2e7d32;
}
.yfx-alert-gradient.yfx-alert-warn {
    --bg-start: #ffb74d;
    --bg-end: #ef6c00;
}
.yfx-alert-gradient.yfx-alert-error {
    --bg-start: #ef5350;
    --bg-end: #c62828;
}
.yfx-alert-gradient.yfx-alert-tips {
    --bg-start: #42a5f5;
    --bg-end: #1565c0;
}
.yfx-alert-gradient .yfx-alert-icon {
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.yfx-alert-gradient .yfx-alert-text {
    text-shadow: 0 1px 1px rgba(0,0,0,0.05);
}
