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

/* Variables */
:root {
    --primary-color: #6C63FF; /* Ungu modern yang lembut */
    --primary-dark: #5A52E0;
    --secondary-color: #4D44DB;
    --text-color: #E0E0E0; /* Teks lebih terang untuk kontras */
    --text-light: #A0A0A0;
    --bg-light: #1E1E1E; /* Warna dasar gelap */
    --bg-dark: #121212; /* Untuk elemen yang lebih gelap */
    --white: #1E1E1E; /* Di dark mode, 'white' sebenarnya abu-abu gelap */
    --black: #E0E0E0; /* Di dark mode, 'black' sebenarnya terang */
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --border-radius: 12px;
    --transition: all 0.3s ease;
    --counter-font: 'Poppins', system-ui, sans-serif;
}

/* Base Styles */
body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-dark); /* Warna background gelap */
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    color: #FFFFFF;
    font-weight: 600;
    line-height: 1.2;
}

p {
    color: var(--text-light);
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    font-size: 2.2rem;
    margin-bottom: 15px;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    margin: 15px auto 25px;
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 50px;
    color: var(--text-light);
}

/* Header Styles */
header {
    background-color: var(--bg-light);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
}

.logo i {
    color: var(--primary-color);
    margin-right: 10px;
}

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

nav a {
    font-weight: 500;
    transition: var(--transition);
}

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

.search-container {
    display: flex;
    align-items: center;
    background: var(--bg-dark);
    padding: 10px 15px;
    border-radius: var(--border-radius);
    width: 300px;
}

.search-container input {
    background: transparent;
    border: none;
    color: var(--text-color);
    width: 100%;
    outline: none;
    font-family: 'Poppins', sans-serif;
}

.search-container i {
    color: var(--text-light);
    margin-right: 10px;
}

/* Buttons */
.btn-ghost {
    display: inline-block;
    padding: 12px 30px;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
    margin-top: 20px;
}

.btn-ghost:hover {
    background-color: var(--primary-color);
    color: #121212;
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.btn-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 40px;
    background-color: var(--primary-color);
    color: var(--bg-dark);
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: var(--transition);
    margin: 20px 0;
    box-shadow: var(--shadow);
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
}

.btn-download:hover {
    background-color: var(--primary-dark);
    color: var(--bg-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(67, 97, 238, 0.3);
}

.btn-download i {
    margin-right: 10px;
    font-size: 1.2rem;
}

/* Hero Section */
.hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
    background-color: var(--bg-dark);
}

.hero-content {
    max-width: 600px;
    z-index: 2;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--text-color);
}

.hero .subtitle {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: var(--text-light);
}

.hero-image {
    position: relative;
    z-index: 1;
}

.app-mockup {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transform: perspective(1000px) rotateY(-15deg);
    transition: var(--transition);
}

.app-mockup:hover {
    transform: perspective(1000px) rotateY(-5deg);
}

/* App Store Section */
.app-store {
    padding: 80px 0;
    background-color: var(--bg-light);
}

.app-store-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.view-all {
    color: var(--primary-color);
    font-weight: 500;
    display: flex;
    align-items: center;
}

.view-all i {
    margin-left: 5px;
    transition: var(--transition);
}

.view-all:hover i {
    transform: translateX(5px);
}

.app-grid-container {
    position: relative;
    overflow: hidden;
}

.app-grid {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding: 10px 5px 30px;
    scroll-behavior: smooth;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.app-grid::-webkit-scrollbar {
    display: none;
}

/* Updated app-card styles */
.app-card {
    background-color: var(--bg-dark);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: var(--shadow);
    transition: var(--transition);
    min-width: 150px;
    max-width: 200px; 
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center; 
    text-align: center;
    padding: 20px 10px; 
    cursor: pointer; 
}

.app-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(108, 99, 255, 0.2);
}

.app-icon {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 18px;
    margin-bottom: 15px;
}

.app-title {
    font-size: 1rem;
    color: #FFFFFF;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Hapus .app-info, .app-description, .app-meta, .app-download dari .app-card */
.app-info, .app-description, .app-meta, .app-download {
    display: none;
}

.scroll-controls {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
}

.scroll-btn {
    background: var(--bg-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.scroll-btn:hover {
    background: var(--primary-color);
    color: var(--bg-dark);
}

/* Download Counter Section */
.download-counter-section {
    position: relative;
    padding: 80px 0;
    padding-top: 50px;
    background-color: var(--bg-dark);
}

.download-counter-grid {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 40px;
}

.download-counter {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: var(--bg-light);
    padding: 40px 60px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px rgba(67, 97, 238, 0.15);
    transition: all 0.3s ease;
    max-width: 500px;
    width: 100%;
}

.download-counter:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 15px rgba(108, 99, 255, 0.3);
}

.download-counter::after {
    content: '';
    display: block;
    width: 100px;
    height: 2px;
    background: rgba(108, 99, 255, 0.3);
    margin: 40px auto;
}

.main-counter i {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.counter-wrapper {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 5px;
    margin-bottom: 10px;
}

.main-counter .counter {
    font-size: 3.2rem;
    font-weight: 700;
    color: #FFFFFF;
    line-height: 1;
    font-style: normal;
    font-feature-settings: "tnum";
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.main-counter .plus-sign {
    font-size: 2rem;
    color: var(--primary-color);
    font-weight: 700;
    padding-bottom: 8px;
    position: relative;
    left: 5px;
}

.main-counter p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-top: 10px;
    letter-spacing: 0.5px;
}

/* Counter Stats */
.counter-stats {
    display: flex;
    justify-content: space-evenly;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 40px;
    width: 100%;
    max-width: 800px;
    margin: 40px auto 0;
    padding: 0 20px;
}

.stat-item {
    background: var(--bg-light);
    padding: 25px 15px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    flex: 1;
    min-width: 160px;
    text-align: center;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 15px rgba(108, 99, 255, 0.3);
    border-color: rgba(108, 99, 255, 0.3);
}

.stat-item i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.stat-item div {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 3px;
}

.stat-item .stat-counter {
    font-size: 1.8rem;
    font-weight: 600;
    color: #FFFFFF;
    line-height: 1;
    font-style: normal;
}

.stat-counter {
    font-family: var(--counter-font);
    font-variant-numeric: tabular-nums;
}

.stat-item span:last-child {
    font-size: 1.2rem;
    color: var(--text-light);
    padding-bottom: 3px;
}

.stat-item p {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-top: 8px;
    letter-spacing: 0.3px;
}

/* Footer Styles */
.footer {
    background-color: #0d0d0d;
    padding: 60px 0 30px;
    color: var(--text-light);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand h3 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.footer-links h4, .footer-contact h4 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    color: var(--text-light);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-contact p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Modal Styles */
.modal {
    display: none; /* Tersembunyi secara default */
    position: fixed;
    z-index: 200;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: var(--bg-light);
    padding: 40px;
    border-radius: var(--border-radius);
    max-width: 600px;
    width: 90%;
    position: relative;
    box-shadow: var(--shadow);
    transform: scale(0.95);
    opacity: 0;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

.modal.show .modal-content {
    transform: scale(1);
    opacity: 1;
}

.close-button {
    position: absolute;
    top: 15px;
    right: 25px;
    color: var(--text-light);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

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

.modal-header {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    text-align: left;
}

.modal-icon {
    width: 100px;
    height: 100px;
    border-radius: 25px;
    margin-right: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.modal-header h3 {
    font-size: 2rem;
    line-height: 1.2;
}

.modal-body {
    text-align: left;
}

.modal-body p {
    font-size: 1rem;
    margin-bottom: 25px;
}

.modal-meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.modal-meta p {
    margin: 0;
    color: var(--text-light);
}

.modal-meta strong {
    color: var(--text-color);
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero {
        padding: 80px 0;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .search-container {
        width: 200px;
    }
}

@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 60px 0;
    }
    
    .hero-content {
        margin-bottom: 40px;
    }
    
    .app-mockup {
        max-width: 80%;
        transform: none;
    }
    
    .app-mockup:hover {
        transform: none;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .header-container {
        flex-direction: column;
        gap: 15px;
    }
    
    nav ul {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .search-container {
        width: 100%;
        max-width: 300px;
    }
    
    .app-store-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
        
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-brand, .footer-links, .footer-contact {
        text-align: center;
    }
    
    .footer-contact p {
        justify-content: center;
    }
    
    .main-counter .counter {
        font-size: 2.5rem;
    }
    
    .stat-item .stat-counter {
        font-size: 1.5rem;
    }

    /* Responsif untuk modal */
    .modal-content {
        padding: 30px 20px;
    }
    .modal-header {
        flex-direction: column;
        text-align: center;
    }
    .modal-icon {
        margin-right: 0;
        margin-bottom: 15px;
    }
    .modal-header h3 {
        font-size: 1.5rem;
    }
    .modal-meta {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero .subtitle {
        font-size: 1rem;
    }
    
    .btn-ghost, .btn-download {
        padding: 12px 25px;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .stat-item {
        min-width: 120px;
        padding: 20px 10px;
    }
}
