/* 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, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Typography */
h1, h2, h3, h4 {
    margin-bottom: 1rem;
    font-weight: 600;
}

h1 {
    font-size: 2.5rem;
    text-align: center;
    color: white;
}

h2 {
    font-size: 1.8rem;
    color: #2d3748;
}

h3 {
    font-size: 1.4rem;
    color: #4a5568;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 3rem 0;
    color: white;
}

.hero-icon {
    font-size: 4rem;
    margin-bottom: 2rem;
    color: #ffd700;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.feature-item i {
    font-size: 1.5rem;
    color: #ffd700;
}

/* Main Content */
.main-content {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    margin: 2rem 0;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    flex: 1;
}

/* Step Header */
.step-header {
    background: white;
    border-radius: 20px 20px 0 0;
    padding: 2rem;
    margin-bottom: 0;
}

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

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

.step-counter {
    color: #667eea;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.step-header h1 {
    color: #2d3748;
    font-size: 2rem;
    margin-top: 0.5rem;
}

/* Step Content */
.step-content {
    background: white;
    border-radius: 0 0 20px 20px;
    padding: 0 2rem 3rem 2rem;
    flex: 1;
}

/* Questionnaire Preview */
.questionnaire-preview {
    margin-bottom: 3rem;
}

.preview-steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.preview-step {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: #f7fafc;
    border-radius: 15px;
    border-left: 4px solid #667eea;
}

.step-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.step-content h3 {
    margin-bottom: 0.5rem;
    color: #2d3748;
}

.step-content p {
    color: #718096;
    margin: 0;
}

/* Forms */
.questionnaire-form {
    max-width: 100%;
}

.question-group {
    margin-bottom: 3rem;
}

.question-group h2 {
    margin-bottom: 2rem;
    color: #2d3748;
}

/* Radio Options */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.radio-option {
    display: block;
    cursor: pointer;
    position: relative;
}

.radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.radio-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.radio-option input[type="radio"]:checked + .radio-content {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.radio-content i {
    font-size: 1.5rem;
    color: #667eea;
    width: 30px;
    text-align: center;
}

.radio-option input[type="radio"]:checked + .radio-content i {
    color: white;
}

.option-title {
    font-weight: 600;
    font-size: 1.1rem;
}

.option-desc {
    font-size: 0.9rem;
    opacity: 0.8;
    display: block;
    margin-top: 0.25rem;
}

/* Checkbox Options */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.checkbox-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.checkbox-option:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

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

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e0;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
}

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

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

/* Input Fields */
.input-group {
    margin-bottom: 2rem;
}

.input-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #4a5568;
}

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

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

.input-help {
    font-size: 0.9rem;
    color: #718096;
    margin-top: 0.5rem;
    display: block;
}

/* Buttons */
.btn-primary, .btn-secondary {
    padding: 1rem 2rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

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

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

.btn-secondary {
    background: #f7fafc;
    color: #4a5568;
    border: 2px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

.btn-generate {
    font-size: 1.1rem;
    padding: 1.2rem 2.5rem;
}

/* CTA Section */
.cta-section {
    text-align: center;
    padding: 3rem 0;
}

.cta-section .btn-primary {
    font-size: 1.2rem;
    padding: 1.5rem 3rem;
    margin-bottom: 1rem;
}

.disclaimer {
    color: #718096;
    font-size: 0.9rem;
}

/* Form Navigation */
.form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

/* Privacy Notice */
.privacy-notice {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 10px;
}

.notice-content {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.notice-content i {
    color: #0ea5e9;
    font-size: 1.5rem;
    margin-top: 0.25rem;
}

.notice-content h3 {
    color: #0c4a6e;
    margin-bottom: 0.5rem;
}

.notice-content p {
    color: #075985;
    margin: 0;
}

/* Results Page */
.results-header {
    text-align: center;
    padding: 2rem 0 3rem 0;
    color: white;
}

.success-icon {
    font-size: 4rem;
    color: #10b981;
    margin-bottom: 1rem;
}

.results-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.results-content {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    flex: 1;
}

/* User Summary */
.summary-card {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 3rem;
    border-left: 5px solid #667eea;
}

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

.summary-item {
    padding: 1rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Diet Plan Preview */
.plan-preview-card {
    background: #f7fafc;
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 3rem;
}

.meals-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.meal-preview {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.meal-preview h4 {
    color: #667eea;
    margin-bottom: 0.5rem;
}

.plan-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    font-weight: 600;
    color: #4a5568;
}

.highlight-item i {
    color: #667eea;
}

.preview-note {
    background: #fef7cd;
    color: #92400e;
    padding: 1rem;
    border-radius: 10px;
    margin-top: 2rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

/* Email Section */
.email-section {
    background: #f0f9ff;
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 3rem;
    text-align: center;
}

.email-pending h3 {
    color: #0c4a6e;
    margin-bottom: 1rem;
}

.email-success {
    color: #065f46;
}

.email-success i {
    font-size: 3rem;
    color: #10b981;
    margin-bottom: 1rem;
}

.email-error {
    color: #7f1d1d;
}

.email-error i {
    font-size: 3rem;
    color: #ef4444;
    margin-bottom: 1rem;
}

/* Additional Actions */
.additional-actions {
    margin-bottom: 3rem;
}

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

.action-item {
    text-align: center;
    padding: 2rem;
    background: #f7fafc;
    border-radius: 15px;
}

.action-item i {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.action-item h3 {
    margin-bottom: 0.5rem;
}

.action-item p {
    color: #718096;
    margin-bottom: 1.5rem;
}

/* Tips Section */
.tips-section {
    margin-bottom: 3rem;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.tip-item {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.tip-item i {
    font-size: 1.5rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.tip-item h4 {
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.tip-item p {
    color: #718096;
    margin: 0;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem 0;
    color: white;
    margin-top: auto;
}

.footer p {
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .main-content,
    .step-header,
    .step-content,
    .results-content {
        padding: 1.5rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .checkbox-group {
        grid-template-columns: 1fr;
    }
    
    .form-navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    .form-navigation .btn-secondary {
        order: 2;
    }
    
    .form-navigation .btn-primary {
        order: 1;
        width: 100%;
    }
    
    .summary-details,
    .meals-preview,
    .plan-highlights {
        grid-template-columns: 1fr;
    }
    
    .action-grid,
    .tips-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-icon {
        font-size: 3rem;
    }
    
    .step-header h1 {
        font-size: 1.5rem;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 1rem;
        font-size: 0.9rem;
    }
    
    .radio-content {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }
    
    .radio-content i {
        margin-bottom: 0.5rem;
    }
}

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

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

.slide-up {
    animation: slideUp 0.6s ease-out;
}

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

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Download Section Styles */
.download-section {
    margin: 3rem 0;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    color: white;
    animation: fadeInUp 0.8s ease-out;
}

.download-card {
    text-align: center;
}

.download-header {
    margin-bottom: 2rem;
}

.download-header i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #ffffff;
    display: block;
}

.download-header h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #ffffff;
}

.download-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.download-options {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.download-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 200px;
    justify-content: center;
}

.download-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

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

.download-btn i {
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    .download-section {
        margin: 2rem 0;
        padding: 1.5rem;
    }
    
    .download-header h3 {
        font-size: 1.5rem;
    }
    
    .download-header p {
        font-size: 1rem;
    }
    
    .download-options {
        flex-direction: column;
        align-items: center;
    }
    
    .download-btn {
        width: 100%;
        max-width: 300px;
    }
}
