/* --- ZTI COMIC PAGE SPECIFIC STYLES --- */

/* Override for the main content area to allow flexbox layout */
.page-content {
    padding: 10px 20px;
    overflow: hidden; /* Hide overflow to contain elements */
    flex-grow: 1;
    min-height: 0;
    text-align: left;
    display: flex;
    flex-direction: column;
}

#comic-image-container {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    margin-bottom: 15px;
    min-height: 200px;
    border: 1px dashed #557777;
    padding: 5px;
    cursor: pointer;
}

.comic-image-preview {
    display: block;
    max-width: 100%;
    max-height: 100%;
    height: auto;
    width: auto;
    border: 2px solid #557777;
    image-rendering: pixelated;
}

#comic-pagination {
    text-align: center;
    padding: 10px 0;
    flex-shrink: 0;
}

.pagination-button {
    display: inline-block;
    padding: 8px 15px;
    margin: 0 15px;
    border: 1px solid #aaffee;
    background-color: #334444;
    color: #ccffff;
    font-family: 'VT323', monospace;
    font-size: 1.2em;
    cursor: pointer;
    text-shadow: 0 0 2px #00ffff;
    transition: all 0.1s ease-in-out;
    user-select: none;
}

.pagination-button:hover:not(:disabled) {
    background-color: #445555;
    box-shadow: 0 0 6px rgba(0, 255, 255, 0.5);
}

.pagination-button:active:not(:disabled) {
    background-color: #556666;
    transform: translateY(1px);
}

.pagination-button:disabled {
    border-color: #444;
    color: #666;
    background-color: #2a2a2a;
    text-shadow: none;
    cursor: not-allowed;
    opacity: 0.5;
}

#page-number {
    display: inline-block;
    min-width: 60px;
    font-size: 1.2em;
    color: #00ff00;
    margin: 0 10px;
    vertical-align: middle;
}

/* --- LIGHTBOX STYLES --- */
#lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 10px;
    box-sizing: border-box;
    cursor: pointer;
}

#lightbox-content {
    position: relative;
    width: 95%;
    height: 85%;
    max-width: 95vw;
    max-height: 85vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    cursor: grab;
}

#lightbox-image {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border: 1px solid #aaffee;
    image-rendering: auto;
    cursor: grab;
    transform-origin: center center;
}

#lightbox-image:active {
    cursor: grabbing;
}

#lightbox-controls {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(10, 10, 10, 0.8);
    padding: 8px 15px;
    border-radius: 5px;
    z-index: 1002;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: default;
}

.lightbox-button, #lightbox-close {
    background-color: #334444;
    border: 1px solid #aaffee;
    color: #ccffff;
    font-family: 'VT323', monospace;
    font-size: 1.5em;
    cursor: pointer;
    padding: 5px 10px;
    line-height: 1;
    user-select: none;
    transition: background-color 0.2s;
}

.lightbox-button:hover:not(:disabled) {
    background-color: #445555;
}

.lightbox-button:active:not(:disabled) {
    background-color: #556666;
}

.lightbox-button:disabled {
    border-color: #444;
    color: #666;
    background-color: #2a2a2a;
    cursor: not-allowed;
    opacity: 0.5;
}

#lightbox-close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 2em;
    padding: 2px 8px;
    z-index: 1002;
    background-color: rgba(51, 68, 68, 0.7);
}

#lightbox-close:hover {
    background-color: #445555;
}

#lightbox-page-indicator {
    color: #ffffaa;
    font-size: 1.1em;
    margin: 0 5px;
    white-space: nowrap;
}