*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', 'sans-serif';
}

.hero{
    width: 100vw;
    min-height: 100vh;
    background-image: url("../images/background.jpg");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.reset-button{
    width: 30%;
    padding: 12px 12px;
    align-content: center;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    margin-bottom: 20px;
    text-align: center;
}


.reset-button-primary {
    background: #804811;
    color: #ffffff;
    box-shadow: 0 4px 12px rgb(64, 41, 20);
    text-decoration: none;
}

.reset-button-primary:hover {
    background: #af4b06;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(154, 35, 5, 0.4);
}

.reset-button-primary:active{
    transform: translateY(0);
}

.legal-move {
    fill: #F7B440;
    opacity: 80%;
}

#chess-container {
    width: min(100vw, 90vh);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}


#chess-container > div {
    width: 100%;
    display: flex;
    justify-content: center;
}

#chess-container svg {
    width: 100% !important;
    height: auto !important;
    max-width: 100%;
    display: block;
}

#promotion-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
}
.hidden {
    display: none !important;
}

#promotion-container{

    display: none;
    position: relative;
    align-self: center;
    justify-self: center;
    background: #ffffff;
    border: 2px solid #333;
    padding: 10px;
}

#promotion-container a {
    align-items: center;
    justify-content: center;
}

#promotion-container button {
    width: 120px;
    height: 120px;
    padding: 15px;
    cursor: pointer;
    background: #e0e0e0;
    border: 1px solid #ccc;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#promotion-container button svg {
    width: 100%;
    height: 100%;
    display: block;
}



.game-over-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}


.game-over-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}


.game-over-card {
    background: linear-gradient(145deg, #1b120a, #834f31);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 32px 40px;
    width: 90%;
    max-width: 380px;
    text-align: center;
    transform: scale(0.9);
    animation: popIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popIn {
    to {
        transform: scale(1);
    }
}

.trophy-icon {
    font-size: 3rem;
    margin-bottom: 8px;
    filter: drop-shadow(0 4px 10px rgba(255, 195, 0, 0.4));
}


.game-over-title {
    color: #f8fafc;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 6px 0;
}

.game-over-subtitle {
    color: #94a3b8;
    font-size: 1rem;
    margin: 0 0 24px 0;
}


.game-over-stats {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.stat-box {
    flex: 1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    color: #cbd4dd;
    font-size: 0.75rem;
    font-weight: 600;
}

.stat-value {
    color: #ffc500;
    font-size: 1.1rem;
    font-weight: 700;
}

.game-over-actions {
    display: flex;
    justify-content: center;
}

.btn {
    width: 100%;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.btn-primary {
    background: #9e7907;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(216, 132, 8, 0.3);
    text-decoration: none;
}

.btn-primary:hover {
    background: #ffc600;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(182, 155, 7, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}