* {
    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);

    --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 {
    position: fixed;
    inset: 0;
    z-index: -2;
    background-image: url("../res/bg/DarkWave.png");
    background-size: cover;
    background-position: 50% 50%;
    filter: blur(7px) brightness(1.7) grayscale(1.5) contrast(1.02);
}

.bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(1200px 600px at 70% 10%, rgba(0, 0, 0, 0.2), transparent 60%),
        linear-gradient(to bottom, rgba(5, 6, 8, 0.55), rgba(5, 6, 8, 0.85));
    pointer-events: none;
}

.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('../res/bg/total-war-bg.png');
}

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

#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: 200%;
    height: 100vh;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-slide {
    width: 50%;
    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;
}

.content.show-elden {
    transform: translateX(-50%);
}

#tw-section #tw-customIcon,
#elden-section #customIcon {
    height: 30%;
    width: auto;
    margin-bottom: 15px;
    user-select: none;
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.7));
}

.section {
    max-width: 920px;
    margin: 0 auto 44px auto;
    padding: 0 10px;
}

.section h1 {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--text-strong);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section h1 img {
    height: 27px;
    vertical-align: middle;
    margin-bottom: 4px;
    margin-left: 15px;
    user-select: none;
    pointer-events: none;
}

.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-y: auto;
    scrollbar-width: none;
}

.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;
}

.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);
}

.folder-open-button {
    background: var(--btn-bg);
    border: none;
    padding: 6px;
    margin-left: 10px;
    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;
}

.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;
}

.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;
    opacity: 0;
    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;
}

.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;
    /* margin-left: 1915px; */
}

/* #docModal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 2920px;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  background-size: cover;
  z-index: 9999;
  justify-content: center;
  align-items: center;
  padding: 20px;
  overflow-y: auto;
} */

/* body.modal-open {
    overflow: hidden;
    padding-right: 17px;
} */

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);
    margin-left: 1950px;
}

#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;
}

.elden-custom-size {
    width: 500px !important;
    height: auto !important;
    margin-top: 30px;
}

.spacer {
    height: 40px;
}

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

    #docModal {
        padding: 10px;
    }

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

.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;
    /* Changed from fixed */
    padding: 10px 24px;
    border-radius: 20px;
    z-index: 998;
    background: var(--nav-bg);
    border: 0px solid var(--glass-border);
    backdrop-filter: blur(5px) saturate(120%);
    -webkit-backdrop-filter: saturate(120%);
    box-shadow: var(--shadow-1);
    /* Remove individual positioning and transitions since container handles them */
}

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

.section-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;
    /* Changed from fixed */
    padding: 10px 24px;
    border-radius: 20px;
    z-index: 998;
    background: var(--nav-bg);
    border: 0px solid var(--glass-border);
    backdrop-filter: blur(5px) saturate(120%);
    -webkit-backdrop-filter: saturate(120%);
    box-shadow: var(--shadow-1);
    /* Remove individual positioning and transitions since container handles them */
}

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

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

.nav-btn,
.section-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;
}

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

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

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

.section-nav-btn.active {
    cursor: default;
}

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

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

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

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

.outdated-tag {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    display: flex;
    align-items: center;
    max-width: fit-content;
    margin: 0 auto;
    padding-top: 3px;
    padding-bottom: 3px;
    padding-right: 1rem;
    padding-left: 0.5rem;
    box-shadow: 0px 0px 5px -3px #111;
    border: solid 1px rgba(144, 138, 115, 0.2);
    background-color: rgba(144, 138, 115, 0.3);
    backdrop-filter: blur(4px);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.3;
    color: #999774;
    gap: 0.75rem;
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
}

.outdated-tag svg {
    fill: #ece8008d;
    width: 1.25rem;
    height: 1.25rem;
}




.popup {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-weight: 700;
    margin: 10px;
    box-shadow: 4px 4px 10px -10px rgba(0, 0, 0, 1);
    width: max-content;
    padding-right: 10px;
    padding-top: 2px;
    padding-bottom: 2px;
    justify-content: space-around;
    align-items: center;
    display: flex;
    border-radius: 4px;
}
.popup svg {
  width: 1.25rem;
  height: 1.25rem;
}
.popup-icon svg {
  margin: 5px;
  display: flex;
  align-items: center;
}
.close-icon {
  margin-left: auto;
}
.close-svg {
  cursor: pointer;
}
.close-path {
  fill: grey;
}

.alert-popup {
  background-color: rgba(129, 128, 118, 0.2);
  border: solid 1px rgba(154, 141, 91, 0.35);
}
.alert-icon path {
  fill: #facc1571;
}
.alert-message {
  color: #877f6e;
}