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

:root {
    --primary-color: #2dabec;
    --primary-dark: #1e8bc4;
    --secondary-color: #f39c12;
    --accent-color: #e74c3c;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --background: #ffffff;
    --background-dark: #f8f9fa;
    --border-color: #e9ecef;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --gradient-primary: linear-gradient(135deg, #2dabec 0%, #1e8bc4 100%);
    --gradient-secondary: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
}

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

.nav-links {
    display: flex;
    gap: 32px;
}

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

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

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

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

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    will-change: transform;
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: 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="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-content {
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    margin-bottom: 24px;
}

.title-main {
    display: block;
    font-size: 4rem;
    font-weight: 800;
    color: white;
    line-height: 1.1;
    margin-bottom: 8px;
    background: linear-gradient(45deg, #fff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title-sub {
    display: block;
    font-size: 1.5rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
}

.hero-description {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 16px 32px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn::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;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    /* Cross-browser compatibility */
    -webkit-box-shadow: var(--shadow-lg);
    -moz-box-shadow: var(--shadow-lg);
    box-shadow: var(--shadow-lg);
    /* Ensure proper rendering */
    -webkit-transform: translateZ(0);
    -o-transform: translateZ(0);
    transform: translateZ(0);
    /* Hardware acceleration */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.btn-primary:hover {
    -webkit-transform: translateY(-2px);
    -moz-transform: translateY(-2px);
    -o-transform: translateY(-2px);
    transform: translateY(-2px);
    -webkit-box-shadow: 0 15px 35px rgba(45, 171, 236, 0.4);
    -moz-box-shadow: 0 15px 35px rgba(45, 171, 236, 0.4);
    box-shadow: 0 15px 35px rgba(45, 171, 236, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

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

.app-store-badge {
    height: 60px;
    /* Cross-browser compatibility */
    -webkit-transition: var(--transition);
    -moz-transition: var(--transition);
    -o-transition: var(--transition);
    transition: var(--transition);
    /* Ensure proper scaling */
    max-width: 100%;
    width: auto;
    /* Prevent image distortion - Cross-browser compatibility */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: optimize-contrast;
    /* Smooth scaling */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    /* Hardware acceleration */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    /* Chrome-specific fixes */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    /* Force Chrome to render SVG properly */
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
    /* Ensure proper display in Chrome */
    display: block;
    vertical-align: middle;
    /* Chrome SVG rendering fix */
    -webkit-filter: none;
    filter: none;
}

/* Use crisp-edges only where supported (e.g., Firefox) */
@supports (image-rendering: crisp-edges) {
    .app-store-badge {
        image-rendering: crisp-edges;
    }
}

/* Chrome-specific fixes for SVG rendering */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    .app-store-badge {
        /* Force Chrome to use hardware acceleration */
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
        /* Ensure proper SVG scaling */
        -webkit-background-size: contain;
        background-size: contain;
        /* Fix Chrome SVG display issues */
        -webkit-mask: none;
        mask: none;
        /* Force Chrome to render the SVG */
        -webkit-appearance: none;
        appearance: none;
        /* Ensure SVG is visible */
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    /* Additional Chrome fix for SVG loading */
    .btn-primary .app-store-badge {
        /* Force Chrome to load and display SVG */
        -webkit-transform: translateZ(0) scale(1);
        transform: translateZ(0) scale(1);
        /* Prevent Chrome from hiding SVG */
        -webkit-clip-path: none;
        clip-path: none;
    }
}

.app-store-badge:hover {
    -webkit-transform: scale(1.05);
    -moz-transform: scale(1.05);
    -o-transform: scale(1.05);
    transform: scale(1.05);
}

/* Phone Mockup */
.hero-visual {
    display: flex;
    justify-content: center;
    animation: fadeInRight 1s ease-out 0.3s both;
}

.phone-mockup {
    width: 300px;
    height: 600px;
    background: #1a1a1a;
    border-radius: 40px;
    padding: 20px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

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

.phone-screen {
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 30px;
    overflow: hidden;
    position: relative;
}

/* Single phone image styles */
.phone-image-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.phone-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    /* Cross-browser compatibility */
    -webkit-border-radius: 30px;
    -moz-border-radius: 30px;
    border-radius: 30px;
    /* Ensure proper scaling */
    max-width: 100%;
    max-height: 100%;
    /* Prevent image distortion - Cross-browser compatibility */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: optimize-contrast;
    /* Smooth scaling */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    /* Hardware acceleration */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Use crisp-edges only where supported (e.g., Firefox) */
@supports (image-rendering: crisp-edges) {
    .phone-image {
        image-rendering: crisp-edges;
    }
}

/* Features Section */
.features {
    padding: 100px 0;
    background: var(--background-dark);
}

.section-title {
    text-align: center;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 60px;
    color: var(--text-primary);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

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

.feature-card {
    background: white;
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: var(--transition);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

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

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

.feature-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

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

/* Screenshots Section */
.screenshots {
    padding: 100px 0;
    background: white;
}

.screenshots.with-top-padding {
    padding-top: 120px;
}

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

.screenshot-item {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

.screenshot-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.screenshot-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition);
}

.screenshot-item:hover img {
    transform: scale(1.1);
}

.screenshot-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(45, 171, 236, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.screenshot-item:hover .screenshot-overlay {
    opacity: 1;
}

.screenshot-overlay span {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
}

/* Download Section */
.download {
    padding: 100px 0;
    background: var(--gradient-primary);
    color: white;
    text-align: center;
}

.download-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.download-description {
    font-size: 1.3rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.download-buttons {
    margin-bottom: 40px;
}

.btn-large {
    padding: 20px 40px;
    font-size: 1.1rem;
}

.download-features {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.download-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.feature-check {
    color: #2ecc71;
    font-weight: bold;
    font-size: 1.2rem;
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.5rem;
}

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

.footer-links {
    display: flex;
    gap: 32px;
}

.footer-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-link:hover {
    color: white;
}

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

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

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

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.phone-mockup {
    animation: float 6s ease-in-out infinite;
}

/* Optimize canvas rendering for smooth animation */
#heroCanvas {
    will-change: transform;
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .title-main {
        font-size: 2.5rem;
    }
    
    .title-sub {
        font-size: 1.2rem;
    }
    
    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .phone-mockup {
        width: 250px;
        height: 500px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .screenshots-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .download-features {
        flex-direction: column;
        gap: 20px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }
    
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .title-main {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .download-title {
        font-size: 2rem;
    }
    
    .phone-mockup {
        width: 200px;
        height: 400px;
    }
}

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

/* Loading animation */
.loading {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Legal page specific styles */
.legal-page h3 {
    margin: 0 0 10px 0;
}

.legal-page p {
    margin: 0;
}

.hidden {
    display: none;
}

/* Email Verification Page Styles */
.email-verification {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.email-verification::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="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.verification-container {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.verification-card {
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: fadeInUp 0.8s ease-out;
    position: relative;
    overflow: hidden;
}

.verification-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.6s ease-out;
}

.verification-card.success-state::before {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    transform: scaleX(1);
}

.verification-card.error-state::before {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    transform: scaleX(1);
}

.verification-icon {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: scaleIn 0.6s ease-out 0.3s both;
}

.success-icon svg {
    animation: checkmark 0.8s ease-out 0.5s both;
}

.error-icon svg {
    animation: shake 0.6s ease-out 0.5s both;
}

.loading-icon {
    animation: pulse 2s ease-in-out infinite;
}

.spinner {
    width: 80px;
    height: 80px;
    border: 4px solid rgba(45, 171, 236, 0.2);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.verification-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

.success-state .verification-title {
    color: #2ecc71;
}

.error-state .verification-title {
    color: #e74c3c;
}

.verification-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.6;
    animation: fadeInUp 0.6s ease-out 0.6s both;
}

.verification-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.6s ease-out 0.8s both;
}

.verification-actions .btn {
    min-width: 180px;
}

/* Animations */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes checkmark {
    0% {
        opacity: 0;
        transform: scale(0.3) rotate(-45deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.1) rotate(-45deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(-45deg);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Responsive Design for Email Verification */
@media (max-width: 768px) {
    .email-verification {
        padding: 80px 0;
    }
    
    .verification-card {
        padding: 40px 30px;
        margin: 0 20px;
    }
    
    .verification-title {
        font-size: 2rem;
    }
    
    .verification-description {
        font-size: 1.1rem;
    }
    
    .verification-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .verification-actions .btn {
        width: 100%;
        max-width: 280px;
    }
}

@media (max-width: 480px) {
    .verification-card {
        padding: 30px 20px;
        margin: 0 15px;
    }
    
    .verification-title {
        font-size: 1.8rem;
    }
    
    .verification-description {
        font-size: 1rem;
    }
}
