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

:root {
    --color-primary: #0ea5e9;
    --color-primary-light: #38bdf8;
    --color-primary-dark: #0284c7;
    --color-accent: #8b5cf6;
    --color-accent-light: #a78bfa;
    --color-secondary: #0f172a;
    --color-text: #f8fafc;
    --color-text-muted: #94a3b8;
    --color-text-dark: #1e293b;
    --color-surface: rgba(255, 255, 255, 0.05);
    --color-surface-hover: rgba(255, 255, 255, 0.1);
    --color-border: rgba(255, 255, 255, 0.1);
    --color-background: #030712;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    color: var(--color-text);
    line-height: 1.6;
    background: var(--color-background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* Background Effects */
.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(14, 165, 233, 0.15), transparent),
        radial-gradient(ellipse 60% 40% at 80% 60%, rgba(139, 92, 246, 0.1), transparent),
        radial-gradient(ellipse 50% 30% at 20% 80%, rgba(14, 165, 233, 0.1), transparent);
    z-index: -3;
    pointer-events: none;
}

.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: -2;
    pointer-events: none;
}

.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    pointer-events: none;
    animation: float 20s ease-in-out infinite;
}

.glow-1 {
    width: 600px;
    height: 600px;
    background: rgba(14, 165, 233, 0.15);
    top: -200px;
    left: -100px;
    animation-delay: 0s;
}

.glow-2 {
    width: 500px;
    height: 500px;
    background: rgba(139, 92, 246, 0.1);
    bottom: -150px;
    right: -100px;
    animation-delay: -7s;
}

.glow-3 {
    width: 400px;
    height: 400px;
    background: rgba(14, 165, 233, 0.1);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(30px, -30px); }
    50% { transform: translate(-20px, 20px); }
    75% { transform: translate(20px, 30px); }
}

/* Particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(14, 165, 233, 0.4);
    border-radius: 50%;
    animation: particleFloat 15s linear infinite;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Main Layout */
.main {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Hero Section */
.hero {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    min-height: 100vh;
}

.hero-content {
    max-width: 800px;
    text-align: center;
    position: relative;
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    padding: 0.5rem 1rem;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-muted);
    margin-bottom: 2rem;
    animation: fadeInDown 0.8s ease-out;
    backdrop-filter: blur(10px);
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--color-primary);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

/* Hero Title */
.hero-title {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

.title-line {
    display: block;
    color: var(--color-text);
    animation: fadeInUp 0.8s ease-out 0.1s both;
}

.title-gradient {
    display: block;
    background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-accent) 50%, var(--color-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.8s ease-out 0.2s both, gradientShift 5s ease infinite;
    background-size: 200% 200%;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Hero Description */
.hero-description {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

/* Features Pills */
.features-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    padding: 0.6rem 1rem;
    border-radius: 100px;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

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

.pill svg {
    width: 16px;
    height: 16px;
    stroke: var(--color-primary-light);
}

/* CTA Container */
.cta-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease-out 0.5s both;
}

/* App Store Button */
.app-store-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    padding: 1rem 1.75rem;
    border-radius: 14px;
    font-weight: 500;
    box-shadow: 
        0 4px 15px rgba(14, 165, 233, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.app-store-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.app-store-button:hover::before {
    left: 100%;
}

.app-store-button:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 8px 25px rgba(14, 165, 233, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.15) inset;
}

.app-store-button:active {
    transform: translateY(-1px);
}

.apple-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

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

.small-text {
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.9;
    line-height: 1;
}

.big-text {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.2;
}

/* Secondary Button */
.secondary-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    padding: 1rem 1.5rem;
    border-radius: 14px;
    font-weight: 500;
    font-size: 0.95rem;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.secondary-button:hover {
    background: var(--color-surface-hover);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.secondary-button svg {
    width: 20px;
    height: 20px;
    opacity: 0.7;
}

/* Stats */
.stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    animation: fadeInUp 0.8s ease-out 0.6s both;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.2;
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-top: 0.25rem;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--color-border);
}

/* Footer */
.footer {
    padding: 2rem;
    text-align: center;
    border-top: 1px solid var(--color-border);
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.footer-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.footer-nav a {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
}

.footer-nav a:hover {
    color: var(--color-text);
}

.footer-nav .divider {
    color: var(--color-border);
    font-size: 0.7rem;
}

.copyright {
    color: var(--color-text-muted);
    font-size: 0.75rem;
    opacity: 0.7;
}

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

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

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

/* Legal Pages Styles */
.legal-page {
    background: var(--color-background);
    min-height: 100vh;
}

.legal-header {
    position: sticky;
    top: 0;
    background: rgba(3, 7, 18, 0.8);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 2rem;
    z-index: 100;
    backdrop-filter: blur(20px);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text-muted);
    font-weight: 500;
    font-size: 0.9rem;
}

.back-link:hover {
    color: var(--color-primary-light);
}

.back-link svg {
    width: 20px;
    height: 20px;
}

.legal-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.legal-content h1 {
    font-size: clamp(2rem, 5vw, 2.5rem);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.last-updated {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--color-border);
}

.legal-content section {
    margin-bottom: 2.5rem;
}

.legal-content h2 {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 1rem;
}

.legal-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text-muted);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.legal-content p {
    color: var(--color-text-muted);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.legal-content ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    list-style: disc;
}

.legal-content li {
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.legal-content a {
    color: var(--color-primary-light);
    font-weight: 500;
}

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

.legal-footer {
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid var(--color-border);
    padding: 2rem;
    text-align: center;
}

.legal-footer .footer-nav a {
    color: var(--color-text-muted);
}

.legal-footer .footer-nav a:hover {
    color: var(--color-primary-light);
}

.legal-footer .footer-nav .divider {
    color: var(--color-border);
}

.legal-footer .copyright {
    color: var(--color-text-muted);
    margin-top: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        padding: 3rem 1.5rem;
    }
    
    .hero-content {
        padding: 0;
    }
    
    .badge {
        margin-bottom: 1.5rem;
    }
    
    .hero-description {
        margin-bottom: 2rem;
    }
    
    .features-pills {
        gap: 0.5rem;
        margin-bottom: 2rem;
    }
    
    .pill {
        padding: 0.5rem 0.875rem;
        font-size: 0.8rem;
    }
    
    .cta-container {
        flex-direction: column;
        align-items: center;
        margin-bottom: 2.5rem;
    }
    
    .app-store-button {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    .secondary-button {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    .stats {
        gap: 1.5rem;
    }
    
    .stat-divider {
        display: none;
    }
    
    .footer {
        padding: 1.5rem 1rem;
    }
    
    .legal-content {
        padding: 2rem 1.5rem;
    }
    
    .legal-header {
        padding: 1rem 1.5rem;
    }
    
    .glow-1 {
        width: 300px;
        height: 300px;
    }
    
    .glow-2 {
        width: 250px;
        height: 250px;
    }
    
    .glow-3 {
        width: 200px;
        height: 200px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 0.95rem;
    }
    
    .app-store-button {
        padding: 0.875rem 1.5rem;
    }
    
    .apple-icon {
        width: 24px;
        height: 24px;
    }
    
    .big-text {
        font-size: 1.1rem;
    }
    
    .stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .bg-glow {
        animation: none;
    }
    
    .particle {
        display: none;
    }
}

/* Language Selector */
.lang-selector {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
}

.lang-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 2rem;
    color: var(--color-text);
    font-family: var(--font-family);
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.lang-toggle:hover {
    background: var(--color-surface-hover);
    border-color: var(--color-primary);
}

.lang-toggle.active {
    background: var(--color-surface-hover);
    border-color: var(--color-primary);
}

.lang-icon {
    width: 18px;
    height: 18px;
    opacity: 0.8;
}

.chevron-icon {
    width: 14px;
    height: 14px;
    opacity: 0.6;
    transition: var(--transition);
}

.lang-toggle.active .chevron-icon {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 140px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.lang-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: transparent;
    border: none;
    border-radius: 0.5rem;
    color: var(--color-text);
    font-family: var(--font-family);
    font-size: 0.875rem;
    text-align: left;
    cursor: pointer;
    transition: var(--transition-fast);
}

.lang-option:hover {
    background: var(--color-surface-hover);
    color: var(--color-primary-light);
}

@media (max-width: 768px) {
    .lang-selector {
        top: 0.75rem;
        right: 0.75rem;
    }
    
    .lang-toggle {
        padding: 0.4rem 0.7rem;
        font-size: 0.8rem;
    }
    
    .lang-icon {
        width: 16px;
        height: 16px;
    }
    
    #currentLang {
        display: none;
    }
}
