/* Estilização geral para a página de criação de planos */
body {
    margin: 0;
    padding: 0;
    color: #333;
}

.main-content {
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

h1, h2 {
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
    margin-bottom: 1.5rem;
}

h1 {
    font-size: 2.5em;
    margin-top: 2rem;
}

h2 {
    font-size: 1.8em;
    margin-top: 2rem;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 1rem;
    border: 1px solid #c3e6cb;
    border-radius: 5px;
    margin-bottom: 1.5rem;
}

/* Formulário de Criação */
#plan-form {
    background-color: #ecf0f1;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}



#plan-form label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #34495e;
}

#plan-form input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #bdc3c7;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

#plan-form input[type="text"]:focus {
    outline: none;
    border-color: #3498db;
}

.muscle-groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.muscle-group {
    position: relative;
}

.muscle-group input[type="checkbox"] {
    opacity: 0;
    position: absolute;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.muscle-group label {
    display: flex;
    background-color: #fff;
    padding: 1rem;
    border: 2px solid #bdc3c7;
    border-radius: 5px;
    text-align: center;
    font-weight: 500;
    transition: all 0.3s ease;
    min-height: 60px;
    box-sizing: border-box;
    word-wrap: break-word;
}

.muscle-group input[type="checkbox"]:hover + label {
    border-color: #95a5a6;
}

.muscle-group input[type="checkbox"]:checked + label {
    background-color: #3498db;
    color: #fff;
    border-color: #2980b9;
    font-weight: bold;
}

#exercise-list {
    margin-top: 2rem;
}

.exercise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.exercise-item {
    position: relative;
}

.exercise-item input[type="checkbox"] {
    opacity: 0;
    position: absolute;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.exercise-item label {
    display: flex;
    justify-content: center;
    background-color: #fff;
    padding: 1rem;
    border: 2px solid #bdc3c7;
    border-radius: 5px;
    text-align: center;
    font-weight: 500;
    transition: all 0.3s ease;
    min-height: 60px;
    box-sizing: border-box;
    word-wrap: break-word;
}

.exercise-item input[type="checkbox"]:hover + label {
    border-color: #95a5a6;
}

.exercise-item input[type="checkbox"]:checked + label {
    background-color: #3498db;
    color: #fff;
    border-color: #2980b9;
    font-weight: bold;
}

.info-message {
    text-align: center;
    color: #7f8c8d;
    font-size: 1.1rem;
    margin-top: 2rem;
}

#plan-form button[type="submit"] {
    background-color: #3498db;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    display: block;
    width: 100%;
    margin-top: 2rem;
    transition: background-color 0.3s;
}

#plan-form button[type="submit"]:hover {
    background-color: #2980b9;
}

/* Tabelas de Exercícios e Planos */
.exercise-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.exercise-table th, .exercise-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.exercise-table thead tr {
    background-color: #34495e;
    color: #fff;
}

.exercise-table th {
    font-weight: 600;
}

.exercise-table tbody tr:nth-of-type(even) {
    background-color: #f8f9fa;
}

.exercise-table tbody tr:hover {
    background-color: #e9ecef;
}

.exercise-table a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
}

.exercise-table a:hover {
    text-decoration: underline;
}

.exercise-table .delete-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    margin-left: 10px;
}

.exercise-table .delete-btn:hover {
    background-color: #c0392b;
}

p {
    line-height: 1.6;
}

/* Responsividade */
@media (max-width: 768px) {
    .main-content {
        margin: 1rem;
        padding: 1.5rem;
    }

    h1 {
        font-size: 2em;
    }

    .muscle-groups-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
}

/* Modal de Login Requerido */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    max-width: 400px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content h2 {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 1rem;
    border-bottom: none;
    padding-bottom: 0;
}

.modal-content p {
    color: #555;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-login, .btn-back, .btn-delete-confirm {
    padding: 12px 25px;
    font-size: 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
    flex: 1;
}

.btn-login {
    background-color: #3498db;
    color: white;
}

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

.btn-delete-confirm {
    background-color: #e74c3c;
    color: white;
}

.btn-delete-confirm:hover {
    background-color: #c0392b;
}

.btn-back {
    background-color: #95a5a6;
    color: white;
}

.btn-back:hover {
    background-color: #7f8c8d;
}

@media (max-width: 480px) {
    .modal-content {
        margin: 1rem;
        max-width: 100%;
    }

    .modal-buttons {
        flex-direction: column;
    }
}
