/* Local Inter Font */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/Inter-Regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('fonts/Inter-Medium.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('fonts/Inter-SemiBold.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('fonts/Inter-Bold.woff2') format('woff2');
}

/* CSS Variables for Light/Dark Theme */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --bg-tertiary: #ededed;
    --text-primary: #1b1b1b;
    --text-secondary: #4a4a4a;
    --text-muted: #888888;
    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --accent-light: #e0e7ff;
    --border: #e0e0e0;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-lg: rgba(0, 0, 0, 0.15);
    --phone-frame: #1b1b1b;
    --phone-frame-inner: #2a2a2a;
    --card-bg: #ffffff;
    --gradient-start: #6366f1;
    --gradient-end: #8b5cf6;
}

[data-theme="dark"] {
    --bg-primary: #1b1b1b;
    --bg-secondary: #252525;
    --bg-tertiary: #333333;
    --text-primary: #ededed;
    --text-secondary: #c0c0c0;
    --text-muted: #888888;
    --accent: #818cf8;
    --accent-hover: #a5b4fc;
    --accent-light: #312e81;
    --border: #404040;
    --shadow: rgba(0, 0, 0, 0.3);
    --shadow-lg: rgba(0, 0, 0, 0.4);
    --phone-frame: #000000;
    --phone-frame-inner: #1b1b1b;
    --card-bg: #252525;
    --gradient-start: #818cf8;
    --gradient-end: #a78bfa;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Top Bar - GitHub Stars + Theme Toggle */
.top-bar {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* GitHub Stars Badge - coder.com style */
.github-stars {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: opacity 0.2s ease;
}

.github-stars:hover {
    opacity: 0.7;
}

.github-stars svg {
    margin-top: -0.1em;
}

.github-stars .stars-count {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.01em;
    line-height: 0.9;
}

/* Theme Toggle Button */
.theme-toggle-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px var(--shadow);
}

.theme-toggle-btn:hover {
    background: var(--bg-tertiary);
    transform: scale(1.05);
}

.icon-sun, .icon-moon {
    transition: opacity 0.2s ease, transform 0.2s ease;
}

[data-theme="light"] .icon-sun,
:root:not([data-theme]) .icon-sun {
    display: block;
}

[data-theme="light"] .icon-moon,
:root:not([data-theme]) .icon-moon {
    display: none;
}

[data-theme="dark"] .icon-sun {
    display: none;
}

[data-theme="dark"] .icon-moon {
    display: block;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

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

.app-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    background: #1b1b1b;
    border-radius: 28px;
    margin-bottom: 2rem;
    color: #ededed;
    box-shadow: 0 20px 40px var(--shadow-lg);
}

[data-theme="dark"] .app-icon {
    background: #ededed;
    color: #1b1b1b;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #1b1b1b;
}

[data-theme="dark"] .hero h1 {
    color: #ffffff;
}

.tagline {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    line-height: 1.8;
}

/* Store Badges */
.download-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
}

.store-badge {
    display: block;
    transition: all 0.2s ease;
}

.store-badge:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.store-badge img {
    height: 80px; /* Store badges have built-in padding */
    width: auto;
    display: block;
}

.apk-badge svg {
    height: 54px;
    width: auto;
    display: block;
    border-radius: 5px;
}

.open-source {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.open-source a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.open-source a:hover {
    text-decoration: underline;
}

/* Section Styles */
section {
    padding: 5rem 2rem;
}

section h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    text-align: center;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Screenshots Section */
.screenshots {
    background: var(--bg-secondary);
}

/* Carousel Wrapper with Navigation */
.carousel-wrapper {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-70%);
    z-index: 10;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    box-shadow: 0 4px 12px var(--shadow);
    transition: all 0.2s ease;
}

.carousel-btn:hover {
    background: var(--bg-tertiary);
    transform: translateY(-70%) scale(1.1);
    box-shadow: 0 6px 20px var(--shadow-lg);
}

.carousel-btn-prev {
    left: 1rem;
}

.carousel-btn-next {
    right: 1rem;
}

.carousel-btn.hidden {
    display: none;
    opacity: 0;
    pointer-events: none;
}

/* Hide scrollbar but keep scrolling */
.phone-carousel {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    padding: 2rem 3rem 3rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.phone-carousel::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.phone-container {
    flex-shrink: 0;
    scroll-snap-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Samsung S25 Ultra Style Phone Frame */
.phone-frame {
    position: relative;
    width: 280px;
    height: 580px;
    background: var(--phone-frame);
    border-radius: 44px;
    padding: 12px;
    box-shadow:
        0 0 0 2px var(--phone-frame-inner),
        0 25px 50px -12px var(--shadow-lg),
        inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.phone-frame::before {
    content: '';
    position: absolute;
    top: 50%;
    right: -3px;
    transform: translateY(-50%);
    width: 3px;
    height: 80px;
    background: var(--phone-frame-inner);
    border-radius: 0 2px 2px 0;
}

.phone-frame::after {
    content: '';
    position: absolute;
    top: 25%;
    left: -3px;
    width: 3px;
    height: 60px;
    background: var(--phone-frame-inner);
    border-radius: 2px 0 0 2px;
}

.phone-notch {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 24px;
    background: var(--phone-frame);
    border-radius: 12px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.phone-notch::before {
    content: '';
    width: 12px;
    height: 12px;
    background: var(--phone-frame-inner);
    border-radius: 50%;
    box-shadow: inset 0 0 0 2px #333;
}

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

.phone-screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.phone-caption {
    margin-top: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Features Section */
.features {
    background: var(--bg-primary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px var(--shadow);
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: var(--accent-light);
    border-radius: 12px;
    color: var(--accent);
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

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

/* How It Works Section */
.how-it-works {
    background: var(--bg-secondary);
}

.steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    max-width: 1000px;
    margin: 0 auto;
}

.step {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    flex: 1;
    min-width: 200px;
    max-width: 280px;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    border-radius: 50%;
    margin-bottom: 1rem;
}

.step h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

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

.step-arrow {
    color: var(--accent);
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .step-arrow {
        transform: rotate(90deg);
    }

    .steps {
        flex-direction: column;
    }

    .step {
        max-width: 100%;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
    }

    .carousel-btn-prev {
        left: 0.5rem;
    }

    .carousel-btn-next {
        right: 0.5rem;
    }

    .carousel-btn-prev,
    .carousel-btn-next {
        display: none;
    }

    .carousel-wrapper.has-prev .carousel-btn-prev,
    .carousel-wrapper.has-next .carousel-btn-next {
        display: flex;
    }
}

/* Requirements Section */
.requirements {
    background: var(--bg-primary);
    text-align: center;
}

.requirements ul {
    list-style: none;
    display: inline-flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.requirements li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.requirements li svg {
    color: var(--accent);
    flex-shrink: 0;
}

/* Footer */
footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 3rem 2rem;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.footer-content > p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.footer-content a {
    color: var(--accent);
    text-decoration: none;
}

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

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
}

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

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

/* Responsive Design */
@media (max-width: 640px) {
    .hero {
        padding: 3rem 1.5rem;
    }

    .top-bar {
        top: 1rem;
        right: 1rem;
        gap: 0.75rem;
    }

    .github-stars .stars-count {
        font-size: 12px;
    }

    .theme-toggle-btn {
        width: 38px;
        height: 38px;
    }

    .download-buttons {
        flex-direction: column;
        align-items: center;
    }

    .store-badge img {
        height: 70px;
    }

    .apk-badge svg {
        height: 48px;
    }

    .phone-frame {
        width: 240px;
        height: 500px;
        border-radius: 36px;
    }

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

    .phone-notch {
        width: 60px;
        height: 20px;
        top: 16px;
    }

    .phone-notch::before {
        width: 10px;
        height: 10px;
    }

    section {
        padding: 3rem 1.5rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* Smooth transitions for theme changes */
* {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* Disable transitions on page load */
.preload * {
    transition: none !important;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .top-bar,
    .download-buttons,
    .carousel-btn {
        display: none;
    }

    body {
        background: white;
        color: black;
    }
}
