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

body {
    font-family: 'Orbitron', sans-serif;
    background: #0a0a0a;
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

.background-effect {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(10, 10, 10, 0.8), rgba(0, 0, 0, 1));
    z-index: -1;
    animation: glow 6s infinite alternate;
}

@keyframes glow {
    0% {
        box-shadow: 0 0 50px rgba(0, 191, 255, 0.1);
    }
    100% {
        box-shadow: 0 0 100px rgba(0, 191, 255, 0.3);
    }
}

.container {
    max-width: 800px;
    width: 95%;
    padding: 20px;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.game-header h1 {
    font-size: 2.5rem;
    text-shadow: 0 0 20px #00bfff;
    flex: 1;
    text-align: center;
}

.orange {
    color: #ff6811;
    text-shadow: 0 0 10px #ff6811;
}

.blue {
    color: #00bfff;
    text-shadow: 0 0 10px #00bfff;
}

.btn-back {
    padding: 10px 20px;
    background: rgba(255, 104, 17, 0.2);
    border: 2px solid #ff6811;
    color: #ff6811;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s;
    font-family: 'Orbitron', sans-serif;
}

.btn-back:hover {
    background: #ff6811;
    color: #0a0a0a;
    transform: scale(1.05);
}

.stats {
    display: flex;
    gap: 20px;
}

.stat-item {
    background: rgba(0, 191, 255, 0.1);
    border: 2px solid #00bfff;
    padding: 10px 15px;
    border-radius: 5px;
}

.stat-label {
    color: #00bfff;
    font-size: 0.9rem;
}

.stat-value {
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: bold;
    margin-left: 5px;
}

.game-info {
    text-align: center;
    margin-bottom: 20px;
    color: #00bfff;
    font-family: 'Roboto', sans-serif;
}

.game-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 30px;
    perspective: 1000px;
}

.card {
    aspect-ratio: 1;
    background: rgba(20, 20, 20, 0.9);
    border: 2px solid #00bfff;
    border-radius: 10px;
    cursor: pointer;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

.card:hover {
    box-shadow: 0 0 15px #00bfff;
}

.card.flipped {
    transform: rotateY(180deg);
}

.card.matched {
    border-color: #ff6811;
    box-shadow: 0 0 20px #ff6811;
    animation: matchPulse 0.5s;
}

@keyframes matchPulse {
    0%, 100% {
        transform: scale(1) rotateY(180deg);
    }
    50% {
        transform: scale(1.1) rotateY(180deg);
    }
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
}

.card-front {
    background: linear-gradient(135deg, #1a1a1a, #0a0a0a);
    font-size: 2rem;
}

.card-back {
    background: linear-gradient(135deg, #00bfff, #008fcc);
    transform: rotateY(180deg);
    font-size: 3rem;
}

.game-controls {
    text-align: center;
}

.btn-game {
    padding: 15px 30px;
    background: #00bfff;
    color: #0a0a0a;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-family: 'Orbitron', sans-serif;
    cursor: pointer;
    transition: all 0.3s;
    margin: 5px;
}

.btn-game:hover {
    background: #008fcc;
    transform: scale(1.05);
}

.btn-secondary {
    background: rgba(255, 104, 17, 0.8);
    color: #ffffff;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary:hover {
    background: #ff6811;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a1a, #0a0a0a);
    border: 3px solid #00bfff;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 0 50px rgba(0, 191, 255, 0.5);
    animation: modalAppear 0.5s;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-content h2 {
    color: #ff6811;
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-shadow: 0 0 20px #ff6811;
}

.victory-stats {
    margin: 30px 0;
    padding: 20px;
    background: rgba(0, 191, 255, 0.1);
    border-radius: 10px;
}

.victory-stats p {
    font-size: 1.2rem;
    margin: 10px 0;
    color: #00bfff;
}

/* Responsividade */
@media (max-width: 768px) {
    .game-header {
        flex-direction: column;
        text-align: center;
    }

    .game-header h1 {
        font-size: 2rem;
    }

    .stats {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .stat-item {
        width: 100%;
    }

    .game-board {
        gap: 10px;
    }

    .card-back {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .game-board {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    .card-back {
        font-size: 1.5rem;
    }

    .game-header h1 {
        font-size: 1.5rem;
    }
}

