* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    height: 100%;
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
    font-family: "Comic Relief", system-ui;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

#wrapper {
    width: 90%;
    max-width: 600px;
    padding: 30px;
    margin: 20px auto;
    background-color: var(--bs-tertiary-bg);
    border: 2px solid var(--bs-border-color);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

h1 {
    font-size: 3rem;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    text-align: center;
    color: var(--bs-body-color);
    font-weight: 700;
}

.score-board {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
}

.score-item {
    background-color: var(--bs-secondary-bg);
    border: 2px solid var(--bs-border-color);
    border-radius: 12px;
    padding: 15px 20px;
    min-width: 100px;
    text-align: center;
}

.score-label {
    font-size: 0.85rem;
    color: var(--bs-body-color);
    opacity: 0.7;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 8px;
}

.score-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--bs-body-color);
}

.choices-container {
    display: flex;
    justify-content: space-around;
    width: 100%;
    margin-bottom: 30px;
    gap: 20px;
}

.big {
    width: 120px;
    height: 150px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    border-radius: 15px;
    border: 3px solid var(--bs-border-color);
    background-color: var(--bs-secondary-bg);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.big.selected {
    border-color: #ffc107;
    box-shadow: 0 0 20px rgba(255, 193, 7, 0.5);
    transform: scale(1.05);
}

.selection-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.small {
    width: 70px;
    height: 70px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    cursor: pointer;
    border-radius: 12px;
    border: 3px solid var(--bs-border-color);
    background-color: var(--bs-secondary-bg);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.small:hover {
    transform: scale(1.15);
    border-color: #ffc107;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4);
    background-color: var(--bs-tertiary-bg);
}

.small.selected {
    border-color: var(--bs-primary);
    box-shadow: 0 0 20px rgba(13, 110, 253, 0.6);
    transform: scale(1.2);
    background-color: var(--bs-tertiary-bg);
}

.btn {
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

#txtRisultato {
    font-size: 1.8rem;
    margin-top: 20px;
    margin-bottom: 15px;
    text-align: center;
    min-height: 50px;
    font-weight: 600;
    animation: fadeIn 0.5s ease-in-out;
}

#txtRisultato.win {
    color: var(--bs-success);
}

#txtRisultato.lose {
    color: var(--bs-danger);
}

#txtRisultato.draw {
    color: var(--bs-warning);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.computer-choice.shake {
    animation: shake 0.5s;
}

/* Modal Styling */
.modal-content {
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
    border: 1px solid var(--bs-border-color);
    border-radius: 1rem;
}

.modal-header {
    border-bottom: 1px solid var(--bs-border-color);
}

.modal-footer {
    border-top: 1px solid var(--bs-border-color);
}

/* Responsive */
@media (max-width: 576px) {
    h1 {
        font-size: 2rem;
    }
    
    .big {
        width: 120px;
        height: 160px;
    }
    
    .small {
        width: 60px;
        height: 60px;
    }
    
    .score-board {
        gap: 10px;
    }
    
    .score-item {
        min-width: 80px;
        padding: 12px 15px;
    }
    
    .score-value {
        font-size: 1.5rem;
    }
}