/* Estilos Gerais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a) fixed;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23222222' fill-opacity='0.4'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    color: #ffffff;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

/* Media Queries */
@media screen and (max-width: 768px) {
    body {
        padding: 5px;
    }

    .game-container {
        max-width: 100%;
        padding: 5px;
    }

    .game-table {
        width: min(95vw, 95vh);
        height: min(95vw, 95vh);
        padding: 10px;
        border-width: 10px;
    }

    .card {
        width: min(12vw, 40px);
        height: min(17vw, 60px);
    }

    .card-value {
        font-size: 18px;
    }

    .card-suit {
        font-size: 20px;
    }

    .player {
        padding: 5px;
    }

    .player-name {
        font-size: 14px;
        margin: 5px 0;
    }

    .player-cards {
        gap: 2px;
    }

    .table-center {
        width: 200px;
        height: 200px;
    }

    .card-played {
        width: 40px;
        height: 55px;
        margin: 5px;
        font-size: 20px;
    }

    .score-board {
        font-size: clamp(14px, 3.5vw, 20px);
        padding: clamp(8px, 2vw, 12px);
    }
}

/* Media Queries para telas muito pequenas */
@media screen and (max-width: 480px) {
    .game-table {
        width: min(98vw, 98vh);
        height: min(98vw, 98vh);
        padding: 5px;
        border-width: 8px;
    }

    .card {
        width: min(10vw, 35px);
        height: min(15vw, 50px);
    }

    .card-value {
        font-size: 16px;
    }

    .card-suit {
        font-size: 18px;
    }

    .player {
        padding: 3px;
    }

    .player-name {
        font-size: 12px;
        margin: 3px 0;
    }

    .player-cards {
        gap: 1px;
    }

    .table-center {
        width: 180px;
        height: 180px;
    }

    .card-played {
        width: 35px;
        height: 48px;
        margin: 3px;
        font-size: 18px;
    }

    .score-board {
        font-size: clamp(12px, 3vw, 18px);
        padding: clamp(6px, 1.5vw, 10px);
    }

    .game-btn {
        padding: clamp(6px, 1.5vw, 8px) clamp(12px, 2.5vw, 15px);
        font-size: clamp(12px, 2.5vw, 16px);
        min-width: 70px;
    }

    .action-buttons {
        gap: clamp(8px, 1.5vw, 15px);
        margin-top: 15px;
    }

    body {
        padding: 5px;
    }

    .game-container {
        max-width: 100%;
        padding: 5px;
    }

    .game-table {
        width: min(95vw, 95vh);
        height: min(95vw, 95vh);
        padding: 10px;
        border-width: 10px;
    }

    .card {
        width: min(12vw, 40px);
        height: min(17vw, 60px);
    }

    .card-value {
        font-size: 18px;
    }

    .card-suit {
        font-size: 20px;
    }

    .player {
        padding: 5px;
    }

    .player-name {
        font-size: 14px;
        margin: 5px 0;
    }

    .player-cards {
        gap: 2px;
    }

    .table-center {
        width: 200px;
        height: 200px;
    }

    .card-played {
        width: 40px;
        height: 55px;
        margin: 5px;
        font-size: 20px;
    }

    .score-board {
        font-size: clamp(14px, 3.5vw, 20px);
        padding: clamp(8px, 2vw, 12px);
    }
}

.start-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
  
    z-index: 1000;
}

.start-btn {
    padding: 15px 30px;
    font-size: 24px;
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
}

.start-btn:hover {
    background-color: #219a52;
    transform: scale(1.05);
}

.game-container {
    width: 100%;
    max-width: min(95vh, 500px);
    padding: 10px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100vh;
    justify-content: center;
}

/* Placar */
.score-board {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    font-size: clamp(18px, 4vw, 24px);
    background: linear-gradient(145deg, #2c1810 0%, #1a0d09 100%);
    padding: clamp(12px, 3vw, 15px);
    border-radius: 10px;
    width: 100%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid #3d231b;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Mesa de Jogo */
.game-table {
    background: radial-gradient(circle at center, #0b8a0b 0%, #006400 100%);
    background-image: url("data:image/svg+xml,%3Csvg width='70' height='70' viewBox='0 0 70 70' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23095709' fill-opacity='0.4'%3E%3Cpath d='M0 0h35v35H0zM35 35h35v35H35z'/%3E%3C/g%3E%3C/svg%3E"), radial-gradient(circle at center, #0b8a0b 0%, #006400 100%);
    border-radius: 50%;
    padding: 20px;
    position: relative;
    aspect-ratio: 1;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), inset 0 2px 10px rgba(255, 255, 255, 0.1);
    border: 15px solid #2c1810;
    width: min(85vh, 500px);
    height: min(85vh, 500px);
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

/* Áreas dos Jogadores */
.player {
    position: absolute;
    text-align: center;
    transition: all 0.3s ease;
    padding: 10px;
    border-radius: 15px;
}

.current-player {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
    transform: scale(1.05);
}

.player-name {
    color: #ffffff;
    font-size: 18px;
    margin: 10px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    font-weight: bold;
}

/* Posicionamento dos Jogadores */
.player-top {
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.player-bottom {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.player-left {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.player-right {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    top: 50%;
    transform: translateY(-50%);
}

/* Cartas */
.player-cards {
    display: flex;
    gap: 5px;
    padding: 5px;
    justify-content: center;
    flex-wrap: wrap;
}

.card {
    width: min(15vw, 50px);
    height: min(21vw, 70px);
    background: linear-gradient(145deg, #ffffff 0%, #f0f0f0 100%);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3), inset 0 1px 3px rgba(255, 255, 255, 0.9);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    font-size: clamp(12px, 3vw, 18px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    border: 2px solid #e0e0e0;
    color: #000000;
    backdrop-filter: blur(5px);
}

.card-red {
    color: #e74c3c;
}

.card-value {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
}

.card-suit {
    font-size: 28px;
}

.card-vira {
    border: 2px solid #f1c40f;
    box-shadow: 0 0 10px #f1c40f;
}

.my-cards .card:hover {
    transform: translateY(-10px);
}

.opponent-cards .card {
    background: #2c3e50;
}

/* Área Central */
.table-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.played-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 5px;
    padding: 5px;
    width: 130%;
    height: 130%;
    place-items: center;
}

/* Botões de Ação */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: clamp(10px, 2vw, 20px);
    margin-top: 20px;
    flex-wrap: wrap;
}

.game-btn {
    padding: clamp(8px, 2vw, 10px) clamp(15px, 3vw, 20px);
    font-size: clamp(14px, 3vw, 18px);
    border: 1px solid #ffd700;
    border-radius: 5px;
    background: linear-gradient(145deg, #d4af37 0%, #b8860b 100%);
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 80px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2), inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.game-btn:hover {
    transform: scale(1.05);
    background: linear-gradient(145deg, #ffd700 0%, #daa520 100%);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3), inset 0 1px 3px rgba(255, 255, 255, 0.4);
}

/* Modal de Fim de Jogo */
.game-over-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #2c3e50;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
}

/* Animações */
@keyframes cardPlay {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.card-played {
    width: 55px;
    height: 75px;
    margin: 10px;
    background: white;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.2s;
    position: relative;
    z-index: 1;
}

.audio-controls {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 1000;
    display: flex;
    gap: 10px;
}

.audio-control {
    padding: 8px 15px;
    border: none;
    border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.audio-control:hover {
    background-color: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.audio-control:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Animação para o ícone */
.audio-control span {
    display: inline-block;
    transition: transform 0.3s ease;
}

.audio-control:hover span {
    transform: scale(1.1);
}
