body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #0d1117;
    color: #c9d1d9;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    overflow: auto;
}

.contenedor {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem;
    border-radius: 1rem;
    background-color: #161b22;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 600px;
    text-align: center;
    transform: scale(0.95);
    transition: transform 0.3s ease-out;
}

@media (min-width: 768px) {
    .contenedor {
        transform: scale(1);
    }
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(66, 153, 225, 0.4);
    margin-bottom: 2rem;
}

.subtitulo {
    font-size: 1.25rem;
    font-weight: 400;
    color: #a0aec0;
    margin-top: -1.5rem;
    margin-bottom: 2rem;
}

.menu-item, .juego-button {
    width: auto;
    padding: 1rem 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
    background-color: #4299e1;
    color: white;
    border-radius: 0.5rem;
    transition: transform 0.2s, background-color 0.2s, box-shadow 0.2s;
    cursor: pointer;
    border: none;
    text-align: center;
    box-shadow: 0 4px 15px rgba(66, 153, 225, 0.4);
    margin-left: auto;
    margin-right: auto;
}

.menu-item:hover, .juego-button:hover {
    background-color: #2b6cb0;
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(66, 153, 225, 0.6);
}

.menu-item:active, .juego-button:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(66, 153, 225, 0.4);
}

canvas {
    background-color: #010409;
    border: 2px solid #30363d;
    border-radius: 0.5rem;
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.1), 0 0 20px rgba(66, 153, 225, 0.2);
    transition: all 0.3s ease;
}

#pong-preview-canvas {
    border: 1px solid #30363d;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
    box-shadow: inset 0 0 5px rgba(255, 255, 255, 0.1);
    background-color: #010409;
}

.oculto {
    display: none;
}

.opciones-contenedor {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem;
    border: 1px solid #30363d;
    border-radius: 0.5rem;
    margin-top: 1.5rem;
    background-color: #0d1117;
}

@media (min-width: 640px) {
    .opciones-contenedor {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
    }
}

.opciones-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.controles-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.controles-input {
    width: 8rem;
    text-align: center;
    background-color: #21262d;
    border: 1px solid #484f58;
    color: #c9d1d9;
    border-radius: 0.25rem;
    padding: 0.5rem;
    text-transform: capitalize;
    transition: background-color 0.2s;
}

.controles-input:focus {
    background-color: #30363d;
    outline: none;
    border-color: #4299e1;
}

.info-mensaje {
    text-align: center;
    color: #a0aec0;
    font-size: 1rem;
    margin-top: 1.5rem;
    transition: opacity 0.3s ease;
}

.score-display {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #4299e1;
    text-shadow: 0 0 10px rgba(66, 153, 225, 0.6);
}

.score-display span {
    width: 5rem;
    text-align: center;
}

.juego-over-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20;
    flex-direction: column;
    gap: 2rem;
    animation: fadeIn 0.5s ease-out forwards;
}

.juego-over-content {
    background-color: #161b22;
    padding: 3rem;
    border-radius: 1rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: scaleIn 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.juego-over-title {
    font-size: 3.5rem;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(66, 153, 225, 0.4);
    margin-bottom: 1rem;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { transform: scale(0.8); }
    to { transform: scale(1); }
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.gap-4 {
    gap: 1rem;
}

.items-center {
    align-items: center;
}

.w-full {
    width: 100%;
}

.p-2 {
    padding: 0.5rem;
}

.rounded-md {
    border-radius: 0.375rem;
}

.bg-gray-700 {
    background-color: rgb(55 65 81);
}

.text-white {
    color: white;
}

.border {
    border-width: 1px;
}

.border-gray-600 {
    border-color: rgb(75 85 99);
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.font-semibold {
    font-weight: 600;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-1-5 {
    margin-top: 1.5rem;
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.font-bold {
    font-weight: 700;
}