/* Import Google Font - Inter (modern and clean) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

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

html {
    scroll-behavior: smooth;
}

:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    --dark-bg: #0f172a;
    --light-bg: #f8fafc;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --white: #ffffff;
    --gradient: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

/* Rainbow gradient animation */
@keyframes rainbowGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

/* Gradient animations */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes float1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-30px, 50px) scale(0.9); }
}

@keyframes float2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-40px, 30px) scale(0.9); }
    66% { transform: translate(40px, -30px) scale(1.1); }
}

@keyframes float3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(50px, 20px) scale(1.05); }
    66% { transform: translate(-50px, -20px) scale(0.95); }
}

/* Lightning effects */
@keyframes lightningFlash {
    0% { opacity: 0; }
    10% { opacity: 1; }
    20% { opacity: 0; }
    30% { opacity: 1; }
    40% { opacity: 0; }
    100% { opacity: 0; }
}

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

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: 
        radial-gradient(ellipse at 20% 30%, rgba(102, 126, 234, 0.28) 0%, transparent 40%),
        radial-gradient(ellipse at 80% 60%, rgba(31, 51, 96, 0.21) 0%, transparent 45%),
        radial-gradient(ellipse at 40% 80%, rgba(15, 23, 42, 0.245) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 20%, rgba(79, 70, 160, 0.21) 0%, transparent 42%),
        linear-gradient(80deg, rgba(45, 53, 97, 0.7) 0%, rgba(26, 40, 71, 0.7) 30%, rgba(15, 23, 42, 0.7) 70%, rgba(10, 15, 31, 0.7) 100%);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 2px 10px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    z-index: 1000;
    transition: all 0.3s ease;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo-link:hover {
    transform: scale(1.05);
}

.brand-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--white);
    transition: all 0.3s ease;
}

.logo-link:hover .brand-name {
    letter-spacing: 0.5px;
}

.nav-logo {
    width: 35px;
    height: 35px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
    transition: all 0.3s ease;
}

.nav-logo:hover {
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.3);
    border-radius: 15px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--white);
    font-weight: 700;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: rgba(255, 255, 255, 0.8);
}

.lang-toggle {
    padding: 0.5rem 1rem;
    border: 2px solid var(--white);
    background: transparent;
    color: var(--white);
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.lang-toggle:hover {
    background: var(--primary-color);
    color: var(--white);
}

.mobile-menu {
    display: none;
    flex-direction: column;
    gap: 0.3rem;
    cursor: pointer;
}

.mobile-menu span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('./image/hero.jpg') center / cover no-repeat;
    background-attachment: fixed;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

/* Animated background orbs */
.hero::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    top: -250px;
    right: -250px;
    animation: float1 20s ease-in-out infinite;
    filter: blur(40px);
    z-index: 1;
}

.hero::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    bottom: -200px;
    left: -200px;
    animation: float2 25s ease-in-out infinite;
    filter: blur(40px);
    z-index: 1;
}

#lightningContainer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 2;
}

.lightning-bolt {
    position: absolute;
    top: 0;
    opacity: 0;
    z-index: 2;
    pointer-events: none;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.9))
            drop-shadow(0 0 15px rgba(255, 255, 255, 0.6))
            drop-shadow(0 0 25px rgba(200, 220, 255, 0.4));
}

.lightning-bolt svg {
    width: 100%;
    height: 100%;
}

.lightning-bolt path {
    fill: none;
    stroke: white;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    text-align: center;
    color: var(--white);
    position: relative;
    z-index: 10;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1rem;
    animation: slideDown 1s ease;
}

.hero p {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: slideUp 1s ease;
}

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

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

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    background-size: 200% 200%;
    animation: rainbowGradient 5s ease infinite;
    color: var(--white);
    text-decoration: none;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 5px 20px rgba(99, 102, 241, 0.3);
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.5);
}

/* Section Styles */
section {
    padding: 5rem 2rem;
    scroll-margin-top: 80px;
}

section:not(.hero) {
    opacity: 1;
    transform: translateY(0);
}

section:nth-child(even) {
    animation-delay: 0.2s;
}

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

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

.section-title {
    text-align: center;
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 3rem;
    position: relative;
    background: linear-gradient(45deg, #667eea, #764ba2, #f093fb);
    background-size: 200% 200%;
    animation: rainbowGradient 5s ease infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
    background-size: 200% 200%;
    animation: rainbowGradient 5s ease infinite;
    border-radius: 2px;
}

/* Apps Section */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.app-card {
    background: var(--white);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.5s ease;
}

.app-card:hover::before {
    left: 100%;
}

.app-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 25px 60px rgba(102, 126, 234, 0.3);
}

.app-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    background-size: 200% 200%;
    animation: rainbowGradient 5s ease infinite;
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
    transition: all 0.4s ease;
}

.app-card:hover .app-icon {
    transform: rotate(360deg) scale(1.1);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.5);
}

.app-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.app-card p {
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.store-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.store-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    background-size: 200% 200%;
    color: var(--white);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.store-button::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 ease;
}

.store-button:hover::before {
    left: 100%;
}

.store-button:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.store-button svg {
    width: 24px;
    height: 24px;
}

/* Disabled links (href="#") */
a[href="#"].store-button {
    opacity: 0.5;
    cursor: not-allowed;
    background: linear-gradient(135deg, #374151, #4b5563);
}

a[href="#"].store-button:hover {
    background: linear-gradient(135deg, #374151, #4b5563);
    transform: scale(1);
    box-shadow: none;
}

a[href="#"].store-button::before {
    background: none;
}

/* About Section */
.about {
    background: var(--light-bg);
}

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

.about-content p {
    font-size: 1.2rem;
    color: var(--text-light);
    line-height: 2;
}

/* Contact Section */
.contact {
    background: var(--white);
}

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

.contact-email {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    background-size: 200% 200%;
    animation: rainbowGradient 5s ease infinite;
    color: var(--white);
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.4s ease;
    box-shadow: 0 5px 20px rgba(99, 102, 241, 0.3);
    position: relative;
    overflow: hidden;
}

.contact-email::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.contact-email:hover::before {
    left: 100%;
}

.contact-email:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.5);
}

/* Terms Section */
.terms {
    background: var(--light-bg);
}

.terms-toggle {
    text-align: center;
    margin-bottom: 2rem;
}

.toggle-button {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    background-size: 200% 200%;
    animation: rainbowGradient 5s ease infinite;
    color: var(--white);
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 5px 20px rgba(99, 102, 241, 0.3);
    position: relative;
    overflow: hidden;
}

.toggle-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.toggle-button:hover::before {
    left: 100%;
}

.toggle-button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.5);
}

.terms-content {
    max-width: 900px;
    margin: 0 auto;
    background: var(--white);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    display: none;
    animation: fadeIn 0.5s ease;
}

.terms-content.active {
    display: block;
}

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

.terms-content h3 {
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.terms-content p, .terms-content ul {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.terms-content ul {
    padding-left: 2rem;
}

/* Footer */
footer {
    background: 
        radial-gradient(ellipse at 20% 30%, rgba(102, 126, 234, 0.4) 0%, transparent 40%),
        radial-gradient(ellipse at 80% 60%, rgba(31, 51, 96, 0.3) 0%, transparent 45%),
        radial-gradient(ellipse at 40% 80%, rgba(15, 23, 42, 0.35) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 20%, rgba(79, 70, 160, 0.3) 0%, transparent 42%),
        linear-gradient(135deg, #2d3561 0%, #1a2847 30%, #0f172a 70%, #0a0f1f 100%);
    color: var(--white);
    padding: 3rem 2rem 1rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
    color: var(--white);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--white);
}

.footer-stores {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

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

/* App Icon with Image */
.app-icon-image {
    background: none;
    animation: none;
    box-shadow: none;
}

.app-icon-image img {
    width: 100%;
    height: 100%;
    border-radius: 25px;
    object-fit: cover;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
    transition: all 0.4s ease;
}

.app-card:hover .app-icon-image img {
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.5);
    transform: scale(1.1);
}

/* Gallery/Carousel Section */
.gallery {
    padding: 4rem 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
}

.carousel-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    max-width: 80%;
    margin: 0 auto;
    position: relative;
}

.carousel-viewport {
    flex: 1;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    gap: 0.5rem;
}

.carousel-item {
    flex: 0 0 calc(33.333% - 0.333rem);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    overflow: hidden;
    background: transparent;
}

.carousel-item img {
    width: 100%;
    height: 60vh;
    object-fit: cover;
    display: block;
}

.carousel-button {
    position: relative;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 5px 20px rgba(99, 102, 241, 0.3);
}

.carousel-button:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
}

.carousel-button:active {
    transform: scale(0.95);
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.carousel-dot.active {
    background: var(--primary-color);
    width: 35px;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.4);
}

.carousel-dot:hover {
    background: rgba(99, 102, 241, 0.6);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        flex-direction: column;
        background: var(--white);
        width: 100%;
        padding: 2rem;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        transition: left 0.3s ease;
    }

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

    .mobile-menu {
        display: flex;
    }

    .hero {
        padding-top: 80px;
    }

    .hero {
        background-attachment: scroll;
    }

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

    .store-buttons {
        flex-direction: column;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-stores {
        justify-content: center;
    }

    .images-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    section {
        scroll-margin-top: 70px;
    }
}

@media (max-width: 1024px) {
    .carousel-item {
        flex: 0 0 calc(50% - 0.5rem);
    }

    .carousel-item img {
        height: 50vh;
    }
}

@media (max-width: 768px) {
    .carousel-wrapper {
        gap: 0.5rem;
    }

    .carousel-button {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .carousel-item {
        flex: 0 0 100%;
    }

    .carousel-item img {
        height: 45vh;
    }
}
