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

body {
    font-family: 'Courier New', 'Consolas', monospace;
    background: #0a0a0a;
    color: #00ff41;
    overflow-x: hidden;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.content-wrapper {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

.sidebar {
    width: 300px;
    flex: 0 0 300px;
    height: 100%;
    background: #0d1b1d;
    border: none;
    padding: 20px;
    overflow-y: auto;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.3);
    display: flex;
    flex-direction: column;
    --aug-tr: 25px;
    --aug-bl: 25px;
    --aug-border-all: 3px;
    --aug-border-bg: linear-gradient(135deg, #00ff41, rgba(0, 255, 65, 0.6));
    --aug-inlay-all: 2px;
    --aug-inlay-bg: linear-gradient(135deg, rgba(0, 255, 65, 0.15), rgba(0, 255, 65, 0.08));
}

.sidebar h2 {
    color: #00ff41;
    text-shadow: 0 0 10px #00ff41;
    margin-bottom: 20px;
    font-size: 1.5em;
    border-bottom: 1px solid #00ff41;
    padding-bottom: 10px;
}

.folder-nav {
    list-style: none;
    flex: 1;
}

.folder-nav li {
    margin-bottom: 8px;
}

.folder-nav a {
    color: #00ff41;
    text-decoration: none;
    display: block;
    padding: 8px 12px;
    border: 1px solid transparent;
    border-radius: 4px;
    transition: all 0.3s;
}

.folder-nav a:hover {
    background: rgba(0, 255, 65, 0.1);
    border-color: #00ff41;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
    transform: translateX(5px);
}

.folder-nav a.active {
    background: rgba(0, 255, 65, 0.2);
    border-color: #00ff41;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.7);
}

.breadcrumb {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #00ff41;
}

.breadcrumb a {
    color: #00ff41;
    text-decoration: none;
    margin-right: 5px;
}

.breadcrumb a:hover {
    text-shadow: 0 0 5px #00ff41;
}

.breadcrumb span {
    color: #00ff41;
    margin: 0 5px;
}

.main-content {
    flex: 1;
    padding: 0 30px 30px 30px;
    overflow-y: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0px;
}

.header-bar {
    padding: 15px 20px 0px 20px;
    background: rgba(0, 255, 65, 0.05);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.1);
}

.slider-label {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #00ff41;
    font-size: 0.95em;
    min-width: 160px;
    text-shadow: 0 0 8px rgba(0, 255, 65, 0.6);
}

.slider-label span:first-child {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: bold;
}

#columns-value {
    color: #9cffc9;
    font-weight: bold;
    min-width: 30px;
    font-size: 1.1em;
    text-shadow: 0 0 10px rgba(156, 255, 201, 0.8);
}

.columns-slider {
    flex: 1;
    height: 6px;
    background: rgba(0, 255, 65, 0.2);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.columns-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #00ff41;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.8);
    transition: all 0.2s;
}

.columns-slider::-webkit-slider-thumb:hover {
    background: #00ff88;
    box-shadow: 0 0 15px rgba(0, 255, 136, 1);
}

.columns-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #00ff41;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.8);
    transition: all 0.2s;
}

.columns-slider::-moz-range-thumb:hover {
    background: #00ff88;
    box-shadow: 0 0 15px rgba(0, 255, 136, 1);
}

.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 20px 0;
}

.gallery-item {
    position: relative;
    border: 2px solid #00ff41;
    border-radius: 8px;
    overflow: hidden;
    background: #0d1b1d;
    transition: all 0.3s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.gallery-item {
    transition: 
        box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1) 300ms, 
        border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1) 300ms;
}
.gallery-item:hover {
    box-shadow: 0 0 25px rgba(0, 255, 65, 0.8);
    border-color: #00ff88;
}

.filename-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 8px 14px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.50) 0%, rgba(0, 0, 0, 0.30) 100%);
    color: #00ff41;
    font-size: 0.9em;
    font-weight: 500;
    text-align: left;
    word-break: break-all;
    text-shadow: 
        0 0 8px rgba(0, 0, 0, 0.9),
        0 1px 2px rgba(0, 0, 0, 0.8),
        0 0 15px rgba(0, 255, 65, 0.4);
    backdrop-filter: blur(4px);
    border-bottom: 1px solid rgba(0, 255, 65, 0.3);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.image-wrapper {
    position: relative;
    width: 100%;
    min-height: 200px;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-item img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.gallery-item img[src] {
    opacity: 1;
}

.gallery-item img[data-src] {
    min-height: 200px;
    background: linear-gradient(90deg, rgba(0, 255, 65, 0.05) 0%, rgba(0, 255, 65, 0.1) 50%, rgba(0, 255, 65, 0.05) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.model-icon-overlay {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #00ff41;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.6);
    backdrop-filter: blur(4px);
    transition: all 0.3s;
}

.gallery-item:hover .model-icon-overlay {
    box-shadow: 0 0 25px rgba(0, 255, 65, 0.9);
    border-color: #00ff88;
}

.model-icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
    filter: drop-shadow(0 0 4px rgba(0, 255, 65, 0.8));
}

.metadata {
    padding: 16px;
    background: rgba(5, 11, 13, 0.95);
    border-top: 1px solid #00ff41;
    border-bottom: 1px solid #00ff41;
    display: flex;
    flex-direction: column;
    gap: 16px;
    font-size: 0.85em;
    backdrop-filter: blur(6px);
    box-shadow: inset 0 0 20px rgba(0, 255, 65, 0.1);
}

.metadata pre {
    color: #00ff41;
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Courier New', 'Consolas', monospace;
}

.meta-card-combined {
    padding: 14px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.08), rgba(3, 20, 18, 0.95));
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.2);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.metadata-top-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    align-items: center;
}

.meta-top-left {
    justify-self: start;
}

.meta-center {
    justify-self: center;
}

.meta-top-right {
    justify-self: end;
}

.metadata-second-row {
    display: flex;
    gap: 10px;
}

.metadata-remaining {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85em;
}

.meta-item .meta-icon {
    font-size: 1em;
    flex-shrink: 0;
}

.meta-item .meta-text {
    font-size: 0.75em;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #9cffc9;
    text-shadow: 0 0 5px rgba(0, 255, 65, 0.4);
    flex-shrink: 0;
}

.meta-item .meta-value {
    color: #eafee9;
    font-size: 0.95em;
    word-break: break-word;
}

.meta-item .meta-value code {
    display: inline-block;
    padding: 4px 6px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 255, 65, 0.3);
    border-radius: 4px;
    color: #b9ffd2;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 0.9em;
}

.meta-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75em;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #9cffc9;
}

.meta-icon {
    font-size: 1.1em;
    text-shadow: 0 0 6px rgba(0, 255, 65, 0.8);
}

.meta-text {
    text-shadow: 0 0 5px rgba(0, 255, 65, 0.4);
}

.meta-value {
    color: #eafee9;
    font-size: 1.05em;
    line-height: 1.4;
    word-break: break-word;
}

.meta-value code {
    display: block;
    padding: 8px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 255, 65, 0.3);
    border-radius: 6px;
    color: #b9ffd2;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.prompt-panel {
    border: 1px solid rgba(0, 255, 65, 0.3);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.2);
    box-shadow: 0 0 8px rgba(0, 255, 65, 0.1);
    overflow: hidden;
    margin-top: 8px;
}

.prompt-panel summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: linear-gradient(90deg, rgba(0, 255, 65, 0.08), rgba(0, 0, 0, 0));
    border-bottom: 1px solid rgba(0, 255, 65, 0.2);
    color: #00ff41;
}

.prompt-panel summary::-webkit-details-marker {
    display: none;
}

.prompt-panel[open] summary {
    color: #b9ffd2;
    box-shadow: inset 0 -4px 12px rgba(0, 255, 65, 0.05);
}

.prompt-content {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(0, 0, 0, 0.2);
}

.prompt-block {
    border: 1px solid rgba(0, 255, 65, 0.25);
    border-radius: 6px;
    padding: 10px;
    background: rgba(0, 255, 65, 0.04);
    box-shadow: 0 0 8px rgba(0, 255, 65, 0.08);
}

.prompt-block.negative {
    border-color: rgba(255, 0, 64, 0.4);
    background: rgba(255, 0, 64, 0.06);
    box-shadow: 0 0 8px rgba(255, 0, 64, 0.15);
}

.prompt-heading {
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
    color: inherit;
}

.prompt-block.positive .prompt-heading {
    color: #9cffc9;
}

.prompt-block.negative .prompt-heading {
    color: #ff7aa5;
}

.prompt-block p {
    margin: 0;
    color: #f0fff4;
    font-size: 0.95em;
    line-height: 1.5;
    white-space: pre-wrap;
}

.error {
    color: #ff0040;
    text-shadow: 0 0 10px #ff0040;
    padding: 20px;
    border: 2px solid #ff0040;
    border-radius: 8px;
    background: rgba(255, 0, 64, 0.1);
    margin: 20px;
}

.empty {
    color: #00ff41;
    text-align: center;
    padding: 40px;
    font-size: 1.2em;
    text-shadow: 0 0 10px #00ff41;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 15px;
}

::-webkit-scrollbar-track {
    background: linear-gradient(180deg, #0a0a0a 0%, #0d1b1d 50%, #0a0a0a 100%);
    border-left: 1px solid rgba(0, 255, 65, 0.2);
    box-shadow: inset 0 0 10px rgba(0, 255, 65, 0.1);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #00ff41 0%, rgba(0, 255, 65, 0.8) 50%, #00ff41 100%);
    border-radius: 6px;
    border: 1px solid rgba(0, 255, 65, 0.5);
    box-shadow: 
        0 0 10px rgba(0, 255, 65, 0.6),
        inset 0 0 5px rgba(0, 255, 65, 0.3);
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #00ff88 0%, rgba(0, 255, 136, 0.9) 50%, #00ff88 100%);
    box-shadow: 
        0 0 20px rgba(0, 255, 136, 0.9),
        inset 0 0 8px rgba(0, 255, 136, 0.5);
    border-color: rgba(0, 255, 136, 0.8);
}

::-webkit-scrollbar-thumb:active {
    background: linear-gradient(180deg, #00ffaa 0%, rgba(0, 255, 170, 1) 50%, #00ffaa 100%);
    box-shadow: 
        0 0 25px rgba(0, 255, 170, 1),
        inset 0 0 10px rgba(0, 255, 170, 0.7);
}

/* Firefox scrollbar styling */
* {
    scrollbar-width: 15px;
    scrollbar-color: #00ff41 rgba(10, 10, 10, 0.5);
}

.cache-control {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid #00ff41;
}

.purge-btn {
    width: 100%;
    padding: 12px;
    background: rgba(255, 0, 64, 0.1);
    border: 2px solid #ff0040;
    border-radius: 4px;
    color: #ff0040;
    font-family: 'Courier New', 'Consolas', monospace;
    font-size: 0.9em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    text-shadow: 0 0 5px #ff0040;
}

.purge-btn:hover {
    background: rgba(255, 0, 64, 0.2);
    box-shadow: 0 0 15px rgba(255, 0, 64, 0.5);
    transform: translateY(-2px);
}

.purge-btn:active {
    transform: translateY(0);
    box-shadow: 0 0 10px rgba(255, 0, 64, 0.3);
}

.gallery-image {
    cursor: pointer;
}

.fullscreen-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: move;
}

.fullscreen-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255, 0, 64, 0.2);
    border: 2px solid #ff0040;
    border-radius: 50%;
    color: #ff0040;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10001;
    transition: all 0.3s;
    text-shadow: 0 0 10px #ff0040;
    box-shadow: 0 0 15px rgba(255, 0, 64, 0.5);
}

.fullscreen-close:hover {
    background: rgba(255, 0, 64, 0.3);
    box-shadow: 0 0 25px rgba(255, 0, 64, 0.8);
    transform: scale(1.1);
}

.fullscreen-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transform-origin: center center;
    transition: transform 0.1s ease-out;
    cursor: move;
    user-select: none;
}

.fullscreen-filename {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #00ff41;
    padding: 12px 24px;
    border: 2px solid #00ff41;
    border-radius: 8px;
    font-size: 0.9em;
    text-shadow: 0 0 10px #00ff41;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10001;
    pointer-events: none;
}

.fullscreen-controls {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    gap: 12px;
    z-index: 10001;
}

.fullscreen-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(0, 255, 65, 0.1);
    border: 2px solid #00ff41;
    border-radius: 6px;
    color: #00ff41;
    font-family: 'Courier New', 'Consolas', monospace;
    font-size: 0.85em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    text-shadow: 0 0 8px #00ff41;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.4);
    backdrop-filter: blur(4px);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.fullscreen-btn:hover {
    background: rgba(0, 255, 65, 0.2);
    border-color: #00ff88;
    box-shadow: 0 0 25px rgba(0, 255, 136, 0.8);
    transform: translateY(-2px);
}

.fullscreen-btn:active {
    transform: translateY(0);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.6);
}

.fullscreen-btn .btn-icon {
    font-size: 1.2em;
    filter: drop-shadow(0 0 4px rgba(0, 255, 65, 0.8));
}

.fullscreen-btn .btn-text {
    font-size: 0.9em;
}

