/* 背景样式文件 */

/* 主体背景 */
body {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 50%, #a5d6a7 100%);
    background-attachment: fixed;
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

/* 背景动画 */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 装饰性背景元素 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(76, 175, 80, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(129, 199, 132, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(165, 214, 167, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* 浮动装饰圆点 */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(2px 2px at 20px 30px, rgba(76, 175, 80, 0.3), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(129, 199, 132, 0.2), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(165, 214, 167, 0.3), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(76, 175, 80, 0.2), transparent),
        radial-gradient(2px 2px at 160px 30px, rgba(129, 199, 132, 0.3), transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: float 20s linear infinite;
    pointer-events: none;
    z-index: -1;
    opacity: 0.6;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

/* 题目容器背景增强 */
.question-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 8px 32px rgba(26, 77, 26, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* 错误容器背景 */
.error-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* 结果容器背景 */
.result-container {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

/* 代码块背景 */
.code-block {
    background: rgba(248, 249, 250, 0.9);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

/* 选项背景 */
.option {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.option:hover {
    background: rgba(76, 175, 80, 0.05);
}

.option.selected {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.15), rgba(76, 175, 80, 0.08));
}

/* 按钮背景增强 */
.submit-btn {
    background: linear-gradient(135deg, #4caf50, #45a049);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.2);
}

.show-answer-btn {
    background: linear-gradient(135deg, #2196f3, #1976d2);
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.2);
}

.retry-btn {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.2);
}

.refresh-btn {
    background: linear-gradient(135deg, #4caf50, #45a049);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.2);
}

/* 移动端背景优化 */
@media (max-width: 768px) {
    body {
        background-attachment: scroll;
    }
    
    body::after {
        opacity: 0.4;
        background-size: 150px 75px;
    }
    
    .question-container {
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    body {
        background: #f0f8f0;
    }
    
    body::before,
    body::after {
        display: none;
    }
    
    .question-container {
        background: #ffffff;
        border: 2px solid #4caf50;
    }
}

/* 减少动画模式支持 */
@media (prefers-reduced-motion: reduce) {
    body {
        animation: none;
        background: #e8f5e8;
    }
    
    body::after {
        animation: none;
    }
    
    .refresh-btn:hover {
        transform: scale(1.1);
    }
}