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

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --bg-primary: #0f0f0f;
    --bg-secondary: #1a1a1a;
    --bg-card: rgba(30, 30, 30, 0.8);
    --bg-light: rgba(40, 40, 40, 0.5);
    --bg-white: rgba(30, 30, 30, 0.9);
    --border-color: rgba(255, 255, 255, 0.1);
    --success-color: #10b981;
    --gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --animation-duration: 0.6s;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    position: relative; /* For particle positioning */
    /* Safe area support for iPhone with notch */
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

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

/* Particle Background */
#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    background: transparent;
}

/* Language Switcher */
.language-switcher {
    position: fixed;
    top: 20px;
    top: max(20px, env(safe-area-inset-top)); /* Safe area for notch */
    right: 20px;
    right: max(20px, env(safe-area-inset-right));
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.language-switcher a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.language-switcher a.active {
    color: var(--primary-color);
}

.language-switcher span {
    margin: 0 8px;
    color: var(--border-color);
}

/* Hero Section - Optimized for One Screen */
.hero {
    background: var(--gradient);
    color: white;
    padding: 60px 0 40px;
    padding-top: max(60px, env(safe-area-inset-top)); /* Safe area for notch */
    padding-bottom: max(40px, env(safe-area-inset-bottom)); /* Safe area for home indicator */
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.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 1200 600"><path d="M0,300 Q300,100 600,300 T1200,300 L1200,600 L0,600 Z" fill="rgba(255,255,255,0.05)"/></svg>') no-repeat bottom;
    background-size: cover;
    transform: translateY(0);
    transition: transform 0.5s ease-out;
}

.hero:hover::before {
    transform: translateY(-10px);
}

.hero .container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 12px;
    line-height: 1.1;
    animation: fadeInUp var(--animation-duration);
}

.hero-tagline {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
    opacity: 0.95;
    animation: fadeInUp var(--animation-duration) 0.2s;
}

.hero-description {
    font-size: 1rem;
    margin-bottom: 20px;
    opacity: 0.9;
    line-height: 1.5;
    animation: fadeInUp var(--animation-duration) 0.4s;
}

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

/* Features Inline - Compact */
.features-inline {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
    animation: fadeInUp var(--animation-duration) 0.5s;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(40, 40, 40, 0.5);
    border: 1px solid var(--border-color);
    padding: 10px 16px;
    border-radius: 10px;
    transition: background 0.3s, transform 0.3s;
}

.feature-item:hover {
    background: rgba(40, 40, 40, 0.8);
    transform: translateX(5px);
}

.feature-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.feature-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.feature-text strong {
    font-size: 0.95rem;
    font-weight: 600;
}

.feature-text span {
    font-size: 0.85rem;
    opacity: 0.85;
}

/* How to Use - Compact */
.how-to-compact {
    margin-bottom: 20px;
    animation: fadeInUp var(--animation-duration) 0.6s;
}

.how-to-text {
    font-size: 0.95rem;
    opacity: 0.9;
    background: rgba(40, 40, 40, 0.5);
    border: 1px solid var(--border-color);
    padding: 12px 16px;
    border-radius: 10px;
    border-left: 4px solid rgba(99, 102, 241, 0.5);
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    animation: fadeInUp var(--animation-duration) 0.7s;
}

/* Buttons with hover scale */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    border: none;
}

.btn:hover {
    transform: scale(1.05);
}

.btn-primary {
    background: var(--bg-card);
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    background: rgba(40, 40, 40, 0.9);
}

.btn-secondary {
    background: rgba(99, 102, 241, 0.2);
    color: var(--text-primary);
    border: 2px solid rgba(99, 102, 241, 0.3);
}

.btn-secondary:hover {
    background: rgba(99, 102, 241, 0.3);
    border-color: rgba(99, 102, 241, 0.5);
}

.btn-large {
    padding: 18px 48px;
    font-size: 1.125rem;
}

/* Stats - Compact */
.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    animation: fadeInUp var(--animation-duration) 0.8s;
}

.stat-item {
    text-align: center;
    transition: transform 0.3s;
    background: rgba(40, 40, 40, 0.5);
    border: 1px solid var(--border-color);
    padding: 12px;
    border-radius: 10px;
}

.stat-item:hover {
    transform: translateY(-3px);
    background: rgba(40, 40, 40, 0.8);
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 900;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.75rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Fixed QR Code - Bottom Right */
.qr-fixed {
    position: fixed;
    bottom: 20px;
    bottom: max(20px, env(safe-area-inset-bottom));
    right: 20px;
    right: max(20px, env(safe-area-inset-right));
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    padding: 12px;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    text-align: center;
    z-index: 999;
    transition: transform 0.3s, box-shadow 0.3s;
}

.qr-fixed:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.qr-fixed .qr-code {
    width: 150px;
    height: 150px;
    border-radius: 8px;
    display: block;
}

.qr-fixed .qr-label {
    margin-top: 8px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.75rem;
    white-space: nowrap;
}

/* Video with Phone Mockup */
.hero-video {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

/* iPhone Mockup */
.phone-mockup {
    position: relative;
    width: 320px;
    height: 650px;
    background: linear-gradient(145deg, #1a1a1a, #2d2d2d);
    border-radius: 45px;
    padding: 12px;
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.3),
        0 10px 20px rgba(0, 0, 0, 0.2),
        inset 0 1px 2px rgba(255, 255, 255, 0.1);
    transition: transform 0.3s;
}

.phone-mockup:hover {
    transform: translateY(-8px) scale(1.02);
}

/* Phone Notch */
.phone-notch {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 140px;
    height: 28px;
    background: #1a1a1a;
    border-radius: 0 0 20px 20px;
    z-index: 10;
    box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.3);
}

.phone-notch::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 6px;
    background: #0a0a0a;
    border-radius: 3px;
}

/* Phone Screen */
.phone-screen {
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 35px;
    overflow: hidden;
    position: relative;
}

.phone-screen .intro-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-label {
    margin-top: 15px;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Hide old sections - everything is in hero now */
.features,
.how-to-use,
.demo,
.footer {
    display: none;
}

/* Features Section (hidden) */
.features {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 900;
    text-align: center;
    margin-bottom: 48px;
    color: var(--text-primary);
    animation: fadeInUp var(--animation-duration);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.feature-card {
    background: var(--bg-card);
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.feature-icon-svg {
    width: 48px;
    height: 48px;
    color: var(--primary-color);
    margin-bottom: 16px;
    transition: color 0.3s;
}

.feature-card:hover .feature-icon-svg {
    color: var(--secondary-color);
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

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

/* How to Use Section */
.how-to-use {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.steps {
    max-width: 800px;
    margin: 0 auto 48px;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 24px;
    padding: 24px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: background 0.3s;
}

.step:hover {
    background: rgba(40, 40, 40, 0.8);
}

.step-number {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: var(--gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    transition: transform 0.3s;
}

.step:hover .step-number {
    transform: scale(1.1);
}

.step-text {
    font-size: 1.125rem;
    color: var(--text-primary);
    line-height: 1.6;
}

.cta-section {
    text-align: center;
    animation: fadeInUp var(--animation-duration);
}

/* Demo Section */
.demo {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.demo-video {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.demo-video-player {
    width: 100%;
    height: auto;
    border-radius: 12px;
    animation: fadeIn var(--animation-duration);
}

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

/* Footer */
.footer {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 60px 0 20px;
    border-top: 1px solid var(--border-color);
}

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

.footer-section h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.footer-section h4 {
    font-size: 1.125rem;
    margin-bottom: 16px;
    opacity: 0.9;
}

.footer-section p {
    opacity: 0.7;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section a {
    color: white;
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.footer-section a:hover {
    opacity: 1;
}

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

.footer-bottom p {
    opacity: 0.6;
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        padding: 40px 0 30px;
        min-height: 100vh;
    }

    .hero .container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-tagline {
        font-size: 1.1rem;
    }

    .hero-description {
        font-size: 0.95rem;
    }

    .features-inline {
        gap: 10px;
    }

    .feature-item {
        padding: 8px 12px;
    }

    .feature-icon {
        font-size: 1.5rem;
    }

    .feature-text strong {
        font-size: 0.9rem;
    }

    .feature-text span {
        font-size: 0.8rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn-large {
        padding: 16px 36px;
        font-size: 1rem;
        min-height: 48px; /* Ensure minimum touch target size */
    }

    .btn {
        min-height: 44px; /* Apple HIG minimum touch target */
        padding: 12px 28px;
    }

    .stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .stat-value {
        font-size: 1.4rem;
    }

    .stat-label {
        font-size: 0.65rem;
    }

    /* Fixed QR Code - Mobile */
    .qr-fixed {
        bottom: 15px;
        right: 15px;
        padding: 10px;
    }

    .qr-fixed .qr-code {
        width: 120px;
        height: 120px;
    }

    .qr-fixed .qr-label {
        font-size: 0.7rem;
        margin-top: 6px;
    }

    /* Phone Mockup - Mobile */
    .phone-mockup {
        width: 260px;
        height: 530px;
        border-radius: 38px;
        padding: 10px;
    }

    .phone-notch {
        width: 120px;
        height: 24px;
        border-radius: 0 0 16px 16px;
    }

    .phone-notch::before {
        width: 50px;
        height: 5px;
        top: 7px;
    }

    .phone-screen {
        border-radius: 30px;
    }

    .video-label {
        font-size: 0.95rem;
        margin-top: 12px;
    }

    /* Language switcher styles removed */
}