/* ============================================================
   strange-qa.css - 奇葩问答（StrangeQuestionAndAnswer）专属样式
   仅包含页面特有样式，通用组件已移至 qistoolkit3-page.css
   ============================================================ */

/* --- 页面标题 --- */
.strange-qa-main h2 {
    font-size: 1.8rem;
    margin-bottom: 8px;
    border-bottom: 2px solid rgba(52, 152, 219, 0.12);
    padding-bottom: 10px;
}

.strange-qa-main h2 a {
    color: #3498db;
    transition: color 0.3s ease;
}

.strange-qa-main h2 a:hover {
    color: #5dade2;
}

body.light-theme .strange-qa-main h2 a {
    color: #2980b9;
}

body.light-theme .strange-qa-main h2 a:hover {
    color: #3498db;
}

/* --- 一句话描述 --- */
.strange-qa-description {
    font-size: 0.95rem;
    color: #aaa;
    margin: -4px 0 22px 0;
    padding-left: 14px;
    border-left: 3px solid rgba(52, 152, 219, 0.2);
    line-height: 1.6;
}

body.light-theme .strange-qa-description {
    color: #666;
}

/* --- 规则框 --- */
.rule-box {
    background: rgba(255, 255, 255, 0.015);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    margin-bottom: 18px;
    overflow: hidden;
}

body.light-theme .rule-box {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.04);
}

.rule-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: rgba(52, 152, 219, 0.04);
    border-bottom: 1px solid rgba(52, 152, 219, 0.04);
}

.rule-icon {
    font-size: 1.2rem;
}

.rule-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #b0d4f0;
}

body.light-theme .rule-header {
    background: rgba(41, 128, 185, 0.03);
    border-bottom: 1px solid rgba(41, 128, 185, 0.04);
}

body.light-theme .rule-header h3 {
    color: #2c3e50;
}

.rule-body {
    padding: 14px 18px 16px;
}

.rule-body ul {
    margin: 0;
    padding-left: 20px;
    list-style: none;
}

.rule-body ul li {
    font-size: 0.88rem;
    color: #aaa;
    padding: 4px 0;
    position: relative;
    padding-left: 18px;
    line-height: 1.6;
}

.rule-body ul li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #3498db;
}

.rule-body ul li ul {
    margin: 2px 0 0 0;
    padding-left: 24px;
}

.rule-body ul li ul li::before {
    content: '◦';
    color: #8bc34a;
}

.rule-body ul li strong {
    color: #c8d8e8;
}

.rule-body code {
    background: rgba(255, 255, 255, 0.06);
    padding: 1px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.8rem;
    color: #64b5f6;
}

body.light-theme .rule-body ul li {
    color: #555;
}

body.light-theme .rule-body ul li strong {
    color: #1a237e;
}

body.light-theme .rule-body code {
    background: rgba(0, 0, 0, 0.04);
    color: #2980b9;
}

/* --- 加载框 --- */
.load-box {
    background: rgba(255, 255, 255, 0.015);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    margin-bottom: 18px;
    overflow: hidden;
}

body.light-theme .load-box {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.04);
}

.load-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: rgba(52, 152, 219, 0.04);
    border-bottom: 1px solid rgba(52, 152, 219, 0.04);
}

.load-icon {
    font-size: 1.2rem;
}

.load-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #b0d4f0;
}

.load-badge {
    font-size: 0.55rem;
    font-weight: 600;
    padding: 1px 12px;
    border-radius: 30px;
    background: rgba(52, 152, 219, 0.1);
    color: #64b5f6;
    border: 1px solid rgba(52, 152, 219, 0.04);
    margin-left: auto;
}

body.light-theme .load-header {
    background: rgba(41, 128, 185, 0.03);
    border-bottom: 1px solid rgba(41, 128, 185, 0.04);
}

body.light-theme .load-header h3 {
    color: #2c3e50;
}

body.light-theme .load-badge {
    background: rgba(41, 128, 185, 0.05);
    color: #2980b9;
}

.load-body {
    padding: 14px 18px 16px;
}

.load-body p {
    font-size: 0.88rem;
    color: #aaa;
    margin: 0 0 12px 0;
    line-height: 1.6;
}

.load-body code {
    background: rgba(255, 255, 255, 0.06);
    padding: 1px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.8rem;
    color: #64b5f6;
}

body.light-theme .load-body p {
    color: #555;
}

body.light-theme .load-body code {
    background: rgba(0, 0, 0, 0.04);
    color: #2980b9;
}

.load-controls {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.load-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 24px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.load-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
}

.load-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.load-status {
    font-size: 0.82rem;
    color: #888;
}

/* --- 进度条 --- */
.load-progress {
    margin-top: 12px;
}

.progress-bar-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.75rem;
    color: #666;
    margin-top: 4px;
    display: block;
}

/* --- 加载结果 --- */
.load-result {
    margin-top: 10px;
    padding: 8px 14px;
    border-radius: 8px;
    background: rgba(139, 195, 74, 0.06);
    border-left: 3px solid #8bc34a;
}

.result-icon {
    font-size: 1.1rem;
    margin-right: 6px;
}

.result-text {
    font-size: 0.85rem;
    color: #aaa;
}

body.light-theme .load-result {
    background: rgba(139, 195, 74, 0.04);
}

body.light-theme .result-text {
    color: #555;
}

/* --- 加载提示 --- */
.load-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 6px 12px;
    background: rgba(241, 196, 15, 0.04);
    border-radius: 6px;
    border-left: 3px solid #f0c27a;
    font-size: 0.8rem;
    color: #888;
}

.load-note .note-icon {
    font-size: 0.9rem;
}

body.light-theme .load-note {
    background: rgba(241, 196, 15, 0.03);
    color: #666;
}

/* --- 题库框 --- */
.question-bank-box {
    background: rgba(255, 255, 255, 0.015);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    margin-bottom: 18px;
    overflow: hidden;
}

body.light-theme .question-bank-box {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.04);
}

.question-bank-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: rgba(139, 195, 74, 0.04);
    border-bottom: 1px solid rgba(139, 195, 74, 0.04);
}

.question-bank-icon {
    font-size: 1.2rem;
}

.question-bank-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #8bc34a;
}

.question-bank-badge {
    font-size: 0.55rem;
    font-weight: 600;
    padding: 1px 12px;
    border-radius: 30px;
    background: rgba(139, 195, 74, 0.1);
    color: #8bc34a;
    border: 1px solid rgba(139, 195, 74, 0.04);
    margin-left: auto;
}

body.light-theme .question-bank-header {
    background: rgba(139, 195, 74, 0.04);
    border-bottom: 1px solid rgba(139, 195, 74, 0.04);
}

body.light-theme .question-bank-header h3 {
    color: #558b2f;
}

body.light-theme .question-bank-badge {
    background: rgba(139, 195, 74, 0.05);
    color: #558b2f;
}

.question-bank-body {
    padding: 14px 18px 16px;
    min-height: 80px;
}

/* --- 占位符 --- */
.bank-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    text-align: center;
    color: #666;
}

.bank-placeholder .placeholder-icon {
    font-size: 2.4rem;
    opacity: 0.4;
    margin-bottom: 8px;
}

.bank-placeholder p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

body.light-theme .bank-placeholder p {
    color: #888;
}

/* --- 题库网格 --- */
.bank-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.bank-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    transition: background 0.2s ease;
    flex-wrap: wrap;
}

.bank-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.bank-item.featured {
    background: rgba(255, 215, 0, 0.04);
    border-color: rgba(255, 215, 0, 0.06);
}

body.light-theme .bank-item {
    background: rgba(0, 0, 0, 0.01);
    border-color: rgba(0, 0, 0, 0.03);
}

body.light-theme .bank-item:hover {
    background: rgba(0, 0, 0, 0.02);
}

body.light-theme .bank-item.featured {
    background: rgba(255, 215, 0, 0.04);
    border-color: rgba(255, 215, 0, 0.06);
}

.bank-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.bank-name {
    font-size: 0.82rem;
    font-weight: 500;
    color: #c8d8e8;
    flex: 1;
    min-width: 80px;
}

.bank-size {
    font-size: 0.65rem;
    color: #666;
    font-family: monospace;
    flex-shrink: 0;
}

.bank-type {
    font-size: 0.55rem;
    font-weight: 600;
    padding: 1px 10px;
    border-radius: 12px;
    flex-shrink: 0;
}

.bank-type.theme {
    background: rgba(255, 215, 0, 0.12);
    color: #ffd700;
}

.bank-type.sub {
    background: rgba(52, 152, 219, 0.08);
    color: #64b5f6;
}

.bank-count {
    font-size: 0.7rem;
    color: #888;
    flex-shrink: 0;
}

.bank-preview-btn {
    padding: 2px 12px;
    border: 1px solid rgba(52, 152, 219, 0.15);
    border-radius: 4px;
    background: rgba(52, 152, 219, 0.06);
    color: #64b5f6;
    font-size: 0.65rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.bank-preview-btn:hover {
    background: rgba(52, 152, 219, 0.12);
}

body.light-theme .bank-name {
    color: #1a237e;
}

body.light-theme .bank-type.theme {
    background: rgba(255, 215, 0, 0.08);
    color: #b8860b;
}

body.light-theme .bank-type.sub {
    background: rgba(41, 128, 185, 0.06);
    color: #2980b9;
}

body.light-theme .bank-preview-btn {
    color: #2980b9;
    border-color: rgba(41, 128, 185, 0.12);
}

body.light-theme .bank-preview-btn:hover {
    background: rgba(41, 128, 185, 0.08);
}

.bank-footer {
    display: flex;
    gap: 20px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 0.78rem;
    color: #666;
    flex-wrap: wrap;
}

body.light-theme .bank-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.03);
}

.bank-total,
.bank-path {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* --- 预览框 --- */
.preview-box {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 18px;
    overflow: hidden;
    animation: fadeIn 0.3s ease;
}

body.light-theme .preview-box {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.06);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.preview-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: rgba(52, 152, 219, 0.04);
    border-bottom: 1px solid rgba(52, 152, 219, 0.04);
}

.preview-icon {
    font-size: 1.2rem;
}

.preview-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #b0d4f0;
    flex: 1;
}

.preview-close {
    background: none;
    border: none;
    color: #888;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 4px;
    transition: color 0.2s ease;
    font-family: inherit;
}

.preview-close:hover {
    color: #e74c3c;
}

body.light-theme .preview-header {
    background: rgba(41, 128, 185, 0.03);
    border-bottom: 1px solid rgba(41, 128, 185, 0.04);
}

body.light-theme .preview-header h3 {
    color: #2c3e50;
}

.preview-body {
    padding: 14px 18px 16px;
    max-height: 500px;
    overflow-y: auto;
}

/* --- 预览题目 --- */
.preview-question {
    padding: 10px 14px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.preview-question:last-child {
    margin-bottom: 0;
}

body.light-theme .preview-question {
    background: rgba(0, 0, 0, 0.01);
    border-color: rgba(0, 0, 0, 0.03);
}

.preview-q-header {
    display: flex;
    gap: 10px;
    margin-bottom: 6px;
}

.preview-q-num {
    font-size: 0.7rem;
    font-weight: 700;
    color: #888;
    flex-shrink: 0;
}

.preview-q-text {
    font-size: 0.9rem;
    color: #c8d8e8;
}

body.light-theme .preview-q-text {
    color: #1a237e;
}

.preview-q-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px 16px;
    font-size: 0.8rem;
    color: #aaa;
    padding: 4px 0 4px 20px;
}

body.light-theme .preview-q-options {
    color: #555;
}

.preview-q-answer {
    font-size: 0.82rem;
    color: #8bc34a;
    padding: 4px 0 0 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    margin-top: 4px;
    padding-top: 6px;
}

body.light-theme .preview-q-answer {
    border-top: 1px solid rgba(0, 0, 0, 0.03);
}

.preview-q-answer strong {
    color: #ffd700;
}

.preview-q-explain {
    display: block;
    color: #888;
    font-size: 0.75rem;
    margin-top: 2px;
    padding-left: 20px;
}

body.light-theme .preview-q-explain {
    color: #666;
}

/* --- 辅助信息 --- */
.strange-qa-legal {
    margin-top: 0;
    padding: 14px 24px;
}

/* --- 响应式 --- */
@media (max-width: 820px) {
    .bank-grid {
        grid-template-columns: 1fr 1fr;
    }
    .preview-q-options {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .strange-qa-main h2 {
        font-size: 1.4rem;
    }

    .strange-qa-description {
        font-size: 0.85rem;
        padding-left: 10px;
    }

    .bank-grid {
        grid-template-columns: 1fr;
    }

    .bank-item {
        padding: 6px 10px;
        flex-wrap: wrap;
    }

    .bank-name {
        min-width: 60px;
        font-size: 0.78rem;
    }

    .bank-size {
        font-size: 0.6rem;
    }

    .bank-type {
        font-size: 0.5rem;
        padding: 0 8px;
    }

    .bank-count {
        font-size: 0.65rem;
    }

    .bank-preview-btn {
        font-size: 0.6rem;
        padding: 1px 10px;
    }

    .bank-footer {
        flex-direction: column;
        gap: 4px;
        font-size: 0.72rem;
    }

    .rule-body ul li,
    .load-body p {
        font-size: 0.82rem;
    }

    .load-btn {
        padding: 6px 18px;
        font-size: 0.82rem;
    }

    .load-status {
        font-size: 0.75rem;
    }

    .preview-q-options {
        grid-template-columns: 1fr;
    }

    .preview-q-text {
        font-size: 0.82rem;
    }

    .strange-qa-legal {
        padding: 10px 16px;
        font-size: 0.8rem;
    }

    .rule-header,
    .question-bank-header,
    .load-header,
    .preview-header {
        padding: 8px 14px;
    }

    .rule-header h3,
    .question-bank-header h3,
    .load-header h3,
    .preview-header h3 {
        font-size: 0.9rem;
    }
}

@media (max-width: 400px) {
    .strange-qa-main h2 {
        font-size: 1.2rem;
    }

    .strange-qa-description {
        font-size: 0.8rem;
    }

    .bank-name {
        font-size: 0.72rem;
    }

    .rule-body ul li,
    .load-body p {
        font-size: 0.78rem;
    }

    .load-btn {
        font-size: 0.75rem;
        padding: 5px 14px;
    }

    .preview-body {
        padding: 10px 12px 12px;
    }
}