:root {
    /* App Colors Reference */
    --primary-color: #5DADE2;
    --primary-dark: #3498DB;
    --primary-light: #85C1E9;
    --secondary-color: #FF9500;
    --text-primary: #2C3E50;
    --text-secondary: #7F8C8D;
    --background-color: #FAFAFA;
    --surface-color: #FFFFFF;

    /* Font Family */
    --font-family-base: 'Inter', 'Noto Sans TC', sans-serif;
}

body {
    background-color: var(--background-color);
    font-family: var(--font-family-base);
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

section {
    padding: 100px 0;
    overflow: hidden;
    /* For scroll animations */
}

/* Animations using AOS-like classes (simple CSS keyframes) */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* App Header */
.app-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 24px 0;
    z-index: 10;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-logo {
    height: 48px;
    width: auto;
}

.app-name {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--surface-color) 0%, var(--background-color) 100%);
    padding: 160px 0 80px;
    /* Increased top padding for header space */
    text-align: center;
    position: relative;
}

.hero-section h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    background: linear-gradient(45deg, var(--primary-dark), var(--primary-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.hero-section .lead {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    font-weight: 400;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 60px;
}

.app-store-btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(93, 173, 226, 0.3);
}

.app-store-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(93, 173, 226, 0.4);
    color: white;
}

.app-store-btn i {
    margin-right: 10px;
    font-size: 1.2rem;
}

.hero-image-container {
    margin-top: 40px;
    perspective: 1000px;
}

.hero-mockup {
    max-width: 280px;
    margin: 0 auto;
    border-radius: 30px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 10px solid #333;
    /* Black frame */
    /* Removed rotation to fix perceived aspect ratio */
    transition: transform 0.5s ease;
    aspect-ratio: 1290 / 2796;
    object-fit: cover;
}

.hero-mockup:hover {
    transform: scale(1.02);
    cursor: zoom-in;
}

/* Features Section */
.features-section {
    background-color: var(--surface-color);
    position: relative;
    /* Optional: subtle background pattern */
    background-image: radial-gradient(#e5e7eb 1px, transparent 1px);
    background-size: 24px 24px;
}

.section-title {
    font-size: 2.25rem;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    display: inline-block;
    width: 100%;
    z-index: 2;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 15px auto 0;
    border-radius: 2px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    position: relative;
    z-index: 2;
}

.feature-card {
    background: #ffffff;
    padding: 40px 32px;
    border-radius: 24px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(93, 173, 226, 0.15);
    /* Primary color shadow */
    border-color: rgba(93, 173, 226, 0.3);
}

.feature-icon {
    width: 80px;
    height: 80px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(93, 173, 226, 0.1), rgba(93, 173, 226, 0.05));
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 24px;
    transition: all 0.4s ease;
    box-shadow: inset 0 0 0 1px rgba(93, 173, 226, 0.1);
}

.feature-card:hover .feature-icon {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 10px 20px rgba(93, 173, 226, 0.3);
}

.feature-card h3 {
    font-size: 1.35rem;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0;
    line-height: 1.7;
}

/* Screenshots Section */
/* Showcase Section (Zigzag Layout) */
.showcase-section {
    background-color: var(--background-color);
    padding: 100px 0;
}

.showcase-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 120px;
    gap: 60px;
}

.showcase-item:last-child {
    margin-bottom: 0;
}

/* Zigzag pattern: reverse order for even items */
.showcase-item:nth-child(even) {
    flex-direction: row-reverse;
}

.showcase-text {
    flex: 1;
    max-width: 500px;
}

.showcase-text h3 {
    font-size: 2rem;
    margin-bottom: 20px;
    background: linear-gradient(45deg, var(--primary-dark), var(--primary-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.showcase-text p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.showcase-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.screenshot-frame {
    max-width: 300px;
    width: 100%;
    position: relative;
    border: 12px solid #333;
    border-radius: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    background-color: #333;
    overflow: hidden;
    aspect-ratio: 1290 / 2796;
    transition: transform 0.5s ease;
}

.screenshot-frame:hover {
    transform: translateY(-10px);
}

.screenshot-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 992px) {
    .showcase-item {
        flex-direction: column !important;
        /* Stack vertically on mobile */
        text-align: center;
        margin-bottom: 80px;
        gap: 40px;
    }

    .showcase-text {
        max-width: 100%;
    }
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    text-align: center;
    padding: 100px 0;
}

.cta-section h2 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.cta-section .lead {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
    font-size: 1.2rem;
}

.cta-btn {
    background-color: white;
    color: var(--primary-dark);
    padding: 15px 40px;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    font-size: 1.1rem;
}

.cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    color: var(--primary-dark);
    background-color: #fff;
}

/* Footer */
.footer-section {
    background-color: #2C3E50;
    color: #95A5A6;
    padding: 40px 0;
    text-align: center;
    font-size: 0.9rem;
}

.footer-section a {
    color: white;
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: var(--primary-light);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .app-store-btn {
        width: 80%;
        justify-content: center;
    }

    section {
        padding: 60px 0;
    }
}

.screenshot-frame {
    cursor: zoom-in;
    /* Indicate clickable */
}

/* Lightbox Styles */
.lightbox-modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    z-index: 9999;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.9);
    cursor: zoom-out;
    /* Flexbox properties applied when display becomes flex via JS */
    align-items: center;
    justify-content: center;
}

.lightbox-frame-container {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    border: 12px solid #333;
    /* Dark frame like screenshots */
    border-radius: 40px;
    background-color: #333;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    animation-name: zoom;
    animation-duration: 0.3s;
    /* Aspect ratio constraint to match phone */
    aspect-ratio: 1290 / 2796;
    height: 85vh;
    /* Fixed height relative to viewport */
    width: auto;
    /* Let width adjust based on aspect ratio */
}

.lightbox-content {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@keyframes zoom {
    from {
        transform: scale(0)
    }

    to {
        transform: scale(1)
    }
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}