/* style.css - 修复版 */

/* 隐藏 Vue 未编译的内容 */
[v-cloak] { display: none; }

/* --- 1. 选项卡片 (核心修复) --- */
.option-card {
    /* 强制使用 Flex 布局，让 A 和文字横向排列 */
    display: flex;
    flex-direction: row;
    align-items: flex-start; /* 顶部对齐 */
    text-align: left; /* 文字左对齐 */

    width: 100%;
    padding: 1rem; /* 16px */
    margin-bottom: 0.75rem; /* 12px */

    background-color: #ffffff;
    border: 2px solid #f1f5f9; /* slate-100 */
    border-radius: 0.75rem; /* 12px */
    color: #475569; /* slate-600 */

    cursor: pointer;
    transition: all 0.2s ease;
    position: relative; /* 为了定位图标 */
}

.option-card:hover {
    border-color: #bfdbfe; /* blue-200 */
    background-color: #eff6ff; /* blue-50 */
}

.option-card:disabled {
    cursor: default;
}

/* 选中/对错状态样式 */
.option-card.selected-exam {
    border-color: #a855f7; /* purple-500 */
    background-color: #faf5ff; /* purple-50 */
    color: #7e22ce; /* purple-700 */
    box-shadow: 0 0 0 1px #a855f7;
}

.option-card.correct {
    border-color: #22c55e; /* green-500 */
    background-color: #f0fdf4; /* green-50 */
    color: #15803d; /* green-700 */
}

.option-card.wrong {
    border-color: #ef4444; /* red-500 */
    background-color: #fef2f2; /* red-50 */
    color: #b91c1c; /* red-700 */
}

/* 选项左侧的圆圈 (A/B/C/D) */
.option-key {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0; /* 禁止被压缩 */

    width: 2rem; /* 32px */
    height: 2rem;
    margin-right: 1rem; /* 16px */
    margin-top: 0.125rem; /* 微调垂直对齐 */

    border: 1px solid currentColor;
    border-radius: 9999px;
    font-weight: bold;
    font-size: 0.875rem;
}

/* 选项文字部分 */
.option-text {
    flex: 1; /* 占满剩余空间 */
    word-break: break-word; /* 防止长单词溢出 */
    line-height: 1.6;
}

/* --- 2. 按钮样式修复 --- */
.primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0.75rem 2rem; /* 上下 12px, 左右 32px */
    border-radius: 0.75rem;
    font-weight: 700;
    color: white;

    transition: all 0.2s;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border: none;
    cursor: pointer;
}

.primary-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.primary-btn:active {
    transform: scale(0.98);
}

/* 颜色变体 */
.btn-blue { background-color: #2563eb; box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3); }
.btn-green { background-color: #16a34a; box-shadow: 0 4px 6px -1px rgba(22, 163, 74, 0.3); }
.btn-red { background-color: #ef4444; box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.3); }

.secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 2rem;
    border-radius: 0.75rem;
    font-weight: 700;

    background-color: white;
    border: 1px solid #e2e8f0;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
}

.secondary-btn:hover {
    background-color: #f8fafc;
}

/* --- 3. 导航栏样式 --- */
.nav-btn {
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
    background-color: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.nav-btn:hover { background-color: #f1f5f9; color: #0f172a; }

/* 激活状态 */
.nav-btn.active-blue { background-color: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.nav-btn.active-purple { background-color: #faf5ff; color: #7e22ce; border-color: #e9d5ff; }
.nav-btn.active-red { background-color: #fef2f2; color: #b91c1c; border-color: #fecaca; }

/* 图标按钮 */
.icon-btn {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}
.icon-btn:hover { background-color: #f1f5f9; }

/* --- 4. 弹窗样式 --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.2s ease-out;
}

.modal-content {
    background-color: white;
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 32rem; /* 512px */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: scaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
    background-color: #f8fafc;
}

.input-field {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    outline: none;
}
.input-field:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* 统计盒子 */
.stat-box {
    padding: 1rem;
    border-radius: 0.75rem;
    text-align: center;
}
.stat-box .label {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-bottom: 0.25rem;
}
.stat-box .value {
    font-size: 1.25rem;
    font-weight: 700;
}

/* 动画定义 */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
.animate-fade-in { animation: fadeIn 0.5s ease-out; }
.animate-scale-in { animation: scaleIn 0.3s ease-out; }