/* gemelle.css - Stili specifici per Quiz Case Gemelle */

/* Fasi del quiz */
.phase {
    text-align: center;
}

.phase-title h2 {
    font-size: 2em;
    font-weight: 900;
    letter-spacing: 2px;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.instruction-text {
    font-size: 1.1em;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

/* Display grande per la coordinata da memorizzare */
.coordinate-display-large {
    margin: 50px 0;
    padding: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

#coordinate-to-remember {
    font-size: 8em;
    font-weight: 900;
    color: white;
    text-transform: uppercase;
    letter-spacing: 20px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
}

/* Countdown */
.countdown {
    font-size: 4em;
    font-weight: 900;
    color: var(--primary-color);
    margin-top: 30px;
    opacity: 0.5;
}

/* Avviso velocità */
.speed-warning {
    font-size: 1.5em;
    font-weight: bold;
    color: #ff6b6b;
    margin-top: 20px;
    display: none;
    animation: blink 0.5s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Input display */
.input-display {
    margin: 30px 0;
    font-size: 5em;
    font-weight: 900;
    color: var(--primary-color);
    letter-spacing: 20px;
    text-transform: uppercase;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Tastierino */
.keyboard-container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.keyboard-row {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.keyboard-row:last-child {
    margin-bottom: 0;
}

.key {
    padding: 20px;
    font-size: 1.5em;
    font-weight: bold;
    border: 3px solid #333;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #333;
}

.key:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.key:active:not(:disabled) {
    transform: translateY(0);
}

.key:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.key.selected {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Feedback */
.feedback-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 40px;
    border-radius: 20px;
    z-index: 1000;
    display: none;
}

.feedback-content {
    text-align: center;
    color: white;
}

.feedback-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.feedback-message {
    font-size: 1.5em;
    margin-bottom: 20px;
}

.feedback-details {
    display: flex;
    gap: 30px;
    justify-content: center;
    align-items: center;
}

.feedback-square {
    text-align: center;
}

.feedback-square-label {
    font-size: 0.9em;
    opacity: 0.8;
    margin-bottom: 5px;
}

.feedback-square-coord {
    font-size: 2em;
    font-weight: bold;
    text-transform: uppercase;
}

.feedback-arrow {
    font-size: 2em;
}

/* Review items specifici */
.review-item {
    display: grid;
    grid-template-columns: 40px 100px 100px 100px 60px;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 8px;
}

.review-item.correct {
    border-left: 4px solid var(--success-color);
}

.review-item.wrong {
    border-left: 4px solid var(--danger-color);
}

.review-original {
    font-weight: 500;
}

.review-answer {
    font-weight: 500;
}

.review-correct {
    color: var(--success-color);
    font-weight: bold;
}

/* Mobile adjustments */
@media (max-width: 600px) {
    .coordinate-display-large {
        padding: 40px 20px;
        margin: 30px 0;
    }
    
    #coordinate-to-remember {
        font-size: 5em;
        letter-spacing: 10px;
    }
    
    .countdown {
        font-size: 3em;
    }
    
    .input-display {
        font-size: 3.5em;
        letter-spacing: 15px;
    }
    
    .keyboard-container {
        padding: 20px;
    }
    
    .key {
        padding: 15px;
        font-size: 1.2em;
    }
    
    .keyboard-row {
        gap: 5px;
    }
    
    .review-item {
        grid-template-columns: 30px 1fr;
        gap: 10px;
    }
    
    .review-item > span:not(:first-child):not(:last-child) {
        display: none;
    }
    
    .feedback-overlay {
        padding: 30px 20px;
    }
    
    .feedback-details {
        gap: 20px;
    }
    
    .feedback-square-coord {
        font-size: 1.5em;
    }
}

/* Schermi piccoli */
@media (max-width: 380px) {
    #coordinate-to-remember {
        font-size: 4em;
        letter-spacing: 5px;
    }
    
    .coordinate-display-large {
        padding: 30px 15px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .key {
        background-color: #2d2d2d;
        color: #ecf0f1;
        border-color: #555;
    }
    
    .key.selected {
        background-color: var(--primary-color);
        border-color: var(--primary-color);
    }
    
    .review-item {
        background-color: #2a2a2a;
    }
}