/* Estilos base */
body {
    margin: 0;
    padding: 20px;
    font-family: Arial, sans-serif;
    background: #f0f2f5;
}

/* Container y contenido principal */
.container {
    max-width: 900px;
    margin: 0 auto;
    background: #ffffff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.author {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-style: italic;
}

/* Controles */
.controls {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.input-group {
    display: flex;
    gap: 20px;
}

.input-controls {
    display: flex;
    gap: 1.5rem;
}

.input-with-icon {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.entity-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-weight: bold;
    color: white;
}

.human-icon {
    background: #0066cc;
}

.resource-icon {
    background: #cc0000;
}

.input-field input {
    border: none;
    outline: none;
    width: 60px;
    font-size: 1rem;
    padding: 0.25rem;
    text-align: center;
    border-bottom: 2px solid #eee;
    transition: all 0.3s ease;
}

.input-field input:focus {
    border-bottom-color: #3498db;
}

/* Botones de control */
.control-buttons {
    display: flex;
    gap: 1rem;
}

#startButton {
    background: #27ae60;
    font-weight: bold;
    padding: 10px 20px;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#startButton.pause-button {
    background: #f39c12;
}

#startButton.continue-button {
    background: #3498db;
}

#startButton:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39,174,96,0.2);
}

#finishButton {
    background: #e74c3c;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: none;
}

#finishButton.active {
    display: inline-flex;
}

#finishButton:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231,76,60,0.2);
}

/* Modo selector */
.mode-selector-container {
    text-align: center;
    margin: 20px 0 30px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

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

.mode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 10px;
}

.mode-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mode-card:not(.disabled):hover {
    transform: translateY(-5px);
    border-color: #3498db;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.mode-card.active {
    border-color: #27ae60;
    background: #f7fdf9;
}

.mode-card.disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.mode-icon {
    font-size: 2em;
    margin-bottom: 10px;
}

.mode-card h3 {
    color: #2c3e50;
    margin: 10px 0;
}

.mode-card p {
    color: #666;
    font-size: 0.9em;
    margin: 0;
}

/* Tooltip de validación */
.input-tooltip {
    position: absolute;
    background: #34495e;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    z-index: 1000;
    animation: fadeInOut 2s ease-in-out;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(-10px); }
    10% { opacity: 1; transform: translateY(0); }
    90% { opacity: 1; }
    100% { opacity: 0; }
}

/* Ajustes responsive */
@media (max-width: 768px) {
    .controls {
        flex-direction: column;
    }

    .input-controls {
        flex-direction: column;
    }

    .phase-system {
        flex-direction: column;
        gap: 1rem;
    }
}