* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft JhengHei", sans-serif;
    background-color: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    flex-direction: column;
    color: #333;
}

.ad {
    width: 100%;
    height: 40px;
    background-color: #f1f1f1;
    margin: 10px 0;
    color: transparent;  /* 隐藏广告位文字 */
}



.question-container {
    margin-bottom: 10px;
}

.question {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
}

.main-question-image {
    max-width: 100%;
    height: auto;
    margin: 30px 0;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.answers {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.answer {
    background-color: #ffffff;
    border: 2px solid #999;
    padding: 15px;
    font-size: 18px;
    color: black;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    width: 80%;
    margin: 0 auto;
}



.answer:active {
    transform: scale(0.98);
}

.answer.correct {
    background-color: #4CAF50;
    border-color: #4CAF50;
}

.answer.incorrect {
    background-color: #f44336;
    border-color: #f44336;
}

.result {
    font-size: 20px;
    font-weight: bold;
    margin-top: 20px;
    color: #333;
}

.image-options-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(120px, 1fr)); /* 最小列宽限制 */
    gap: 10px; /* 缩小间隙 */
    width: 100%;
    overflow-x: auto; /* 添加横向滚动 */
    padding-bottom: 10px;
}

.image-option-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s;
}

.option-preview-image {
    max-width: 150px;
    height: auto;
    object-fit: contain;
}

.navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 0px;
    width: 80%;
    margin-left: auto;
    margin-right: auto;
}

.nav-button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.nav-button:hover {
    background-color: #007bff;
}

.nav-button:active {
    transform: scale(0.98);
}

@media (max-width: 768px) {
    /* 保持三列布局 */
    .image-options-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px; /* 更小间隙 */
    }

    /* 增加图片容器的高度 */
    .image-wrapper {
        height: 200px; /* 增加容器高度 */
    }

    /* 增大图片预览大小 */
    .option-preview-image {
        max-width: 80%; /* 增大图片宽度，保持自适应 */
        height: auto;
    }

    .image-option-button {
        font-size: 14px !important; /* 缩小字体 */
        padding: 8px !important;
        min-height: 50px; /* 调小最小高度 */
    }
}

.image-options-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    max-width: 800px;
    margin: 0 auto;
}

.image-option-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: transform 0.2s;
}

.image-option-card:hover {
    transform: translateY(-3px);
}

.image-wrapper {
    width: 100%;
    height: 300px;  /* 增加高度，使图片更大 */
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid #ddd;
}

.option-preview-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s;
}

.image-option-card:hover .option-preview-image {
    border-color: #007bff;
}

.image-option-button {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    white-space: normal;
    height: auto;
    min-height: 60px;
}



