/* ==========================================
   MODERN CSS RESET & BASE STYLES
   ========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #007AFF;
    --primary-dark: #0051D5;
    --secondary-color: #5856D6;
    --accent-color: #FF9500;
    --text-primary: #1C1C1E;
    --text-secondary: #8E8E93;
    --background: #FFFFFF;
    --background-alt: #F2F2F7;
    --border-color: #E5E5EA;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    background-color: var(--background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.menu-open {
    overflow: hidden;
}

body.menu-open::before {
    content: '';
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

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

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

/* ==========================================
   NAVIGATION
   ========================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition);
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
}

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

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

.nav-menu {
    display: flex;
    list-style: none;
    gap: 32px;
    align-items: center;
}

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

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

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

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 3px;
    background: var(--text-primary);
    transition: var(--transition);
    border-radius: 3px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

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

.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ==========================================
   HERO SECTION
   ========================================== */

.hero {
    padding: 120px 24px 64px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 20px;
    margin-bottom: 32px;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    padding: 14px 32px;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: var(--transition);
    display: inline-block;
}

.btn-primary {
    background: white;
    color: var(--primary-color);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ==========================================
   FEATURED BANNER SECTION
   ========================================== */

.featured-banner {
    padding: 80px 0;
    background: var(--background);
}

.section-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 48px;
    text-align: center;
    color: var(--text-primary);
}

.banner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.banner-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 400px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

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

.banner-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    transform: translateY(60%);
    transition: var(--transition);
}

.banner-card:hover .banner-overlay {
    transform: translateY(0);
}

.banner-overlay h3 {
    font-size: 24px;
    margin-bottom: 8px;
}

.banner-overlay p {
    font-size: 14px;
    margin-bottom: 16px;
    opacity: 0.9;
}

.banner-btn {
    display: inline-block;
    padding: 10px 24px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 100px;
    font-weight: 600;
    transition: var(--transition);
}

.banner-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

/* ==========================================
   ALL APPS SECTION
   ========================================== */

.all-apps {
    padding: 80px 0;
    background: var(--background-alt);
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 18px;
    margin-top: -32px;
    margin-bottom: 48px;
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 32px;
}

.app-item {
    background: var(--background);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.app-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.app-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
}

.app-icon img {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-xl);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.app-content {
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.app-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.app-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.app-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
    flex: 1;
}

.app-meta {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.app-category,
.app-price {
    padding: 6px 12px;
    background: var(--background-alt);
    color: var(--text-secondary);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.app-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 100px;
    font-weight: 600;
    transition: var(--transition);
}

.app-link:hover {
    background: var(--primary-dark);
    transform: scale(1.02);
}

.app-link svg {
    width: 16px;
    height: 16px;
}

/* ==========================================
   FOOTER
   ========================================== */

.footer {
    padding: 48px 0;
    background: var(--text-primary);
    color: white;
}

.footer-content {
    text-align: center;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-weight: 600;
    font-size: 20px;
}

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

.footer-content p {
    margin-bottom: 16px;
    opacity: 0.8;
}

.footer-links {
    display: flex;
    gap: 24px;
    justify-content: center;
    align-items: center;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.footer-links a:hover {
    opacity: 0.7;
}

.separator {
    opacity: 0.5;
}

/* ==========================================
   RESPONSIVE DESIGN - TABLET
   ========================================== */

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 64px;
        left: -100%;
        flex-direction: column;
        background: var(--background);
        width: 280px;
        height: calc(100vh - 64px);
        padding: 32px;
        gap: 24px;
        box-shadow: var(--shadow-lg);
        transition: left 0.3s ease;
        z-index: 1001;
    }

    .nav-menu.active {
        left: 0;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 18px;
    }

    .section-title {
        font-size: 28px;
    }

    .apps-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

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

/* ==========================================
   RESPONSIVE DESIGN - MOBILE
   ========================================== */

@media (max-width: 480px) {
    .hero {
        padding: 100px 16px 48px;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }

    .section-title {
        font-size: 24px;
        margin-bottom: 32px;
    }

    .banner-card {
        height: 300px;
    }

    .apps-grid {
        gap: 20px;
    }

    .app-icon {
        width: 100px;
        height: 100px;
    }

    .footer-links {
        flex-direction: column;
        gap: 16px;
    }

    .separator {
        display: none;
    }
}

/* ==========================================
   ANIMATIONS
   ========================================== */

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

.app-item,
.banner-card {
    animation: fadeInUp 0.6s ease forwards;
}

.app-item:nth-child(1) { animation-delay: 0.1s; }
.app-item:nth-child(2) { animation-delay: 0.2s; }
.app-item:nth-child(3) { animation-delay: 0.3s; }
.app-item:nth-child(4) { animation-delay: 0.4s; }
.app-item:nth-child(5) { animation-delay: 0.5s; }
.app-item:nth-child(6) { animation-delay: 0.6s; }
.app-item:nth-child(7) { animation-delay: 0.7s; }
.app-item:nth-child(8) { animation-delay: 0.8s; }
.app-item:nth-child(9) { animation-delay: 0.9s; }

.banner-card:nth-child(1) { animation-delay: 0.1s; }
.banner-card:nth-child(2) { animation-delay: 0.2s; }
.banner-card:nth-child(3) { animation-delay: 0.3s; }
