body {
    margin: 0;
    padding: 0;
    font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #ccc 0%, #f5f5f5 100%);
}

header {
    padding: 20px;
    background: linear-gradient(to right, rgb(87, 92, 237), rgba(106, 0, 255, 0.719));
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    color: white;
}

.banner h1 {
    margin: 0 0 10px 10px;
    color: white;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    margin: 10px 0;
    padding: 0;
    flex-wrap: wrap;
    gap: 20px;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 800;
}

nav a:hover {
    color: #ffd700;
}

main.game-page {
    flex: 1;
    display: grid;
    place-items: center;
    padding: 30px 15px;
}

.game-card {
    width: min(90vw, 420px);
    padding: 25px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    text-align: center;
}

.game-card h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
}

.board {
    display: grid;
    grid-template-columns: repeat(3, 100px);
    grid-template-rows: repeat(3, 100px);
    gap: 12px;
    justify-content: center;
}

.mensaje-container {
    position: relative;
    margin-bottom: 16px;
    display: inline-block;
}

.mensaje {
    margin: 0;
    font-weight: 700;
    color: #4b5563;
}

.controls {
    margin-bottom: 20px;
}

.start-button {
    background: #4f46e5;
    color: white;
    border: none;
    border-radius: 999px;
    padding: 12px 24px;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.start-button:hover {
    transform: translateY(-1px);
    background: #4338ca;
}

.start-button.active {
    background: #0f766e;
}

.confeti {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 14px;
    border-radius: 2px;
    pointer-events: none;
    animation: confetiFall 1s ease-out forwards;
}

.cell {
    display: grid;
    place-items: center;
    background: #f1f5f9;
    border-radius: 16px;
    font-size: 3rem;
    font-weight: 700;
    border: 2px solid #cbd5e1;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cell:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.12);
}

.cell.win {
    animation: pulseWin 0.8s ease-in-out infinite alternate;
    background: #fef3c7;
    border-color: #f59e0b;
}

.x {
    color: #2563eb;
}

.o {
    color: #dc2626;
}

@keyframes pulseWin {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.05);
    }
}

.site-footer {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
    background: linear-gradient(to right, rgb(87, 92, 237), rgba(106, 0, 255, 0.719));
    color: white;
    margin-top: 20px;
}

.site-footer a {
    color: white;
    text-decoration: none;
    font-weight: 700;
}

.site-footer a:hover {
    color: #ffd700;
}

@keyframes confetiFall {
    0% {
        transform: translate(-50%, -50%) rotate(0deg) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--x), var(--y)) rotate(720deg) scale(0.2);
        opacity: 0;
    }
}
