/* ============================================
   题目详情页样式
   ============================================ */

/* 主体布局 */
.qb-main {
    min-height: calc(100vh - 60px - 200px);
    padding: 20px 0 40px;
    background: #f5f7fa;
}

.qb-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 20px;
}

/* 左侧内容区域 */
.qb-content {
    margin-top:60px;
    flex: 1;
    min-width: 0;
}

/* 面包屑导航 */
.qb-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 0.8125rem;
    color: #6b7280;
}

.qb-breadcrumb a {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s;
}

.qb-breadcrumb a:hover {
    color: #2563eb;
}

.qb-breadcrumb__sep {
    font-size: 0.625rem;
    color: #d1d5db;
}

.qb-breadcrumb__text {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s;
    cursor: default;
}

.qb-breadcrumb__current {
    color: #374151;
    font-weight: 500;
}

/* 题目卡片 */
.qb-question-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    padding: 24px;
    margin-bottom: 20px;
}

/* 题目头部 */
.qb-question__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f3f4f6;
}

.qb-question__type {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 4px;
}

.qb-question__source {
    font-size: 0.8125rem;
    color: #9ca3af;
}

/* 题目内容 */
.qb-question__content {
    margin-bottom: 24px;
}

.qb-question__title {
    font-size: 1rem;
    line-height: 1.8;
    color: #1f2937;
    font-weight: 500;
    margin: 0 0 20px 0;
}

/* 选项列表 */
.qb-question__options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.qb-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: #ffffff;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.qb-option:hover {
    background: #f3f4f6;
    border-color: #e5e7eb;
}

.qb-option--selected {
    background: #eff6ff;
    border-color: #3b82f6;
}

.qb-option__input {
    display: none;
}

.qb-option__label {
    width: 28px;
    height: 28px;
    min-width: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #6b7280;
    transition: all 0.2s ease;
}

.qb-option:hover .qb-option__label {
    border-color: #3b82f6;
    color: #3b82f6;
}

.qb-option--selected .qb-option__label {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #ffffff;
}

/* 正确答案高亮 */
.qb-option--correct {
    background: #f0fdf4;
    border-color: #22c55e;
}

.qb-option--correct .qb-option__label {
    background: #22c55e;
    border-color: #22c55e;
    color: #ffffff;
}

.qb-option__text {
    font-size: 0.9375rem;
    color: #374151;
    line-height: 1.6;
    padding-top: 2px;
}

/* 操作按钮 */
.qb-question__actions {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.qb-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    outline: none;
}

.qb-btn--primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.qb-btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.qb-btn--outline {
    background: #ffffff;
    color: #4b5563;
    border: 1px solid #e5e7eb;
}

.qb-btn--outline:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #374151;
}

.qb-btn--active {
    background: #fef2f2;
    border-color: #ef4444;
    color: #dc2626;
}

.qb-btn--active i {
    color: #ef4444 !important;
}

.qb-btn i {
    transition: color 0.2s ease, transform 0.2s ease;
}

.qb-btn:hover i {
    transform: scale(1.1);
}

/* 答案解析 */
.qb-answer {
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.qb-answer__header {
    margin-bottom: 12px;
}

.qb-answer__title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #166534;
    display: flex;
    align-items: center;
    gap: 6px;
}

.qb-answer__title i {
    color: #22c55e;
}

.qb-answer__content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.qb-answer__item {
    display: flex;
    gap: 8px;
    align-items: baseline;
}

.qb-answer__label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
    white-space: nowrap;
}

.qb-answer__value {
    font-size: 0.875rem;
    color: #374151;
}

.qb-answer__value--correct {
    color: #16a34a;
    font-weight: 600;
    font-size: 1.125rem;
}

.qb-answer__text {
    font-size: 0.875rem;
    line-height: 1.8;
    color: #4b5563;
    margin: 0;
}

/* 题目统计 */
.qb-question__stats {
    display: flex;
    gap: 24px;
    padding-top: 20px;
    border-top: 1px solid #f3f4f6;
    flex-wrap: wrap;
}

.qb-stat {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8125rem;
}

.qb-stat__label {
    color: #9ca3af;
}

.qb-stat__value {
    color: #374151;
    font-weight: 500;
}

.qb-stat__value--easy {
    color: #22c55e;
}

.qb-stat__value--medium {
    color: #f59e0b;
}

.qb-stat__value--hard {
    color: #ef4444;
}

/* 右侧边栏 */
.qb-sidebar {
    width: 230px;
    flex-shrink: 0;
    margin-top:95px;
}

/* ============================================
   APP下载推广卡片
   ============================================ */
.app-promo-card {
    background: linear-gradient(180deg, #1e88e5 0%, #1565c0 100%);
    border-radius: 16px;
    padding: 32px 24px;
    box-shadow: 0 8px 32px rgba(30, 136, 229, 0.3);
    text-align: center;
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

/* 装饰性背景元素 */
.app-promo-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    pointer-events: none;
}

.app-promo-header {
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.app-promo-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    letter-spacing: 1px;
}

.app-promo-subtitle {
    font-size: 1.125rem;
    font-weight: 500;
    margin: 0;
    opacity: 0.95;
}

.app-promo-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 8px;
    margin-bottom: 28px;
    position: relative;
    z-index: 1;
}

.app-promo-feature {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.875rem;
    font-weight: 500;
}

.app-promo-feature i {
    color: #81d4fa;
    font-size: 1rem;
}

.app-promo-qrcode {
    background: #ffffff;
    border-radius: 12px;
    padding: 16px;
    margin: 0 auto 16px;
    width: 180px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 1;
}

.app-promo-qrcode img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

/* 二维码占位样式（当图片不存在时显示） */
.app-promo-qrcode img[src=''],
.app-promo-qrcode img:not([src]) {
    background: 
        linear-gradient(90deg, #333 25%, transparent 25%),
        linear-gradient(90deg, transparent 75%, #333 75%),
        linear-gradient(90deg, transparent 75%, #333 75%),
        linear-gradient(#333 25%, transparent 25%),
        linear-gradient(transparent 75%, #333 75%),
        linear-gradient(transparent 75%, #333 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    background-color: #f5f5f5;
}

/* 二维码中间Logo */
.app-promo-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #1e88e5 0%, #1565c0 100%);
    color: #ffffff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
}

.app-promo-tip {
    font-size: 0.9375rem;
    font-weight: 500;
    margin: 0;
    opacity: 0.95;
    position: relative;
    z-index: 1;
}

/* 空状态 */
.qb-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.qb-empty i {
    font-size: 64px;
    color: #e5e7eb;
    margin-bottom: 20px;
}

.qb-empty p {
    font-size: 1rem;
    color: #9ca3af;
    margin: 0 0 24px 0;
}

/* ============================================
   响应式设计
   ============================================ */

@media (max-width: 992px) {
    .qb-container {
        flex-direction: column;
    }

    .qb-sidebar {
        width: 100%;
        order: -1;
    }

    .qb-question-card {
        padding: 20px;
    }

    .qb-question__stats {
        gap: 16px;
    }

    /* 移动端APP推广卡片适配 */
    .app-promo-card {
        max-width: 360px;
        margin: 0 auto 20px;
    }
}

@media (max-width: 768px) {
    .qb-main {
        padding: 12px 0 24px;
    }

    .qb-container {
        padding: 0 12px;
    }

    .qb-breadcrumb {
        font-size: 0.75rem;
        margin-bottom: 12px;
    }

    .qb-question-card {
        padding: 16px;
    }

    .qb-question__header {
        padding-bottom: 12px;
        margin-bottom: 12px;
    }

    .qb-question__title {
        font-size: 0.9375rem;
        line-height: 1.7;
    }

    .qb-option {
        padding: 12px 14px;
    }

    .qb-option__label {
        width: 24px;
        height: 24px;
        min-width: 24px;
        font-size: 0.75rem;
    }

    .qb-option__text {
        font-size: 0.875rem;
    }

    .qb-question__actions {
        gap: 8px;
    }

    .qb-btn {
        padding: 8px 14px;
        font-size: 0.8125rem;
    }

    .qb-answer {
        padding: 16px;
    }

    .qb-question__stats {
        gap: 12px;
        padding-top: 16px;
    }

    .qb-stat {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .qb-question__actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .qb-btn {
        justify-content: center;
    }

    .qb-btn--primary {
        grid-column: span 2;
    }

    .qb-question__stats {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .qb-related__item {
        padding: 10px;
    }
}

/* ============================================
   Toast提示样式
   ============================================ */
.toast-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 14px 24px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(16, 185, 129, 0.35);
    z-index: 10001;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    font-size: 0.9375rem;
    font-weight: 500;
}

.toast-notification.toast-show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-icon {
    font-size: 1.25rem;
}

.toast-message {
    white-space: nowrap;
}

/* 适配移动端 */
@media (max-width: 480px) {
    .toast-notification {
        top: 15px;
        padding: 12px 20px;
        font-size: 0.875rem;
        border-radius: 10px;
        max-width: 90%;
    }
    
    .toast-icon {
        font-size: 1.125rem;
    }
}

/* ============================================
   报错弹窗样式已迁移到 error-modal.css
   ============================================ */
