:root {
    --square-size: 80px;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f0f0f0;
}

/* Ajustes específicos para mobile */
@media (max-width: 480px) {
    body {
        align-items: flex-start;
        padding-top: 10px;
    }
}

.game-container {
    text-align: center;
    max-width: 1200px;
    width: 100%;
    background-color: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

h1 {
    color: #333;
    margin-bottom: 20px;
}

/* Menu de jogo */
.game-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

.game-menu h2 {
    color: #555;
    margin-bottom: 20px;
}

.menu-button {
    background: linear-gradient(to bottom right, #6a11cb, #2575fc);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 15px 30px;
    margin: 10px;
    font-size: 18px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    width: 280px;
}

.menu-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.menu-button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.menu-button.secondary {
    background: linear-gradient(to bottom right, #757575, #424242);
}

.menu-button.secondary:hover {
    background: linear-gradient(to bottom right, #616161, #212121);
}

/* Seletor de dificuldade */
.difficulty-selector {
    margin-top: 30px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.difficulty-selector h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 18px;
}

.difficulty-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.difficulty-btn {
    padding: 12px 16px;
    border: 2px solid #ddd;
    background-color: white;
    color: #333;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.difficulty-btn:hover {
    border-color: #2575fc;
    background-color: #f0f8ff;
    transform: translateY(-2px);
}

.difficulty-btn.active {
    background: linear-gradient(to bottom right, #6a11cb, #2575fc);
    color: white;
    border-color: #2575fc;
}

.difficulty-btn.active:hover {
    background: linear-gradient(to bottom right, #5a0fb7, #1e6bfc);
}

/* Responsividade para o seletor de dificuldade */
@media (max-width: 480px) {
    .difficulty-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .difficulty-btn {
        padding: 10px 12px;
        font-size: 12px;
    }

    .difficulty-selector {
        padding: 15px;
        margin-top: 20px;
    }

    .difficulty-selector h3 {
        font-size: 16px;
        margin-bottom: 15px;
    }
}

.game-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    background-color: #f9f9f9;
    padding: 10px;
    border-radius: 5px;
}

.current-player,
.game-mode {
    font-size: 16px;
    font-weight: bold;
}

/* Centralizador para o indicador de jogador em modo dois jogadores */
.center-player-indicator {
    text-align: center;
    width: 100%;
    font-size: 22px;
    font-weight: bold;
    padding: 15px 0;
    background-color: #f0f0f0;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

/* Estilo comum para os indicadores no modo computador */
.computer-mode-indicator,
.computer-player-indicator {
    font-size: 18px;
    font-weight: bold;
    padding: 8px 12px;
    background-color: #f0f0f0;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin: 0 5px;
}

.hide-mode-indicator {
    display: none;
}

#player-indicator,
#mode-text {
    transition: color 0.3s ease;
}

#mode-text {
    color: #2575fc;
}

/* Estilo do tabuleiro */
.chessboard-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    position: relative;
    padding: 20px;
}

.captured-pieces {
    width: 180px;
    min-height: 640px;
    padding: 20px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.captured-pieces h3 {
    margin: 0 0 15px 0;
    color: #555;
    font-size: 16px;
    text-align: center;
}

.captured-pieces .piece {
    width: 40px;
    height: 40px;
    margin: 5px;
    transition: transform 0.3s ease;
}

.chessboard {
    display: grid;
    grid-template-columns: repeat(8, var(--square-size));
    grid-template-rows: repeat(8, var(--square-size));
    gap: 0;
    border: 3px solid #333;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    position: relative;
}

.chessboard div {
    width: var(--square-size);
    height: var(--square-size);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.chessboard div:hover {
    opacity: 0.8;
}

.light-square {
    background-color: #f0d9b5;
}

.dark-square {
    background-color: #b58863;
}

.controls {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.controls button {
    padding: 10px 20px;
    margin: 5px 10px;
    font-size: 16px;
    cursor: pointer;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.controls button:hover {
    background-color: #45a049;
}

#back-to-menu {
    background-color: #f44336;
}

#back-to-menu:hover {
    background-color: #d32f2f;
}

#toggle-player {
    background-color: #2196F3;
}

#toggle-player:hover {
    background-color: #0b7dda;
}

#invert-colors {
    background-color: #9C27B0;
    font-size: 20px;
    padding: 8px 16px;
}

#invert-colors:hover {
    background-color: #7B1FA2;
}

#toggle-sound {
    background-color: #424242;
    font-size: 20px;
    padding: 8px 16px;
    position: relative;
}

#toggle-sound:hover {
    background-color: #212121;
}

#toggle-sound.muted::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 70%;
    background-color: #FF5252;
    transform: rotate(45deg);
    top: 15%;
    left: 0;
    right: 0;
    margin: 0 auto;
}

.piece {
    width: 70px;
    height: 70px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: all 0.3s ease;
}

/* Rotação das peças pretas no modo dois jogadores */
.two-player-mode .piece.black-piece {
    transform: rotate(180deg);
}

/* Garante que a animação do rei em xeque funcione mesmo com rotação */
.two-player-mode .piece.black-piece.king-in-check {
    transform: rotate(180deg) scale(1);
}

/* Ajusta as animações para peças rotacionadas */
.two-player-mode .piece.black-piece.king-in-check {
    animation: check-blink-rotated 0.7s infinite ease-in-out;
}

@keyframes check-blink-rotated {

    0%,
    100% {
        filter: brightness(1) drop-shadow(0 0 0 transparent);
        transform: rotate(180deg) scale(1);
        box-shadow: 0 0 0 0 rgba(255, 0, 0, 0);
    }

    25% {
        filter: brightness(1.3) drop-shadow(0 0 5px rgba(255, 0, 0, 0.6));
        transform: rotate(180deg) scale(1.08);
        box-shadow: 0 0 10px 2px rgba(255, 0, 0, 0.4);
    }

    50% {
        filter: brightness(1.5) drop-shadow(0 0 8px rgba(255, 50, 50, 0.8));
        transform: rotate(180deg) scale(1.15);
        box-shadow: 0 0 15px 3px rgba(255, 0, 0, 0.6);
    }

    75% {
        filter: brightness(1.3) drop-shadow(0 0 5px rgba(255, 0, 0, 0.6));
        transform: rotate(180deg) scale(1.08);
        box-shadow: 0 0 10px 2px rgba(255, 0, 0, 0.4);
    }
}

/* Animação de destaque neon aprimorada */
@keyframes neon-pulse {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(170, 0, 255, 0.7),
            0 0 10px rgba(170, 0, 255, 0.7),
            0 0 15px rgba(170, 0, 255, 0.5),
            inset 0 0 5px rgba(170, 0, 255, 0.5);
    }

    50% {
        box-shadow: 0 0 10px rgba(170, 0, 255, 0.9),
            0 0 20px rgba(170, 0, 255, 0.9),
            0 0 30px rgba(170, 0, 255, 0.7),
            inset 0 0 10px rgba(170, 0, 255, 0.7);
    }
}

.neon-highlight {
    position: relative;
    animation: neon-pulse 1.5s infinite ease-in-out;
    background-color: rgba(170, 0, 255, 0.15) !important;
    box-sizing: border-box;
    z-index: 1;
}

/* Coordenadas do tabuleiro */
.coordinate {
    position: absolute;
    font-size: 14px;
    font-weight: bold;
    color: #555;
    pointer-events: none;
}

.file-coord {
    bottom: -25px;
    transform: translateX(-50%);
}

.rank-coord {
    left: -25px;
    transform: translateY(-50%);
}

/* Destaque para a peça selecionada */
.selected {
    box-shadow: inset 0 0 0 4px rgba(255, 255, 0, 0.8);
    background-color: rgba(255, 255, 0, 0.3) !important;
}

/* Destaque para o quadrado do rei em xeque */
.square-king-in-check {
    background-color: rgba(255, 0, 0, 0.25) !important;
    animation: square-danger-flash 0.7s infinite ease-in-out;
    border: 2px solid rgba(255, 0, 0, 0.6) !important;
    box-sizing: border-box;
}

@keyframes square-danger-flash {

    0%,
    100% {
        background-color: rgba(255, 0, 0, 0.15) !important;
        border-color: rgba(255, 0, 0, 0.5) !important;
    }

    50% {
        background-color: rgba(255, 0, 0, 0.4) !important;
        border-color: rgba(255, 0, 0, 0.8) !important;
    }
}

/* Efeito suavizado no mobile */
@media (max-width: 480px) {
    .square-king-in-check {
        border-width: 2px !important;
    }

    @keyframes square-danger-flash {

        0%,
        100% {
            background-color: rgba(255, 0, 0, 0.2) !important;
            border-color: rgba(255, 0, 0, 0.6) !important;
        }

        50% {
            background-color: rgba(255, 0, 0, 0.5) !important;
            border-color: rgba(255, 0, 0, 0.9) !important;
        }
    }
}

/* Responsividade para telas menores */
@media (max-width: 1200px) {
    .game-container {
        padding: 20px;
    }

    .chessboard-container {
        flex-direction: column;
        gap: 15px;
    }

    .captured-pieces {
        width: 100%;
        min-height: auto;
        padding: 10px;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .chessboard {
        grid-template-columns: repeat(8, 70px);
        grid-template-rows: repeat(8, 70px);
    }

    .chessboard div {
        width: 70px;
        height: 70px;
    }

    .piece {
        width: 65px;
        height: 65px;
    }

    .controls button {
        padding: 8px 16px;
        font-size: 14px;
    }
}

/* Responsividade para dispositivos móveis - tabuleiro maior */
@media (max-width: 480px) {
    h1 {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .game-container {
        padding: 2px;
        margin: 0;
        width: 100vw;
        max-width: 100vw;
        border-radius: 0;
        box-shadow: none;
    }

    .chessboard-container {
        padding: 2px;
        gap: 8px;
    }

    .chessboard {
        grid-template-columns: repeat(8, calc((100vw - 12px) / 8));
        grid-template-rows: repeat(8, calc((100vw - 12px) / 8));
        max-width: calc(100vw - 12px);
        width: calc(100vw - 12px);
        margin: 0 auto;
        border-width: 2px;
    }

    .chessboard div {
        width: calc((100vw - 12px) / 8);
        height: calc((100vw - 12px) / 8);
    }

    .piece {
        width: calc((100vw - 20px) / 8);
        height: calc((100vw - 20px) / 8);
        max-width: 50px;
        max-height: 50px;
    }

    .captured-pieces {
        width: 100%;
        min-height: auto;
        padding: 6px;
    }

    .captured-pieces h3 {
        font-size: 13px;
        margin-bottom: 6px;
    }

    .controls {
        margin-top: 12px;
    }

    .controls button {
        padding: 6px 10px;
        font-size: 12px;
        margin: 2px 4px;
    }

    .game-info {
        margin-bottom: 10px;
        padding: 6px;
        font-size: 14px;
    }
}

/* Para telas muito pequenas - maximizar completamente o tabuleiro */
@media (max-width: 400px) {
    .chessboard {
        grid-template-columns: repeat(8, calc((100vw - 8px) / 8));
        grid-template-rows: repeat(8, calc((100vw - 8px) / 8));
        max-width: calc(100vw - 8px);
        width: calc(100vw - 8px);
        border-width: 1px;
    }

    .chessboard div {
        width: calc((100vw - 8px) / 8);
        height: calc((100vw - 8px) / 8);
    }

    .piece {
        width: calc((100vw - 16px) / 8);
        height: calc((100vw - 16px) / 8);
        max-width: 48px;
        max-height: 48px;
    }

    .game-container {
        padding: 1px;
    }

    .chessboard-container {
        padding: 1px;
        gap: 6px;
    }

    h1 {
        font-size: 18px;
        margin-bottom: 8px;
    }

    .controls button {
        padding: 5px 8px;
        font-size: 11px;
        margin: 1px 3px;
    }
}

/* Para telas extremamente pequenas - máxima utilização do espaço */
@media (max-width: 350px) {
    .chessboard {
        grid-template-columns: repeat(8, calc((100vw - 6px) / 8));
        grid-template-rows: repeat(8, calc((100vw - 6px) / 8));
        max-width: calc(100vw - 6px);
        width: calc(100vw - 6px);
        border-width: 1px;
    }

    .chessboard div {
        width: calc((100vw - 6px) / 8);
        height: calc((100vw - 6px) / 8);
    }

    .piece {
        width: calc((100vw - 12px) / 8);
        height: calc((100vw - 12px) / 8);
        max-width: 45px;
        max-height: 45px;
    }

    .game-container {
        padding: 0px;
    }

    .chessboard-container {
        padding: 0px;
        gap: 4px;
    }

    h1 {
        font-size: 16px;
        margin-bottom: 6px;
    }

    .game-info {
        padding: 4px;
        font-size: 12px;
        margin-bottom: 6px;
    }

    .captured-pieces h3 {
        font-size: 11px;
        margin-bottom: 4px;
    }

    .controls {
        margin-top: 8px;
    }

    .controls button {
        padding: 4px 6px;
        font-size: 10px;
        margin: 1px 2px;
    }
}

/* Mensagem de fim de jogo - Nova versão com prêmios */
.game-over-message {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.5s ease-in-out;
    padding: 20px;
    box-sizing: border-box;
}

/* Responsividade da mensagem de fim de jogo para dispositivos móveis */
@media (max-width: 768px) {
    .game-over-message {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .game-over-message {
        font-size: 24px;
        padding: 5px;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Sistema de notificação personalizado */
.custom-alert {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 20px 30px;
    border-radius: 10px;
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    z-index: 2000;
    max-width: 90%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.3s ease-in-out;
}

.custom-alert.checkmate {
    background-color: rgba(244, 67, 54, 0.95);
    padding: 25px 35px;
    font-size: 28px;
}

.custom-alert.check {
    background-color: rgba(255, 152, 0, 0.95);
}

.custom-alert-button {
    display: block;
    margin: 20px auto 0;
    padding: 10px 20px;
    background-color: white;
    color: black;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
}

/* Responsividade para o sistema de notificação */
@media (max-width: 768px) {
    .custom-alert {
        font-size: 22px;
        padding: 20px 25px;
        width: 80%;
    }

    .custom-alert.checkmate {
        font-size: 24px;
    }

    .custom-alert-button {
        padding: 12px 20px;
        font-size: 20px;
        margin-top: 15px;
    }
}

/* Animação de destaque para rei em xeque - efeito suavizado */
@keyframes check-blink {

    0%,
    100% {
        filter: brightness(1) drop-shadow(0 0 0 transparent);
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 0, 0, 0);
    }

    25% {
        filter: brightness(1.3) drop-shadow(0 0 5px rgba(255, 0, 0, 0.6));
        transform: scale(1.08);
        box-shadow: 0 0 10px 2px rgba(255, 0, 0, 0.4);
    }

    50% {
        filter: brightness(1.5) drop-shadow(0 0 8px rgba(255, 50, 50, 0.8));
        transform: scale(1.15);
        box-shadow: 0 0 15px 3px rgba(255, 0, 0, 0.6);
    }

    75% {
        filter: brightness(1.3) drop-shadow(0 0 5px rgba(255, 0, 0, 0.6));
        transform: scale(1.08);
        box-shadow: 0 0 10px 2px rgba(255, 0, 0, 0.4);
    }
}

.king-in-check {
    animation: check-blink 0.7s infinite ease-in-out;
    position: relative;
    z-index: 10;
    border-radius: 50%;
}

/* Efeito adicional para o quadrado do rei em xeque */
.king-in-check::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: radial-gradient(circle, rgba(255, 0, 0, 0.2) 0%, rgba(255, 0, 0, 0.05) 50%, transparent 100%);
    border-radius: 50%;
    z-index: -1;
    animation: danger-pulse 0.7s infinite ease-in-out;
}

@keyframes danger-pulse {

    0%,
    100% {
        opacity: 0.2;
        transform: scale(0.95);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.05);
    }
}

/* Melhorias específicas para mobile */
@media (max-width: 480px) {
    .king-in-check {
        animation: check-blink 0.6s infinite ease-in-out;
    }

    @keyframes check-blink {

        0%,
        100% {
            filter: brightness(1) drop-shadow(0 0 0 transparent);
            transform: scale(1);
            box-shadow: 0 0 0 0 rgba(255, 0, 0, 0);
        }

        25% {
            filter: brightness(1.4) drop-shadow(0 0 4px rgba(255, 0, 0, 0.7));
            transform: scale(1.12);
            box-shadow: 0 0 8px 2px rgba(255, 0, 0, 0.5);
        }

        50% {
            filter: brightness(1.6) drop-shadow(0 0 6px rgba(255, 30, 30, 0.8));
            transform: scale(1.2);
            box-shadow: 0 0 12px 3px rgba(255, 0, 0, 0.7);
        }

        75% {
            filter: brightness(1.4) drop-shadow(0 0 4px rgba(255, 0, 0, 0.7));
            transform: scale(1.12);
            box-shadow: 0 0 8px 2px rgba(255, 0, 0, 0.5);
        }
    }

    /* Animação para peças pretas rotacionadas no mobile */
    .two-player-mode .piece.black-piece.king-in-check {
        animation: check-blink-rotated-mobile 0.6s infinite ease-in-out;
    }

    @keyframes check-blink-rotated-mobile {

        0%,
        100% {
            filter: brightness(1) drop-shadow(0 0 0 transparent);
            transform: rotate(180deg) scale(1);
            box-shadow: 0 0 0 0 rgba(255, 0, 0, 0);
        }

        25% {
            filter: brightness(1.4) drop-shadow(0 0 4px rgba(255, 0, 0, 0.7));
            transform: rotate(180deg) scale(1.12);
            box-shadow: 0 0 8px 2px rgba(255, 0, 0, 0.5);
        }

        50% {
            filter: brightness(1.6) drop-shadow(0 0 6px rgba(255, 30, 30, 0.8));
            transform: rotate(180deg) scale(1.2);
            box-shadow: 0 0 12px 3px rgba(255, 0, 0, 0.7);
        }

        75% {
            filter: brightness(1.4) drop-shadow(0 0 4px rgba(255, 0, 0, 0.7));
            transform: rotate(180deg) scale(1.12);
            box-shadow: 0 0 8px 2px rgba(255, 0, 0, 0.5);
        }
    }
}

/* Animação de pulsação para o indicador de jogador atual */
@keyframes player-pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

.player-turn-pulse {
    animation: player-pulse 1.2s infinite ease-in-out;
    border: 2px solid transparent;
    border-radius: 8px;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
}

/*
 Estilos para o diálogo de promoção */
#promotion-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.7) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 10000 !important;
}

#promotion-overlay>div {
    background: white !important;
    padding: 30px 20px !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    max-width: 90vw !important;
}

#promotion-overlay h3 {
    margin: 0 0 20px 0 !important;
    color: #333 !important;
    font-size: 18px !important;
    text-align: center !important;
}

#promotion-overlay button {
    background: none !important;
    border: 2px solid #ddd !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    padding: 10px !important;
    transition: all 0.2s ease !important;
}

#promotion-overlay button:hover {
    border-color: #2575fc !important;
    transform: scale(1.1) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

#promotion-overlay img {
    width: 60px !important;
    height: 60px !important;
    display: block !important;
}

/* Responsividade para o diálogo de promoção */
@media (max-width: 480px) {
    #promotion-overlay>div {
        padding: 20px 15px !important;
    }

    #promotion-overlay h3 {
        font-size: 16px !important;
        margin-bottom: 15px !important;
    }

    #promotion-overlay img {
        width: 50px !important;
        height: 50px !important;
    }

    #promotion-overlay button {
        padding: 8px !important;
    }
}

/* S
istema de Medalhas e Troféus */
.victory-medal,
.victory-trophy {
    width: 80px;
    height: 80px;
    margin-left: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    position: relative;
    animation: medalPulse 2s infinite ease-in-out;
}

/* Medalhas */
.medal-bronze {
    background: linear-gradient(135deg, #CD7F32, #8B4513, #CD7F32);
    border: 3px solid #8B4513;
    box-shadow: 0 0 20px rgba(205, 127, 50, 0.6);
}

.medal-silver {
    background: linear-gradient(135deg, #C0C0C0, #808080, #C0C0C0);
    border: 3px solid #808080;
    box-shadow: 0 0 20px rgba(192, 192, 192, 0.6);
}

.medal-gold {
    background: linear-gradient(135deg, #FFD700, #FFA500, #FFD700);
    border: 3px solid #FFA500;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
}

/* Troféus */
.trophy-bronze {
    background: linear-gradient(135deg, #CD7F32, #8B4513);
    border: 3px solid #8B4513;
    border-radius: 15px 15px 50% 50%;
    box-shadow: 0 0 25px rgba(205, 127, 50, 0.7);
}

.trophy-silver {
    background: linear-gradient(135deg, #C0C0C0, #808080);
    border: 3px solid #808080;
    border-radius: 15px 15px 50% 50%;
    box-shadow: 0 0 25px rgba(192, 192, 192, 0.7);
}

.trophy-gold {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border: 3px solid #FFA500;
    border-radius: 15px 15px 50% 50%;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.9);
    animation: goldTrophyPulse 1.5s infinite ease-in-out;
}

/* Ícones dentro das medalhas e troféus */
.victory-medal::before,
.victory-trophy::before {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.medal-bronze::before,
.medal-silver::before,
.medal-gold::before {
    content: '🏅';
    font-size: 35px;
}

.trophy-bronze::before,
.trophy-silver::before,
.trophy-gold::before {
    content: '🏆';
    font-size: 35px;
}

/* Animações */
@keyframes medalPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.9;
    }

    50% {
        transform: scale(1.05);
        opacity: 1;
    }
}

@keyframes goldTrophyPulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 30px rgba(255, 215, 0, 0.9);
    }

    50% {
        transform: scale(1.1);
        box-shadow: 0 0 40px rgba(255, 215, 0, 1), 0 0 60px rgba(255, 215, 0, 0.5);
    }
}

/* Container da mensagem de vitória com prêmio */
.victory-message-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.95), rgba(56, 142, 60, 0.95));
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 90vw;
    animation: victorySlideIn 0.8s ease-out;
}

.victory-message-text {
    flex: 1;
    color: white;
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.4;
}

.defeat-message-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.95), rgba(211, 47, 47, 0.95));
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 90vw;
    animation: defeatSlideIn 0.8s ease-out;
}

.defeat-message-text {
    color: white;
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.4;
}

@keyframes victorySlideIn {
    0% {
        transform: translateY(-50px) scale(0.8);
        opacity: 0;
    }

    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes defeatSlideIn {
    0% {
        transform: translateY(-50px) scale(0.8);
        opacity: 0;
    }

    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Responsividade para mobile */
@media (max-width: 480px) {

    .victory-medal,
    .victory-trophy {
        width: 60px;
        height: 60px;
        margin-left: 15px;
    }

    .medal-bronze::before,
    .medal-silver::before,
    .medal-gold::before,
    .trophy-bronze::before,
    .trophy-silver::before,
    .trophy-gold::before {
        font-size: 25px;
    }

    .victory-message-text,
    .defeat-message-text {
        font-size: 18px;
    }

    .victory-message-container,
    .defeat-message-container {
        gap: 15px;
        padding: 15px;
    }
}

/* Efeito
 de confete para troféu de ouro */
.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #FFD700;
    animation: confetti-fall 3s linear infinite;
}

.confetti:nth-child(odd) {
    background: #FF6B6B;
    animation-delay: -0.5s;
}

.confetti:nth-child(even) {
    background: #4ECDC4;
    animation-delay: -1s;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Efeito de brilho extra para troféu de ouro */
.trophy-gold::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: linear-gradient(45deg, transparent, rgba(255, 215, 0, 0.4), transparent);
    border-radius: inherit;
    animation: goldShine 2s linear infinite;
    z-index: -1;
}

@keyframes goldShine {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Efeito de estrelas para vitórias épicas */
.victory-stars {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.star {
    position: absolute;
    color: #FFD700;
    font-size: 20px;
    animation: starTwinkle 2s ease-in-out infinite;
}

@keyframes starTwinkle {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(0.8);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}