/* ========== 高考志愿填报工具 - 教育主题样式 ========== */
/* 主色调：教育蓝 #1565C0，金色 #FFB300（代表成功与梦想） */

/* ========== 主容器 ========== */
.ceev-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    min-height: 620px;
    background: #F0F4FA;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(21, 101, 192, 0.08);
    transition: all 0.3s ease;
}

/* 全屏模式 */
.ceev-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999;
    border-radius: 0;
    margin: 0;
}

/* ========== 顶部工具栏 ========== */
.ceev-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    background: linear-gradient(135deg, #1565C0 0%, #0D47A1 60%, #1a237e 100%);
    color: white;
    flex-wrap: wrap;
    gap: 8px;
    box-shadow: 0 2px 10px rgba(21, 101, 192, 0.4);
    flex-shrink: 0;
    position: relative;
}

/* 顶部金色装饰线 */
.ceev-toolbar::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #FFB300 30%, #FFD54F 50%, #FFB300 70%, transparent);
}

.toolbar-group {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
    min-height: 28px;
}

.toolbar-title {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.5px;
    margin-right: 4px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.toolbar-btn {
    padding: 6px 11px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: #ffffff;
    transition: all 0.2s;
    white-space: nowrap;
    backdrop-filter: blur(4px);
}

.toolbar-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.32);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.toolbar-btn:active:not(:disabled) {
    transform: translateY(0);
}

.toolbar-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.toolbar-btn-primary {
    background: linear-gradient(135deg, #FFB300 0%, #FF8F00 100%);
    border-color: #FF8F00;
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255, 143, 0, 0.4);
}

.toolbar-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #FFD54F 0%, #FFB300 100%);
    border-color: #FFB300;
    box-shadow: 0 3px 12px rgba(255, 143, 0, 0.5);
}

.toolbar-btn-primary:disabled {
    background: rgba(255, 179, 0, 0.4);
    border-color: transparent;
    box-shadow: none;
}

.toolbar-btn-cancel {
    background: rgba(244, 67, 54, 0.8);
    border-color: rgba(244, 67, 54, 0.6);
    color: #fff;
}

.toolbar-btn-cancel:hover {
    background: #f44336;
    border-color: #e53935;
}

/* ========== 主内容区 ========== */
.ceev-main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    background: #F0F4FA;
}

/* ========== 左侧历史面板 ========== */
.ceev-history-panel {
    width: 195px;
    background: white;
    border-right: 1px solid #e0e8f5;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
}

.history-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: linear-gradient(to bottom, #f8faff, #f0f4fa);
    border-bottom: 1px solid #e0e8f5;
    flex-shrink: 0;
}

.history-panel-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #1565C0;
}

.history-count {
    font-size: 11px;
    color: #90a4ae;
    font-weight: 400;
    margin-left: 4px;
}

.history-clear-btn {
    background: #fff0f0;
    border: none;
    color: #ef4444;
    font-size: 11px;
    cursor: pointer;
    padding: 3px 7px;
    border-radius: 4px;
    transition: all 0.2s;
    white-space: nowrap;
}

.history-clear-btn:hover {
    background: #fde8e8;
    color: #dc2626;
}

.history-search {
    padding: 8px;
    border-bottom: 1px solid #e0e8f5;
    flex-shrink: 0;
}

.history-search input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #d0daea;
    border-radius: 4px;
    font-size: 12px;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
    background: #f8faff;
    color: #334155;
}

.history-search input:focus {
    border-color: #1565C0;
    box-shadow: 0 0 0 2px rgba(21, 101, 192, 0.1);
    background: white;
}

.history-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
}

.history-empty {
    text-align: center;
    padding: 28px 12px;
    color: #94a3b8;
    font-size: 12px;
    line-height: 1.8;
}

.history-item {
    display: flex;
    flex-direction: column;
    padding: 9px 10px;
    margin: 3px 0;
    background: #f8faff;
    border: 1px solid #e0e8f5;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.history-item:hover {
    background: #e8f0fe;
    border-color: #90CAF9;
    transform: translateX(2px);
}

.history-item.active {
    background: #e3f2fd;
    border-color: #1565C0;
    box-shadow: 0 1px 4px rgba(21, 101, 192, 0.15);
}

.history-item-delete {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    background: #fde8e8;
    color: #ef4444;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: bold;
    opacity: 0;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    line-height: 1;
}

.history-item:hover .history-item-delete {
    opacity: 1;
}

.history-item-delete:hover {
    background: #ef4444;
    color: white;
}

.history-item-title {
    font-weight: 600;
    font-size: 12px;
    color: #1e293b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 22px;
}

.history-item-score {
    font-size: 11px;
    color: #1565C0;
    margin-top: 2px;
    font-weight: 500;
}

.history-item-time {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 1px;
}

/* ========== 中间输入面板 ========== */
.ceev-input-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
    border-right: 1px solid #e0e8f5;
    overflow: hidden;
    min-width: 340px;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 16px;
    background: linear-gradient(to bottom, #fafcff, #f5f8ff);
    border-bottom: 1px solid #e0e8f5;
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: 6px;
}

.panel-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #1565C0;
}

.panel-tip {
    font-size: 11px;
    color: #90a4ae;
    background: rgba(21, 101, 192, 0.06);
    padding: 2px 8px;
    border-radius: 4px;
}

.ceev-input-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px 20px;
}

/* ========== 表单区块 ========== */
.form-section {
    background: #fafcff;
    border: 1px solid #e0e8f5;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 12px;
}

.form-section:last-child {
    margin-bottom: 0;
}

.form-section-title {
    font-size: 13px;
    font-weight: 700;
    color: #1565C0;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e3f2fd;
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-row {
    display: flex;
    gap: 10px;
    margin-bottom: 0;
}

.form-group {
    margin-bottom: 10px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group-half {
    flex: 1;
    min-width: 0;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 5px;
}

.required-mark {
    color: #ef4444;
    margin-left: 2px;
}

.label-tip {
    font-size: 11px;
    font-weight: 400;
    color: #94a3b8;
    margin-left: 4px;
}

.ceev-input, .ceev-select {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #d0daea;
    border-radius: 5px;
    font-size: 13px;
    outline: none;
    transition: all 0.2s;
    background: white;
    color: #334155;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.ceev-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%231565C0' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
    cursor: pointer;
}

.ceev-input:focus, .ceev-select:focus {
    border-color: #1565C0;
    box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.1);
    background: white;
}

.ceev-input::placeholder {
    color: #b0bec5;
}

.ceev-input-score {
    padding-right: 36px;
}

.score-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.score-input-wrap .ceev-input {
    padding-right: 32px;
}

.score-unit {
    position: absolute;
    right: 10px;
    font-size: 12px;
    color: #78909c;
    pointer-events: none;
    font-weight: 500;
}

/* 选考科目 */
.subjects-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.subject-checkbox-label {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border: 1.5px solid #d0daea;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    color: #475569;
    background: white;
    transition: all 0.2s;
    user-select: none;
}

.subject-checkbox-label:hover {
    border-color: #1565C0;
    background: #e8f0fe;
    color: #1565C0;
}

.subject-checkbox-label input[type="checkbox"] {
    display: none;
}

.subject-checkbox-label:has(input:checked) {
    background: #1565C0;
    border-color: #1565C0;
    color: white;
}

/* 院校类型 */
.school-type-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.school-type-label {
    cursor: pointer;
    user-select: none;
}

.school-type-label input[type="checkbox"] {
    display: none;
}

.school-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    border: 1.5px solid transparent;
    transition: all 0.2s;
    cursor: pointer;
}

.school-985 { background: #FFF8E1; color: #E65100; border-color: #FFCC80; }
.school-211 { background: #E3F2FD; color: #1565C0; border-color: #90CAF9; }
.school-dual { background: #F3E5F5; color: #6A1B9A; border-color: #CE93D8; }
.school-b1  { background: #E8F5E9; color: #2E7D32; border-color: #A5D6A7; }
.school-b2  { background: #FFF3E0; color: #E65100; border-color: #FFCC80; }
.school-voc { background: #F5F5F5; color: #546E7A; border-color: #CFD8DC; }

.school-type-label:hover .school-type-badge {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.school-type-label:has(input:checked) .school-985 { background: #E65100; color: white; border-color: #E65100; }
.school-type-label:has(input:checked) .school-211 { background: #1565C0; color: white; border-color: #1565C0; }
.school-type-label:has(input:checked) .school-dual { background: #6A1B9A; color: white; border-color: #6A1B9A; }
.school-type-label:has(input:checked) .school-b1  { background: #2E7D32; color: white; border-color: #2E7D32; }
.school-type-label:has(input:checked) .school-b2  { background: #E65100; color: white; border-color: #E65100; }
.school-type-label:has(input:checked) .school-voc { background: #546E7A; color: white; border-color: #546E7A; }

/* 策略选择 */
.strategy-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 4px;
}

.strategy-radio-label {
    cursor: pointer;
    user-select: none;
}

.strategy-radio-label input[type="radio"] {
    display: none;
}

.strategy-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 6px;
    border: 1.5px solid #d0daea;
    border-radius: 8px;
    background: white;
    transition: all 0.2s;
    cursor: pointer;
    text-align: center;
}

.strategy-card:hover {
    border-color: #1565C0;
    background: #e8f0fe;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(21, 101, 192, 0.1);
}

.strategy-radio-label:has(input:checked) .strategy-card {
    border-color: #1565C0;
    background: #e8f0fe;
    box-shadow: 0 3px 10px rgba(21, 101, 192, 0.15);
}

.strategy-radio-label:has(input:checked) .strategy-card-rush {
    background: linear-gradient(135deg, #fff8e1, #fff3cd);
    border-color: #FFB300;
    box-shadow: 0 3px 10px rgba(255, 179, 0, 0.2);
}

.strategy-radio-label:has(input:checked) .strategy-card-balance {
    background: linear-gradient(135deg, #e8f0fe, #d0e8ff);
    border-color: #1565C0;
}

.strategy-radio-label:has(input:checked) .strategy-card-steady {
    background: linear-gradient(135deg, #e8f5e9, #d0eedb);
    border-color: #2E7D32;
}

.strategy-radio-label:has(input:checked) .strategy-card-safe {
    background: linear-gradient(135deg, #f3e5f5, #e8d0f5);
    border-color: #6A1B9A;
}

.strategy-icon {
    font-size: 18px;
    margin-bottom: 4px;
    display: block;
}

.strategy-name {
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    display: block;
}

.strategy-desc {
    font-size: 10px;
    color: #78909c;
    margin-top: 2px;
    display: block;
}

.ceev-textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d0daea;
    border-radius: 5px;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    resize: vertical;
    transition: all 0.2s;
    background: white;
    color: #334155;
    box-sizing: border-box;
    min-height: 70px;
    line-height: 1.6;
}

.ceev-textarea:focus {
    border-color: #1565C0;
    box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.1);
}

.ceev-textarea::placeholder {
    color: #b0bec5;
}

.ceev-textarea-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
}

.ceev-textarea-hint {
    font-size: 11px;
    color: #90a4ae;
}

.char-count {
    font-size: 11px;
    color: #90a4ae;
}

/* ========== 右侧结果面板 ========== */
.ceev-result-panel {
    width: 40%;
    display: flex;
    flex-direction: column;
    background: white;
    overflow: hidden;
    min-width: 300px;
}

.result-panel-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.result-meta-score {
    font-size: 11px;
    color: #1565C0;
    background: #e3f2fd;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.result-char-count {
    font-size: 11px;
    color: #78909c;
    background: #f0f4fa;
    padding: 2px 8px;
    border-radius: 10px;
}

.result-time {
    font-size: 11px;
    color: #90a4ae;
}

.ceev-result-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* 初始占位 */
.result-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    text-align: center;
}

.placeholder-icon {
    font-size: 52px;
    margin-bottom: 16px;
    animation: floatIcon 3s ease-in-out infinite;
    display: block;
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
}

.placeholder-title {
    font-size: 16px;
    font-weight: 600;
    color: #1565C0;
    margin: 0 0 8px 0;
}

.placeholder-desc {
    font-size: 13px;
    color: #90a4ae;
    margin: 3px 0;
    line-height: 1.6;
}

.placeholder-tags {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.placeholder-tag {
    padding: 4px 12px;
    background: #e8f0fe;
    color: #1565C0;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid #c5d8f8;
}

/* 加载中 */
.result-loading {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.loading-anim {
    font-size: 48px;
    animation: spinPulse 1.5s ease-in-out infinite;
    display: block;
    margin-bottom: 16px;
}

@keyframes spinPulse {
    0%   { transform: scale(1) rotate(0deg); }
    50%  { transform: scale(1.15) rotate(5deg); }
    100% { transform: scale(1) rotate(0deg); }
}

.loading-dots {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    background: #1565C0;
    border-radius: 50%;
    animation: dotBounce 1.2s ease-in-out infinite;
}

.loading-dots span:nth-child(1) { animation-delay: 0s; }
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotBounce {
    0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
    40%           { transform: scale(1.2); opacity: 1; }
}

.loading-text {
    font-size: 13px;
    color: #78909c;
    margin: 0;
}

/* 错误块 */
.result-error-block {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.result-error-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.result-error-msg {
    font-size: 13px;
    color: #ef4444;
    text-align: center;
    margin: 0 0 16px 0;
    max-width: 300px;
    line-height: 1.6;
}

.result-error-retry {
    padding: 8px 20px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.result-error-retry:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

/* 结果内容 */
.result-content {
    flex: 1;
    padding: 18px 20px;
    font-size: 13px;
    line-height: 1.9;
    color: #2c3e50;
    word-break: break-word;
}

/* 结果内容入场动效 */
@keyframes ceevResultEnter {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.result-content.result-enter-anim {
    animation: ceevResultEnter 0.35s ease-out forwards;
}

/* 结果梯度标题 */
.result-tier-header {
    font-size: 13px;
    font-weight: 700;
    padding: 7px 12px;
    margin: 12px 0 6px 0;
    border-radius: 6px;
    border-left: 4px solid;
    letter-spacing: 0.5px;
}

.result-tier-rush {
    background: #fff8e1;
    border-left-color: #FFB300;
    color: #b45309;
}

.result-tier-steady {
    background: #e8f5e9;
    border-left-color: #2E7D32;
    color: #276227;
}

.result-tier-safe {
    background: #f3e5f5;
    border-left-color: #6A1B9A;
    color: #5b1891;
}

.result-tier-advice {
    background: #e3f2fd;
    border-left-color: #1565C0;
    color: #1143a0;
}

.result-line {
    line-height: 1.9;
    min-height: 1em;
}

.result-line:empty {
    min-height: 0.6em;
}

/* 院校条目高亮（数字/汉字编号开头） */
.result-college-entry {
    margin-top: 6px;
    font-weight: 600;
    color: #1143a0;
}

/* 第一个梯度标题不需要多余顶边距 */
.result-content .result-tier-header:first-child {
    margin-top: 4px;
}

/* 数字输入框去除浏览器默认箭头 */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

/* ========== 滚动条美化 ========== */
.ceev-input-body::-webkit-scrollbar,
.ceev-result-body::-webkit-scrollbar,
.history-list::-webkit-scrollbar,
.ceev-modal-body::-webkit-scrollbar {
    width: 5px;
}

.ceev-input-body::-webkit-scrollbar-track,
.ceev-result-body::-webkit-scrollbar-track,
.history-list::-webkit-scrollbar-track,
.ceev-modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.ceev-input-body::-webkit-scrollbar-thumb,
.ceev-result-body::-webkit-scrollbar-thumb,
.history-list::-webkit-scrollbar-thumb,
.ceev-modal-body::-webkit-scrollbar-thumb {
    background: #c5d8f8;
    border-radius: 3px;
}

.ceev-input-body::-webkit-scrollbar-thumb:hover,
.ceev-result-body::-webkit-scrollbar-thumb:hover,
.history-list::-webkit-scrollbar-thumb:hover,
.ceev-modal-body::-webkit-scrollbar-thumb:hover {
    background: #90CAF9;
}

/* ========== 示例模态框 ========== */
.ceev-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 100000;
    backdrop-filter: blur(2px);
}

.ceev-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100001;
    width: 580px;
    max-width: calc(100vw - 32px);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.ceev-modal-content {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 80vh;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.16);
    animation: modalSlideIn 0.22s ease-out;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-20px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.ceev-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: linear-gradient(135deg, #1565C0, #0D47A1);
    color: white;
    flex-shrink: 0;
}

.ceev-modal-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.ceev-modal-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ceev-modal-close:hover {
    background: rgba(255,255,255,0.35);
}

.ceev-modal-body {
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 示例卡片 */
.example-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border: 1.5px solid #e0e8f5;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fafcff;
}

.example-card:hover {
    border-color: #1565C0;
    background: #e8f0fe;
    transform: translateX(3px);
    box-shadow: 0 3px 10px rgba(21, 101, 192, 0.1);
}

.example-card-icon {
    font-size: 28px;
    flex-shrink: 0;
    line-height: 1;
}

.example-card-content {
    flex: 1;
    min-width: 0;
}

.example-card-title {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.example-badge {
    font-size: 11px;
    font-weight: 500;
    padding: 1px 8px;
    border-radius: 8px;
    background: #e3f2fd;
    color: #1565C0;
    border: 1px solid #90CAF9;
}

.example-card-desc {
    font-size: 12px;
    color: #64748b;
    line-height: 1.5;
}

/* ========== Toast ========== */
.ceev-toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1e293b;
    color: white;
    padding: 10px 20px;
    border-radius: 24px;
    font-size: 13px;
    z-index: 200000;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    max-width: 90vw;
}

.ceev-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.ceev-toast.success { background: #166534; }
.ceev-toast.error   { background: #991b1b; }
.ceev-toast.info    { background: #1e3a5f; }

/* ========== 输入框抖动动画 ========== */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-6px); }
    40%       { transform: translateX(6px); }
    60%       { transform: translateX(-4px); }
    80%       { transform: translateX(4px); }
}

.shake {
    animation: shake 0.4s ease;
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

/* ========== 暗黑模式（body.dark 前缀） ========== */
body.dark .ceev-container {
    background: #0A1628;
}

body.dark .ceev-toolbar {
    background: linear-gradient(135deg, #0D2137 0%, #0A1628 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

body.dark .toolbar-btn {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #c8d8ee;
}

body.dark .toolbar-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

body.dark .toolbar-btn-primary {
    background: linear-gradient(135deg, #FFB300, #FF8F00);
    border-color: #FF8F00;
    color: white;
}

body.dark .toolbar-btn-primary:disabled {
    background: rgba(255, 179, 0, 0.18);
    border-color: rgba(255, 179, 0, 0.1);
    color: rgba(255, 255, 255, 0.35);
    box-shadow: none;
    opacity: 1;
}

body.dark .ceev-main-content {
    background: #0A1628;
}

body.dark .ceev-history-panel,
body.dark .ceev-input-panel,
body.dark .ceev-result-panel {
    background: #0D1E33;
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark .history-panel-header {
    background: #0A1628;
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.dark .history-panel-header h3 {
    color: #64B5F6;
}

body.dark .history-search input {
    background: #0A1628;
    border-color: rgba(255, 255, 255, 0.12);
    color: #c8d8ee;
}

body.dark .history-search input::placeholder {
    color: #5a7898;
}

body.dark .history-search input:focus {
    border-color: #1976D2;
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.2);
    background: #0D2137;
}

body.dark .history-empty {
    color: #7a9ab5;
}

body.dark .history-item {
    background: #0D2137;
    border-color: rgba(255, 255, 255, 0.08);
    color: #c8d8ee;
}

body.dark .history-item:hover {
    background: #0D2D50;
    border-color: #1976D2;
}

body.dark .history-item.active {
    background: #0D3060;
    border-color: #42A5F5;
}

body.dark .history-item-title {
    color: #c8d8ee;
}

body.dark .history-item-score {
    color: #64B5F6;
}

body.dark .history-clear-btn {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

body.dark .history-clear-btn:hover {
    background: rgba(239, 68, 68, 0.28);
    color: #fca5a5;
}

body.dark .panel-header {
    background: #0A1628;
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.dark .panel-header h3 {
    color: #64B5F6;
}

body.dark .panel-tip {
    color: #7a9ab5;
    background: rgba(255, 255, 255, 0.05);
}

body.dark .form-section {
    background: #0A1628;
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark .form-section-title {
    color: #64B5F6;
    border-bottom-color: rgba(100, 181, 246, 0.2);
}

body.dark .form-group label {
    color: #90aac5;
}

body.dark .ceev-input,
body.dark .ceev-select {
    background: #0D2137;
    border-color: rgba(255, 255, 255, 0.12);
    color: #c8d8ee;
}

body.dark .ceev-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364B5F6' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
}

body.dark .ceev-select option {
    background: #0D2137;
    color: #c8d8ee;
}

body.dark .ceev-input:focus,
body.dark .ceev-select:focus {
    border-color: #1976D2;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.15);
    background: #0D2D50;
}

body.dark .ceev-input::placeholder {
    color: #4a7090;
}

body.dark .score-unit {
    color: #7a9ab5;
}

body.dark .subject-checkbox-label {
    border-color: rgba(255, 255, 255, 0.12);
    background: #0D2137;
    color: #90aac5;
}

body.dark .subject-checkbox-label:hover {
    border-color: #1976D2;
    background: #0D2D50;
    color: #64B5F6;
}

body.dark .subject-checkbox-label:has(input:checked) {
    background: #1565C0;
    border-color: #1565C0;
    color: white;
}

body.dark .school-type-badge {
    filter: brightness(0.85);
}

body.dark .school-type-label:has(input:checked) .school-985 { background: #E65100; }
body.dark .school-type-label:has(input:checked) .school-211 { background: #1565C0; }
body.dark .school-type-label:has(input:checked) .school-dual { background: #6A1B9A; }
body.dark .school-type-label:has(input:checked) .school-b1  { background: #2E7D32; }
body.dark .school-type-label:has(input:checked) .school-b2  { background: #E65100; }
body.dark .school-type-label:has(input:checked) .school-voc { background: #546E7A; }

body.dark .strategy-card {
    background: #0D2137;
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark .strategy-card:hover {
    background: #0D2D50;
    border-color: #1976D2;
}

body.dark .strategy-name {
    color: #c8d8ee;
}

body.dark .strategy-desc {
    color: #7a9ab5;
}

body.dark .strategy-radio-label:has(input:checked) .strategy-card {
    border-color: #1976D2;
    background: #0D2D50;
}

body.dark .strategy-radio-label:has(input:checked) .strategy-card-rush {
    background: rgba(255, 179, 0, 0.12);
    border-color: #FFB300;
}

body.dark .strategy-radio-label:has(input:checked) .strategy-card-steady {
    background: rgba(46, 125, 50, 0.15);
    border-color: #66BB6A;
}

body.dark .strategy-radio-label:has(input:checked) .strategy-card-safe {
    background: rgba(106, 27, 154, 0.15);
    border-color: #CE93D8;
}

body.dark .ceev-textarea {
    background: #0D2137;
    border-color: rgba(255, 255, 255, 0.12);
    color: #c8d8ee;
}

body.dark .ceev-textarea:focus {
    border-color: #1976D2;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.15);
    background: #0D2D50;
}

body.dark .ceev-textarea::placeholder {
    color: #4a7090;
}

body.dark .ceev-textarea-hint,
body.dark .char-count,
body.dark .label-tip {
    color: #7a9ab5;
}

body.dark .result-panel-header {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.dark .result-meta-score {
    background: rgba(100, 181, 246, 0.15);
    color: #64B5F6;
}

body.dark .result-char-count {
    background: rgba(255, 255, 255, 0.05);
    color: #7a9ab5;
}

body.dark .result-time {
    color: #7a9ab5;
}

body.dark .placeholder-title {
    color: #64B5F6;
}

body.dark .placeholder-desc {
    color: #94a3b8;
}

body.dark .placeholder-tag {
    background: rgba(100, 181, 246, 0.1);
    color: #64B5F6;
    border-color: rgba(100, 181, 246, 0.2);
}

body.dark .loading-dots span {
    background: #64B5F6;
}

body.dark .loading-text {
    color: #94a3b8;
}

body.dark .result-content {
    color: #c8d8ee;
}

body.dark .result-tier-rush {
    background: rgba(255, 179, 0, 0.1);
    border-left-color: #FFB300;
    color: #ffd54f;
}

body.dark .result-tier-steady {
    background: rgba(46, 125, 50, 0.12);
    border-left-color: #66BB6A;
    color: #81c784;
}

body.dark .result-tier-safe {
    background: rgba(106, 27, 154, 0.12);
    border-left-color: #CE93D8;
    color: #ce93d8;
}

body.dark .result-tier-advice {
    background: rgba(21, 101, 192, 0.12);
    border-left-color: #64B5F6;
    color: #90CAF9;
}

body.dark .result-college-entry {
    color: #64B5F6;
}

body.dark .result-error-msg {
    color: #f87171;
}

body.dark .result-error-retry {
    background: #b91c1c;
}

body.dark .result-error-retry:hover {
    background: #991b1b;
}

/* 暗黑模式滚动条 */
body.dark .ceev-input-body::-webkit-scrollbar-thumb,
body.dark .ceev-result-body::-webkit-scrollbar-thumb,
body.dark .history-list::-webkit-scrollbar-thumb,
body.dark .ceev-modal-body::-webkit-scrollbar-thumb {
    background: rgba(100, 181, 246, 0.2);
}

body.dark .ceev-input-body::-webkit-scrollbar-thumb:hover,
body.dark .ceev-result-body::-webkit-scrollbar-thumb:hover,
body.dark .history-list::-webkit-scrollbar-thumb:hover,
body.dark .ceev-modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 181, 246, 0.4);
}

body.dark .ceev-modal-content {
    background: #0D1E33;
    color: #c8d8ee;
}

body.dark .ceev-modal-body {
    background: #0D1E33;
}

body.dark .example-card {
    background: #0A1628;
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark .example-card:hover {
    background: #0D2D50;
    border-color: #1976D2;
}

body.dark .example-card-title {
    color: #c8d8ee;
}

body.dark .example-badge {
    background: rgba(100, 181, 246, 0.1);
    color: #64B5F6;
    border-color: rgba(100, 181, 246, 0.2);
}

body.dark .example-card-desc {
    color: #7a9ab5;
}

/* ========== 响应式 ========== */
@media (max-width: 900px) {
    .strategy-options {
        grid-template-columns: repeat(2, 1fr);
    }
    .ceev-result-panel {
        width: 100%;
        min-width: unset;
        border-right: none;
    }
    .ceev-main-content {
        flex-direction: column;
    }
    .ceev-history-panel {
        width: 100%;
        max-height: 180px;
    }
}

@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
    }
    .strategy-options {
        grid-template-columns: repeat(2, 1fr);
    }
}
