/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Header styles */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.header h1 {
    color: #084796;
    font-size: 2.2rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.privacy-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #666;
    font-size: 0.9rem;
    background: #f8f9fa;
    padding: 12px 20px;
    border-radius: 25px;
    margin-top: 20px;
}

.privacy-notice svg {
    color: #B1C800;
}

/* Form styles */
.form-section {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.form-group.error {
    animation: shake 0.3s ease-in-out;
}

.form-group.error label {
    color: #dc3545 !important;
}

.form-group.error .radio-group,
.form-group.error .button-group {
    border: 2px solid #dc3545;
    border-radius: 12px;
    padding: 15px;
    background: #fff5f5;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.form-group {
    margin-bottom: 30px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    color: #084796;
    font-size: 1.1rem;
}

.form-group input[type="text"],
.form-group input[type="number"] {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-group input[type="text"]:focus,
.form-group input[type="number"]:focus {
    outline: none;
    border-color: #084796;
    background: white;
    box-shadow: 0 0 0 3px rgba(8, 71, 150, 0.1);
}

/* Radio button styles */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.radio-option {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.radio-option:hover {
    border-color: #084796;
    background: white;
}

.radio-option input[type="radio"] {
    display: none;
}

.radio-icon {
    width: 50px;
    height: 50px;
    border: 2px solid #e9ecef;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
    margin-top: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.radio-option input[type="radio"]:checked + .radio-icon {
    background: #084796;
    border-color: #084796;
    transform: scale(1.1);
}

.radio-option input[type="radio"]:checked + .radio-icon {
    box-shadow: 0 0 20px rgba(8, 71, 150, 0.3);
}

.radio-text {
    flex: 1;
}

.radio-text strong {
    display: block;
    color: #084796;
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.radio-text small {
    color: #666;
    font-size: 0.9rem;
}

/* Button group styles */
.button-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-option {
    flex: 1;
    min-width: 120px;
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    background: #f8f9fa;
    color: #333;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-option:hover {
    border-color: #084796;
    background: white;
}

.btn-option.active {
    border-color: #084796;
    background: #084796;
    color: white;
}

/* Primary button */
.btn-primary {
    width: 100%;
    padding: 18px 30px;
    background: linear-gradient(135deg, #084796 0%, #0a5bb8 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(8, 71, 150, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Results section */
.results-section {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.plan-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.plan-header h2 {
    color: #084796;
    font-size: 2rem;
    margin-bottom: 20px;
}

.plan-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.summary-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border-left: 4px solid #B1C800;
}

.summary-item strong {
    display: block;
    color: #084796;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.summary-item span {
    color: #666;
    font-size: 0.9rem;
}

/* Plan content */
.plan-content {
    margin-bottom: 40px;
}

.week-plan {
    margin-bottom: 30px;
}

.week-title {
    color: #084796;
    font-size: 1.4rem;
    margin-bottom: 20px;
    padding: 15px 0;
    border-bottom: 2px solid #B1C800;
}

.training-day {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 15px;
    border-left: 4px solid #084796;
}

.training-day h4 {
    color: #084796;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.exercise-list {
    display: grid;
    gap: 15px;
}

.exercise-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.exercise-icon {
    width: 40px;
    height: 40px;
    background: #B1C800;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    flex-shrink: 0;
}

.exercise-details {
    flex: 1;
}

.exercise-name {
    font-weight: 600;
    color: #084796;
    margin-bottom: 5px;
}

.exercise-specs {
    color: #666;
    font-size: 0.9rem;
}

/* Action buttons */
.actions {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.btn-secondary {
    flex: 1;
    min-width: 200px;
    padding: 15px 25px;
    background: #B1C800;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-secondary:hover {
    background: #9bb000;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(177, 200, 0, 0.3);
}

.btn-outline {
    flex: 1;
    min-width: 200px;
    padding: 15px 25px;
    background: transparent;
    color: #084796;
    border: 2px solid #084796;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-outline:hover {
    background: #084796;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(8, 71, 150, 0.3);
}

/* Sharing section */
.sharing-section {
    border-top: 2px solid #f0f0f0;
    padding-top: 40px;
    margin-top: 40px;
}

.privacy-consent {
    margin-bottom: 25px;
}

.checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    cursor: pointer;
}

.checkbox-wrapper input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #084796;
    border-radius: 4px;
    position: relative;
    flex-shrink: 0;
    margin-top: 2px;
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkbox-custom {
    background: #084796;
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 12px;
}

.checkbox-text {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

.sharing-options h3 {
    color: #084796;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.sharing-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
}

.btn-share {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-share.whatsapp {
    background: #25D366;
    color: white;
}

.btn-share.email {
    background: #007bff;
    color: white;
}

.btn-share.facebook {
    background: #1877f2;
    color: white;
}

.btn-share.copy {
    background: #6c757d;
    color: white;
}

.btn-share.disabled {
    background: #e9ecef !important;
    color: #6c757d !important;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-share.disabled:hover {
    transform: none;
    box-shadow: none;
}

.btn-share:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.privacy-links {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #666;
}

.privacy-links a {
    color: #084796;
    text-decoration: none;
}

.privacy-links a:hover {
    text-decoration: underline;
}

/* PDF template styles */
.pdf-template {
    background: white;
    padding: 40px;
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    max-width: 794px;
    margin: 0 auto;
}

.pdf-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #084796;
}

.pdf-header h1 {
    color: #084796;
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.pdf-user-info {
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.pdf-date {
    color: #666;
    font-size: 0.9rem;
}

.pdf-content {
    margin-bottom: 40px;
}

.pdf-summary {
    margin-bottom: 30px;
}

.pdf-summary h2 {
    color: #084796;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.pdf-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.pdf-summary-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #B1C800;
}

.pdf-schedule {
    margin-bottom: 30px;
}

.pdf-schedule h2 {
    color: #084796;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.pdf-week {
    margin-bottom: 30px;
    page-break-inside: avoid;
}

.pdf-week h3 {
    color: #084796;
    font-size: 1.3rem;
    margin-bottom: 15px;
    border-bottom: 1px solid #B1C800;
    padding-bottom: 5px;
}

.pdf-session {
    margin-bottom: 20px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #084796;
}

.pdf-session h4 {
    color: #084796;
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.pdf-exercises {
    margin-bottom: 15px;
}

.pdf-exercise {
    margin-bottom: 10px;
    padding: 10px;
    background: white;
    border-radius: 5px;
    border: 1px solid #e9ecef;
}

.pdf-exercise strong {
    color: #084796;
}

.pdf-footer {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #ddd;
    color: #666;
    font-size: 0.9rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .form-section,
    .results-section {
        padding: 25px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .btn-option {
        min-width: auto;
    }
    
    .actions {
        flex-direction: column;
    }
    
    .btn-secondary,
    .btn-outline {
        min-width: auto;
    }
    
    .sharing-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .plan-summary {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.5rem;
    }
    
    .form-section,
    .results-section {
        padding: 20px;
    }
    
    .radio-option {
        padding: 15px;
    }
    
    .sharing-buttons {
        grid-template-columns: 1fr;
    }
    
    .exercise-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Loading states */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #084796;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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