/* ===================================
   CSS Variables & Root Styles
   =================================== */
:root {
    /* Colors from iOS App */
    --primary-color: #6A6CFF;
    --secondary-color: #A57CFF;
    --accent-gradient: linear-gradient(135deg, #6A6CFF, #A57CFF);

    --bg-gradient-start: #F5F4FF;
    --bg-gradient-end: #ECE4FF;

    --text-primary: #2A2B5F;
    --text-secondary: #5A5C87;
    --text-light: #9A9CB7;

    --surface-bg: rgba(255, 255, 255, 0.96);
    --card-bg: #FFFFFF;

    --border-color: #D3CCFF;
    --divider-color: #D5CEF2;

    --shadow-sm: 0 2px 8px rgba(126, 108, 255, 0.08);
    --shadow-md: 0 4px 16px rgba(126, 108, 255, 0.12);
    --shadow-lg: 0 8px 32px rgba(126, 108, 255, 0.16);

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;

    /* Border Radius */
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 28px;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ===================================
   Typography
   =================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: var(--spacing-sm);
    color: var(--text-secondary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

/* ===================================
   Navigation
   =================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--surface-bg);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
}

.nav-menu {
    display: flex;
    gap: var(--spacing-lg);
}

.nav-link {
    font-weight: 500;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color);
    background: rgba(106, 108, 255, 0.1);
}

.nav-link.active {
    color: var(--primary-color);
    background: rgba(106, 108, 255, 0.15);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.lang-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: var(--font-family);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.lang-toggle:hover {
    border-color: var(--primary-color);
    background: rgba(106, 108, 255, 0.05);
}

.lang-option {
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-option.active {
    color: var(--primary-color);
    font-weight: 600;
}

.lang-divider {
    color: var(--border-color);
}

.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
}

/* ===================================
   Buttons
   =================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: var(--font-family);
}

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

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

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

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

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

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* ===================================
   Hero Section
   =================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
    overflow: hidden;
    z-index: 1;
}

.hero-gradient {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: var(--accent-gradient);
    opacity: 0.05;
    border-radius: 0 0 0 50%;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-2xl);
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content.centered {
    grid-template-columns: 1fr;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.hero-text {
    animation: fadeInUp 0.8s ease;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: var(--spacing-md);
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
    flex-wrap: wrap;
}

.hero-content.centered .hero-buttons {
    justify-content: center;
}

.hero-stats {
    display: flex;
    gap: var(--spacing-xl);
    flex-wrap: wrap;
}

.hero-content.centered .hero-stats {
    justify-content: center;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

.phone-mockup {
    position: relative;
    width: 300px;
    height: 600px;
    background: white;
    border-radius: 40px;
    padding: 15px;
    box-shadow: var(--shadow-lg);
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.phone-screen img {
    width: 120px;
    height: 120px;
    object-fit: contain;
}

/* ===================================
   Features Section
   =================================== */
.features {
    padding: var(--spacing-2xl) 0;
    background: white;
    position: relative;
    z-index: 1;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.section-title {
    margin-bottom: var(--spacing-sm);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.feature-card {
    background: var(--card-bg);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

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

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--accent-gradient);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: white;
    margin-bottom: var(--spacing-md);
}

/* Custom colors for each feature */
.feature-card:nth-child(1) .feature-icon {
    background: linear-gradient(135deg, #6A6CFF, #8B5CF6);
}

.feature-card:nth-child(2) .feature-icon {
    background: linear-gradient(135deg, #F97316, #FB923C);
}

.feature-card:nth-child(3) .feature-icon {
    background: linear-gradient(135deg, #10B981, #34D399);
}

.feature-card:nth-child(4) .feature-icon {
    background: linear-gradient(135deg, #3B82F6, #60A5FA);
}

.feature-card:nth-child(5) .feature-icon {
    background: linear-gradient(135deg, #EF4444, #F87171);
}

.feature-card:nth-child(6) .feature-icon {
    background: linear-gradient(135deg, #8B5CF6, #A78BFA);
}

.feature-title {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
}

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

.cta-section {
    text-align: center;
    margin-top: var(--spacing-2xl);
}

/* ===================================
   Why Choose Section
   =================================== */
.why-choose {
    padding: var(--spacing-2xl) 0;
    background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
    position: relative;
    z-index: 1;
}

.why-choose-content {
    display: flex;
    justify-content: center;
    align-items: center;
}

.why-choose-text {
    max-width: 900px;
    text-align: center;
}

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

.image-wrapper {
    width: 300px;
    height: 300px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
}

.image-wrapper img {
    width: 150px;
    height: 150px;
    object-fit: contain;
}

.why-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.why-item {
    display: flex;
    gap: var(--spacing-md);
    text-align: left;
    justify-content: flex-start;
}

.why-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: rgba(106, 108, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.25rem;
}

.why-content h4 {
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}

.why-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ===================================
   Download Section
   =================================== */
.download {
    padding: var(--spacing-2xl) 0;
    background: var(--accent-gradient);
    text-align: center;
    color: white;
    position: relative;
    z-index: 1;
}

.download .section-title,
.download .section-subtitle {
    color: white;
}

.download-buttons {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    margin-top: var(--spacing-xl);
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: 1rem 2rem;
    background: white;
    color: var(--primary-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

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

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

.download-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.download-label {
    font-size: 0.75rem;
    font-weight: 400;
}

.download-store {
    font-size: 1.125rem;
    font-weight: 600;
}

/* ===================================
   Footer
   =================================== */
.footer {
    background: var(--text-primary);
    color: white;
    padding: var(--spacing-2xl) 0 var(--spacing-md);
    position: relative;
    z-index: 1;
}

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

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}

.footer-logo img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
}

.footer-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.footer-title {
    margin-bottom: var(--spacing-sm);
    font-size: 1.125rem;
}

.footer-links,
.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a,
.footer-contact a {
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s ease;
}

.footer-links a:hover,
.footer-contact a:hover {
    color: var(--secondary-color);
}

.footer-contact li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.social-links {
    display: flex;
    gap: var(--spacing-sm);
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

/* ===================================
   Page Header (For other pages)
   =================================== */
.page-header {
    padding: 150px 0 var(--spacing-2xl);
    text-align: center;
    background: var(--accent-gradient);
    color: white;
}

.page-title {
    color: white;
    margin-bottom: var(--spacing-sm);
}

.page-subtitle {
    color: rgba(255, 255, 255, 0.9);
}

/* ===================================
   Detailed Features (features.html)
   =================================== */
.detailed-features {
    padding: var(--spacing-2xl) 0;
    background: white;
}

.feature-detail {
    margin-bottom: var(--spacing-2xl);
    padding: var(--spacing-2xl);
    background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
    border-radius: var(--radius-lg);
}

.feature-detail:nth-child(even) {
    background: white;
}

.feature-detail-content {
    max-width: 800px;
    margin: 0 auto;
}

.feature-detail-icon {
    width: 80px;
    height: 80px;
    background: var(--accent-gradient);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    margin-bottom: var(--spacing-md);
}

/* Custom colors for feature detail icons */
.feature-detail:nth-of-type(1) .feature-detail-icon {
    background: linear-gradient(135deg, #6A6CFF, #8B5CF6);
}

.feature-detail:nth-of-type(2) .feature-detail-icon {
    background: linear-gradient(135deg, #F97316, #FB923C);
}

.feature-detail:nth-of-type(3) .feature-detail-icon {
    background: linear-gradient(135deg, #10B981, #34D399);
}

.feature-detail:nth-of-type(4) .feature-detail-icon {
    background: linear-gradient(135deg, #3B82F6, #60A5FA);
}

.feature-detail:nth-of-type(5) .feature-detail-icon {
    background: linear-gradient(135deg, #EF4444, #F87171);
}

.feature-detail:nth-of-type(6) .feature-detail-icon {
    background: linear-gradient(135deg, #8B5CF6, #A78BFA);
}

.feature-detail h2 {
    margin-bottom: var(--spacing-md);
}

.feature-detail h3 {
    font-size: 1.5rem;
    margin: var(--spacing-lg) 0 var(--spacing-sm);
}

.feature-list {
    list-style: none;
    margin-top: var(--spacing-md);
}

.feature-list li {
    padding: 0.75rem 0 0.75rem 2rem;
    position: relative;
    color: var(--text-secondary);
}

.feature-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.25rem;
}

/* ===================================
   Legal Content (privacy.html, terms.html)
   =================================== */
.legal-content {
    padding: var(--spacing-2xl) 0;
    background: white;
    position: relative;
    z-index: 1;
}

.content-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.content-section {
    margin-bottom: var(--spacing-xl);
}

.content-section h2 {
    font-size: 2rem;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--divider-color);
}

.content-section h3 {
    font-size: 1.5rem;
    margin: var(--spacing-md) 0 var(--spacing-sm);
    color: var(--primary-color);
}

.content-section ul {
    list-style: none;
    margin: var(--spacing-sm) 0;
    padding-left: 0;
}

.content-section ul li {
    padding: 0.5rem 0 0.5rem 2.5rem;
    position: relative;
    color: var(--text-secondary);
    line-height: 1.6;
}

.content-section ul li:before {
    content: "•";
    position: absolute;
    left: 1rem;
    top: 0.5rem;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.25rem;
    line-height: 1.6;
}

.content-section a {
    color: var(--primary-color);
    text-decoration: underline;
}

.content-section a:hover {
    color: var(--secondary-color);
}

.warning-box {
    background: rgba(255, 152, 0, 0.1);
    border-left: 4px solid #FF9800;
    padding: var(--spacing-md);
    margin: var(--spacing-md) 0;
    border-radius: var(--radius-sm);
}

.warning-box p {
    color: #E65100;
    font-weight: 500;
    margin: 0;
}

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

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

.fade-in {
    animation: fadeIn 0.5s ease;
}

/* ===================================
   Animated Background Icons
   =================================== */
.fitness-icons-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.fitness-icon {
    position: absolute;
    font-size: 3rem;
    color: rgba(106, 108, 255, 0.08);
    animation: floatDown linear infinite;
}

@keyframes floatDown {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(calc(100vh + 100px)) rotate(360deg);
        opacity: 0;
    }
}

/* ===================================
   Utility Classes
   =================================== */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }

.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }

.hidden {
    display: none;
}
