
html[data-theme='dark'] {
	--bg: #0a0a0f; /* Deep dark blue-black */
	--bg-title: #1a1a2e; /* Dark blue-purple */
	--header-bg-title: var(--bg-title);
	--color-header-footer-divider: #16213e; /* Fallout blue */
	--color-header-header-divider: #16213e;
	--a-color-header-footer-divider: #16213e;
	--bg-color-header-footer-divider: #16213e;
	--color-text: #c7d2fe; /* Light blue-white text */
	--hover: #4f46e5; /* Purple-blue hover */
	--hover-text: #fbbf24; /* Golden yellow for hover text */
	--file-desc-color: var(--color-text);

	--a-color: var(--color-text);

	/* Dark/Light Switch */
	--button-bg: grey;
	--button-checked: #0077FF;
	--button-ring-color: #FFFF;

	/* Modal Content */
	--modal-bg-color: #16213e; /* Consistent with theme */
	--modal-text-color: #c7d2fe; /* Light blue text */
	--modal-header-close-color: #fbbf24 !important; /* Golden close button */

	/* Directory Lister */
	--dir-color-text: var(--color-text);

	/* Navbar stuff */
	--navbar-text: #25e66b;
	--navbar-textD: none;
	--navbar-text2: #c7d2fe;

}


/* ---------------------------------------------------------------------------------------------- */
/* -----| GENERAL |------------------------------------------------------------------------------ */
/* ---------------------------------------------------------------------------------------------- */

body {
	background-color: var(--bg);
	padding: 70px 0 0;
	
}

a {
	color: var(--a-color);
	
}


.nav > li > a:focus, .nav > li > a:hover {
	text-decoration: var(--navbar-textD);
	background-color: var(--hover);
	color: var(--hover-text);
}

.nav > li > a:focus #icon, .nav > li > a:hover #icon {
	color: white;
}
	

body.breadcrumb-fixed {
	padding-top: 56px;
}

.container {
	max-width: 960px;
}


/* -------------------------------------------------------------------------- */
/* -----| HEADER |----------------------------------------------------------- */
/* -------------------------------------------------------------------------- */

#page-navbar.navbar-default {
	background-color: var(--header-bg-title);
	/* border: 0; /* if you don't like borders */
	border-color: var(--color-header-header-divider);
}
#page-navbar .navbar-text {
	color: #bada55;
	display: block;
	float: left;
	margin-left: 35px;
	font-family: 'Cutive Mono', monospace, serif;
	font-size: 16px;
	max-width: 80%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.navbar-brand {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
}

.navbar-brand h1 {
	color: #bada55;
}

#page-navbar .navbar-text>a {
	
	color: var(--navbar-text);
}

.navbar-default .navbar-nav>li>a, .navbar-default .navbar-nav>li>a:visited {
	color: var(--navbar-text2);
}

.navbar-default .navbar-nav>li>a:hover {
	color: var(--navbar-text2);
}

.navbar-default .navbar-nav>li>a:active {
	color: var(--navbar-text2);
}

#description {
	color: var(--file-desc-color);
}
/* -------------------------------------------------------------------------- */
/* -----| Light/Dark Toggle Switch |----------------------------------------- */
/* -------------------------------------------------------------------------- */

/* We hide that so it doesn't take up space */
input[type=checkbox]{
	height: 0;
	width: 0;
	display: none;
	visibility: hidden;
}

label {

	top: 14px;
	left: 20px;
	
	text-indent: -9999px;
	width: 46px;
	height: 22px;
	/* 
	width: 200px; 
	height: 100px;
	*/
	/* background: grey; */
	color: blue;
	background: var(--button-bg);
	display: block;
	/* border-radius: 100px; */
	border-radius: 100px;
	position: relative;
}

label:after {
	content: '';
	position: absolute;
	top: 2px;
	left: 2px;
	/*
	width: 90px;
	height: 90px;
	*/
	width: 18px;
	height: 18px;
	background: #fff;
	border-radius: 90px;
	transition: 0.3s;
	background-color: var(--button-ring-color);
}

input:checked + label {
	background: var(--button-checked);
}

input:checked + label:after {
	left: calc(100% - 3px);
	transform: translateX(-100%);
}

label:active:after {
	/* width: 130px; */
	width: 40px;
}

centering

body {
	display: flex;
	justify-content: center;
	align-items: center;
	height: 100vh;
}




/* ---------------------------------------------------------------------------------------------- */
/* -----| DIRECTORY LISTER |--------------------------------------------------------------------- */
/* ---------------------------------------------------------------------------------------------- */

#directory-list-header {
	color: var(--dir-color-text);
	font-family: 'Cutive Mono', monospace, serif;
	font-weight: bold;
	padding: 10px 15px;
}

#directory-listing {
	font-family: 'Cutive Mono', monospace, serif;
}

#directory-listing li {
	position: relative;
}

.file-name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.file-name i {
	color: #bada55;
}

.file-info-button,
.web-link-button {
	display: inline-block;
	cursor: pointer;
	margin-left: 100%;
	padding: 6px 10px !important;
	position: absolute !important;
	top: 4px;

}

.web-link-button i,
.file-info-button i {
	color: #999;
}


/* ---------------------------------------------------------------------------------------------- */
/* -----| FOOTER |------------------------------------------------------------------------------- */

/* Persistent Music Player */
.persistent-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--bg-title);
    border-top: 1px solid var(--modal-bg-color);
    padding: 10px 20px;
    z-index: 1050;
    display: flex;
    align-items: center;
    gap: 15px;
    min-height: 60px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
    font-family: 'Cutive Mono', monospace, serif;
}

.persistent-player.hidden {
    display: none;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}

.player-btn {
    background: #16213e !important;
    border: 1px solid #4f46e5 !important;
    color: #c7d2fe !important;
    padding: 8px 10px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
    min-width: 35px;
    height: 35px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.player-btn:hover {
    background: var(--hover);
    color: var(--hover-text);
    border-color: var(--hover);
}

.player-btn.player-play.playing i:before {
    content: "\f04c"; /* pause icon */
}

.player-info {
    flex: 1;
    margin: 0 15px;
    min-width: 200px;
}

#player-track-name {
    color: var(--color-text);
    font-size: 13px;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--color-text);
}

.progress-bar {
    flex: 1;
    height: 4px;
    background: var(--modal-bg-color);
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.progress-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: var(--hover);
    border-radius: 50%;
    cursor: pointer;
}

.progress-bar::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: var(--hover);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.player-volume {
    display: flex;
    align-items: center;
    gap: 8px;
}

.volume-bar {
    width: 60px;
    height: 4px;
    background: var(--modal-bg-color);
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.volume-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 10px;
    height: 10px;
    background: var(--hover);
    border-radius: 50%;
    cursor: pointer;
}

.volume-bar::-moz-range-thumb {
    width: 10px;
    height: 10px;
    background: var(--hover);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.player-close {
    margin-left: 10px;
}

/* Adjust body padding when player is visible */
body.player-active {
    padding-bottom: 80px;
}

/* Adjust player for smaller screens */
@media (max-width: 768px) {
    .persistent-player {
        flex-direction: column;
        gap: 8px;
        padding: 8px 15px;
        min-height: auto;
    }
    
    .player-info {
        margin: 0;
        width: 100%;
    }
    
    .player-controls {
        order: 2;
    }
    
    .player-volume {
        order: 3;
    }
    
    .player-close {
        position: absolute;
        top: 5px;
        right: 10px;
        margin: 0;
    }
    
    body.player-active {
        padding-bottom: 100px;
    }
}
/* ---------------------------------------------------------------------------------------------- */

hr {
	border-color: var(--color-header-footer-divider); /* Chrome, Safari */
	background-color: var(--bg-color-header-footer-divider); /* Firefox and Opera */
	color: var(--a-color-header-footer-divider); /* IE7+ */
}

.footer {
	margin: 20px;
	text-align: center;
	color: var(--color-text);
}
.footer a{
	color: var(--a-color-header-footer-divider);
}


/* ---------------------------------------------------------------------------------------------- */
/* -----| CHECKSUM MODAL |----------------------------------------------------------------------- */
/* ---------------------------------------------------------------------------------------------- */

#file-info {
	margin: 0;
}

#file-info .table-title {
	font-weight: bold;
	text-align: right;
}

/* File Downloads */
#file-info .file-downloads,
#file-info .md5-hash,
#file-info .sha1-hash {
	font-family: 'Cutive Mono', monospace, serif;
}


/* Zheme */
.modal-content {
	background-color: var(--modal-bg-color);
	color: var(--modal-text-color);
}

.modal-header .close {
	color: var(--modal-header-close-color);
}


/* -------------------------------------------------------------------------- */
/* -----| RESPONSIVE |------------------------------------------------------- */
/* -------------------------------------------------------------------------- */

@media (max-width: 767px) {

	.navbar-nav {
		float: left;
		margin: 0;
		padding-bottom: 0;
		padding-top: 0;
	}

	.navbar-nav > li {
		float: left;
	}

	.navbar-nav > li > a {
		padding-bottom: 15px;
		padding-top: 15px;
	}

	.navbar-right {
		float: right !important;
	}

	#page-navbar .navbar-text {
		margin-left: 25px;
		margin-right: 15px;
		max-width: 75%;
	}

	.file-info-button {
		display: none !important;
	}

}
/* ---------------------------------------------------------------------------------------------- */
/* -----| INLINE PREVIEW PANEL |----------------------------------------------------------------- */
/* ---------------------------------------------------------------------------------------------- */

.preview-panel {
    position: fixed;
    top: 70px;
    right: 0;
    width: 50%;
    height: calc(100vh - 70px);
    background-color: var(--bg);
    border-left: 1px solid var(--modal-bg-color);
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}

.preview-panel.show {
    transform: translateX(0);
}

.preview-panel.hidden {
    display: flex;
}

.preview-header {
    background-color: var(--bg-title);
    border-bottom: 1px solid var(--modal-bg-color);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 50px;
}

.preview-title {
    color: var(--color-text);
    font-family: 'Cutive Mono', monospace, serif;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.preview-title i {
    color: var(--hover);
}

.preview-controls {
    display: flex;
    gap: 8px;
}

.preview-btn {
    background: transparent;
    border: 1px solid var(--modal-bg-color);
    color: var(--color-text);
    padding: 6px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.preview-btn:hover {
    background: var(--hover);
    color: var(--hover-text);
    border-color: var(--hover);
}

.preview-content {
    flex: 1;
    overflow: hidden;
    background-color: var(--bg);
}

/* Inline preview content styles */
.inline-text-preview,
.inline-code-preview {
    font-family: 'Cutive Mono', monospace, serif;
    color: var(--color-text);
    white-space: pre-wrap;
    word-wrap: break-word;
    padding: 16px;
    margin: 0;
    background-color: var(--bg);
    height: 100%;
    overflow-y: auto;
    font-size: 12px;
    line-height: 1.4;
}

.inline-image-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 16px;
    background-color: var(--bg);
}

.inline-image-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border: none;
}

.inline-media-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 16px;
    background-color: var(--bg);
}

.inline-audio-player {
    width: 100%;
    height: 40px;
    background: transparent;
}

.inline-video-player {
    width: 100%;
    max-height: 100%;
    background: transparent;
}

.inline-pdf-viewer {
    width: 100%;
    height: 100%;
    border: none;
    background-color: var(--bg);
}

.inline-error-message {
    color: var(--hover-text);
    text-align: center;
    font-size: 14px;
    padding: 40px 16px;
    background-color: var(--bg);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Adjust main content when preview is open */
.preview-open #page-content {
    margin-right: 50%;
    transition: margin-right 0.3s ease-in-out;
}

/* Custom scrollbar for inline preview */
.inline-text-preview::-webkit-scrollbar,
.inline-code-preview::-webkit-scrollbar {
    width: 6px;
}

.inline-text-preview::-webkit-scrollbar-track,
.inline-code-preview::-webkit-scrollbar-track {
    background: var(--bg-title);
}

.inline-text-preview::-webkit-scrollbar-thumb,
.inline-code-preview::-webkit-scrollbar-thumb {
    background: var(--modal-bg-color);
    border-radius: 3px;
}

.inline-text-preview::-webkit-scrollbar-thumb:hover,
.inline-code-preview::-webkit-scrollbar-thumb:hover {
    background: var(--hover);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .preview-panel {
        width: 100%;
        top: 56px;
        height: calc(100vh - 56px);
    }
    
    .preview-open #page-content {
        margin-right: 0;
        display: none;
    }
}

/* -------------------------------------------------------------------------- */
/* ------------| Transition from Light to Dark and vice versa |-------------- */
/* -------------------------------------------------------------------------- */
html.transition,
html.transition *,
html.transition *:before,
html.transition *:after {
  transition: all 750ms !important;
  transition-delay: 0 !important;
}
