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

:root {
    --tw-overlay-1: rgba(0, 0, 0, 0.3);
    --tw-overlay-2: rgba(0, 0, 0, 0.3);
    --er-overlay-1: rgba(160, 160, 160, 0.08);
    --er-overlay-2: rgba(0, 0, 0, 0.3);
    --fs-overlay-1: rgba(0, 0, 0, 0.3);
    --fs-overlay-2: rgba(0, 0, 0, 0.3);
    
    --text-main: #eeebebbe;
    --text-strong: #ffffff;
    --tile-bg: rgba(96, 95, 95, 0.05);
    --tile-bg-hover: rgba(255, 255, 255, 0.055);
    --tile-highlight: rgba(128, 128, 128, 0.09);
    --badge-bg: rgba(120, 120, 120, 0.25);
    --badge-text: rgba(170, 170, 170, 0.8);
    --btn-bg: rgba(255, 255, 255, 0.05);
    --btn-bg-hover: rgba(255, 255, 255, 0.12);
    --arrow-color: #9b9b9bc9;
}

body {
    position: relative;
    font-family: 'Rubik', sans-serif;
    color: #eee;
    min-height: 100vh;
    overflow-x: hidden;
}

.bg-layer {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    z-index: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

#bg-tw {
    opacity: 1;
    background-image:
        linear-gradient(var(--tw-overlay-1), var(--tw-overlay-1)),
        linear-gradient(var(--tw-overlay-2), var(--tw-overlay-2)),
        url('https://www.justkaarlo.com/res/bg/total-war-bg.png');
}

#bg-er {
    opacity: 1;
    background-image:
        linear-gradient(var(--er-overlay-1), var(--er-overlay-1)),
        linear-gradient(var(--er-overlay-2), var(--er-overlay-2)),
        url('https://www.justkaarlo.com/res/bg/elden-ring-bg.png');
}

#bg-fs {
    opacity: 1;
    background-image:
        linear-gradient(var(--fs-overlay-1), var(--fs-overlay-1)),
        linear-gradient(var(--fs-overlay-2), var(--fs-overlay-2)),
        url('https://4kwallpapers.com/images/wallpapers/farming-simulator-5120x2880-20864.jpg');
}

#particles-js {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.sections-container {
    position: relative;
    overflow: hidden;
    height: 100vh;
}

.content {
    position: relative;
    z-index: 2;
    display: flex;
    width: 100%;
    height: 100vh;
}

.section-slide {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    padding: 60px 20px 20px;
    color: white;
    position: relative;
}

.game-icon {
    width: 500px !important;
    height: auto !important;
    margin-top: 30px;
    margin-bottom: 30px;
    user-select: none;
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.7));
}

.filelist-frame {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 16px;
    backdrop-filter: blur(6px) brightness(0.5);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
    padding: 1px;
    max-width: 880px;
    margin: 0 auto 80px auto;
    width: 700px;
    min-height: 200px;
    max-height: 600px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.file-list {
    list-style: none;
    padding: 0;
    margin: 10px 15px 0px 15px;
    padding-right: 10px;
    overflow-y: auto;
    scrollbar-width: none;
    flex: 1;
    min-height: 0;
}

.file-list::-webkit-scrollbar {
    display: none;
}

.file-list li {
    margin: 8px 0;
    padding: 6px 12px;
    background-color: rgba(96, 95, 95, 0.05);
    border-radius: 6px;
    transition: transform 0.15s ease, background-color 0.2s ease;
    will-change: transform;
    font-weight: 500;
    font-size: 14px;
    font-family: 'Poppins', monospace;
    color: #eeebebbe;
    cursor: pointer;
    height: auto;
    scrollbar-width: none;
    overflow-y: auto;
    border: none;
    box-shadow: none;
    outline: none;
}

.file-list li.folder-open {
    background-color: var(--tile-bg-hover);
}

.file-list li:hover:not(:has(.folder-open-button:hover)) {
    background-color: var(--tile-bg-hover);
}

.file-list li.highlighted {
    background: var(--tile-highlight);
    color: var(--text-main);
    transition: background 0.3s ease;
    font-weight: 600;
    cursor: pointer;
    border: none;
    box-shadow: none;
    outline: none;
}

.file-list li.highlighted:hover {
    background: rgba(128, 128, 128, 0.12);
    transition: transform 0.15s ease, background 0.1s ease-in;
    will-change: transform;
    border: none;
    box-shadow: none;
}

.file-entry {
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: visible;
    position: relative;
}

.file-entry a {
    color: var(--text-main);
    text-decoration: none;
    display: inline-block;
    transform-style: preserve-3d;
    transition: transform 0.2s ease, color 0.2s ease;
    will-change: transform;
}

.file-entry a:hover {
    color: rgba(253, 255, 255, 0.72);
}

.file-entry img,
.folder-entry img {
    height: 20px;
    vertical-align: middle;
    margin-right: 8px;
}

.file-entry img:hover,
.folder-entry img:hover {
    filter: brightness(1.2);
    transform: scale(1.1);
    transition: transform 0.2s ease, filter 0.2s ease;
    cursor: pointer;
}

li.folder-open .folder-entry img {
    filter: brightness(1.3);
    transform: scale(1.1);
}

.file-size-tag,
.file-count-tag {
    background: var(--badge-bg);
    color: var(--badge-text);
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 12px;
    white-space: nowrap;
    font-family: 'Poppins', monospace;
    font-weight: 600;
}

.file-size-tag {
    margin-left: auto;
}

.file-count-tag {
    margin-left: 6px;
}

/* Custom Tag Styles */
.custom-tag {
    background: var(--badge-bg);
    color: var(--badge-text);
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 12px;
    white-space: nowrap;
    font-family: 'Poppins', monospace;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(2px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.15s ease;
}

.custom-tag:hover {
    transform: scale(1.05);
}

/* Container for tags to ensure proper spacing */
.tags-container {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.folder-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    color: var(--text-main);
    position: relative;
    scrollbar-width: none;
}

.folder-entry:hover {
    color: rgba(253, 255, 255, 0.75);
    cursor: pointer;
}

.folder-entry span.folder-name {
    display: inline-block;
    transform-style: preserve-3d;
    transition: transform 0.2s ease;
    will-change: transform;
}

.folder-arrow {
    width: 12px;
    height: 12px;
    margin-right: 6px;
    transition: transform 0.2s ease;
    fill: var(--arrow-color);
    flex-shrink: 0;
}

.folder-arrow.open {
    transform: rotate(90deg);
}

/* Button Container for Multiple Buttons */
.button-container {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 10px;
}

.folder-open-button {
    background: var(--btn-bg);
    border: none;
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.3s ease, opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    position: relative;
}

.folder-open-button:hover {
    background: var(--btn-bg-hover);
    filter: brightness(1.2);
    transform: translateX(0.5px) scale(1.1);
}

.folder-open-button svg {
    width: 18px;
    height: 18px;
}

/* Default Download Button Styling */
.folder-open-button svg path:first-child {
    fill: rgba(2, 161, 50, 0.8);
    opacity: 0.7;
}

.folder-open-button svg path.arrow-part {
    fill: rgba(2, 161, 50, 0.8);
    opacity: 0.7;
}

/* Website Button Styling */
.folder-open-button.website-button svg path {
    fill: rgba(122, 121, 121, 0.7);
    opacity: 1;
}

.folder-open-button.website-button svg path[stroke] {
    stroke: rgba(136, 136, 136, 0.7);
    opacity: 1;
}

.custom-tooltip {
    opacity: 0;
    position: absolute;
    bottom: 20px;
    left: 10%;
    transform: translateX(-50%);
    background: rgba(50, 50, 50, 0.6);
    color: #a1a1a179;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    font-weight: 700;
    font-family: 'Poppins', monospace;
    pointer-events: none;
    transition: opacity 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 9999;
    width: auto;
    height: auto;
    scale: 65%;
}

.folder-open-button:hover .custom-tooltip {
    opacity: 0;
    pointer-events: auto;
    transition-delay: 180ms;
}

/* Enhanced Tooltip Styles */
.enhanced-tooltip {
    position: fixed;
    background: rgba(40, 40, 40, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    padding: 12px;
    max-width: 300px;
    min-width: 200px;
    z-index: 10001;
    pointer-events: none;
    opacity: 0;
    transform: translateY(10px) scale(0.95);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.enhanced-tooltip.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.tooltip-image-container {
    position: relative;
    width: 100%;
    height: auto;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 8px;
}

.tooltip-image {
    width: 100%;
    height: auto;
    max-height: 150px;
    object-fit: cover;
    border-radius: 8px;
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.4s ease-in-out;
}

.tooltip-image:first-child {
    position: relative;
}

.tooltip-image.active {
    opacity: 1;
    z-index: 2;
}

.tooltip-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 3;
}

.tooltip-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transition: background 0.3s ease;
    cursor: pointer;
}

.tooltip-dot.active {
    background: rgba(255, 255, 255, 0.9);
}

.tooltip-description {
    color: #e0e0e0;
    font-size: 13px;
    line-height: 1.4;
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
}

.tooltip-description b,
.tooltip-description strong {
    font-weight: 600;
    color: #ffffff;
}

.tooltip-description br {
    display: block;
    content: "";
    margin: 4px 0;
}

.tooltip-description ul,
.tooltip-description ol {
    margin: 8px 0;
    padding-left: 20px;
}

.tooltip-description li {
    margin: 4px 0;
    line-height: 1.5;
}

.tooltip-description p {
    margin: 6px 0;
}

.tooltip-description p:first-child {
    margin-top: 0;
}

.tooltip-description p:last-child {
    margin-bottom: 0;
}

.tooltip-description em,
.tooltip-description i {
    font-style: italic;
    color: #d0d0d0;
}

.tooltip-description code {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

.manager-disclaimer {
    font-family: 'Rubik', sans-serif;
    display: flex;
    align-items: center;
    max-width: fit-content;
    margin: 0 auto;
    padding: 0.75rem 1rem;
    background: rgba(173, 173, 173, 0.05);
    backdrop-filter: blur(4px);
    border-radius: 12px;
    font-size: 12px;
    line-height: 1.3;
    color: #999;
    gap: 0.75rem;
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.manager-disclaimer-icon-custom {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 2px solid rgba(120, 120, 120, 0.5);
    border-radius: 50%;
    color: rgba(140, 140, 140, 0.7);
    font-weight: bold;
    font-size: 18px;
    opacity: 0.5;
    filter: blur(0.3px);
    backdrop-filter: blur(2px);
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
}

#docModal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding-top: 35px;
    overflow-y: auto;
}

body.modal-open {
    overflow: hidden;
    margin: 0;
    padding: 0;
}

#docModal > div {
    position: relative;
    width: 90vw;
    max-width: 1200px;
    height: 85vh;
    background: rgba(40, 40, 40, 0.95);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#closeModal {
    position: absolute;
    top: 8px;
    right: 15px;
    background: rgba(255, 51, 51, 0.8);
    border: none;
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    padding: 7px 10px;
    border-radius: 8px;
    z-index: 10000;
    transition: background 0.2s ease, transform 0.1s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

#closeModal:hover {
    background: rgba(255, 51, 51, 1);
    transform: scale(1.05);
}

#docFrame {
    flex: 1;
    border: none;
    border-radius: 8px;
    margin: 10px;
    margin-top: 50px;
    background: white;
}

.nav-frame {
    --nav-bg: rgb(54, 54, 54, 0.7);
    --shadow-1: 0 8px 30px rgba(0, 0, 0, 0.45);
    --glass-border: rgba(255, 255, 255, 0.18);
    position: static;
    padding: 10px 24px;
    border-radius: 20px;
    z-index: 998;
    background: rgba(63, 63, 63, 0.1);
    border: 0px solid var(--glass-border);
    backdrop-filter: blur(3px) saturate(120%);
    -webkit-backdrop-filter: saturate(120%);
    box-shadow: var(--shadow-1);
}

.nav-frame.hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-20px);
}

.nav-buttons {
    display: flex;
    gap: 22px;
}

.nav-btn {
    --bg-glass: rgba(255, 255, 255, 0.05);
    --text: #e1e2e7;
    --radius-sm: 10px;
    background: var(--bg-glass);
    box-shadow: 0 4px 3px rgba(0, 0, 0, 0.1);
    color: var(--text);
    font-weight: 600;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: background 160ms ease, transform 120ms ease;
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji";
    cursor: pointer;
    border: none;
    position: relative;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

.nav-btn svg {
    display: block;
    margin: 0 auto;
}

#SelectedNavBtn {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
    cursor: not-allowed;
}

body.modal-open .nav-frame {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.nav-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 30px;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    z-index: 999999;
}

.nav-container.hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-20px);
}

body.modal-open .nav-container {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.nav-tooltip {
    --glass-border: rgba(255, 255, 255, 0.18);
    --shadow-1: 0 8px 30px rgba(0, 0, 0, 0.45);
    position: absolute;
    bottom: -45px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(52, 52, 52, 0.34);
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    font-family: 'Poppins', sans-serif;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    border: 0px solid var(--glass-border);
    backdrop-filter: blur(10px) saturate(120%);
    -webkit-backdrop-filter: saturate(120%);
    box-shadow: var(--shadow-1);
    z-index: 10000;
}

.nav-tooltip::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid rgba(40, 40, 40, 0.95);
}

.nav-btn:hover .nav-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px);
    transition-delay: 0.5s;
}

@media (max-width: 768px) {
    #docModal > div {
        width: 95vw;
        height: 90vh;
    }

    #docModal {
        padding: 10px;
    }

    #closeModal {
        top: 10px;
        right: 10px;
        padding: 6px 10px;
        font-size: 16px;
    }

    .game-icon {
        width: 350px !important;
    }

    .filelist-frame {
        width: 90%;
        max-width: none;
    }

    .button-container {
        gap: 2px;
        margin-left: 6px;
    }

    .enhanced-tooltip {
        max-width: 250px;
        min-width: 180px;
    }

    .tags-container {
        gap: 4px;
    }

    .custom-tag {
        font-size: 11px;
        padding: 1px 6px;
    }
}

/* CSS Animations for Download Manager */
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

.download-toast {
    transition: all 0.3s ease;
}

.download-toast:hover {
    transform: translateX(-5px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}