/* Основные стили плагина */
.fpg-form-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.fpg-plan-form {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.fpg-form-header {
    text-align: center;
    margin-bottom: 30px;
}

.fpg-form-header h3 {
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 24px;
}

.fpg-form-header p {
    color: #7f8c8d;
    font-size: 16px;
}

.fpg-form-field {
    margin-bottom: 20px;
}

.fpg-form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.fpg-form-field select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    transition: all 0.3s ease;
}

.fpg-form-field select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.fpg-form-actions {
    margin-top: 30px;
    text-align: center;
}

.fpg-submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    font-size: 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.fpg-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.fpg-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Стили загрузки */
.fpg-loading {
    text-align: center;
    padding: 40px 20px;
}

.fpg-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Стили плана тренировок */
.fpg-workout-plan {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.fpg-plan-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
}

.fpg-plan-header h2 {
    margin-bottom: 20px;
    font-size: 28px;
}

.fpg-plan-meta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.fpg-plan-meta span {
    background: rgba(255,255,255,0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
}

/* Стили дня тренировки */
.fpg-workout-day {
    margin-bottom: 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.fpg-day-header {
    background: #2c3e50;
    color: white;
    padding: 20px;
}

.fpg-day-header h3 {
    margin: 0 0 10px 0;
    font-size: 22px;
}

.fpg-target-muscles {
    margin: 0;
    opacity: 0.9;
    font-size: 14px;
}

/* Сетка упражнений */
.fpg-exercises-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    padding: 20px;
}

.fpg-exercise-card {
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.fpg-exercise-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.fpg-exercise-image {
    height: 200px;
    overflow: hidden;
}

.fpg-exercise-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.fpg-exercise-card:hover .fpg-exercise-image img {
    transform: scale(1.05);
}

.fpg-exercise-content {
    padding: 20px;
}

.fpg-exercise-content h4 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 18px;
    line-height: 1.4;
}

.fpg-exercise-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.fpg-sets-reps, .fpg-equipment, .fpg-difficulty {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.fpg-sets-reps {
    background: #e8f5e8;
    color: #27ae60;
}

.fpg-equipment {
    background: #e3f2fd;
    color: #1976d2;
}

.fpg-difficulty-beginner {
    background: #e8f5e8;
    color: #27ae60;
}

.fpg-difficulty-intermediate {
    background: #fff3e0;
    color: #f57c00;
}

.fpg-difficulty-advanced {
    background: #ffebee;
    color: #d32f2f;
}

.fpg-instructions h5 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 14px;
}

.fpg-instructions ol {
    margin: 0;
    padding-left: 20px;
    font-size: 13px;
    line-height: 1.5;
    color: #555;
}

.fpg-instructions li {
    margin-bottom: 8px;
}

.fpg-secondary-muscles {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e1e8ed;
    font-size: 13px;
    color: #7f8c8d;
}

/* Кнопки действий */
.fpg-plan-actions {
    text-align: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e1e8ed;
}

.fpg-print-btn, .fpg-save-btn {
    padding: 12px 24px;
    margin: 0 10px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

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

.fpg-save-btn {
    background: #27ae60;
    color: white;
}

.fpg-print-btn:hover, .fpg-save-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Сообщения об ошибках */
.fpg-error {
    background: #ffebee;
    color: #c62828;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid #c62828;
}

.fpg-success {
    background: #e8f5e8;
    color: #2e7d32;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid #4caf50;
}

/* Адаптивность */
@media (max-width: 768px) {
    .fpg-form-container {
        padding: 10px;
    }
    
    .fpg-plan-form {
        padding: 20px;
    }
    
    .fpg-exercises-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px;
    }
    
    .fpg-plan-meta {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .fpg-exercise-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .fpg-print-btn, .fpg-save-btn {
        display: block;
        width: 100%;
        margin: 10px 0;
    }
}

@media (max-width: 480px) {
    .fpg-plan-header {
        padding: 20px 15px;
    }
    
    .fpg-plan-header h2 {
        font-size: 24px;
    }
    
    .fpg-day-header {
        padding: 15px;
    }
    
    .fpg-day-header h3 {
        font-size: 20px;
    }
}
/* Стили для изображений упражнений */
.fpg-exercise-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.fpg-exercise-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.fpg-no-image {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    text-align: center;
    padding: 20px;
}

.fpg-placeholder-icon {
    font-size: 48px;
    margin-bottom: 10px;
    opacity: 0.7;
}

.fpg-placeholder-text p {
    margin: 0 0 5px 0;
    font-weight: 600;
}

.fpg-placeholder-text small {
    font-size: 12px;
    opacity: 0.8;
}

.fpg-image-source {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e9ecef;
}

.fpg-image-source a {
    color: #6c757d;
    text-decoration: none;
    font-size: 12px;
}

.fpg-image-source a:hover {
    color: #495057;
    text-decoration: underline;
}

/* Улучшаем адаптивность изображений */
@media (max-width: 768px) {
    .fpg-exercise-image {
        height: 180px;
    }
    
    .fpg-exercise-image img {
        height: 180px;
    }
}

@media (max-width: 480px) {
    .fpg-exercise-image {
        height: 160px;
    }
    
    .fpg-exercise-image img {
        height: 160px;
    }
    
    .fpg-placeholder-icon {
        font-size: 36px;
    }
}