/* CSS Variables */
:root {
    --primary-gradient: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    --secondary-gradient: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    --accent-gradient: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
    --background-light: #f8f9fa;
    --background-white: #ffffff;
    --text-primary: #2c3e50;
    --text-secondary: #6c757d;
    --text-light: #95a5a6;
    --border-color: #e9ecef;
    --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.15);
    --shadow-heavy: 0 8px 30px rgba(0, 0, 0, 0.2);
    --border-radius: 12px;
    --border-radius-large: 20px;
    --transition: all 0.3s ease;
}

/* Dark Mode Variables */
body.dark-mode {
    --primary-gradient: linear-gradient(135deg, rgb(30, 200, 120) 0%, rgb(25, 170, 100) 100%);
    --secondary-gradient: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    --accent-gradient: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
    --background-light: rgb(18, 24, 22);
    --background-white: rgb(28, 36, 34);
    --text-primary: rgb(240, 255, 250);
    --text-secondary: rgba(240, 255, 250, 0.7);
    --text-light: rgba(240, 255, 250, 0.5);
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.3);
    --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-heavy: 0 8px 30px rgba(0, 0, 0, 0.5);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background-light);
    overflow-x: hidden;
    transition: background 0.3s, color 0.3s;
}

/* Dark Mode Base Styles */
body.dark-mode {
    background-color: rgb(18, 24, 22);
    color: rgb(240, 255, 250);
}

body.dark-mode .header {
    background: rgb(28, 36, 34);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

body.dark-mode .nav-link {
    color: rgba(240, 255, 250, 0.7);
}

body.dark-mode .nav-link:hover {
    color: rgb(240, 255, 250);
}

body.dark-mode .hero {
    background: rgb(28, 36, 34);
}

body.dark-mode .hero-title {
    color: rgb(240, 255, 250);
}

body.dark-mode .hero-description {
    color: rgba(240, 255, 250, 0.7);
}

body.dark-mode .feature-card {
    background: rgb(28, 36, 34);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

body.dark-mode .feature-card:hover {
    background: rgb(32, 40, 38);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

body.dark-mode .feature-title {
    color: rgb(240, 255, 250);
}

body.dark-mode .feature-description {
    color: rgba(240, 255, 250, 0.7);
}

body.dark-mode .progress-section {
    background: rgb(28, 36, 34);
}

body.dark-mode .progress-title {
    color: rgb(240, 255, 250);
}

body.dark-mode .progress-demo {
    background: rgb(28, 36, 34);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

body.dark-mode .progress-bar {
    background: rgba(255, 255, 255, 0.1);
}

body.dark-mode .progress-text {
    color: rgb(240, 255, 250);
}

body.dark-mode .progress-percentage {
    color: rgb(30, 200, 120);
}

body.dark-mode .progress-description {
    color: rgba(240, 255, 250, 0.7);
}

body.dark-mode .meal-card {
    background: rgb(28, 36, 34);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

body.dark-mode .meal-card:hover {
    background: rgb(32, 40, 38);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

body.dark-mode .meal-title {
    color: rgb(240, 255, 250);
}

body.dark-mode .meal-description {
    color: rgba(240, 255, 250, 0.7);
}

body.dark-mode .nutrition-item {
    color: rgba(240, 255, 250, 0.7);
}

body.dark-mode .cta-section {
    background: rgb(28, 36, 34);
}

body.dark-mode .cta-title {
    color: rgb(240, 255, 250);
}

body.dark-mode .cta-description {
    color: rgba(240, 255, 250, 0.7);
}

body.dark-mode .footer {
    background: rgb(28, 36, 34);
}

body.dark-mode .footer-title {
    color: rgb(240, 255, 250);
}

body.dark-mode .footer-description {
    color: rgba(240, 255, 250, 0.7);
}

body.dark-mode .footer-subtitle {
    color: rgb(240, 255, 250);
}

body.dark-mode .footer-link {
    color: rgba(240, 255, 250, 0.7);
}

body.dark-mode .footer-link:hover {
    color: rgb(30, 200, 120);
}

body.dark-mode .section-title {
    color: rgb(240, 255, 250);
}

body.dark-mode .section-subtitle {
    color: rgba(240, 255, 250, 0.7);
}

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

/* Header Styles */
.header {
    background: var(--background-white);
    box-shadow: var(--shadow-light);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-text {
    font-size: 1.75rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.signup, .login {
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
}

.signup {
    background: var(--primary-gradient);
    color: white;
}

.signup:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.login {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.login:hover {
    border-color: var(--text-primary);
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    padding: 6rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, #4CAF50 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-light);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--text-primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-light);
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-img {
    width: 100%;
    max-width: 500px;
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-heavy);
    transition: var(--transition);
}

.hero-img:hover {
    transform: translateY(-10px) scale(1.02);
}

/* Features Section */
.features {
    padding: 6rem 0;
    background: var(--background-white);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

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

.feature-card {
    background: var(--background-white);
    padding: 2.5rem;
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-medium);
    border-color: #4CAF50;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: block;
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-description {
    color: var(--text-secondary);
    line-height: 1.6;
}

.upcoming-badge {
    display: inline-block;
    background: var(--accent-gradient);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 1rem;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(255, 152, 0, 0.4);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
    }
}

/* Progress Section */
.progress-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
}

.progress-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.progress-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

.progress-demo {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: var(--border-radius-large);
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
}

.progress-bar {
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: white;
    border-radius: 10px;
    transition: width 0.5s ease;
}

.progress-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.progress-text {
    font-weight: 600;
    font-size: 1.1rem;
}

.progress-percentage {
    opacity: 0.8;
}

.progress-description {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Meal Section */
.meal-section {
    padding: 6rem 0;
    background: var(--background-light);
}

.meal-card {
    background: var(--background-white);
    border-radius: var(--border-radius-large);
    padding: 3rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    box-shadow: var(--shadow-medium);
    transition: var(--transition);
}

.meal-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
}

.meal-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.meal-description {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.meal-nutrition {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.nutrition-item {
    background: var(--background-light);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 500;
}

.meal-image {
    display: flex;
    justify-content: center;
}

.meal-img {
    width: 100%;
    max-width: 300px;
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-light);
    transition: var(--transition);
}

.meal-img:hover {
    transform: scale(1.05);
}

/* CTA Section */
.cta-section {
    padding: 6rem 0;
    background: var(--background-white);
    text-align: center;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.cta-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

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

/* Footer */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 4rem 0 2rem;
}

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

.footer-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-description {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.footer-subtitle {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-link {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.footer-link:hover {
    color: white;
    transform: translateX(5px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

.hero-text {
    animation: fadeInLeft 1s ease-out;
}

.hero-image {
    animation: fadeInRight 1s ease-out;
}

.feature-card {
    animation: fadeInUp 0.8s ease-out;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }
.feature-card:nth-child(4) { animation-delay: 0.4s; }
.feature-card:nth-child(5) { animation-delay: 0.5s; }
.feature-card:nth-child(6) { animation-delay: 0.6s; }

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .meal-card {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .meal-nutrition {
        justify-content: center;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 4rem 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .feature-card {
        padding: 2rem;
    }
    
    .meal-card {
        padding: 2rem;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus styles for accessibility */
.btn:focus,
.nav-link:focus {
    outline: 2px solid #4CAF50;
    outline-offset: 2px;
}

/* Loading animation for images */
.hero-img,
.meal-img {
    opacity: 0;
    animation: fadeIn 0.5s ease-out forwards;
    max-width: 100%;
    height: auto;
    display: block;
}

.hero-img {
    min-height: 300px;
    object-fit: cover;
}

.meal-img {
    min-height: 200px;
    object-fit: cover;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Image loading states */
.hero-img:not([src]),
.meal-img:not([src]) {
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.9rem;
}

.hero-img:not([src])::before {
    content: "Loading athlete image...";
}

.meal-img:not([src])::before {
    content: "Loading recipe image...";
}
