/* ========================================
   aShell You - Modern Website Styles
   ======================================== */

/* CSS Custom Properties */
:root {
    /* Colors - Dark Theme */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-surface: #1a1a2e;
    --bg-surface-hover: #252542;

    /* Brand Colors */
    --primary: #a855f7;
    --primary-light: #c084fc;
    --primary-dark: #7c3aed;
    --primary-glow: rgba(168, 85, 247, 0.4);

    --accent: #06b6d4;
    --accent-light: #22d3ee;

    /* Semantic Colors */
    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;

    /* Text Colors */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    --gradient-dark: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    --gradient-radial: radial-gradient(ellipse at center, var(--bg-surface) 0%, var(--bg-primary) 70%);

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

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
    --text-6xl: 3.75rem;
    --text-7xl: 4.5rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 40px var(--primary-glow);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;

    /* Z-Index */
    --z-base: 1;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal: 400;
    --z-tooltip: 500;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

ul,
ol {
    list-style: none;
}

/* Container */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* Typography Utilities */
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ========================================
   Navigation
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-fixed);
    padding: var(--space-md) 0;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all var(--transition-base);
}

.navbar.scrolled {
    padding: var(--space-sm) 0;
    background: rgba(10, 10, 15, 0.95);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-lg);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

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

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

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

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: var(--space-sm);
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: var(--space-4xl) 0;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: -1;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 8s ease-in-out infinite;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: var(--primary);
    top: -200px;
    right: -200px;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: var(--accent);
    bottom: -100px;
    left: -100px;
    animation-delay: -2s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: var(--primary-dark);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -4s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -30px) scale(1.05);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.95);
    }
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4xl);
    align-items: center;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

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

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-family: var(--font-heading);
    font-size: var(--text-7xl);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--space-lg);
}

.hero-tagline {
    font-size: var(--text-2xl);
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    min-height: 2.5rem;
}

.typing-text::after {
    content: '|';
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.hero-description {
    font-size: var(--text-lg);
    color: var(--text-muted);
    margin-bottom: var(--space-2xl);
    max-width: 500px;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    font-size: var(--text-base);
    font-weight: 600;
    border-radius: var(--radius-xl);
    transition: all var(--transition-base);
    cursor: pointer;
}

.btn-icon {
    width: 20px;
    height: 20px;
}

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

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

.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

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

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

/* Hero Stats */
.hero-stats {
    display: flex;
    gap: var(--space-3xl);
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--primary-light);
}

.stat-label {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

/* Hero Mockup */
.hero-mockup {
    display: flex;
    justify-content: center;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.phone-frame {
    position: relative;
    background: linear-gradient(135deg, #2a2a3e 0%, #1a1a28 100%);
    border-radius: 40px;
    padding: 12px;
    box-shadow: var(--shadow-xl), 0 0 80px rgba(168, 85, 247, 0.2);
}

.phone-frame::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 40px;
    padding: 2px;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.5), rgba(6, 182, 212, 0.3));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

.phone-screen {
    width: 280px;
    height: auto;
    border-radius: 30px;
    display: block;
}

.phone-frame.small {
    padding: 8px;
    border-radius: 30px;
}

.phone-frame.small::before {
    border-radius: 30px;
}

.phone-frame.small .phone-screen,
.phone-frame.small img {
    width: 200px;
    border-radius: 24px;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: var(--space-2xl);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-muted);
    font-size: var(--text-sm);
    animation: bounce 2s ease-in-out infinite;
}

.scroll-arrow {
    width: 24px;
    height: 24px;
    border-right: 2px solid var(--text-muted);
    border-bottom: 2px solid var(--text-muted);
    transform: rotate(45deg);
}

@keyframes bounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(10px);
    }
}

/* ========================================
   Section Styles
   ======================================== */
section {
    padding: var(--space-4xl) 0;
}

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

.section-title {
    font-family: var(--font-heading);
    font-size: var(--text-5xl);
    font-weight: 700;
    margin-bottom: var(--space-md);
}

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

/* ========================================
   Features Section
   ======================================== */
.features {
    background: var(--gradient-dark);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
    margin-bottom: var(--space-3xl);
}

.feature-card {
    background: var(--bg-surface);
    border-radius: var(--radius-2xl);
    padding: var(--space-2xl);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all var(--transition-base);
    opacity: 0;
    transform: translateY(20px);
}

.feature-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.feature-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-lg);
}

.feature-icon svg {
    width: 28px;
    height: 28px;
    stroke: var(--text-primary);
}

.feature-title {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

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

/* Extra Features */
.features-extra {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.extra-feature {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    background: var(--bg-surface);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all var(--transition-base);
}

.extra-feature:hover {
    border-color: var(--primary);
    color: var(--text-primary);
}

.extra-icon {
    font-size: var(--text-lg);
}

/* ========================================
   Screenshots Section
   ======================================== */
.screenshots {
    background: var(--bg-primary);
    overflow: hidden;
}

.carousel-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.carousel-track-container {
    overflow: hidden;
    flex: 1;
    margin: 0 auto;
}

.carousel-track {
    display: flex;
    gap: var(--space-lg);
    transition: transform 0.5s ease;
}

.carousel-slide {
    flex: 0 0 auto;
}

.carousel-btn {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    transition: all var(--transition-base);
    flex-shrink: 0;
}

.carousel-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.carousel-btn svg {
    width: 24px;
    height: 24px;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-2xl);
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: var(--radius-full);
    background: var(--bg-surface);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
}

.carousel-dot.active {
    background: var(--primary);
    width: 30px;
}

/* ========================================
   Requirements Section
   ======================================== */
.requirements {
    background: var(--gradient-dark);
}

.requirements-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
    margin-bottom: var(--space-3xl);
}

.requirement-card {
    background: var(--bg-surface);
    border-radius: var(--radius-2xl);
    padding: var(--space-2xl);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all var(--transition-base);
}

.requirement-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
}

.requirement-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
    border-radius: var(--radius-full);
    background: var(--bg-surface-hover);
}

.requirement-icon svg {
    width: 36px;
    height: 36px;
}

.requirement-icon.shizuku svg {
    stroke: var(--primary-light);
}

.requirement-icon.root svg {
    stroke: var(--warning);
}

.requirement-icon.wireless svg {
    stroke: var(--accent);
}

.requirement-icon.otg svg {
    stroke: var(--success);
}

.requirement-card h3 {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.requirement-card p {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

.requirement-link {
    color: var(--primary-light);
    font-size: var(--text-sm);
    font-weight: 500;
}

.requirement-link:hover {
    text-decoration: underline;
}

.requirement-badge {
    display: inline-block;
    padding: var(--space-xs) var(--space-md);
    background: var(--bg-surface-hover);
    color: var(--text-secondary);
    font-size: var(--text-xs);
    font-weight: 600;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.requirement-badge.success {
    background: rgba(34, 197, 94, 0.2);
    color: var(--success);
}

/* Warning Box */
.warning-box {
    display: flex;
    align-items: flex-start;
    gap: var(--space-lg);
    padding: var(--space-xl);
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-2xl);
}

.warning-icon {
    font-size: var(--text-2xl);
    flex-shrink: 0;
}

.warning-content h4 {
    font-family: var(--font-heading);
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--warning);
    margin-bottom: var(--space-xs);
}

.warning-content p {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.requirements .btn-outline {
    display: flex;
    margin: 0 auto;
}

/* ========================================
   Download Section
   ======================================== */
.download {
    background: var(--bg-primary);
    text-align: center;
}

.version-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-xl);
    background: var(--bg-surface);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-3xl);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.version-badge span {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.version-badge strong {
    font-size: var(--text-lg);
    color: var(--primary-light);
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    max-width: 900px;
    margin: 0 auto;
}

.download-card {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-xl);
    background: var(--bg-surface);
    border-radius: var(--radius-2xl);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all var(--transition-base);
    text-align: left;
}

.download-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.download-card.primary {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1) 0%, var(--bg-surface) 100%);
}

.download-badge {
    width: 48px;
    height: 48px;
    object-fit: contain;
    flex-shrink: 0;
}

.download-info h3 {
    font-family: var(--font-heading);
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.download-info p {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.download-arrow {
    font-size: var(--text-xl);
    color: var(--text-muted);
    margin-left: auto;
    transition: transform var(--transition-base);
}

.download-card:hover .download-arrow {
    transform: translateX(5px);
    color: var(--primary);
}

/* ========================================
   Community Section
   ======================================== */
.community {
    background: var(--gradient-dark);
}

.community-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    max-width: 900px;
    margin: 0 auto;
}

.community-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-2xl);
    background: var(--bg-surface);
    border-radius: var(--radius-2xl);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all var(--transition-base);
}

.community-card:hover {
    transform: translateY(-4px);
}

.community-card.github:hover {
    border-color: #fff;
}

.community-card.crowdin:hover {
    border-color: #2e8b57;
}

.community-card.telegram:hover {
    border-color: #0088cc;
}

.community-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-lg);
}

.community-icon svg {
    width: 40px;
    height: 40px;
}

.community-card.github .community-icon svg {
    fill: var(--text-primary);
}

.community-card.crowdin .community-icon svg {
    fill: #2e8b57;
}

.community-card.telegram .community-icon svg {
    fill: #0088cc;
}

.community-card h3 {
    font-family: var(--font-heading);
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.community-card p {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background: var(--bg-secondary);
    padding: var(--space-3xl) 0 var(--space-xl);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: var(--space-2xl);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: var(--space-xl);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.footer-logo {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-xl);
}

.footer-info h3 {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.footer-info p {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.footer-links {
    display: flex;
    gap: var(--space-xl);
}

.footer-links a {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.footer-bottom a {
    color: var(--primary-light);
}

.footer-bottom a:hover {
    text-decoration: underline;
}

/* ========================================
   Responsive Styles - Enhanced Mobile Experience
   ======================================== */

/* Tablet Landscape */
@media (max-width: 1024px) {
    .container {
        padding: 0 var(--space-xl);
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--space-2xl);
    }

    .hero-content {
        order: 1;
    }

    .hero-mockup {
        order: 0;
    }

    .hero-description {
        margin: 0 auto var(--space-2xl);
    }

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

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

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .requirements-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .download-grid {
        grid-template-columns: 1fr;
        max-width: 450px;
    }

    .community-grid {
        grid-template-columns: 1fr;
        max-width: 450px;
    }
}

/* Tablet Portrait & Large Phones */
@media (max-width: 768px) {
    :root {
        --space-4xl: 4rem;
        --space-3xl: 3rem;
    }

    .container {
        padding: 0 var(--space-lg);
    }

    /* Navigation - Full Screen Mobile Menu */
    .navbar {
        padding: var(--space-sm) 0;
    }

    .nav-menu {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        height: 100vh !important;
        height: 100dvh !important;
        /* Dynamic viewport height for mobile */
        min-height: -webkit-fill-available;
        width: 100vw !important;
        background: var(--bg-primary) !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        padding: var(--space-2xl);
        gap: var(--space-xl);
        transform: translateX(100%);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
            opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
            visibility 0.4s;
        z-index: 9999 !important;
        overflow-y: auto;
    }

    .nav-menu.active {
        transform: translateX(0) !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    .nav-link {
        font-size: var(--text-2xl);
        font-weight: 600;
        padding: var(--space-md);
        color: var(--text-primary);
        /* Ensure text is clearly visible */
    }

    .nav-menu li {
        display: block;
        width: 100%;
        text-align: center;
    }

    .nav-toggle {
        display: flex;
        z-index: calc(var(--z-modal) + 1);
        background: rgba(10, 10, 15, 0.5);
        /* Semi-transparent background for toggle */
        backdrop-filter: blur(4px);
        border-radius: var(--radius-full);
    }

    .nav-toggle.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
        background: var(--primary-light);
        /* Highlight active state */
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
        background: var(--primary-light);
    }

    /* Hero Section - Mobile Optimized */
    .hero {
        min-height: auto;
        padding: 100px 0 var(--space-3xl);
    }

    .hero-title {
        font-size: var(--text-4xl);
        line-height: 1.15;
    }

    .hero-tagline {
        font-size: var(--text-lg);
        min-height: 2rem;
    }

    .hero-description {
        font-size: var(--text-base);
        padding: 0 var(--space-sm);
    }

    .hero-stats {
        gap: var(--space-xl);
        padding: var(--space-lg);
        background: var(--bg-surface);
        border-radius: var(--radius-2xl);
        border: 1px solid rgba(255, 255, 255, 0.05);
    }

    .stat-number {
        font-size: var(--text-2xl);
    }

    .stat-label {
        font-size: var(--text-xs);
    }

    /* Phone Mockup - Mobile */
    .phone-screen {
        width: 100%;
        /* Responsive width */
        max-width: 200px;
        height: auto;
    }

    .phone-frame {
        padding: 10px;
        border-radius: 32px;
        display: inline-block;
        /* Ensure frame wraps resizing image */
    }

    .phone-frame::before {
        border-radius: 32px;
    }

    .phone-frame.small {
        padding: 6px;
        border-radius: 24px;
        width: auto;
        /* Let content dictate width */
    }

    .phone-frame.small::before {
        border-radius: 24px;
    }

    .phone-frame.small .phone-screen,
    .phone-frame.small img {
        width: 140px;
        /* Fixed width for carousel consistency */
        height: auto;
        border-radius: 20px;
    }

    /* Sections - Mobile */
    section {
        padding: var(--space-3xl) 0;
    }

    .section-header {
        margin-bottom: var(--space-2xl);
    }

    .section-title {
        font-size: var(--text-3xl);
        line-height: 1.2;
    }

    .section-subtitle {
        font-size: var(--text-base);
        padding: 0 var(--space-sm);
    }

    /* Features - Mobile Cards */
    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .feature-card {
        padding: var(--space-xl);
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .feature-card:hover {
        transform: none;
    }

    .feature-icon {
        width: 56px;
        height: 56px;
        margin-bottom: var(--space-md);
    }

    .feature-icon svg {
        width: 24px;
        height: 24px;
    }

    .feature-title {
        font-size: var(--text-lg);
    }

    .features-extra {
        gap: var(--space-sm);
    }

    .extra-feature {
        padding: var(--space-xs) var(--space-md);
        font-size: var(--text-xs);
    }

    /* Carousel - Mobile Responsive Layout */
    .carousel-container {
        gap: var(--space-sm);
        width: 100%;
        overflow: visible;
    }

    .carousel-btn {
        width: 36px;
        height: 36px;
        display: flex;
    }

    .carousel-track-container {
        overflow: hidden;
    }

    .carousel-track {
        display: flex;
        gap: var(--space-md);
        padding: 0;
        transition: transform 0.5s ease;
    }

    .carousel-slide {
        flex: 0 0 auto;
        display: flex;
        justify-content: center;
    }

    .carousel-slide .phone-frame.small {
        margin: 0 auto;
    }

    .carousel-slide .phone-frame.small .phone-screen,
    .carousel-slide .phone-frame.small img {
        width: 140px;
        height: auto;
    }

    .carousel-dots {
        margin-top: var(--space-lg);
    }

    /* Requirements - Mobile */
    .requirements-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .requirement-card {
        padding: var(--space-xl);
        display: flex;
        flex-direction: row;
        text-align: left;
        gap: var(--space-lg);
        align-items: center;
    }

    .requirement-card:hover {
        transform: none;
    }

    .requirement-icon {
        width: 60px;
        height: 60px;
        min-width: 60px;
        margin: 0;
    }

    .requirement-icon svg {
        width: 28px;
        height: 28px;
    }

    .requirement-card h3 {
        font-size: var(--text-lg);
        margin-bottom: var(--space-xs);
    }

    .requirement-card p {
        font-size: var(--text-sm);
        margin-bottom: var(--space-sm);
    }

    .warning-box {
        flex-direction: row;
        align-items: center;
        padding: var(--space-lg);
        gap: var(--space-md);
    }

    .warning-icon {
        font-size: var(--text-xl);
    }

    .warning-content h4 {
        font-size: var(--text-base);
    }

    .warning-content p {
        font-size: var(--text-xs);
    }

    .requirements .btn-outline {
        font-size: var(--text-sm);
        padding: var(--space-sm) var(--space-lg);
    }

    /* Download - Mobile */
    .download-grid {
        max-width: 100%;
    }

    .download-card {
        padding: var(--space-lg);
        gap: var(--space-md);
    }

    .download-card:hover {
        transform: none;
    }

    .download-badge {
        width: 40px;
        height: 40px;
    }

    .download-info h3 {
        font-size: var(--text-base);
    }

    .download-info p {
        font-size: var(--text-xs);
    }

    /* Community - Mobile */
    .community-grid {
        max-width: 100%;
        gap: var(--space-md);
    }

    .community-card {
        padding: var(--space-xl);
        flex-direction: row;
        text-align: left;
        gap: var(--space-lg);
    }

    .community-card:hover {
        transform: none;
    }

    .community-icon {
        width: 48px;
        height: 48px;
        min-width: 48px;
        margin: 0;
    }

    .community-icon svg {
        width: 28px;
        height: 28px;
    }

    .community-card h3 {
        font-size: var(--text-base);
        margin-bottom: var(--space-xs);
    }

    .community-card p {
        font-size: var(--text-sm);
    }

    /* Footer - Mobile */
    .footer {
        padding: var(--space-2xl) 0 var(--space-lg);
    }

    .footer-content {
        flex-direction: column;
        gap: var(--space-xl);
        text-align: center;
    }

    .footer-brand {
        flex-direction: column;
        gap: var(--space-md);
    }

    .footer-logo {
        width: 48px;
        height: 48px;
    }

    .footer-info h3 {
        font-size: var(--text-lg);
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--space-lg);
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--space-sm);
        text-align: center;
        font-size: var(--text-xs);
    }
}

/* Small Phones (iPhone SE, etc.) */
@media (max-width: 480px) {
    :root {
        --space-4xl: 3rem;
        --space-3xl: 2.5rem;
        --space-2xl: 2rem;
    }

    .container {
        padding: 0 var(--space-md);
    }

    /* Hero - Small Phone */
    .hero {
        padding: 90px 0 var(--space-2xl);
    }

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

    .hero-tagline {
        font-size: var(--text-base);
    }

    .hero-description {
        font-size: var(--text-sm);
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
        gap: var(--space-sm);
    }

    .btn {
        width: 100%;
        justify-content: center;
        padding: var(--space-md) var(--space-lg);
        font-size: var(--text-sm);
    }

    .hero-stats {
        gap: var(--space-lg);
        padding: var(--space-md);
    }

    .stat-number {
        font-size: var(--text-xl);
    }

    .phone-screen {
        width: 180px;
    }

    .phone-frame.small .phone-screen,
    .phone-frame.small img {
        width: 120px;
    }

    /* Section Headers */
    .section-title {
        font-size: var(--text-2xl);
    }

    .section-subtitle {
        font-size: var(--text-sm);
    }

    /* Features */
    .feature-card {
        padding: var(--space-lg);
    }

    .feature-icon {
        width: 48px;
        height: 48px;
    }

    .feature-icon svg {
        width: 20px;
        height: 20px;
    }

    .feature-title {
        font-size: var(--text-base);
    }

    .feature-description {
        font-size: var(--text-xs);
    }

    .features-extra {
        flex-direction: column;
        align-items: stretch;
    }

    .extra-feature {
        justify-content: center;
    }

    /* Warning Box */
    .warning-box {
        flex-direction: column;
        text-align: center;
        gap: var(--space-sm);
        padding: var(--space-md);
    }

    /* Requirement Cards */
    .requirement-card {
        flex-direction: column;
        text-align: center;
        gap: var(--space-sm);
        padding: var(--space-lg);
    }

    .requirement-icon {
        margin: 0 auto;
    }

    /* Download Cards */
    .download-card {
        padding: var(--space-md);
    }

    /* Community Cards */
    .community-card {
        flex-direction: column;
        text-align: center;
        gap: var(--space-sm);
        padding: var(--space-lg);
    }

    .community-icon {
        margin: 0 auto;
    }

    /* Hide non-essential elements on small screens */
    .scroll-indicator {
        display: none;
    }

    .gradient-orb {
        opacity: 0.3;
    }

    .orb-1 {
        width: 300px;
        height: 300px;
    }

    .orb-2 {
        width: 200px;
        height: 200px;
    }

    .orb-3 {
        display: none;
    }
}

/* Extra Small Phones */
@media (max-width: 360px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: var(--space-md);
    }

    .stat {
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
        padding: var(--space-sm) 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .stat:last-child {
        border-bottom: none;
    }

    .phone-screen {
        width: 160px;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {

    .feature-card:hover,
    .requirement-card:hover,
    .download-card:hover,
    .community-card:hover {
        transform: none;
        box-shadow: none;
    }

    .btn-primary:hover {
        transform: none;
    }

    /* Active states for touch */
    .feature-card:active,
    .download-card:active,
    .community-card:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }

    .btn:active {
        transform: scale(0.98);
    }
}

/* Landscape Phone */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        padding: 80px 0 var(--space-xl);
        min-height: auto;
    }

    .hero-container {
        grid-template-columns: 1fr 1fr;
        text-align: left;
        gap: var(--space-xl);
    }

    .hero-mockup {
        order: 1;
    }

    .hero-content {
        order: 0;
    }

    .hero-buttons {
        justify-content: flex-start;
    }

    .hero-stats {
        justify-content: flex-start;
    }

    .phone-screen {
        width: 150px;
    }

    .nav-menu.active {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        padding: var(--space-lg);
    }

    .nav-link {
        font-size: var(--text-lg);
    }
}

/* Dark mode preference - ensure consistent dark theme */
@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .gradient-orb {
        animation: none;
    }

    .typing-text::after {
        animation: none;
    }

    html {
        scroll-behavior: auto;
    }
}

/* Animation Utilities */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Scroll-based animations delay */
.feature-card:nth-child(1) {
    transition-delay: 0ms;
}

.feature-card:nth-child(2) {
    transition-delay: 100ms;
}

.feature-card:nth-child(3) {
    transition-delay: 200ms;
}

.feature-card:nth-child(4) {
    transition-delay: 300ms;
}

.feature-card:nth-child(5) {
    transition-delay: 400ms;
}

.feature-card:nth-child(6) {
    transition-delay: 500ms;
}