body {
    background-color: #36393f;
    background-image: linear-gradient(to bottom, #2f3136, #36393f);
    color: #dcddde;
    min-height: 100vh;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.card {
    background: #2f3136;
    border: 1px solid rgba(32, 34, 37, 0.5);
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transform-origin: 50% 50%;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
}

.card * {
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.card:hover {
    background: #36393f;
    border-color: rgba(88, 101, 242, 0.3);
    transform: translateY(-1px);
}

.card.sortable-chosen {
    background: #36393f;
    border-color: #5865f2;
    transform: scale(1.02);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.card.sortable-ghost {
    opacity: 0.3;
    background: #36393f;
    border: 2px dashed #5865f2;
}

.handle {
    color: #72767d;
    cursor: grab;
    padding: 8px;
    border-radius: 4px;
    background: rgba(79, 84, 92, 0.2);
    pointer-events: auto !important;
    transition: all 0.15s ease;
}

.handle:hover {
    color: #5865f2;
    background: rgba(88, 101, 242, 0.1);
}

.handle:active {
    cursor: grabbing;
}

table td .rating-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.rating-container {
    display: flex;
    align-items: center;
    gap: 0.5rem; /* Espacio entre el círculo y el texto */
}

.rating-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.rating-1 { background: #ef4444; }
.rating-2 { background: #f59e0b; }
.rating-3 { background: #3b82f6; }
.rating-4 { background: #10b981; }

.modal {
    background: rgba(0, 0, 0, 0.85);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(4px);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #2f3136;
    transform: scale(0.95);
    transition: transform 0.2s ease;
    border: 1px solid rgba(32, 34, 37, 0.5);
    user-select: none;
}

.modal.active .modal-content {
    transform: scale(1);
}

.rating-btn {
    transition: all 0.2s ease;
    user-select: none;
    position: relative;
    overflow: hidden;
}

.rating-btn:hover {
    transform: translateY(-2px);
}

.rating-btn.selected {
    transform: none;
}

#bottomBar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 50; /* Por encima de otros elementos */
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.2);
}

#bottomBar button {
    transition: transform 0.2s ease, background-color 0.2s ease;
}

#bottomBar button:hover {
    transform: translateY(-2px); /* Efecto sutil al pasar el ratón */
}

select {
    background-color: #2f3136;
    color: #dcddde;
    border: 1px solid rgba(32, 34, 37, 0.5);
    padding: 0.5rem;
    border-radius: 0.375rem; /* Bordes redondeados */
    font-size: 1rem;
    appearance: none; /* Elimina los estilos predeterminados del navegador */
    outline: none; /* Elimina el borde al hacer foco */
}

select:focus {
    border-color: #5865f2; /* Cambia el color del borde al hacer foco */
    box-shadow: 0 0 0 2px rgba(88, 101, 242, 0.5); /* Añade un efecto de foco */
}

select::placeholder {
    color: #72767d; /* Placeholder más tenue */
}

select:hover {
    background-color: #36393f; /* Fondo más claro al pasar el mouse */
}

option {
    background-color: #2f3136; /* Fondo del menú desplegable */
    color: #dcddde; /* Texto del menú desplegable */
}

/* Tarjeta (info-card) */
.info-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden; /* Asegura que no haya desbordamiento */
    max-width: 100%; /* La tarjeta ocupa el ancho de su contenedor */
    display: flex;
    flex-direction: column;
    align-items: stretch; /* Asegura que los elementos internos ocupen todo el ancho */
    font-size: 0.9rem; /* Ajusta la fuente general de la tarjeta */
}

/* Tabla */
table {
    width: 100%; /* La tabla ocupa exactamente el ancho de la tarjeta */
    border-collapse: collapse;
    margin-top: 1rem;
    table-layout: fixed; /* Las columnas tienen un ancho fijo */
    font-size: 0.85rem; /* Reduce el tamaño de la fuente */
}

table th,
table td {
    padding: 0.5rem; /* Reduce el padding para optimizar espacio */
    border: 1px solid #e2e8f0; /* Bordes claros */
    text-align: center;
    vertical-align: middle;
}

table th {
    background-color: #5a67d8; /* Fondo morado */
    color: #ffffff; /* Texto blanco */
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem; /* Ajusta ligeramente el tamaño del texto */
}

table td {
    background-color: #f9fafb; /* Fondo claro */
    color: #4a5568; /* Texto gris oscuro */
    font-size: 0.85rem; /* Reduce el tamaño de la fuente en las celdas */
    padding: 0.5rem; /* Espaciado adecuado */
    border: 1px solid #e2e8f0; /* Bordes claros */
    vertical-align: middle; /* Alineación vertical */
    text-align: left; /* Alineación del texto a la izquierda */
}

table th:first-child,
table td:first-child {
    width: 16%; /* La primera columna ocupa el 25% del ancho total */
}

table th:not(:first-child),
table td:not(:first-child) {
    width: 42%; /* Las otras columnas comparten el resto del ancho */
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Manejo del desbordamiento */
.info-card table {
    overflow: hidden; /* Se asegura de que no haya scroll horizontal */
    white-space: normal; /* Permite el salto de línea en las celdas */
}

/* Spinner */
#spinner {
    margin: 1rem 0;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.text-green-500 {
    color: #48bb78; /* Verde atractivo */
}

.text-indigo-500 {
    color: #5a67d8; /* Morado atractivo */
}

/* Espaciado */
.hidden {
    display: none;
}

button.close-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: transparent;
    border: none;
    font-size: 1.25rem;
    color: #dcddde;
    cursor: pointer;
    transition: color 0.2s ease;
}

button.close-btn:hover {
    color: #ffffff;
}

@media (max-width: 768px) {
    #summaryTableContainer {
        padding: 1rem; /* Reduce el padding en dispositivos móviles */
    }
    #recommendationContainer {
        padding: 1rem; /* Reduce el padding en dispositivos móviles */
    }

    .info-card {
        padding: 1rem; /* Reduce el padding de las tarjetas */
    }

    table th,
    table td {
        padding: 0.25rem; /* Reduce el padding dentro de las celdas de la tabla */
        font-size: 0.75rem; /* Reduce el tamaño de la fuente */
    }
}

/* Estilo para el highlight */
.highlight {
    position: relative;
    z-index: 10;
    border: 3px solid #4f46e5;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(79, 70, 229, 0.5);
}

/* Estilo para el overlay oscuro */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9;
}

/* Tooltip para mostrar las instrucciones */
.tooltip {
    position: absolute;
    z-index: 100;
    max-width: 280px;
    background: #2f3136;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    font-size: 14px;
    color: rgba(156,163,175,1);
    text-align: center;
    transform: translateX(-10px);
}

.robot-emoji {
    font-size: 6rem;
    display: inline-block;
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

#parent-container {
    position: relative;
    width: 100%;
    height: 100vh;
}

#sanity-check {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);

    max-width: 600px;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
}