:root {
    --primary-color: #5856D6;
    --secondary-color: #8E8CFF;
    --accent-color: #FF9500;
    --text-color: #333333;
    --light-text: #666666;
    --background-color: #F5F5F7;
    --white: #FFFFFF;
    --max-width: 1200px;
    --border-radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Kanit', sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Header & Nav */
header {
    background-color: transparent;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
    padding: 10px 0;
}

header.scrolled {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 5px 0;
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--white); /* Default light state */
    transition: color 0.3s;
}

header.scrolled .logo {
    color: var(--primary-color);
}

.logo img {
    height: 40px;
    width: auto;
    transition: all 0.3s;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 500;
    color: var(--white); /* Default light state */
    transition: color 0.3s;
    opacity: 0.9;
}

.nav-links a:hover {
    opacity: 1;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--white);
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-radius: 8px;
    z-index: 1000;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 0;
    margin-top: 10px; /* Gap for hover */
}

/* Add a pseudo-element to bridge the gap so hover isn't lost */
.dropdown-content::before {
    content: "";
    position: absolute;
    top: -15px;
    left: 0;
    width: 100%;
    height: 20px;
    background: transparent;
}

.dropdown-content a {
    color: var(--text-color) !important; /* Force dark text in dropdown */
    padding: 12px 20px;
    text-decoration: none;
    display: block;
    font-size: 0.95rem;
    opacity: 1 !important;
}

.dropdown-content a:hover {
    background-color: #F5F5F7;
    color: var(--primary-color) !important;
}

.dropdown:hover .dropdown-content {
    display: block;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, 10px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

header.scrolled .nav-links a {
    color: var(--text-color);
}

header.scrolled .nav-links a:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    background: radial-gradient(circle at 10% 20%, rgb(87, 108, 230) 0%, rgb(113, 103, 237) 40%, rgb(88, 86, 214) 90%);
    color: var(--white);
    padding-top: 160px; /* Space for fixed header */
    padding-bottom: 100px;
    position: relative;
    overflow: hidden;
}

/* Abstract Background Shapes */
.hero-bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    opacity: 0.6;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: #FF9500;
    top: -100px;
    right: -100px;
    animation: floatShape 10s infinite alternate;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: #00C6FF;
    bottom: -50px;
    left: -50px;
    animation: floatShape 15s infinite alternate-reverse;
}

@keyframes floatShape {
    0% { transform: translate(0, 0); }
    100% { transform: translate(30px, 30px); }
}

.hero-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    position: relative;
    z-index: 1;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 15px;
    line-height: 1.2;
    font-weight: 700;
    text-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.hero-subtitle {
    font-size: 1.2rem;
    font-weight: 500;
    color: #FFD700;
    margin-bottom: 20px;
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 15px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
}

.hero-desc {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.95;
    line-height: 1.8;
    color: #F0F0FF;
}

.hero-stats {
    display: flex;
    gap: 40px;
    margin-bottom: 30px;
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 20px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--white);
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.8);
}

/* Layered Phone Animation */
.hero-image-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
    height: 600px; /* Define height for positioning */
    width: 100%;
    max-width: 500px;
    perspective: 1000px;
}

.phone-back {
    position: absolute;
    width: 70%;
    right: 0;
    top: 50px;
    z-index: 1;
    opacity: 0.8;
    transform: rotate(5deg) scale(0.9);
    filter: blur(1px);
    transition: all 0.5s ease;
    animation: floatBack 6s ease-in-out infinite;
}

.phone-front {
    position: absolute;
    width: 75%;
    left: 20px;
    top: 0;
    z-index: 2;
    filter: drop-shadow(0 30px 60px rgba(0,0,0,0.4));
    animation: floatFront 6s ease-in-out infinite;
}

.floating-badge {
    position: absolute;
    background: var(--white);
    color: var(--primary-color);
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: bold;
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
    z-index: 3;
    animation: floatBadge 4s ease-in-out infinite;
}

.badge-1 {
    top: 100px;
    left: 0;
    animation-delay: 0.5s;
}

.badge-2 {
    bottom: 150px;
    right: 20px;
    animation-delay: 1s;
}

@keyframes floatFront {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes floatBack {
    0%, 100% { transform: rotate(5deg) scale(0.9) translateY(0); }
    50% { transform: rotate(5deg) scale(0.9) translateY(-15px); }
}

@keyframes floatBadge {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.btn-download {
    background-color: var(--white);
    color: var(--primary-color);
    padding: 15px 40px;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1rem;
    transition: transform 0.2s, box-shadow 0.2s;
    display: inline-block;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.btn-download:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

/* Features Section */
.section {
    padding: 100px 20px;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    color: var(--text-color);
    font-weight: 600;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 40px;
}

.feature-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(0,0,0,0.02);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #F0F0FF 0%, #E6E6FF 100%);
    border-radius: 50%;
    margin: 0 auto 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--primary-color);
}

.feature-card h3 {
    margin-bottom: 15px;
    color: var(--text-color);
    font-size: 1.25rem;
}

.feature-card p {
    color: var(--light-text);
    font-size: 1rem;
}

/* Screenshots Section */
.screenshot-section {
    background-color: var(--white);
    overflow: hidden;
}

.screenshot-scroll {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    padding: 40px 20px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    cursor: grab; /* Indicate draggable */
}

.screenshot-scroll.active {
    cursor: grabbing;
    scroll-snap-type: none; /* Disable snap while dragging for smoother feel */
}

.screenshot-scroll::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.screenshot-item {
    flex: 0 0 auto;
    width: 280px;
    scroll-snap-align: center;
    transition: transform 0.3s;
}

.screenshot-item:hover {
    transform: scale(1.02);
}

.screenshot-item img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    border: 8px solid #fff;
}

/* Steps Section */
.steps-section {
    background-color: #FAFAFC;
}

.steps-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.steps-container::before {
    content: '';
    position: absolute;
    top: 30px;
    left: 50px;
    right: 50px;
    height: 2px;
    background-color: #E0E0E0;
    z-index: 0;
    display: none; /* Hide on mobile, show on desktop via media query */
}

.step-item {
    flex: 1;
    min-width: 200px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-weight: bold;
    font-size: 1.2rem;
    box-shadow: 0 5px 15px rgba(88, 86, 214, 0.4);
}

.step-item h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.step-item p {
    color: var(--light-text);
    font-size: 0.95rem;
}

/* Footer */
footer {
    background-color: #1A1A1D;
    color: var(--white);
    padding: 80px 20px 30px;
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 50px;
    margin-bottom: 60px;
}

.footer-col h4 {
    margin-bottom: 25px;
    color: var(--white);
    font-size: 1.2rem;
}

.footer-col ul li {
    margin-bottom: 15px;
}

.footer-col a {
    color: #A0A0A0;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.footer-col a:hover {
    color: var(--primary-color);
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #333;
    color: #666;
    font-size: 0.9rem;
}

/* Responsive */
@media (min-width: 992px) {
    .steps-container::before {
        display: block;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero {
        padding-top: 100px;
        text-align: center;
    }

    .hero-container {
        flex-direction: column;
        gap: 40px;
    }

    .hero-content {
        order: 1;
    }
    
    .hero-image-wrapper {
        height: 400px;
        margin-top: 40px;
    }

    .phone-front {
        width: 60%;
        left: 50%;
        transform: translateX(-50%);
        animation: floatFrontMobile 6s ease-in-out infinite;
    }
    
    .phone-back {
        width: 55%;
        right: 50%;
        transform: translateX(60%) rotate(5deg) scale(0.9);
        animation: none; /* Simplify animation on mobile */
    }
    
    @keyframes floatFrontMobile {
        0%, 100% { transform: translateX(-50%) translateY(0); }
        50% { transform: translateX(-50%) translateY(-20px); }
    }

    .badge-1 { left: 10%; }
    .badge-2 { right: 10%; }

    .hero h1 {
        font-size: 2.5rem;
    }
    
    .steps-container {
        flex-direction: column;
        align-items: center;
    }
    
    .step-item {
        width: 100%;
        max-width: 300px;
    }

    .section-title {
        font-size: 2rem;
    }
}
