* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    font-size: 16px;
    position: relative;
    min-height: 100vh;
    padding-bottom: 180px; /* Espacio para los botones fijos */
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.section {
    display: none;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.section.active {
    display: block;
}

h1 {
    text-align: center;
    margin-bottom: 20px;
    color: #2c3e50;
}

h2 {
    color: #2c3e50;
    margin: 12px 0;
    font-size: 1.4rem;
    text-align: center;
}

/* Estilos para el consentimiento informado */
.consent-text {
    margin-bottom: 20px;
    text-align: justify;
}

.consent-text p {
    margin-bottom: 15px;
}

.consent-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

/* Estilos para formularios */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.radio-group, .checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-group label, .checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
}

input[type="text"],
input[type="number"],
select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

/* Estilos para botones */
.btn {
    padding: 12px 24px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #2980b9;
}

/* Centrado de botones de continuar/siguiente */
form .btn[type="submit"] {
    display: block;
    margin: 30px auto 10px;
    min-width: 150px;
}

/* Centrado del botón Entendido en la sección de explicación */
#start-game {
    display: block;
    margin: 30px auto 10px;
    min-width: 150px;
}

/* Estilos para el juego */
.game-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    padding: 10px;
    background-color: #ecf0f1;
    border-radius: 8px;
}

.score {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Botones de escritorio (ocultos en móvil) */
.desktop-buttons {
    display: none;
    flex-direction: row;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
}

/* Botones fijos para móvil */
.game-area {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 15px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.choice {
    text-align: center;
    width: calc(50% - 5px);
}

.choice-button {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 60px;
    border: none;
    border-radius: 10px;
    background-color: #3498db;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    margin: 0 auto;
}

.choice-button:hover {
    background-color: #2980b9;
    transform: scale(1.03);
}

.choice-button i {
    font-size: 22px;
    margin-right: 8px;
}

#cooperate .choice-button,
#cooperate-desktop .choice-button {
    background-color: #2ecc71;
}

#cooperate .choice-button:hover,
#cooperate-desktop .choice-button:hover {
    background-color: #27ae60;
}

#betray .choice-button,
#betray-desktop .choice-button {
    background-color: #e74c3c;
}

#betray .choice-button:hover,
#betray-desktop .choice-button:hover {
    background-color: #c0392b;
}

.results-table {
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 0.7rem;
    table-layout: fixed;
}

th, td {
    padding: 6px 2px;
    text-align: center;
    border: 1px solid #ddd;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

th:nth-child(1), td:nth-child(1) { width: 15%; }
th:nth-child(2), td:nth-child(2),
th:nth-child(3), td:nth-child(3) { width: 30%; }
th:nth-child(4), td:nth-child(4),
th:nth-child(5), td:nth-child(5) { width: 12.5%; }

th abbr {
    text-decoration: none;
}

th {
    background-color: #34495e;
    color: white;
    font-weight: normal;
}

tr:nth-child(even) {
    background-color: #f2f2f2;
}

tfoot tr {
    background-color: #ecf0f1;
    font-weight: bold;
    border-top: 2px solid #34495e;
}

tfoot td {
    padding: 8px 2px;
}

.cooperate-icon {
    color: #2ecc71;
}

.betray-icon {
    color: #e74c3c;
}

#game-over {
    text-align: center;
    background-color: rgba(44, 62, 80, 0.95);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 500px;
    z-index: 200;
}

#play-again {
    padding: 10px 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 15px;
}

#play-again:hover {
    background-color: #2980b9;
}

.hidden {
    display: none;
}

.highlight {
    animation: highlight 1s ease;
}

@keyframes highlight {
    0% { background-color: #f1c40f; }
    100% { background-color: inherit; }
}

/* Estilos para las instrucciones */
.instructions {
    margin-bottom: 20px;
    text-align: justify;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-left: 4px solid #3498db;
    border-radius: 6px;
    padding: 15px 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    font-size: 0.95rem;
    line-height: 1.7;
    color: #495057;
}

/* Estilos para el mensaje de agradecimiento */
.thank-you-message {
    text-align: center;
    margin-top: 20px;
}

.thank-you-message a {
    color: #3498db;
    text-decoration: none;
}

.thank-you-message a:hover {
    text-decoration: underline;
}

/* Media queries para tablets y escritorio */
@media (min-width: 768px) {
    body {
        padding-bottom: 0;
    }
    
    .container {
        padding: 30px;
    }
    
    .section {
        padding: 30px;
    }
    
    .form-group {
        margin-bottom: 25px;
    }
    
    .radio-group, .checkbox-group {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 20px;
    }
    
    .desktop-buttons {
        display: flex;
    }
    
    .game-area {
        display: none;
    }
    
    .desktop-buttons .choice {
        width: auto;
    }
    
    .desktop-buttons .choice-button {
        flex-direction: column;
        width: 150px;
        height: 150px;
    }
    
    .desktop-buttons .choice-button i {
        font-size: 48px;
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    table {
        font-size: 0.9rem;
        min-width: 0;
        table-layout: auto;
    }
    
    th, td {
        padding: 10px 8px;
        font-weight: normal;
        white-space: normal;
    }
    
    th {
        font-weight: bold;
    }
    
    tfoot td {
        padding: 12px 8px;
    }
    
    th:nth-child(1), td:nth-child(1),
    th:nth-child(2), td:nth-child(2),
    th:nth-child(3), td:nth-child(3),
    th:nth-child(4), td:nth-child(4),
    th:nth-child(5), td:nth-child(5) {
        width: auto;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 900px;
    }
    
    table {
        font-size: 1rem;
    }
    
    th, td {
        padding: 12px;
    }
}

/* Tooltip styles */
.tooltip-trigger {
    cursor: pointer;
    position: relative;
    display: inline-flex;
    align-items: center;
    color: #3498db;
    font-weight: bold;
    z-index: 100;
}

.tooltip-trigger i {
    margin-left: 5px;
}

.tooltip-content {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    padding: 15px;
    z-index: 1000;
    width: 280px;
    left: 0;
    transform: none;
    top: 30px;
    transition: opacity 0.3s, visibility 0.3s;
    pointer-events: none;
}

.tooltip-trigger:hover .tooltip-content {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.tooltip-text {
    display: block;
    line-height: 1.6;
}

.coop {
    color: #27ae60;
    font-weight: bold;
}

.betray {
    color: #e74c3c;
    font-weight: bold;
}

.mixed {
    font-weight: bold;
}

.coop-result {
    color: #27ae60;
    margin-left: 15px;
}

.betray-result {
    color: #e74c3c;
    margin-left: 15px;
}

/* Mobile-specific tooltip adjustments */
@media (max-width: 768px) {
    .tooltip-content {
        width: 250px;
        font-size: 14px;
        top: 25px;
        left: 50%;
        transform: translateX(-50%);
    }
    
    /* Force show class for mobile */
    .tooltip-content.show {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
    }
    
    /* Make sure the tooltip doesn't extend beyond screen edges */
    .game-info {
        position: relative;
    }
} 