:root {
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --primary: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.5);
    --secondary: #8b5cf6;
    --text-light: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-darker);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    width: 100%;
}

html {
    overflow-x: hidden;
    width: 100%;
}

h1, h2, h3, h4, .logo-text {
    font-family: 'Outfit', sans-serif;
}

/* Ambient Glows */
.ambient-glow {
    position: absolute;
    border-radius: 50%;
    z-index: -1;
    opacity: 0.5;
    pointer-events: none;
    transform: translateZ(0);
}
.glow-1 {
    top: -100px;
    left: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
}
.glow-2 {
    top: 40%;
    right: -150px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--secondary) 0%, transparent 70%);
}
.glow-3 {
    bottom: -100px;
    left: 20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.4) 0%, transparent 70%);
}

/* Typography & Utilities */
.text-gradient {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-panel {
    background: rgba(30, 41, 59, 0.95); /* Lebih solid agar tidak butuh blur */
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
    /* backdrop-filter dihapus untuk mengatasi lag di banyak kartu */
}

.navbar.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-outline:hover {
    background: rgba(59, 130, 246, 0.1);
}

.btn-text {
    background: transparent;
    color: var(--text-muted);
    padding: 8px 12px;
}

.btn-text:hover {
    color: var(--text-light);
}

.btn-whatsapp {
    background: #25D366;
    color: white;
}

.btn-whatsapp:hover {
    background: #20bd5a;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    z-index: 100;
    border-radius: 50px;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
}

.logo {
    text-decoration: none;
    color: white;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.accent {
    color: var(--primary);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

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

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

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px 20px 50px;
}

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

.badge {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 50px;
    color: #60a5fa;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.hero-title {
    font-size: 4rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 24px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* Portfolio Section */
.portfolio-section {
    padding: 100px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.app-card {
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.app-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.5);
    border-color: rgba(59, 130, 246, 0.3);
}

.app-image-container {
    height: 200px;
    width: 100%;
    position: relative;
    border-bottom: 1px solid var(--glass-border);
}

.app-mockup {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    position: relative;
}

.app-mockup::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent, var(--glass-bg));
}

.carwash-bg {
    background: linear-gradient(45deg, #0f172a, #1e3a8a);
}

.coffee-bg {
    background: linear-gradient(45deg, #271c19, #78350f);
}

.app-icon {
    font-size: 4rem;
    color: rgba(255,255,255,0.8);
    z-index: 1;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.5));
}

.app-content {
    padding: 30px;
}

.tags {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.tag {
    font-size: 0.75rem;
    padding: 4px 10px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    color: #cbd5e1;
}

.app-content h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.app-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 24px;
    min-height: 80px;
}

.card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Contact Section */
.contact-section {
    padding: 50px 20px 100px;
    max-width: 800px;
    margin: 0 auto;
}

.contact-card {
    text-align: center;
    padding: 60px 40px;
}

.contact-card h2 {
    font-size: 2rem;
    margin-bottom: 16px;
}

.contact-card p {
    color: var(--text-muted);
    margin-bottom: 30px;
}

/* Footer */
.footer {
    border-top: 1px solid var(--glass-border);
    padding: 40px 20px;
    background: #020617;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.2rem;
}

.footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: color 0.3s;
}

.social-links a:hover {
    color: white;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    width: 90%;
    max-width: 400px;
    padding: 40px;
    text-align: center;
    position: relative;
    animation: modalPop 0.3s ease-out forwards;
}

@keyframes modalPop {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
}

.close-modal:hover {
    color: white;
}

.loader {
    border: 4px solid rgba(255,255,255,0.1);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 30px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.warning-text {
    font-size: 0.85rem;
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.1);
    padding: 10px;
    border-radius: 8px;
    text-align: left;
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        right: 20px;
        left: 5%;
        width: 90%;
        background: var(--glass-bg);
        padding: 20px;
        border-radius: 12px;
        border: 1px solid var(--glass-border);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        text-align: center;
        gap: 15px;
        box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    }

    .nav-links.active {
        display: flex !important;
    }
    
    .navbar {
        width: 95%;
        top: 10px;
        padding: 0;
    }
    
    .nav-container {
        padding: 10px 15px;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero-section {
        min-height: auto;
        padding: 140px 20px 60px;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 30px;
    }
    
    .hero-cta {
        flex-direction: column;
        width: 100%;
    }

    .hero-cta .btn {
        width: 100%;
    }
    
    .portfolio-section {
        padding: 60px 15px;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .app-card {
        margin-bottom: 10px;
    }

    .contact-section {
        padding: 40px 15px 80px;
    }

    .contact-card {
        padding: 40px 20px;
    }

    .contact-card h2 {
        font-size: 1.5rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

/* AI Chatbot Widget */
.chatbot-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.chatbot-floating-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-size: 24px;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.chatbot-floating-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.6);
}

.chatbot-window {
    width: 350px;
    height: 450px;
    margin-bottom: 15px;
    display: none;
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
    animation: chatPopUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    background: rgba(30, 41, 59, 0.95);
}

.chatbot-window.show {
    display: flex;
}

@keyframes chatPopUp {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.chatbot-header {
    padding: 15px 20px;
    background: linear-gradient(to right, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.2));
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-title {
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chatbot-title i {
    color: var(--primary);
}

.chatbot-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
    transition: color 0.3s;
}

.chatbot-close-btn:hover {
    color: white;
}

.chatbot-messages {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}
.chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}
.chatbot-messages::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
}

.chat-message {
    padding: 10px 15px;
    border-radius: 12px;
    max-width: 85%;
    word-wrap: break-word;
    font-size: 0.9rem;
}

.bot-message {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.user-message {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-typing {
    font-style: italic;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.chatbot-input-area {
    padding: 15px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 10px;
    background: rgba(2, 6, 23, 0.5);
}

.chatbot-input-area input {
    flex-grow: 1;
    background: transparent;
    border: none;
    color: white;
    font-family: 'Inter', sans-serif;
    outline: none;
}

.chatbot-input-area input::placeholder {
    color: var(--text-muted);
}

.chatbot-input-area button {
    background: transparent;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 18px;
    transition: color 0.3s, transform 0.2s;
}

.chatbot-input-area button:hover {
    color: var(--secondary);
    transform: scale(1.1);
}

@media (max-width: 480px) {
    .chatbot-window {
        width: 300px;
        height: 400px;
    }
}

/* App Gallery & Mockups */
.app-gallery-container {
    margin-top: 40px;
    margin-bottom: 60px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    align-items: center;
    justify-items: center;
}

.mockup-container {
    width: 100%;
    perspective: 1000px;
}

.mockup-container.desktop-mockup {
    max-width: 800px;
}

.mockup-container.mobile-mockup {
    max-width: 300px;
}

.mockup-frame {
    background: #e2e8f0;
    border-radius: 12px 12px 0 0;
    padding-top: 30px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    overflow: hidden;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.mockup-frame:hover, .mockup-frame-mobile:hover {
    transform: translateY(-5px);
}

.mockup-topbar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 30px;
    background: #cbd5e1;
    display: flex;
    align-items: center;
    padding: 0 15px;
    gap: 6px;
}

.mockup-topbar .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.mockup-frame-mobile {
    background: #1e293b;
    border: 10px solid #0f172a;
    border-radius: 30px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    overflow: hidden;
    transition: transform 0.3s ease;
    cursor: pointer;
    max-width: 250px;
    margin: 0 auto;
}

.mockup-frame-mobile .notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 20px;
    background: #0f172a;
    border-radius: 0 0 10px 10px;
    z-index: 10;
}

.gallery-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Lightbox Modal */
.lightbox-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 2001;
}

.close-lightbox:hover {
    color: var(--primary);
}

/* Process Section */
.process-section {
    padding: 100px 20px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    position: relative;
    margin-top: 50px;
}

/* Connecting Line on Desktop */
.process-steps::before {
    content: '';
    position: absolute;
    top: 130px;
    left: 10%;
    width: 80%;
    height: 2px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    z-index: 1;
    opacity: 0.3;
}

.process-step {
    padding: 40px 20px 30px;
    text-align: center;
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.process-step:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.4);
}

.step-number {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-weight: 800;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.4);
    font-family: 'Outfit', sans-serif;
}

.step-icon-wrapper {
    width: 70px;
    height: 70px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 25px;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.process-step:hover .step-icon-wrapper {
    background: rgba(59, 130, 246, 0.1);
    color: var(--text-light);
    transform: scale(1.05) rotate(5deg);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

.process-step h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: #fff;
}

.process-step p {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.5;
}

/* Responsif untuk seksi Alur Pembelian */
@media (max-width: 1024px) {
    .process-steps {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 30px;
    }
    .process-steps::before {
        display: none;
    }
    .process-step {
        margin-top: 10px;
    }
}

@media (max-width: 768px) {
    .process-section {
        padding: 60px 15px;
    }
    .process-steps {
        grid-template-columns: 1fr;
        gap: 35px;
    }
    .process-step {
        padding: 35px 25px 25px;
    }
}
