/* styles.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
}

/* Progress Bar */
.progress-container {
    background: #f8f9fa;
    padding: 30px;
    border-bottom: 1px solid #e9ecef;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    margin-bottom: 20px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 25%;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.step {
    font-weight: 600;
    color: #6c757d;
    font-size: 14px;
    transition: color 0.3s ease;
}

.step.active {
    color: #667eea;
}

/* Page Styles */
.page {
    display: none;
    padding: 40px;
    min-height: 500px;
}

.page.active {
    display: block;
}

.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 700;
}

.page-header p {
    color: #6c757d;
    font-size: 1.1rem;
}

/* Form Styles */
.form-container {
    max-width: 600px;
    margin: 0 auto;
}

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

.form-group label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 1rem;
}

.required-star {
    color: #e74c3c;
    margin-left: 4px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

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

.input-with-unit {
    display: flex;
    gap: 10px;
}

.input-with-unit input {
    flex: 1;
}

.input-with-unit select {
    width: 80px;
    flex-shrink: 0;
}

/* Radio Button Styles */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: white;
}

.radio-option:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

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

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #e9ecef;
    border-radius: 50%;
    margin-right: 12px;
    position: relative;
    transition: all 0.3s ease;
}

.radio-option input[type="radio"]:checked + .radio-custom {
    border-color: #667eea;
    background: #667eea;
}

.radio-option input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

/* Height Input Styles */
.height-input {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.height-value {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.height-value input {
    width: 100%;
}

.height-option {
    display: flex;
    align-items: center;
    gap: 15px;
}

.height-option .radio-option {
    margin: 0;
    padding: 8px 12px;
    min-width: 150px;
}

.imperial-height {
    display: flex;
    gap: 10px;
}

.imperial-height input {
    flex: 1;
}

/* Goal Options */
.goal-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.goal-option {
    cursor: pointer;
}

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

.goal-card {
    padding: 20px;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    background: white;
    height: 100%;
}

.goal-card h3 {
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 1.2rem;
}

.goal-card p {
    color: #6c757d;
    font-size: 0.9rem;
}

.goal-option input[type="radio"]:checked + .goal-card {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.goal-option input[type="radio"]:checked + .goal-card h3,
.goal-option input[type="radio"]:checked + .goal-card p {
    color: white;
}

.goal-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

/* Equipment Grid */
.equipment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.equipment-option {
    cursor: pointer;
}

.equipment-option input[type="checkbox"] {
    display: none;
}
.equipment-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.equipment-option.disabled .equipment-card {
    background: #f8f9fa;
    border-color: #dee2e6;
    color: #6c757d;
}

.equipment-option.disabled .equipment-card:hover {
    transform: none;
    box-shadow: none;
    border-color: #dee2e6;
}

.equipment-option.disabled .equipment-card span {
    color: #6c757d !important;
}

.equipment-option.disabled input[type="checkbox"] {
    cursor: not-allowed;
}
.equipment-card {
    padding: 20px;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.equipment-icon {
    font-size: 2rem;
}

.equipment-card span:last-child {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
}

.equipment-option input[type="checkbox"]:checked + .equipment-card {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.equipment-option input[type="checkbox"]:checked + .equipment-card span {
    color: white;
}

.equipment-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

/* Tip Box */
.tip-box {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

.tip-icon {
    font-size: 1.2rem;
}

.tip-box p {
    margin: 0;
    font-size: 0.9rem;
}

/* Button Styles */
.button-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

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

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.4);
}

/* Results Page Styles */
.results-container {
    max-width: 800px;
    margin: 0 auto;
}

.results-header {
    text-align: center;
    margin-bottom: 40px;
}

.results-header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 10px;
}

.results-header p {
    color: #6c757d;
    font-size: 1.2rem;
}

.plan-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.overview-card {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
}

.overview-card h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    font-weight: 700;
}
.overview-card p {
    font-size: 0.9rem;
    opacity: 0.9;
}

.nutrition-section {
    margin-bottom: 40px;
}

.nutrition-section h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 2rem;
}

.nutrition-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
}

.nutrition-card {
    background: white;
    border: 2px solid #e9ecef;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.nutrition-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.nutrition-card h3 {
    font-size: 1.8rem;
    color: #667eea;
    margin-bottom: 8px;
    font-weight: 700;
}

.nutrition-card p {
    color: #6c757d;
    font-weight: 600;
}

.workout-schedule {
    margin-bottom: 40px;
}

.workout-schedule h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 2rem;
}

.workout-day {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.workout-day:hover {
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.1);
}

.workout-day h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.3rem;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

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

.exercise-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f8f9fa;
}

.exercise-item:last-child {
    border-bottom: none;
}

.exercise-name {
    font-weight: 600;
    color: #2c3e50;
}

.exercise-details {
    color: #6c757d;
    font-size: 0.9rem;
}

.form-description {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        border-radius: 15px;
    }
    
    .page {
        padding: 20px;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .progress-container {
        padding: 20px;
    }
    
    .progress-steps {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .step {
        font-size: 12px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .goal-options {
        grid-template-columns: 1fr;
    }
    
    .equipment-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .equipment-card {
        padding: 15px;
    }
    
    .plan-overview {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .nutrition-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .button-container {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 200px;
    }
    
    .height-option {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .imperial-height {
        width: 100%;
    }
    
    .imperial-height input {
        flex: 1;
    }
    
    .exercise-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    .results-header h1 {
        font-size: 2rem;
    }
    
    .nutrition-section h2,
    .workout-schedule h2 {
        font-size: 1.5rem;
    }
    
    .plan-overview {
        grid-template-columns: 1fr;
    }
    
    .nutrition-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .equipment-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .overview-card {
        padding: 20px;
    }
    
    .overview-card h3 {
        font-size: 1.2rem;
    }
    
    .nutrition-card h3 {
        font-size: 1.5rem;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        padding: 0;
    }
    
    .container {
        box-shadow: none;
        border-radius: 0;
    }
    
    .progress-container,
    .button-container {
        display: none;
    }
    
    .page {
        display: none;
    }
    
    .page#resultsPage {
        display: block;
    }
    
    .workout-day {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* Loading Animation */
.loading {
    display: none;
    text-align: center;
    padding: 40px;
}

.loading.active {
    display: block;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e9ecef;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Error Styles */
.error {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1) !important;
}

.error-message {
    color: #e74c3c;
    font-size: 0.9rem;
    margin-top: 5px;
    display: none;
}

.error-message.show {
    display: block;
}

/* Success Animation */
.success-animation {
    opacity: 0;
    transform: translateY(20px);
    animation: slideInUp 0.5s ease forwards;
}

@keyframes slideInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}