/* --- CSS Variables --- */
:root {
    --primary-color: #ffffff;
    --secondary-color: #e0e0e0;
    --accent-color-1: #8e2de2;
    --accent-color-2: #4a00e0;
    --text-color: #f0f0f0;
    --text-muted: #b3b3b3;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
    --font-family: 'Poppins', sans-serif;
}

/* --- Global Reset & Base Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    color: var(--text-color);
    background: linear-gradient(135deg, #2575fc, #6a11cb);
    background-attachment: fixed;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* --- Animated Background Spheres --- */
.sphere {
    position: fixed;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color-1), var(--accent-color-2));
    z-index: -1;
    filter: blur(80px);
    opacity: 0.4;
}
.sphere1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 10%;
    animation: float1 25s infinite ease-in-out alternate;
}
.sphere2 {
    width: 400px;
    height: 400px;
    top: 60%;
    right: 5%;
    animation: float2 30s infinite ease-in-out alternate;
}
.sphere3 {
    width: 250px;
    height: 250px;
    bottom: 5%;
    left: 20%;
    animation: float3 20s infinite ease-in-out alternate;
}

@keyframes float1 {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(50px, -50px) scale(1.1); }
}

@keyframes float2 {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(-40px, 60px) scale(0.9); }
}

@keyframes float3 {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(-60px, -30px) scale(1.05); }
}

/* --- Main Layout --- */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* --- Header & Navbar --- */
header {
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.3s ease;
}

header.scrolled .navbar {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
    padding: 15px 30px;
    border-radius: 50px;
    margin-top: 10px;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease-in-out;
}

.nav-logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}
.nav-logo span {
    color: var(--accent-color-1);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 20px;
    flex-wrap: wrap;
}

.nav-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 400;
    transition: color 0.3s ease;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
}
.nav-link:hover, .nav-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--accent-color-1);
}

.contact-btn {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: var(--primary-color);
    padding: 10px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    font-family: var(--font-family); /* Ensure button inherits font */
}
.contact-btn:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.2);
}

.hamburger {
    display: none;
    cursor: pointer;
}
.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background-color: var(--primary-color);
}
        
/* --- Page Sections --- */
section {
    padding: 80px 0;
    opacity: 0;
    animation: fadeIn 0.8s ease-out forwards;
    animation-delay: 0.2s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.98);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
        
.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 40px;
    font-weight: 700;
}
.section-title span {
    color: var(--accent-color-1);
}

/* --- Hero Section --- */
.hero {
    text-align: center;
    padding: 120px 0;
}
.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}
.hero p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 30px;
    color: var(--text-muted);
}
.hero .cta-btn {
    display: inline-block;
    padding: 15px 40px;
    font-size: 1.1rem;
}

/* --- Glass Card Style --- */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    padding: 25px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
a.glass-card {
    cursor: pointer;
}
.glass-card:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
}
        
/* --- Mod Grid --- */
.mods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

/* Lazy loading untuk gambar */
.mod-card-thumbnail {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mod-card-thumbnail.loaded {
    opacity: 1;
}

.mod-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--text-color);
}
.mod-card-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 15px;
}
.mod-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    font-weight: 600;
    flex-grow: 1; 
}
.mod-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.rating, .downloads {
    display: flex;
    align-items: center;
    gap: 5px;
}
.rating i {
    color: #ffc107;
}

/* --- Mods Page Filters --- */
.filter-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
}

.filter-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--secondary-color);
    padding: 10px 25px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}
.filter-btn:hover, .filter-btn.active {
    background: linear-gradient(90deg, var(--accent-color-1), var(--accent-color-2));
    color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* --- Mod Detail Page --- */
.mod-detail-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-top: 40px;
}
.mod-gallery .main-image {
    width: 100%;
    height: auto;
    border-radius: 15px;
    margin-bottom: 15px;
    object-fit: cover;
}
.thumbnail-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.thumbnail-container img {
    width: 100px;
    height: 75px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}
.thumbnail-container img.active, .thumbnail-container img:hover {
    border-color: var(--accent-color-1);
}
.mod-info h1 {
    font-size: 2.8rem;
    margin-bottom: 20px;
}
.mod-info .description {
    margin-bottom: 20px;
    color: var(--text-muted);
}

.mod-meta-list {
    list-style: none;
    margin-bottom: 30px;
}
.mod-meta-list li {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--glass-border);
}
.mod-meta-list li strong {
    color: var(--primary-color);
}

.download-block {
    text-align: center;
    padding: 20px 0 0 0;
}

.download-block .download-btn {
    width: 100%;
    padding: 15px;
    font-size: 1.2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Download Button States */
.download-btn.processing {
    background: linear-gradient(45deg, #6c757d, #495057) !important;
    cursor: not-allowed;
    pointer-events: none;
}

.download-btn.success {
    background: linear-gradient(45deg, #28a745, #20c997) !important;
    animation: pulse 0.5s ease-in-out;
}

.download-btn.error {
    background: linear-gradient(45deg, #dc3545, #fd7e14) !important;
    animation: shake 0.5s ease-in-out;
}

/* Progress Bar */
.download-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #28a745, #20c997);
    border-radius: 0 0 10px 10px;
    transition: width 0.3s ease;
    width: 0%;
}

.download-progress.active {
    animation: progress 2s ease-in-out forwards;
}

/* Animations */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes progress {
    0% { width: 0%; }
    100% { width: 100%; }
}

/* Progress bar untuk 5 detik */
.download-progress.slow {
    animation: progress 5s ease-in-out forwards;
}
.download-block .download-count {
    margin-top: 15px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.rating-system h3 {
    text-align: center;
    margin-bottom: 15px;
}
.stars {
    display: flex;
    justify-content: center;
    gap: 5px;
}
.stars i {
    font-size: 2rem;
    color: #555;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
}
.stars i:hover {
    transform: scale(1.15) translateY(-2px);
}
/* Stars hover effect */
.stars:not(.rated):hover i { color: var(--accent-color-1); }
.stars:not(.rated) i:hover ~ i { color: #555; }

.stars.rated i { cursor: default; }

#rating-feedback {
    text-align: center;
    margin-top: 15px;
    color: var(--accent-color-1);
    min-height: 20px;
    font-weight: 600;
}


/* --- Footer --- */
footer {
    margin-top: 80px;
    padding: 40px 0 20px 0;
    text-align: center;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    text-align: left;
    padding: 40px;
    margin-bottom: 30px;
}

.footer-column h4 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.footer-column p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-column ul {
    list-style: none;
    padding-left: 0;
}

.footer-column ul li a {
    color: var(--text-muted);
    text-decoration: none;
    display: block;
    padding: 5px 0;
    transition: color 0.3s ease, transform 0.3s ease;
}

.footer-column ul li a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}
.social-links a {
    color: var(--secondary-color);
    font-size: 1.4rem;
    transition: color 0.3s ease, transform 0.3s ease;
}
.social-links a:hover {
    color: var(--accent-color-1);
    transform: translateY(-3px);
}

.footer-bottom {
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
}

/* --- Privacy Policy Styles --- */
.privacy-policy {
    padding: 2rem 0;
}

.privacy-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--glass-border);
}

.privacy-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--accent-color-1), var(--accent-color-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.privacy-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.last-updated {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
}

.privacy-content {
    max-width: 800px;
    margin: 0 auto;
}

.privacy-section {
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    background: var(--glass-bg);
    border-radius: 15px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.privacy-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent-color-1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.privacy-section h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.privacy-item ul {
    list-style: none;
    padding: 0;
}

.privacy-item li {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-left: 3px solid var(--accent-color-1);
}

.privacy-item li i {
    color: var(--accent-color-1);
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.privacy-note {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.privacy-note i {
    color: #ffc107;
    font-size: 1.2rem;
}

.contact-info {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.contact-info p {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.contact-info a {
    color: var(--accent-color-1);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-info a:hover {
    color: var(--accent-color-2);
    text-decoration: underline;
}

.consent-box {
    background: linear-gradient(45deg, var(--accent-color-1), var(--accent-color-2));
    color: white;
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    font-size: 1.1rem;
}

.consent-box i {
    font-size: 1.5rem;
}
        
/* --- Responsive Design --- */
@media(max-width: 992px) {
    .mod-detail-layout {
        grid-template-columns: 1fr;
    }
}

@media(max-width: 768px) {
    .main-container {
        padding: 0 15px;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background-color: rgba(20, 20, 40, 0.95);
        backdrop-filter: blur(15px);
        width: 100%;
        border-radius: 10px;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow);
        gap: 0;
        padding: 20px 0;
        flex-wrap: nowrap;
    }
    .nav-menu.active {
        left: 0;
    }
    .nav-item {
        margin: 16px 0;
    }
    .hamburger {
        display: block;
        z-index: 101; /* Ensure it's above nav menu */
    }
    .hamburger.active .bar:nth-child(2) { opacity: 0; }
    .hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    .hero {
        padding: 80px 0;
    }
    .hero h1 { 
        font-size: 2.5rem; 
        line-height: 1.1;
    }
    .hero p { 
        font-size: 1rem; 
        padding: 0 10px;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 30px;
    }

    .mods-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }

    .mod-card-thumbnail {
        height: 180px;
    }

    .filter-container {
        flex-wrap: wrap;
        gap: 10px;
    }

    .filter-btn {
        padding: 8px 20px;
        font-size: 0.9rem;
    }

    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 30px 20px;
    }
    .footer-column ul {
        display: inline-block;
        margin: 0 auto;
    }
    .social-links {
        justify-content: center;
    }

    .mod-detail-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .mod-gallery .main-image {
        height: 250px;
        object-fit: cover;
    }

    .thumbnail-container {
        justify-content: center;
    }

    .thumbnail-container img {
        width: 80px;
        height: 60px;
    }

    .mod-info h1 {
        font-size: 2.2rem;
    }

    .download-btn {
        padding: 12px;
        font-size: 1.1rem;
    }
}

/* Mobile landscape dan tablet */
@media(max-width: 1024px) and (min-width: 769px) {
    .nav-menu {
        gap: 15px;
    }
    
    .mods-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 25px;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    .mod-detail-layout {
        gap: 35px;
    }
}

/* Mobile portrait */
@media(max-width: 480px) {
    .main-container {
        padding: 0 10px;
    }
    
    .hero {
        padding: 60px 0;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .mods-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .mod-card-thumbnail {
        height: 160px;
    }
    
    .filter-container {
        flex-direction: column;
        align-items: center;
    }
    
    .filter-btn {
        width: 200px;
        margin: 5px 0;
    }
    
    .mod-gallery .main-image {
        height: 200px;
    }
    
    .thumbnail-container img {
        width: 60px;
        height: 45px;
    }
    
    .mod-info h1 {
        font-size: 1.8rem;
    }
    
    .footer-container {
        padding: 20px 15px;
    }
}
