:root {
    --primary: #7c5cfc;
    --primary-glow: rgba(124, 92, 252, 0.5);
    --secondary: #0ea5e9;
    --bg-dark: #020617;
    --bg-card: rgba(30, 41, 59, 0.5);
    --text-main: #f8fafc;
    --text-dim: #94a3b8;
    --accent: #10b981;
    --font-kanit: 'Kanit', sans-serif;
}

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

body {
    font-family: var(--font-kanit);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Blobs */
.blob {
    position: fixed;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
    filter: blur(100px);
    animation: moveOrganic 20s infinite alternate ease-in-out;
    pointer-events: none;
    opacity: 0.6;
}

.blob-1 { top: -10%; left: -10%; }
.blob-2 { 
    bottom: -10%; 
    right: -10%; 
    background: radial-gradient(circle, rgba(14, 165, 233, 0.5) 0%, transparent 70%); 
    animation-delay: -3s;
}
.blob-3 {
    top: 40%;
    left: 40%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.2) 0%, transparent 70%);
    animation-duration: 20s;
}

@keyframes moveOrganic {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); }
    33% { transform: translate(150px, -100px) scale(1.2) rotate(20deg); }
    66% { transform: translate(-100px, 150px) scale(0.9) rotate(-20deg); }
    100% { transform: translate(0, 0) scale(1) rotate(0deg); }
}

/* Grid Overlay Effect */
.grid-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    pointer-events: none;
    mask-image: radial-gradient(circle at center, black, transparent 80%);
    animation: gridMove 20s infinite linear;
}

@keyframes gridMove {
    from { background-position: 0 0; }
    to { background-position: 50px 50px; }
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

.nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 10%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Floating Animation */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

.float-anim {
    animation: float 5s infinite ease-in-out;
}

/* Reveal on Scroll */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

.nav.scrolled {
    padding: 12px 10%;
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #fff 30%, var(--primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links { display: flex; gap: 40px; }
.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: 0.3s;
    opacity: 0.8;
}
.nav-links a:hover { opacity: 1; color: var(--primary); }

header {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 160px 10% 100px;
    position: relative;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at center, transparent 0%, var(--bg-dark) 90%);
    z-index: 1;
}

header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('hero-bg.png');
    background-size: cover;
    background-position: center;
    opacity: 0.3;
    filter: saturate(1.5);
    animation: panBG 60s linear infinite alternate;
}

@keyframes panBG {
    0% { background-position: 0% 50%; transform: scale(1.05); }
    50% { background-position: 50% 50%; transform: scale(1); }
    100% { background-position: 100% 50%; transform: scale(1.05); }
}

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

.particle {
    position: absolute;
    background: white;
    border-radius: 50%;
    opacity: 0;
    animation: floatParticle 8s infinite ease-in-out;
}

@keyframes floatParticle {
    0% { transform: translateY(100px) scale(0); opacity: 0; }
    20% { opacity: 0.4; }
    80% { opacity: 0.2; }
    100% { transform: translateY(-300px) scale(1.5); opacity: 0; }
}

.hero-glow {
    position: absolute;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(124, 92, 252, 0.4) 0%, transparent 70%);
    z-index: 1;
    filter: blur(120px);
    animation: breatheGlow 10s infinite alternate ease-in-out;
    pointer-events: none;
    top: 20%;
}

@keyframes breatheGlow {
    0% { transform: scale(0.8) translate(-50px, -50px); opacity: 0.3; }
    50% { transform: scale(1.1) translate(50px, 50px); opacity: 0.6; }
    100% { transform: scale(0.9) translate(-30px, 40px); opacity: 0.4; }
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 900px;
    text-align: center;
    animation: slideUp 1s ease-out;
}

.hero-content h1 {
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 25px;
    background: linear-gradient(to bottom, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: clamp(1.1rem, 3vw, 1.3rem);
    color: var(--text-dim);
    margin-bottom: 35px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.app-preview-container {
    margin-top: 60px;
    position: relative;
    z-index: 10;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    perspective: 1000px;
    animation: fadeInUp 1.2s ease-out;
}

.app-screenshot {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8), 0 0 50px var(--primary-glow);
    border: 1px solid rgba(124, 92, 252, 0.3);
    transform: rotateX(5deg);
    transition: transform 0.5s ease;
}

.app-screenshot:hover {
    transform: rotateX(0deg) scale(1.02);
}

.btn-container { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }

.btn {
    padding: 16px 40px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.4s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: fit-content;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 10px 30px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px var(--primary-glow);
    background: var(--primary-hover);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

section { padding: 120px 10%; position: relative; }

.section-head { text-align: center; margin-bottom: 80px; }
.badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(124, 92, 252, 0.1);
    color: var(--primary);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 15px;
    border: 1px solid rgba(124, 92, 252, 0.2);
}

.section-title { font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; margin-bottom: 20px; }

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover {
    transform: translateY(-12px);
    border-color: var(--primary);
    background: rgba(30, 41, 59, 0.8);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

.icon-box {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    font-size: 1.8rem;
    color: white;
    box-shadow: 0 10px 20px rgba(124, 92, 252, 0.2);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.feature-card:hover .icon-box {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 15px 30px rgba(124, 92, 252, 0.4);
}

.feature-card h3 { font-size: 1.5rem; margin-bottom: 15px; }
.feature-card p { color: var(--text-dim); font-size: 1rem; line-height: 1.7; }

.cta-section {
    margin: 0 10% 120px;
    padding: 80px;
    background: linear-gradient(135deg, rgba(124, 92, 252, 0.15), rgba(14, 165, 233, 0.15));
    border-radius: 40px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    overflow: hidden;
    position: relative;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 60%);
    opacity: 0.3;
}

.cta-content { 
    position: relative; 
    z-index: 2; 
    display: flex;
    flex-direction: column;
    align-items: center;
}
.cta-section h2 { font-size: 3rem; margin-bottom: 20px; }
.cta-section p { font-size: 1.2rem; color: var(--text-dim); margin-bottom: 40px; max-width: 600px; margin-left: auto; margin-right: auto; }

footer {
    padding: 80px 10%;
    background: #010411;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-logo { margin-bottom: 30px; }
.social-links { display: flex; justify-content: center; gap: 20px; margin-bottom: 30px; }
.social-links a {
    width: 45px; height: 45px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 1.2rem; transition: 0.3s;
}
.social-links a:hover { background: var(--primary); transform: translateY(-3px); }

/* Demo App Section Styles */
.demo-section {
    padding: 100px 5%;
    background: radial-gradient(circle at center, rgba(124, 92, 252, 0.05) 0%, transparent 70%);
}

.demo-app-container {
    background: #0f172a;
    border: 1px solid rgba(124, 92, 252, 0.3);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 50px 100px rgba(0,0,0,0.5);
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.demo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    margin-bottom: 20px;
    border-bottom: 1px solid #334155;
}

.demo-logo {
    font-size: 1.2rem;
    font-weight: 600;
    background: linear-gradient(90deg, #fff, #7c5cfc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.demo-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 900px) {
    .demo-main { grid-template-columns: 1fr; }
}

.demo-panel {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
}

.demo-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.demo-textarea {
    width: 100%;
    height: 300px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 12px;
    color: white;
    font-family: 'Consolas', monospace;
    font-size: 0.9rem;
    resize: none;
    outline: none;
    margin-bottom: 10px;
}

.demo-controls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin-top: 5px;
}

.demo-control-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.demo-control-group label {
    font-size: 0.8rem;
    color: #94a3b8;
}

.demo-select, .demo-input {
    background: #334155;
    border: 1px solid #334155;
    border-radius: 6px;
    padding: 8px;
    color: white;
    font-family: inherit;
    font-size: 0.85rem;
    outline: none;
}

.demo-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.demo-checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #94a3b8;
}

.demo-checkbox-item input {
    accent-color: #7c5cfc;
}

.demo-action-bar {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.demo-btn {
    padding: 10px 18px;
    border-radius: 8px;
    border: none;
    font-weight: 500;
    cursor: default;
    font-family: inherit;
    transition: 0.3s;
    font-size: 0.9rem;
}

.demo-btn-primary {
    background: #7c5cfc;
    color: white;
    flex: 2;
}

.demo-btn-secondary {
    background: #334155;
    color: white;
    flex: 1;
}

.demo-btn-sm {
    padding: 4px 12px;
    font-size: 0.8rem;
    border-radius: 6px;
    flex: none;
}

.demo-footer {
    margin-top: 20px;
    padding-top: 10px;
    border-top: 1px solid #334155;
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #94a3b8;
}

.demo-stats { display: flex; gap: 20px; }
.demo-stat-item span { color: #7c5cfc; font-weight: 700; }

/* Floating Button */
.floating-btn {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background: #06c755;
    color: white;
    padding: 14px 28px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 15px 35px rgba(6, 199, 85, 0.4);
    z-index: 2000;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    transform: translateY(100px);
}

.floating-btn.show { opacity: 1; transform: translateY(0); }
.floating-btn:hover {
    background: #05b04c;
    transform: scale(1.05) translateY(-5px);
}

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

@media (max-width: 768px) {
    .nav { padding: 15px 5%; }
    .nav.scrolled { padding: 10px 5%; }
    .nav-links { display: none; }
    
    .blob { width: 300px; height: 300px; filter: blur(60px); opacity: 0.3; }
    .grid-overlay { background-size: 30px 30px; opacity: 0.3; }

    header { padding: 80px 5% 40px; min-height: auto; }
    
    .hero-content { width: 100%; text-align: center; }
    .hero-content h1 { font-size: 2.8rem; line-height: 1.1; margin-bottom: 20px; }
    .hero-content p { font-size: 1rem; line-height: 1.5; margin-bottom: 30px; }
    
    .btn { width: 100%; padding: 14px 20px; font-size: 1rem; justify-content: center; }
    .btn-container { flex-direction: column; gap: 15px; align-items: center; }

    .reveal, .reveal-left, .reveal-right {
        transform: translateY(30px) !important;
        transition-duration: 0.6s !important;
    }
    .reveal.active, .reveal-left.active, .reveal-right.active {
        transform: translateY(0) !important;
    }

    .app-preview-container { margin-top: 40px; perspective: none; }
    .demo-app-container { padding: 15px; border-radius: 12px; margin-bottom: 20px; }
    
    .demo-header { flex-direction: row; flex-wrap: wrap; gap: 10px; }
    .demo-logo { font-size: 1.1rem; width: 100%; margin-bottom: 5px; }
    .demo-header div:last-child { width: 100%; display: flex; gap: 10px; }
    .demo-btn-sm { flex: 1; text-align: center; padding: 6px; font-size: 0.75rem; }
    
    .demo-main { grid-template-columns: 1fr; gap: 15px; }
    .demo-textarea { height: 200px; font-size: 0.85rem; padding: 12px; }
    .demo-controls-grid { grid-template-columns: 1fr; gap: 10px; }
    .demo-checkbox-group { gap: 12px; justify-content: flex-start; }
    .demo-checkbox-item { font-size: 0.8rem; }

    .demo-action-bar { flex-direction: row; gap: 10px; }
    .demo-btn { padding: 10px 15px; font-size: 0.85rem; height: 44px; display: flex; align-items: center; justify-content: center; }
    
    .demo-footer { font-size: 0.8rem; flex-wrap: wrap; gap: 10px; padding-top: 15px; }
    .demo-stats { width: 100%; justify-content: space-between; order: 2; }
    .demo-stat-item { font-size: 0.75rem; }

    section { padding: 70px 6%; }
    .section-head { margin-bottom: 40px; }
    .section-title { font-size: 2.2rem; }
    
    .feature-card { padding: 25px; border-radius: 20px; margin-bottom: 10px; }
    .icon-box { width: 55px; height: 55px; font-size: 1.5rem; margin-bottom: 20px; }
    .feature-card h3 { font-size: 1.4rem; }
    .feature-card p { font-size: 1rem; line-height: 1.6; }
    
    .how-step { margin-bottom: 40px; }
    .how-step .icon-box { margin-bottom: 15px; }
    
    #why-choose-us div { padding: 25px !important; border-radius: 30px !important; }
    #why-choose-us h2 { font-size: 1.8rem; margin-bottom: 15px; }
    #why-choose-us p { font-size: 1rem; }

    .cta-section { margin: 0 5% 50px; padding: 40px 20px; border-radius: 30px; }
    .cta-section h2 { font-size: 2rem; margin-bottom: 15px; }
    .cta-content div[style*="background"] { padding: 25px !important; margin-bottom: 25px !important; width: 100%; box-sizing: border-box; }
    .cta-content div[style*="font-size: 3.5rem"] { font-size: 3rem !important; }
    .cta-content div[style*="font-size: 1.8rem"] { font-size: 1.5rem !important; }

    .floating-btn { bottom: 20px; right: 20px; padding: 12px 22px; font-size: 0.95rem; box-shadow: 0 10px 25px rgba(6, 199, 85, 0.5); }
}

@media (max-width: 480px) {
    .hero-content h1 { font-size: 2.4rem; }
    header { padding-top: 100px; }
    .section-title { font-size: 2rem; }
}
