body {
    background: #2c3e50;
    color: #ecf0f1;
    font-family: sans-serif;
    touch-action: none;
    margin: 0;
}
.game-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100vh;
    padding-top: 60px;
    box-sizing: border-box;
}
.header {
    width: 100%;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #34495e;
}
.board {
    display: grid;
    margin: 20px auto;
    gap: 2px;
    background: #34495e;
    padding: 5px;
    border-radius: 5px;
    touch-action: none;
}
.cell {
    background: #ecf0f1;
    border-radius: 4px;
    position: relative;
    cursor: pointer;
}
.dot {
    width: 60%;
    height: 60%;
    border-radius: 50%;
    position: absolute;
    top: 20%;
    left: 20%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.path {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    /* Path styling will be dynamic */
}
.overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.modal-content {
    background: #34495e;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    border: 2px solid #ecf0f1;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-width: 250px;
}
.hidden { display: none; }
button {
    padding: 10px 20px;
    background: #27ae60;
    border: none;
    color: white;
    font-size: 1rem;
    border-radius: 5px;
    cursor: pointer;
}

.status-bar {
    width: 90%;
    max-width: 500px;
    display: flex;
    justify-content: space-between;
    padding: 10px;
    margin-top: 10px;
    background: rgba(255,255,255,0.1);
    border-radius: 5px;
}
.action-btn {
    margin-top: 15px;
    background: #e74c3c;
}

.level-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 20px 0;
}

.level-grid button {
    padding: 15px;
    font-size: 1.2rem;
    background: #3498db;
    border-radius: 8px;
}

.level-grid button:hover {
    background: #2980b9;
}


/* Modal de Instrucciones */
.instructions-modal {
    max-width: 600px;
    padding: 40px 30px;
}

.instructions-modal h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #ecf0f1;
}

.game-subtitle {
    font-size: 1.1rem;
    color: #95a5a6;
    margin-bottom: 30px;
}

.instructions-section {
    background: rgba(52, 73, 94, 0.5);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
}

.instructions-section h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #3498db;
}

.instructions-list {
    display: grid;
    gap: 15px;
    text-align: left;
}

.instruction-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: rgba(236, 240, 241, 0.1);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.instruction-item:hover {
    background: rgba(236, 240, 241, 0.2);
    transform: translateX(5px);
}

.instruction-icon {
    font-size: 1.8rem;
    min-width: 40px;
    text-align: center;
}

.start-btn {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.start-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.6);
}

@media (max-width: 768px) {
    .instructions-modal {
        padding: 30px 20px;
        max-width: 90%;
    }

    .instructions-modal h1 {
        font-size: 2rem;
    }

    .instruction-icon {
        font-size: 1.5rem;
        min-width: 35px;
    }

    .instruction-item {
        font-size: 0.9rem;
    }
}
