/* Custom styles for microbe categorization task */

body {
    background-color: #FFFFFF; /* White background */
    font-family: Arial, sans-serif;
}

#jspsych-content {
    max-width: none;
    margin: 0 auto;
}

.instruction-text {
    font-size: 20px;
    line-height: 1.6;
    text-align: left;
    max-width: 800px;
    margin: 0 auto;
    padding: 40px;
}

.microbe-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 70vh;
}

.microbe-image {
    max-width: 600px;
    max-height: 600px;
}

.category-options-container {
    display: flex;
    justify-content: center;
    gap: 60px;  /* More space between options */
    position: fixed;  /* Fix to screen position */
    bottom: 100px;  /* Distance from bottom */
    left: 50%;
    transform: translateX(-50%);  /* Center horizontally */
    width: 100%;
}

.category-option {
    position: relative;
    width: 350px;  /* Larger images (was 250px) */
    cursor: pointer;
    transition: transform 0.2s;
}

.category-option img {
    width: 100%;
    height: auto;
    border: 3px solid transparent;
    border-radius: 5px;
}

.category-option:hover img {
    transform: scale(1.05);
}

.category-option.selected img {
    border-color: #000000;
    box-shadow: none;
}

.category-option.previous img {
    border-color: #808080;
}

.feedback-text {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 22px;
  font-weight: bold;
  text-shadow: 0 0 5px #fff;
}

.category-option.locked {
    opacity: 0.2;
    cursor: not-allowed;
    pointer-events: none;
}

.category-option.locked::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
}

.category-label {
    text-align: center;
    font-size: 18px;
    margin-top: 10px;
    font-weight: bold;
}

.key-instruction {
    text-align: center;
    font-size: 16px;
    color: #333;
    margin-top: 10px;
}

.fixation {
    font-size: 48px;
    text-align: center;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
}

.message-text {
    font-size: 24px;
    text-align: center;
    padding: 40px;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
}

.feedback-correct {
    color: green;
    font-weight: bold;
}

.feedback-incorrect {
    color: red;
    font-weight: bold;
}

.progress-bar {
    width: 80%;
    height: 20px;
    background-color: #e0e0e0;
    border-radius: 10px;
    margin: 20px auto;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #4CAF50;
    transition: width 0.3s ease;
}

/* Keyboard response hints */
.key-hint {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 24px;
    font-weight: bold;
    color: #333;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 5px 15px;
    border-radius: 5px;
}

/* Scene preview at bottom */
.scene-preview-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

.scene-preview {
    width: 100px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
    border: 2px solid #666;
    opacity: 0.7;
}

.scene-preview.current {
    opacity: 1;
    border-color: #000000;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.key-instruction {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    font-size: 16px;
    color: #333;
    margin: 0;
    height: 25px;  /* Reserve space even when empty */
}

/* Loading screen */
.loading-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.spinner {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #3498db;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

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

/* Responsive design */
@media (max-width: 768px) {
    .category-options-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .category-option {
        width: 200px;
        margin: 0 auto;
    }
    
    .instruction-text {
        font-size: 16px;
        padding: 20px;
    }
}
