/* --- Modernized Light & Dark Theme Styles --- */
.autoindex-list,
.autoindex-copyright,
.autoindex-unsupported{
	font-family: 'Inter', 'Segoe UI', Arial, Helvetica, sans-serif;
	font-size: 15px;
}
h1 {
    font-family: 'Segoe UI', Arial, Helvetica, sans-serif;
    font-size: 2.2em;
    color: #4cae4f;
    font-weight: 700;
    margin: 24px 0 18px 0;
    text-align: center;
    letter-spacing: 0.01em;
}
.autoindex-list>li{
    line-height: 36px;
    border-bottom: 1px solid #e3e7ef;
    padding: 0 16px;
    position: relative;
    color: #4a5568;
    background: #fff;
    transition: background 0.2s, box-shadow 0.2s;
    border-radius: 8px;
    margin-bottom: 6px;
    box-shadow: 0 1px 2px rgba(60,60,100,0.03);
}
.autoindex-list>li:hover{
    background: #f3f6fa;
    border-bottom-color: #4cae4f;
    box-shadow: 0 2px 8px rgba(60,60,100,0.07);
}
.autoindex-list>li a{
    text-decoration: none;
    color: #4cae4f;
    font-weight: 500;
    transition: color 0.2s;
}
.autoindex-list>li a:hover{
    text-decoration: underline;
    color: #388a3b;
}
.autoindex-list>li a.external{
    font-size: 0;
    line-height: 0;
    width: 16px;
    height: 16px;
    display: inline-block;
    vertical-align: middle;
    margin-left: 12px;
    background-size: 100%;
    background-repeat: no-repeat;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%234cae4f" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16"><path d="M14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3z"/><path d="M5 5v14h14v-7h-2v5H7V7h5V5H5z"/></svg>');
}
.autoindex-list>li span{
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    min-width: 180px;
    display: inline-flex;
    align-items: center;
    color: #7b8794;
    padding-left: 12px;
    padding-right: 12px;
    background: rgba(245,248,255,0.7);
    border-radius: 0 8px 8px 0;
    font-size: 14px;
    transition: background 0.2s, color 0.2s;
}

.autoindex-copyright{
    text-align: right;
    padding: 12px 10px 10px 10px;
    color: #7b8794;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    min-height: 36px;
    background: transparent;
}
/* --- Toggle Button Colors & Centered Layout --- */
.autoindex-footer-bar {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin: 12px 0 0 0;
    padding: 0;
}
.autoindex-toggle,
.theme-toggle {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    border-radius: 6px;
    padding: 4px 10px;
    background: #f3f6fa;
    box-shadow: 0 1px 2px rgba(60,60,100,0.04);
    transition: background 0.2s, box-shadow 0.2s;
    border: none;
    outline: none;
}
.autoindex-toggle {
    background: #eaf7ea;
    color: #4cae4f;
}
.autoindex-toggle.active {
    background: #4cae4f;
    color: #fff;
}
.autoindex-toggle img {
    filter: none;
    transition: filter 0.2s;
}
.autoindex-toggle.active img {
    filter: grayscale(1) brightness(2.2);
}
.theme-toggle {
    background: #eaf1f7;
    color: #ffa600;
}
.theme-toggle.active {
    background: #ffa600;
    color: #fff;
}
.theme-toggle img {
    filter: none;
    transition: filter 0.2s;
}
.theme-toggle.active img {
    filter: grayscale(1) brightness(2.2);
}
.autoindex-footer-link {
    font-weight:600;
    font-size:15px;
    letter-spacing:0.01em;
    line-height:1.2;
    color:#4cae4f;
    text-decoration:none;
    margin: 0 8px;
    transition: color 0.2s;
}
.autoindex-footer-link:hover {
    color: #388a3b;
    text-decoration: underline;
}

/* --- End Modernized Styles --- */
/* --- Modern Dark Theme --- */
.theme-dark {
    background: #181c23 !important;
    color: #e6eaf3 !important;
}
.theme-dark .autoindex-list>li {
    background: #23272e !important;
    color: #e6eaf3 !important;
    border-bottom-color: #2a2e36 !important;
    box-shadow: 0 1px 4px rgba(20,20,40,0.10);
}
.theme-dark .autoindex-list>li:hover {
    background: #232f3e !important;
    border-bottom-color: #4cae4f !important;
    box-shadow: 0 2px 12px rgba(20,20,40,0.16);
}
.theme-dark .autoindex-list>li a {
    color: #4cae4f !important;
}
.theme-dark .autoindex-list>li a:hover {
    color: #7ad1ff !important;
}
.theme-dark .autoindex-copyright {
    color: #b3b9c9 !important;
    background: transparent !important;
}
.theme-dark .autoindex-list>li span {
    background: rgba(40,48,60,0.55) !important;
    color: #b3b9c9 !important;
}
.theme-dark .autoindex-toggle,
.theme-dark .theme-toggle {
    background: #23272e !important;
    box-shadow: 0 1px 4px rgba(20,20,40,0.10);
}
.theme-dark .autoindex-toggle:hover,
.theme-dark .theme-toggle:hover {
    background: #232f3e !important;
    box-shadow: 0 2px 12px rgba(20,20,40,0.16);
}
.theme-dark .autoindex-toggle.active {
    background: #4cae4f !important;
    color: #fff !important;
    box-shadow: 0 2px 12px rgba(76,174,79,0.12);
}
.theme-dark .theme-toggle.active {
    background: #ffa600 !important;
    color: #fff !important;
    box-shadow: 0 2px 12px rgba(42,127,166,0.12);
}
.theme-dark .autoindex-footer-link {
    color: #4cae4f !important;
}
.theme-dark .autoindex-footer-link:hover {
    color: #7ad1ff !important;
}
