/* diagonale.css - Stili specifici per Quiz Stessa Diagonale */

/* Contenitore domanda diagonale */
.diagonal-question-container {
    text-align: center;
    padding: 40px 20px;
    background: #f8f8f8;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 40px;
}

.diagonal-question-container h2 {
    font-size: 2.5em;
    font-weight: 900;
    letter-spacing: 2px;
    margin-bottom: 20px;
    color: #000;
}

.instruction-text {
    font-size: 1.1em;
    color: #666;
    line-height: 1.6;
    margin-bottom: 30px;
}

/* Display delle caselle */
.squares-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin: 30px 0;
}

#square1, #square2 {
    font-size: 4em;
    font-weight: 900;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 5px;
    padding: 20px 40px;
    background: #f5f5f5;
    border: 3px solid #000;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.and-text {
    font-size: 2em;
    font-weight: 900;
    color: #000;
    letter-spacing: 2px;
}

/* Bottoni risposta */
.answer-buttons {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
}

.answer-buttons.disabled {
    pointer-events: none;
    opacity: 0.7;
}

.answer-btn {
    width: 200px;
    height: 120px;
    border: 5px solid #000;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 2.5em;
    font-weight: 900;
    letter-spacing: 2px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    text-shadow: none;
}

.answer-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.answer-btn:active {
    transform: translateY(-2px) scale(1.02);
}

.answer-btn.yes {
    background: #1a1a1a;
    color: #fff;
    border-color: #000;
}

.answer-btn.no {
    background: #ffffff;
    color: #000;
    border-color: #333;
}

/* Rimuovi gradienti su dispositivi touch per migliore visibilità */
@media (hover: none) and (pointer: coarse) {
    .answer-btn.yes {
        background: #000000;
    }
    
    .answer-btn.no {
        background: #ffffff;
    }
}

/* Animazioni feedback */
@keyframes correctPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); background-color: var(--success-color); }
    100% { transform: scale(1); }
}

@keyframes wrongShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.answer-btn.correct {
    animation: correctPulse 0.5s ease;
    background-color: var(--success-color) !important;
}

.answer-btn.wrong {
    animation: wrongShake 0.5s ease;
    background-color: var(--danger-color) !important;
}

/* Review items specifici */
.review-item {
    display: grid;
    grid-template-columns: 40px 1fr 2fr 40px;
    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-squares {
    font-weight: 700;
    font-size: 1.1em;
}

.review-answer {
    color: var(--text-secondary);
}

/* Mobile adjustments */
@media (max-width: 600px) {
    .diagonal-question-container h2 {
        font-size: 1.8em;
    }
    
    .instruction-text {
        font-size: 0.95em;
    }
    
    .squares-display {
        gap: 20px;
        flex-wrap: wrap;
    }
    
    #square1, #square2 {
        font-size: 3em;
        padding: 15px 25px;
        letter-spacing: 3px;
    }
    
    .and-text {
        font-size: 1.5em;
    }
    
    .answer-buttons {
        gap: 20px;
    }
    
    .answer-btn {
        width: 140px;
        height: 100px;
        font-size: 2em;
    }
    
    .review-item {
        grid-template-columns: 30px 1fr;
        gap: 10px;
    }
    
    .review-answer {
        grid-column: 2;
    }
    
    .review-result {
        display: none;
    }
}

/* Schermi molto piccoli */
@media (max-width: 380px) {
    #square1, #square2 {
        font-size: 2.5em;
        padding: 12px 20px;
    }
    
    .answer-btn {
        width: 120px;
        height: 90px;
        font-size: 1.8em;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .diagonal-question-container {
        background: #1a1a1a;
    }
    
    .diagonal-question-container h2 {
        color: #fff;
    }
    
    .instruction-text {
        color: #aaa;
    }
    
    #square1, #square2 {
        background: #2a2a2a;
        border-color: #fff;
        color: #fff;
    }
    
    .and-text {
        color: #fff;
    }
    
    .review-item {
        background-color: #2a2a2a;
    }
}

/* Fix per Safari/iOS - colori più marcati */
@supports (-webkit-touch-callout: none) {
    .answer-btn.yes {
        background-color: #000000 !important;
        -webkit-appearance: none;
    }
    
    .answer-btn.no {
        background-color: #ffffff !important;
        border: 5px solid #000000 !important;
        -webkit-appearance: none;
    }
}

/* Aumenta contrasto per accessibilità */
.answer-btn {
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}