/* Multi-page color blind test styles */

/* Question container */
.question-container {
    margin-bottom: 30px;
    padding: 20px;
    border-radius: 8px;
    background-color: #f9f9f9;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

/* .question-container.answered {
    border-left: 4px solid #4caf50;
} */

.question-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}

/* Canvas container position relative for absolute positioning of loading indicator */
.canvas-wrap {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
    width: 250px;
    height: 250px;
    margin-left: auto;
    margin-right: auto;
}

.canvas-wrap canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* Answer buttons */
.answers-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.select-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 40px;
    background-color: #f0f0f0;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: bold;
    border: 1px solid #ddd;
}

.select-btn:hover {
    background-color: #e0e0e0;
    border-color: #aaa;
}

.select-btn.active {
    background-color: #1a73e8;
    color: white;
    border-color: #1a73e8;
}

/* Navigation */
.navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding: 20px 0;
    border-top: 1px solid #eee;
}

.nav-btn {
    padding: 10px 20px;
    background-color: #2196f3;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.nav-btn.disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.7;
    pointer-events: none;
}

.nav-btn:hover:not(.disabled) {
    background-color: #0b7dda;
    color: #fff;
}

#submit-test-btn {
    background-color: #4caf50;
}

#submit-test-btn:hover:not(.disabled) {
    background-color: #45a049;
}

#submit-test-btn.submitting {
    background-color: #8bc34a;
    cursor: wait;
    pointer-events: none;
}

/* Progress indicators */
.progress-container {
    margin-bottom: 0;
}

.progress-bar-container {
    height: 10px;
    background-color: #f0f0f0;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 10px;
}

.page-progress-bar {
    height: 100%;
    background-color: #2196f3;
    border-radius: 5px;
    transition: width 0.3s ease;
}

.page-indicator {
    text-align: center;
    font-size: 16px;
    color: #666;
    margin-bottom: 15px;
}

/* Question indicators */
.question-indicators {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
    justify-content: center;
}

.question-indicator {
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background-color: #f0f0f0;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #ddd;
}

.question-indicator.active {
    border: 2px solid #2196f3;
    color: #2196f3;
    font-weight: bold;
}

.question-indicator.answered {
    background-color: #4caf50;
    color: white;
    border-color: #3d8b40;
    position: relative;
}


.question-indicator.active.answered {
    border: 2px solid #2196f3;
    background-color: #4caf50;
    color: white;
}

.question-indicator.group-indicator {
    width: auto;
    height: auto;
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: bold;
    margin: 0 5px;
}

.question-indicator.group-indicator.active {
    background-color: #4caf50;
    color: white;
    border-color: #3d8b40;
}

/* Test header */
.test-header {
    margin-bottom: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.test-header h1 {
    text-align: center;
    margin-bottom: 10px;
}
.start_btn_box{
    padding:10px 0;
    margin: 10px 0;
    background: #f9593a;
    border-radius: 0.5rem;
    font-size: 13px;
    font-weight: bold;
    text-align: center;
    animation: dfs 1.5s infinite;
    display: none;
    color: #fff !important;
}
.group-indicator {
    position: relative;
}
.cart_sd{
    display: none !important;
}
.check-icon,.question-indicator.answered .cart_sd {
    position: absolute;
    right: -5px;
    top: -5px;
    color: #4CAF50;
    font-size: 10px;
    background: white;
    border-radius: 50%;
    padding: 2px;
    display: block !important;
}
@keyframes dfs {
    0% {
        box-shadow: 0 0 0 0 #FF7625
    }
    50% {
        box-shadow: 0 0 0 2vw rgba(59, 89, 152, 0)
    }
    100% {
        box-shadow: 0 0 0 2vw rgba(59, 89, 152, 0)
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .start_btn_box{
        display: block;
    }
    .answers-grid {
        grid-template-columns: repeat(5, 1fr);
    }
    
}

@media (max-width: 480px) {
    .question-container{
        padding: 10px;
        margin-bottom: 5px;
    }
    .test-header h1{
        font-size: 15px;
        font-weight: 700;
        margin-bottom: 5px;
    }
    .progress-container{
        margin-bottom: 10px;
    }
    .test-header{
        margin-bottom: 0px;
        padding-bottom: 0px;
    }
    .answers-grid {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .navigation {
        gap: 10px;
    }
    
    .nav-btn {
        width: 100%;
    }
    
}

/* New Test Button */
.new-test-container {
    text-align: center;
    margin: 15px 0;
}

.new-test-btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: #ff5722;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.new-test-btn:hover {
    background-color: #e64a19;
}

.clear-btn {
    background-color: #ff5722;
}

.clear-btn:hover:not(.disabled) {
    background-color: #e64a19;
}

/* 内联加载指示器样式 */
.inline-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.7);
}

.inline-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    margin-bottom: 10px;
    animation: spin 1s linear infinite;
}

.inline-loading-text {
    color: #333;
    font-size: 14px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Highlight animation for next page button */
.highlight-btn {
    animation: pulse 1.5s infinite;
    box-shadow: 0 0 8px #1a73e8;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 4px 2px rgba(26, 115, 232, 0.5);
    }
    50% {
        box-shadow: 0 0 8px 5px rgba(26, 115, 232, 0.8);
    }
    100% {
        box-shadow: 0 0 4px 2px rgba(26, 115, 232, 0.5);
    }
} 