/* 简单丰富的移动端样式 */
.mobile-section {
    background: #ffffff;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #e5e7eb;
}

@media (min-width: 375px) {
    .mobile-section {
        padding: 20px;
        margin-bottom: 20px;
    }
}

/* 练习设置区域优化 */
.mobile-section .grid.grid-cols-2 {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 374px) {
    .mobile-section .grid.grid-cols-2 {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .mobile-section .grid.grid-cols-2 > div:first-child {
        order: 2;
    }
    
    .mobile-section .grid.grid-cols-2 > div:last-child {
        order: 1;
    }
}

.mobile-header {
    font-size: 16px;
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
}

@media (min-width: 375px) {
    .mobile-header {
        font-size: 18px;
    }
}

.mobile-header i {
    margin-right: 8px;
    color: #3b82f6;
    font-size: 16px;
}

@media (min-width: 375px) {
    .mobile-header i {
        margin-right: 10px;
        font-size: 18px;
    }
}

.mobile-btn {
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 12px;
    font-weight: 500;
    transition: all 0.2s;
    font-size: 14px;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (min-width: 375px) {
    .mobile-btn {
        padding: 12px 16px;
        font-size: 16px;
    }
}

.mobile-btn:hover {
    background-color: #2563eb;
}

.mobile-option {
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

@media (min-width: 375px) {
    .mobile-option {
        padding: 16px;
        margin-bottom: 12px;
    }
}

.mobile-option:hover {
    border-color: #3b82f6;
    background-color: #f0f9ff;
}

.mobile-option.selected {
    border-color: #3b82f6;
    background-color: #dbeafe;
}

.mobile-progress-container {
    height: 6px;
    background-color: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
    margin: 12px 0;
}

@media (min-width: 375px) {
    .mobile-progress-container {
        height: 8px;
        border-radius: 4px;
        margin: 16px 0;
    }
}

.mobile-progress {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    border-radius: 3px;
    transition: width 0.3s;
}

@media (min-width: 375px) {
    .mobile-progress {
        border-radius: 4px;
    }
}

.mobile-tag {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 500;
    margin-right: 6px;
    margin-bottom: 6px;
    white-space: nowrap;
}

@media (min-width: 375px) {
    .mobile-tag {
        padding: 4px 12px;
        border-radius: 20px;
        font-size: 12px;
        margin-right: 8px;
        margin-bottom: 8px;
    }
}

.tag-blue {
    background-color: #dbeafe;
    color: #1d4ed8;
}

.tag-green {
    background-color: #dcfce7;
    color: #166534;
}

.tag-yellow {
    background-color: #fef9c3;
    color: #854d0e;
}

.tag-purple {
    background-color: #f3e8ff;
    color: #7e22ce;
}

.mobile-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (min-width: 375px) {
    .mobile-input {
        padding: 12px;
        font-size: 16px;
    }
}

.mobile-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

@media (min-width: 375px) {
    .mobile-input:focus {
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }
}

/* 学段和题型标签样式优化 */
.stage-tag, .type-tag {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
    max-width: 100%;
}

@media (max-width: 319px) {
    .stage-tag, .type-tag {
        padding: 0.125rem 0.5rem;
        font-size: 0.625rem;
    }
}

@media (min-width: 375px) {
    .stage-tag, .type-tag {
        padding: 0.25rem 1rem;
        font-size: 0.8125rem;
    }
}

@media (min-width: 414px) {
    .stage-tag, .type-tag {
        padding: 0.375rem 1.25rem;
        font-size: 0.875rem;
    }
}

/* 题目数量选择器优化 */
#question-count {
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
}

@media (max-width: 319px) {
    #question-count {
        font-size: 0.75rem;
        width: 2.5rem;
    }
    
    #decrease-count, #increase-count {
        width: 2rem;
        height: 2rem;
        font-size: 1rem;
    }
}

@media (min-width: 375px) {
    #question-count {
        font-size: 1rem;
        width: 3rem;
    }
    
    #decrease-count, #increase-count {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.125rem;
    }
}

@media (min-width: 414px) {
    #question-count {
        font-size: 1.125rem;
        width: 3.5rem;
    }
    
    #decrease-count, #increase-count {
        width: 3rem;
        height: 3rem;
        font-size: 1.25rem;
    }
}

.mobile-footer-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e5e7eb;
    padding: 10px 0;
}

@media (min-width: 375px) {
    .mobile-footer-nav {
        padding: 12px 0;
    }
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 11px;
    color: #6b7280;
}

@media (min-width: 375px) {
    .nav-item {
        font-size: 12px;
    }
}

.nav-item.active {
    color: #3b82f6;
}

.nav-item i {
    font-size: 18px;
    margin-bottom: 3px;
}

@media (min-width: 375px) {
    .nav-item i {
        font-size: 20px;
        margin-bottom: 4px;
    }
}

.question-number {
    font-weight: 500;
    color: #3b82f6;
    background-color: #dbeafe;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 12px;
}

@media (min-width: 375px) {
    .question-number {
        padding: 2px 8px;
        border-radius: 12px;
        font-size: 14px;
    }
}

/* 答题卡按钮样式 */
.answer-card-btn {
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    width: 40px;
    height: 40px;
    font-size: 14px;
}

@media (min-width: 375px) {
    .answer-card-btn {
        width: 44px;
        height: 44px;
        font-size: 16px;
    }
}

.answer-card-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.answer-card-btn:active::before {
    width: 200%;
    height: 200%;
}

/* 功能按钮样式 */
.function-btn {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

@media (min-width: 375px) {
    .function-btn {
        padding: 8px 12px;
        font-size: 14px;
    }
}

.function-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.function-btn-primary {
    background-color: #3b82f6;
    color: white;
}

.function-btn-primary:hover {
    background-color: #2563eb;
}

.function-btn-secondary {
    background-color: #f3f4f6;
    color: #374151;
}

.function-btn-secondary:hover {
    background-color: #e5e7eb;
}

.function-btn-danger {
    background-color: #ef4444;
    color: white;
}

.function-btn-danger:hover {
    background-color: #dc2626;
}

/* 上下题提交按钮区域 */
.question-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
    gap: 0.5rem;
}

.nav-button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.nav-button i {
    font-size: 0.875rem;
}

.nav-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.prev-button {
    background-color: #6b7280;
    color: white;
}

.prev-button:hover {
    background-color: #4b5563;
}

.submit-button {
    background-color: #3b82f6;
    color: white;
}

.submit-button:hover {
    background-color: #2563eb;
}

.next-button {
    background-color: #3b82f6;
    color: white;
}

.next-button:hover {
    background-color: #2563eb;
}

/* 响应式断点优化 */
@media (max-width: 319px) {
    .question-navigation {
        gap: 0.25rem;
    }
    
    .nav-button {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }
    
    .nav-button i {
        font-size: 0.75rem;
    }
}

@media (min-width: 375px) {
    .question-navigation {
        margin-top: 1.5rem;
        gap: 1rem;
    }
    
    .nav-button {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    
    .nav-button i {
        font-size: 1rem;
    }
}

@media (min-width: 414px) {
    .question-navigation {
        margin-top: 1.5rem;
        gap: 1.5rem;
    }
    
    .nav-button {
        padding: 1rem 1.25rem;
        font-size: 1rem;
    }
    
    .nav-button i {
        font-size: 1.125rem;
    }
}

/* 临时消息样式 */
.temp-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 500;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: opacity 0.3s;
    font-size: 14px;
    max-width: 90%;
}

@media (min-width: 375px) {
    .temp-message {
        padding: 12px 20px;
        font-size: 16px;
        max-width: 80%;
    }
}

.temp-message.success {
    background-color: #10b981;
    color: white;
}

.temp-message.error {
    background-color: #ef4444;
    color: white;
}

/* 题目内容样式 */
#question-content {
    font-size: 16px;
    line-height: 1.6;
    word-wrap: break-word;
    word-break: break-word;
    white-space: pre-wrap;
}

@media (min-width: 375px) {
    #question-content {
        font-size: 18px;
    }
}

/* 选项容器样式 */
#options-container {
    font-size: 14px;
}

@media (min-width: 375px) {
    #options-container {
        font-size: 16px;
    }
}

/* 响应式断点优化 */
@media (max-width: 319px) {
    .mobile-section {
        padding: 12px;
    }
    
    .mobile-header {
        font-size: 14px;
    }
    
    .mobile-btn {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .mobile-option {
        padding: 10px;
    }
    
    .mobile-tag {
        padding: 2px 6px;
        font-size: 10px;
    }
    
    .question-number {
        padding: 1px 4px;
        font-size: 11px;
    }
    
    #question-content {
        font-size: 14px;
    }
    
    #options-container {
        font-size: 12px;
    }
    
    .function-btn {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .temp-message {
        padding: 8px 12px;
        font-size: 12px;
    }
}

@media (min-width: 414px) {
    .mobile-section {
        padding: 24px;
    }
    
    .mobile-header {
        font-size: 20px;
    }
    
    .mobile-btn {
        padding: 14px 18px;
        font-size: 17px;
    }
    
    .mobile-option {
        padding: 18px;
    }
    
    .mobile-tag {
        padding: 5px 14px;
        font-size: 13px;
    }
    
    .question-number {
        padding: 3px 10px;
        font-size: 15px;
    }
    
    #question-content {
        font-size: 20px;
    }
    
    #options-container {
        font-size: 17px;
    }
    
    .function-btn {
        padding: 10px 14px;
        font-size: 15px;
    }
    
    .temp-message {
        padding: 14px 22px;
        font-size: 17px;
    }
}

/* 结构化数据，提升搜索引擎理解 */
.structured-data {
    display: none;
}