/* Specific styles for the Symbol Memory module */

/* Symbol grid layout */
.symbol-grid-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 2rem 0;
    position: relative;
}

.symbol-grid {
    display: grid;
    grid-template-columns: repeat(3, 80px); /* Default now 3x3 grid, overridden in JS */
    grid-template-rows: repeat(3, 80px);
    gap: 10px;
    background-color: #1e242c;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    transition: opacity 0.4s ease, transform 0.3s ease;
}

/* Symbol styles */
.symbol-cell {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    background-color: #282c34;
    border-radius: 8px;
    font-size: 2.2rem; /* Larger font size for better visibility in 3x3 */
    font-weight: bold;
    color: var(--text-color);
    cursor: pointer;
    transition: transform 0.2s ease-out, 
                background-color 0.3s ease,
                box-shadow 0.3s ease,
                opacity 0.3s ease;
    position: relative;
    user-select: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.symbol-cell:hover {
    background-color: #323842;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

/* Phase indicator */
.phase-indicator {
    text-align: center;
    margin: 1rem 0;
}

.phase-text {
    font-size: 1.3rem;
    font-weight: bold;
    padding: 10px 20px;
    border-radius: 20px;
    background-color: rgba(0, 120, 255, 0.2);
    display: inline-block;
    transition: background-color 0.5s, transform 0.3s;
}

.phase-text.memorize {
    background-color: rgba(0, 120, 255, 0.2);
}

.phase-text.recall {
    background-color: rgba(255, 100, 0, 0.2);
}

/* Animation for phase transitions */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.phase-text.memorize {
    animation: pulse 2s infinite;
}

/* Answer panel */
.answer-panel, .position-panel {
    text-align: center;
    margin: 1rem 0;
    padding: 15px;
    background-color: rgba(40, 44, 52, 0.8);
    border-radius: 10px;
    transition: all 0.5s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.position-panel {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
}

.button-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
}

.answer-button {
    min-width: 100px;
}

/* Result message */
.result-message {
    text-align: center;
    margin: 1rem 0;
    padding: 15px;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.5s, transform 0.3s;
    transform: translateY(10px);
}

.result-message.visible {
    opacity: 1;
    transform: translateY(0);
}

.result-message.correct {
    background-color: rgba(50, 255, 50, 0.2);
    color: var(--success-color);
}

.result-message.incorrect {
    background-color: rgba(255, 50, 50, 0.2);
    color: var(--error-color);
}

/* Symbol highlighting */
.symbol-cell.highlighted {
    background-color: var(--primary-color);
    transform: scale(1.1);
    box-shadow: 0 0 15px var(--primary-color);
    z-index: 5;
}

.symbol-cell.correct {
    background-color: rgba(50, 255, 50, 0.3);
    box-shadow: 0 0 10px rgba(50, 255, 50, 0.5);
}

.symbol-cell.incorrect {
    background-color: rgba(255, 50, 50, 0.3);
    box-shadow: 0 0 10px rgba(255, 50, 50, 0.5);
}

.symbol-cell.modified {
    border: 2px solid var(--error-color);
    box-shadow: 0 0 15px var(--error-color);
    animation: pulse 2s infinite;
}

/* Keyboard usage hint */
.symbol-grid-container::after {
    content: "Use arrow keys and Enter to navigate";
    position: absolute;
    bottom: -30px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.9rem;
    color: rgba(180, 180, 180, 0.7);
    opacity: 0;
    transition: opacity 0.5s;
}

.position-panel:not(.hidden) ~ .symbol-grid-container::after {
    opacity: 1;
}

/* Symbol colors - these are now applied directly in JavaScript */
.symbol-color-1 { /* Styles kept for compatibility */ }
.symbol-color-2 { /* Styles kept for compatibility */ }
.symbol-color-3 { /* Styles kept for compatibility */ }
.symbol-color-4 { /* Styles kept for compatibility */ }
.symbol-color-5 { /* Styles kept for compatibility */ }

/* Responsive design */
@media (max-width: 768px) {
    .symbol-grid {
        gap: 8px;
        padding: 15px;
    }
    
    .phase-text {
        font-size: 1.1rem;
        padding: 8px 15px;
    }
    
    .button-group {
        gap: 10px;
    }
    
    .answer-button {
        min-width: 80px;
        padding: 8px 15px;
    }
}

/* Dark mode optimization */
@media (prefers-color-scheme: dark) {
    .symbol-cell {
        background-color: #222830;
    }
    
    .symbol-cell:hover {
        background-color: #2c3440;
    }
} 