/* style.css */

:root {
    --dark-bg: #0a0a0f;
    --text-color: #e0e0e0;
    --accent-blue: #00bfff; /* Deep Sky Blue */
    --light-blue: #87cefa; /* Light Sky Blue */
    --border-color: rgba(0, 191, 255, 0.3);
    --glow-color: rgba(0, 191, 255, 0.7);
}

body {
    font-family: 'Roboto Mono', monospace;
    background-color: var(--dark-bg);
    color: var(--text-color);
    margin: 0;
    line-height: 1.6;
    overflow-x: hidden; /* Prevent horizontal scroll from lightning effect */
}

.container {
    max-width: 960px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Header/Hero Section */
.hero {
    position: relative;
    height: 500px; /* Adjust as needed */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    /* Pastikan URL gambar ini sesuai dengan lokasi gambar Anda */
    background-image: url('https://googleusercontent.com/image_generation_content/0'); /* Gambar yang dihasilkan */
    background-size: cover;
    background-position: center;
    overflow: hidden; /* For lightning effect */
}

.hero .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* Dark overlay */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 3.5em;
    margin-bottom: 10px;
    text-shadow: 0 0 15px var(--accent-blue), 0 0 30px var(--light-blue);
    animation: textGlow 2s infinite alternate;
}

.hero p {
    font-size: 1.2em;
    color: var(--light-blue);
}

/* Lightning Effect (Pseudo-elements) */
.hero::before,
.hero::after {
    content: '';
    position: absolute;
    background: radial-gradient(circle at center, var(--accent-blue) 0%, transparent 70%);
    opacity: 0;
    animation: lightningFlash 4s infinite ease-out;
    border-radius: 50%;
    z-index: 0;
}

.hero::before {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 20%;
    animation-delay: 0s;
}

.hero::after {
    width: 250px;
    height: 250px;
    bottom: 15%;
    right: 25%;
    animation-delay: 2s;
}

@keyframes lightningFlash {
    0% { opacity: 0; transform: scale(0.5); }
    5% { opacity: 0.8; transform: scale(1.2); }
    10% { opacity: 0; transform: scale(0.5); }
    100% { opacity: 0; }
}

@keyframes textGlow {
    from {
        text-shadow: 0 0 10px var(--accent-blue), 0 0 20px var(--light-blue);
    }
    to {
        text-shadow: 0 0 20px var(--accent-blue), 0 0 40px var(--light-blue), 0 0 60px var(--light-blue);
    }
}

/* Particle Canvas */
.particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0; /* Make sure it's below the overlay and content */
}


/* Search Box Styling */
.search-box {
    position: relative;
    margin-bottom: 25px;
    text-align: center;
}

.search-box input[type="text"] {
    width: 80%; /* Adjust width as needed */
    padding: 12px 20px 12px 45px; /* Padding for icon */
    border: 1px solid var(--border-color);
    border-radius: 25px;
    background-color: #111115;
    color: var(--text-color);
    font-size: 1em;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 191, 255, 0.1);
}

.search-box input[type="text"]::placeholder {
    color: #666;
}

.search-box input[type="text"]:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 15px var(--glow-color);
}

.search-box .search-icon {
    position: absolute;
    left: 50%;
    transform: translateX(-50%) translateY(12px); /* Centered with input */
    color: #aaa;
    font-size: 1.2em;
    pointer-events: none; /* Make icon unclickable */
    left: calc(10% + 15px); /* Position icon to the left of input */
}


/* Download Section */
.download-section {
    background-color: #1a1a20;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 191, 255, 0.2);
    border: 1px solid var(--border-color);
}

.download-section h2 {
    font-family: 'Orbitron', sans-serif;
    color: var(--accent-blue);
    text-align: center;
    margin-bottom: 30px;
    text-shadow: 0 0 10px var(--accent-blue);
}

.download-list {
    list-style: none;
    padding: 0;
}

.download-item {
    background-color: #2a2a30;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    margin-bottom: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.download-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--glow-color);
}

.download-item a {
    display: block;
    padding: 20px;
    text-decoration: none;
    color: var(--text-color);
}

.download-item h3 {
    font-family: 'Orbitron', sans-serif;
    color: var(--light-blue);
    margin-top: 0;
    margin-bottom: 5px;
    font-size: 1.5em;
}

.download-item p {
    font-size: 0.95em;
    color: #b0b0b0;
    margin-bottom: 10px;
}

.download-item .file-info {
    display: block;
    font-size: 0.85em;
    color: var(--accent-blue);
    font-weight: bold;
    text-transform: uppercase;
}

/* Glitch Effect for Download Links on Hover */
.download-item a h3,
.download-item a p,
.download-item a .file-info {
    position: relative;
    display: inline-block; /* Essential for applying width/height to pseudo elements */
    transition: color 0.3s ease; /* Smooth color transition */
    overflow: hidden;
}

.download-item a:hover h3,
.download-item a:hover p,
.download-item a:hover .file-info {
    color: var(--accent-blue); /* Highlight text on hover */
}

/* Glitch effect for h3, p, file-info on hover */
.download-item a:hover h3::before,
.download-item a:hover h3::after,
.download-item a:hover p::before,
.download-item a:hover p::after,
.download-item a:hover .file-info::before,
.download-item a:hover .file-info::after {
    content: attr(data-text); /* Use the text of the element itself */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    color: var(--light-blue); /* Glitch color */
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    opacity: 0;
    pointer-events: none;
    animation: glitchText 0.3s infinite alternate; /* Faster, subtle glitch */
}

.download-item a:hover h3::before,
.download-item a:hover p::before,
.download-item a:hover .file-info::before {
    left: 1px;
    text-shadow: -1px 0 #ff00ff; /* Magenta */
    animation-delay: 0s;
}

.download-item a:hover h3::after,
.download-item a:hover p::after,
.download-item a:hover .file-info::after {
    left: -1px;
    text-shadow: 1px 0 #00ffff; /* Cyan */
    animation-delay: 0.05s; /* Slight delay for second layer */
}

@keyframes glitchText {
    0% {
        clip: rect(2px, 9999px, 6px, 0);
        transform: skew(-0.2deg);
        opacity: 1;
    }
    20% {
        clip: rect(10px, 9999px, 4px, 0);
        transform: skew(0.3deg);
    }
    40% {
        clip: rect(8px, 9999px, 12px, 0);
        transform: skew(-0.1deg);
    }
    60% {
        clip: rect(4px, 9999px, 8px, 0);
        transform: skew(0.4deg);
    }
    80% {
        clip: rect(6px, 9999px, 10px, 0);
        transform: skew(-0.5deg);
    }
    100% {
        clip: rect(0, 9999px, 0, 0); /* Hide at end of animation */
        opacity: 0;
    }
}


/* Footer */
footer {
    text-align: center;
    padding: 20px;
    margin-top: 50px;
    color: #555;
    font-size: 0.9em;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Back To Top Button */
#backToTopBtn {
    display: none; /* Hidden by default */
    position: fixed; /* Fixed position */
    bottom: 30px; /* Place at bottom */
    right: 30px; /* Place at right */
    z-index: 99; /* High z-index to be on top */
    border: none; /* Remove borders */
    outline: none; /* Remove outline */
    background-color: var(--accent-blue); /* Background color */
    color: white; /* Text color */
    cursor: pointer; /* Add a mouse pointer on hover */
    padding: 15px; /* Some padding */
    border-radius: 50%; /* Rounded shape */
    font-size: 24px; /* Large font for arrow */
    box-shadow: 0 0 15px rgba(0, 191, 255, 0.4);
    transition: background-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

#backToTopBtn:hover {
    background-color: var(--light-blue);
    box-shadow: 0 0 20px var(--glow-color);
    transform: translateY(-3px);
}

/* Responsive Design for Mobile Chrome and other mobile devices */
@media (max-width: 768px) {
    .hero {
        height: 350px; /* Adjust hero height for smaller screens */
    }

    .hero h1 {
        font-size: 2.5em; /* Smaller font size for title */
        padding: 0 10px; /* Add some horizontal padding */
    }

    .hero p {
        font-size: 1em; /* Smaller font size for subtitle */
        padding: 0 10px;
    }

    /* Adjust lightning effects for smaller screens */
    .hero::before {
        width: 200px;
        height: 200px;
        top: 5%;
        left: 10%;
    }

    .hero::after {
        width: 180px;
        height: 180px;
        bottom: 10%;
        right: 15%;
    }

    .container {
        margin: 20px auto;
        padding: 0 15px; /* Adjust container padding */
    }

    .search-box input[type="text"] {
        width: 90%;
        padding: 10px 15px 10px 40px;
        font-size: 0.9em;
    }
    .search-box .search-icon {
        left: calc(5% + 10px);
        font-size: 1em;
        transform: translateY(10px);
    }

    .download-section {
        padding: 20px; /* Smaller padding for the section */
    }

    .download-item {
        margin-bottom: 10px; /* Slightly less margin between items */
    }

    .download-item h3 {
        font-size: 1.2em; /* Smaller font for download item titles */
    }

    .download-item p {
        font-size: 0.85em; /* Smaller font for download item descriptions */
    }

    .download-item .file-info {
        font-size: 0.75em; /* Smaller font for file info */
    }

    #backToTopBtn {
        bottom: 20px;
        right: 20px;
        padding: 10px;
        font-size: 18px;
    }
}

/* Further optimizations for very small screens (e.g., iPhone SE) */
@media (max-width: 480px) {
    .hero {
        height: 280px;
    }

    .hero h1 {
        font-size: 2em;
    }

    .hero p {
        font-size: 0.9em;
    }

    .download-section {
        padding: 15px;
    }
    
    .download-item a {
        padding: 15px;
    }
}