/* Design System & Core Styles */
:root {
    --bg-primary: #050507;
    --bg-secondary: #0c0d10;
    --bg-card: #000000;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-hover: rgba(255, 255, 255, 0.25);
    --text-primary: #f0f2f5;
    --text-secondary: #8a8d94;
    --text-muted: #55575c;
    
    /* Monochrome Black/White Accent System */
    --accent-bg: #ffffff;
    --accent-text: #000000;
    --accent-border: #ffffff;
    
    --font-sans: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    
    --header-height: 70px;
    --footer-height: 45px;
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-sans);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Prevent copying only in alternative history (/wuwa/althistory) */
body.no-copy, body.no-copy * {
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
}
/* Allow text selection in search bar and input fields */
body.no-copy input, body.no-copy textarea {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}
::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Background Canvas */
#tethys-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    pointer-events: none;
    background: radial-gradient(circle at 50% 50%, #0c0d12 0%, #040406 100%);
}

/* Scanlines overlay */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    pointer-events: none;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    background-size: 100% 4px, 6px 100%;
    opacity: 0.8;
}

/* CSS Grid Layout */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    z-index: 1;
    position: relative;
}

.font-mono {
    font-family: var(--font-mono);
}

/* Header */
.database-header {
    height: var(--header-height);
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cyber-logo {
    width: 32px;
    height: 32px;
    border: 2px solid var(--text-primary);
    transform: rotate(45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.logo-inner {
    width: 12px;
    height: 12px;
    background-color: var(--text-primary);
    animation: pulse-logo 2s infinite ease-in-out;
}

@keyframes pulse-logo {
    0%, 100% { transform: scale(0.8); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 1; }
}

.logo-text h1 {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 2px;
    font-family: var(--font-mono);
}

.sub-logo {
    font-size: 0.65rem;
    letter-spacing: 4px;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    display: block;
    margin-top: -2px;
}

.header-metrics {
    display: flex;
    gap: 30px;
}

.metric-item {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.metric-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    letter-spacing: 1px;
}

.metric-value {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
}

.status-online {
    color: #ffffff;
    font-weight: bold;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
    position: relative;
    padding-right: 12px;
}

.status-online::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background-color: #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 8px #ffffff;
}

/* Main Body Layout */
.database-body {
    flex: 1;
    padding: 30px 40px;
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
    position: relative;
}

/* Views Management */
.view-panel {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.view-panel.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* CATALOG VIEW CSS */

/* Control Board */
.control-board {
    background-color: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    padding: 25px;
    margin-bottom: 25px;
    border-radius: 0;
    position: relative;
}

.control-board::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 20px;
    width: 60px;
    height: 3px;
    background-color: var(--accent-bg);
}

.board-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.board-header p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 20px;
}

.search-filter-wrapper {
    display: flex;
    gap: 15px;
}

.search-box {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    padding: 0 15px;
    height: 50px;
    transition: var(--transition);
}

.search-box:focus-within {
    border-color: var(--border-color-hover);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.05);
}

.search-icon {
    font-family: var(--font-mono);
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-right: 12px;
}

.search-box input {
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    width: 100%;
    height: 100%;
    font-family: var(--font-mono);
    font-size: 0.95rem;
}

.clear-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 5px;
    display: none;
}

.clear-btn:hover {
    color: var(--text-primary);
}

/* Buttons */
.btn {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    padding: 0 20px;
    height: 50px;
    border: 1px solid var(--border-color);
    background: none;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
}

.btn-secondary:hover {
    border-color: var(--border-color-hover);
    background: rgba(255, 255, 255, 0.08);
}

.btn-reset {
    width: 100%;
    margin-top: 15px;
    background-color: transparent;
    border-color: var(--text-muted);
}

.btn-reset:hover {
    background-color: var(--text-primary);
    color: var(--bg-primary);
    border-color: var(--text-primary);
}

/* Active Tags */
.active-filters-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.filter-tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 4px 10px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.filter-tag button {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    line-height: 1;
}

.filter-tag button:hover {
    color: var(--text-primary);
}

/* Catalog Layout Grid + Sidebar */
.catalog-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
}

/* Sidebar Filters */
.filters-sidebar {
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    padding: 20px;
    height: fit-content;
}

.filter-group {
    margin-bottom: 25px;
}

.filter-group h4 {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    border-left: 2px solid var(--text-muted);
    padding-left: 8px;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Filter Checkbox / Options Custom Styling */
.filter-btn {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    background-color: rgba(255, 255, 255, 0.01);
    color: var(--text-secondary);
    cursor: pointer;
    text-align: left;
    transition: var(--transition);
    border-radius: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-btn:hover {
    border-color: var(--border-color-hover);
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.03);
}

/* THE BLACK ACCENT: INVERTED STARK BLACK/WHITE WHEN ACTIVE */
.filter-btn.active {
    background-color: var(--accent-bg);
    color: var(--accent-text);
    border-color: var(--accent-border);
    font-weight: 500;
}

.filter-btn .count-badge {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 2px 5px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

.filter-btn.active .count-badge {
    background-color: rgba(0, 0, 0, 0.15);
    color: var(--accent-text);
}

/* Grid Wrapper & Statistics */
.cards-grid-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.grid-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.grid-sorting {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-dropdown {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    padding: 5px 10px;
    outline: none;
    cursor: pointer;
}

.sort-dropdown:focus {
    border-color: var(--border-color-hover);
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* Stark Premium Character Cards */
.character-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 20px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.character-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 10px 10px;
    border-color: transparent transparent var(--border-color) transparent;
    transition: var(--transition);
}

/* Card Hover States */
.character-card:hover {
    border-color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.03);
}

.character-card:hover::after {
    border-color: transparent transparent var(--text-primary) transparent;
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.card-node-id {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.card-element-badge {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    padding: 2px 8px;
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    text-transform: uppercase;
    color: var(--text-primary);
}

/* High contrast active elements (Stark Black) */
.character-card:hover .card-element-badge {
    background-color: var(--text-primary);
    color: var(--bg-primary);
    border-color: var(--text-primary);
}

.card-middle {
    margin-bottom: 25px;
    flex: 1;
}

.card-name {
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    line-height: 1.2;
    margin-bottom: 6px;
    transition: var(--transition);
}

.character-card:hover .card-name {
    color: #ffffff;
}

.card-title {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
}

.card-affiliation {
    color: var(--text-secondary);
}

.card-weapon {
    color: var(--text-muted);
}

.character-card:hover .card-weapon {
    color: var(--text-secondary);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    border: 1px dashed var(--border-color);
}

.empty-icon {
    font-family: var(--font-mono);
    font-size: 2rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.empty-state h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.empty-state p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* DETAIL VIEW CSS */

.detail-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.btn-back {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.btn-back:hover {
    color: var(--text-primary);
    transform: translateX(-4px);
}

.btn-back .arrow {
    font-size: 1.1rem;
    line-height: 1;
}

.detail-path {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 2px;
}

/* Detail Columns Layout */
.detail-layout {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 40px;
    align-items: start;
}

/* Left Profile Cyber Card */
.profile-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 30px;
    position: relative;
}

/* Hologram container */
.profile-avatar-container {
    width: 100%;
    height: 180px;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Scanner line animation */
.avatar-scanner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--text-primary), transparent);
    box-shadow: 0 0 10px var(--text-primary);
    animation: scanning 3s infinite ease-in-out;
    z-index: 5;
}

@keyframes scanning {
    0% { top: 0%; }
    50% { top: 100%; }
    100% { top: 0%; }
}

.avatar-mesh {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 15px 15px;
    z-index: 1;
}

/* Hologram visual styling */
.hologram-overlay {
    position: relative;
    width: 100px;
    height: 100px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.holo-circle {
    position: absolute;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

.ring-1 {
    width: 100px;
    height: 100px;
    animation: rotate-clockwise 10s infinite linear;
}

.ring-2 {
    width: 80px;
    height: 80px;
    border-style: solid;
    animation: rotate-counter 6s infinite linear;
}

.ring-3 {
    width: 60px;
    height: 60px;
    border-style: dotted;
}

.hologram-symbol {
    font-family: var(--font-mono);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-primary);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
    z-index: 3;
}

@keyframes rotate-clockwise {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes rotate-counter {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}

.status-indicator {
    position: absolute;
    bottom: 10px;
    left: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-secondary);
    z-index: 5;
}

.blink-dot {
    width: 6px;
    height: 6px;
    background-color: var(--text-primary);
    border-radius: 50%;
    animation: blink 1s infinite step-end;
}

@keyframes blink {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

/* Profile header */
.profile-header h2 {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.profile-subtitle {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 25px;
}

/* Specs rows styling */
.profile-specs {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.spec-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.spec-label {
    color: var(--text-muted);
}

.spec-value {
    color: var(--text-primary);
    text-align: right;
}

.spec-row-status {
    border-bottom: none;
    padding-bottom: 0;
    margin-top: 5px;
}

.spec-row-status .spec-value {
    font-weight: 700;
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.08);
    padding: 2px 8px;
    border: 1px solid var(--border-color);
}

/* Connection Relations Box */
.relations-box {
    margin-top: 25px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 20px;
}

.relations-box h3 {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.relations-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.relation-item {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 10px;
    border: 1px solid var(--border-color);
    background-color: rgba(255, 255, 255, 0.01);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.relation-item::before {
    content: '//';
    color: var(--text-muted);
    margin-right: 8px;
}

.relation-item:hover {
    background-color: var(--text-primary);
    color: var(--bg-primary);
    border-color: var(--text-primary);
}

/* Right Reader Box */
.detail-content-wrapper {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    position: relative;
    padding: 40px;
    min-height: 600px;
}

.reader-decor {
    width: 100%;
}

.decor-corner {
    position: absolute;
    width: 10px;
    height: 10px;
    border: 2px solid var(--text-muted);
}

.top-left { top: 10px; left: 10px; border-right: none; border-bottom: none; }
.top-right { top: 10px; right: 10px; border-left: none; border-bottom: none; }
.bottom-left { bottom: 10px; left: 10px; border-right: none; border-top: none; }
.bottom-right { bottom: 10px; right: 10px; border-left: none; border-top: none; }

.decor-bar {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
    margin-bottom: 30px;
}

/* Markdown Rendering Engine */
.markdown-body {
    line-height: 1.6;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.markdown-body h1, 
.markdown-body h2, 
.markdown-body h3, 
.markdown-body h4 {
    font-weight: 600;
    color: #ffffff;
    margin-top: 1.8em;
    margin-bottom: 0.6em;
    letter-spacing: 0.5px;
}

.markdown-body h1 { font-size: 1.8rem; margin-top: 0; }
.markdown-body h2 { 
    font-size: 1.4rem; 
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 6px;
    font-family: var(--font-mono);
    text-transform: uppercase;
}
.markdown-body h3 { font-size: 1.15rem; color: var(--text-primary); }
.markdown-body h4 { font-size: 0.95rem; color: var(--text-secondary); font-family: var(--font-mono); }

.markdown-body p {
    margin-bottom: 1.2em;
    color: var(--text-primary);
}

.markdown-body strong {
    font-weight: 600;
    color: #ffffff;
}

.markdown-body hr {
    height: 1px;
    background-color: var(--border-color);
    border: none;
    margin: 25px 0;
    position: relative;
}

/* Custom styled Horizontal separator with dot */
.markdown-body hr::after {
    content: '[TETHYS CORE]';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-mono);
    font-size: 0.6rem;
    background-color: var(--bg-card);
    padding: 0 10px;
    color: var(--text-muted);
}

.markdown-body ul, 
.markdown-body ol {
    margin-bottom: 1.2em;
    padding-left: 20px;
}

.markdown-body li {
    margin-bottom: 0.5em;
}

/* Tables from Markdown (Database Record Style) */
.markdown-body table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5em;
    margin-top: 1em;
}

.markdown-body th, 
.markdown-body td {
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    font-size: 0.85rem;
    text-align: left;
}

.markdown-body th {
    background-color: rgba(255, 255, 255, 0.02);
    font-family: var(--font-mono);
    font-weight: 500;
    color: var(--text-secondary);
}

.markdown-body tr:hover td {
    background-color: rgba(255, 255, 255, 0.01);
}

/* Footer Section */
.database-footer {
    border-top: 1px solid var(--border-color);
    background-color: rgba(0, 0, 0, 0.95);
    padding: 25px 40px;
    font-size: 0.72rem;
    color: var(--text-secondary);
    line-height: 1.6;
    text-align: center;
}

.database-footer p {
    margin-bottom: 8px;
}

.database-footer p:last-child {
    margin-bottom: 0;
}

.database-footer a {
    color: var(--text-primary);
    text-decoration: underline;
    transition: var(--transition);
}

.database-footer a:hover {
    color: #ffffff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

/* Hide classes */
.hide-desktop {
    display: none;
}

/* RESPONSIVE BREAKPOINTS */

@media (max-width: 1024px) {
    .database-header {
        padding: 0 20px;
    }
    
    .database-body {
        padding: 20px;
    }
    
    .catalog-layout {
        grid-template-columns: 1fr;
    }
    
    /* Responsive slide drawer for filters */
    .filters-sidebar {
        display: none;
        position: fixed;
        top: 0;
        left: -300px;
        width: 280px;
        height: 100vh;
        z-index: 200;
        background-color: var(--bg-secondary);
        border-right: 1px solid var(--border-color);
        transition: left 0.3s ease;
        overflow-y: auto;
    }
    
    .filters-sidebar.active {
        display: block;
        left: 0;
    }
    
    .sidebar-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 10px;
    }
    
    .sidebar-header h3 {
        font-family: var(--font-mono);
        font-size: 0.9rem;
    }
    
    .close-btn {
        background: none;
        border: none;
        color: var(--text-primary);
        font-size: 1.8rem;
        cursor: pointer;
    }
    
    .hide-desktop {
        display: block;
    }
    
    .hide-mobile {
        display: none !important;
    }
    
    /* Detail View responsive layout */
    .detail-layout {
        grid-template-columns: 1fr;
    }
    
    .detail-profile-sidebar {
        width: 100%;
    }
    
    .detail-content-wrapper {
        padding: 20px;
    }
}

@media (max-width: 576px) {
    .search-filter-wrapper {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .grid-stats {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .markdown-body h1 { font-size: 1.4rem; }
    .markdown-body h2 { font-size: 1.15rem; }

    /* Header Logo size reduction for mobile screens */
    .database-header {
        padding: 0 15px;
    }
    .header-logo {
        gap: 8px;
    }
    .cyber-logo {
        width: 24px;
        height: 24px;
        border-width: 1px;
    }
    .logo-inner {
        width: 8px;
        height: 8px;
    }
    .logo-text h1 {
        font-size: 0.9rem;
        letter-spacing: 1px;
    }
    .sub-logo {
        font-size: 0.55rem;
        letter-spacing: 2px;
        margin-top: -1px;
    }

    /* Disclaimer scrollability on mobile screens */
    .disclaimer-panel {
        overflow-y: auto;
        align-items: flex-start;
        padding: 10px;
    }
    .disclaimer-content {
        margin: 10px auto;
        padding: 20px 15px;
    }
}

/* Content Warning / Disclaimer Screen Overlay */
.disclaimer-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #000000 !important; /* Pitch black background */
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.disclaimer-content {
    max-width: 680px;
    width: 100%;
    color: #e1e3e6;
    background-color: #000000;
    text-align: center;
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.95);
}

.disclaimer-title {
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 3px;
    margin-bottom: 30px;
    animation: disclaimer-glow 2.5s infinite ease-in-out;
}

@keyframes disclaimer-glow {
    0%, 100% { opacity: 0.75; text-shadow: 0 0 4px rgba(255, 255, 255, 0.1); }
    50% { opacity: 1; text-shadow: 0 0 15px rgba(255, 255, 255, 0.5); }
}

.disclaimer-text {
    font-size: 0.9rem;
    line-height: 1.65;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.warning-alert {
    color: #ffffff;
    font-weight: 600;
    border-left: 2px solid #ffffff;
    padding-left: 15px;
    margin-bottom: 8px;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.warning-section strong {
    color: #ffffff;
    display: block;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
    font-family: var(--font-mono);
}

.warning-footer {
    color: #8c9099;
    font-size: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 15px;
    margin-top: 5px;
    text-align: center;
}

/* Actions (Buttons Wrapper) */
.disclaimer-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
    margin-top: 45px;
    height: 55px;
}

/* [ВЫХОД] - centered, glows faintly white */
.disclaimer-btn-exit {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background-color: transparent;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.8);
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 2px;
    padding: 10px 36px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.18);
}

.disclaimer-btn-exit:hover {
    background-color: #ffffff;
    color: #000000;
    box-shadow: 0 0 18px rgba(255, 255, 255, 0.4);
}

/* [ПРОДОЛЖИТЬ] - dimmer, smaller, placed to the right */
.disclaimer-btn-continue {
    position: absolute;
    left: calc(50% + 120px); /* Position it to the right of the centered Exit button */
    background-color: transparent;
    color: #55575c;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 1px;
    padding: 8px 18px;
    cursor: pointer;
    transition: var(--transition);
}

.disclaimer-btn-continue:hover {
    color: #b0b4c0;
    border-color: rgba(255, 255, 255, 0.3);
}

@media (max-width: 600px) {
    .disclaimer-actions {
        display: flex;
        flex-direction: column-reverse;
        gap: 15px;
        height: auto;
        margin-top: 35px;
    }
    
    .disclaimer-btn-exit,
    .disclaimer-btn-continue {
        position: static;
        transform: none;
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }
}

/* Landing View Styles */
.landing-container {
    max-width: 900px;
    width: 100%;
    margin: 80px auto 0 auto;
    text-align: center;
    padding: 20px;
}

.landing-header {
    margin-bottom: 50px;
}

.landing-main-title {
    font-size: 2.2rem;
    letter-spacing: 5px;
    margin-bottom: 20px;
    color: #ffffff;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.landing-intro {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-primary);
    max-width: 650px;
    margin: 0 auto;
}

.landing-subtext {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 10px;
}

.landing-divider {
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 3px;
    margin-top: 30px;
}

.landing-hubs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

.hub-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 40px 30px;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 240px;
    position: relative;
    overflow: hidden;
}

.hub-card::before {
    content: '// SELECT HUB';
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 0.65rem;
    color: var(--text-muted);
}

.hub-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 1px;
}

.hub-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-top: 20px;
    flex: 1;
}

.hub-action {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
    transition: var(--transition);
}

/* Hover highlights: Stark White accent with black text */
.hub-card:hover {
    background-color: var(--text-primary);
    border-color: var(--text-primary);
    box-shadow: 0 8px 32px rgba(255, 255, 255, 0.05);
}

.hub-card:hover .hub-title {
    color: var(--bg-primary);
}

.hub-card:hover .hub-desc {
    color: rgba(0, 0, 0, 0.7);
}

.hub-card:hover .hub-action {
    color: var(--bg-primary);
    border-color: rgba(0, 0, 0, 0.15);
}

/* WW Loading Terminal Styles */
.loading-terminal-container {
    max-width: 700px;
    width: 100%;
    background-color: #000000;
    border: 1px solid var(--border-color);
    margin: 100px auto 0 auto;
    padding: 30px;
    min-height: 380px;
    position: relative;
    overflow: hidden;
}

.loading-lines {
    font-size: 0.9rem;
    line-height: 1.8;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.loading-lines .loading-success {
    color: #ffffff;
    font-weight: bold;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.loading-hex-overlay {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.25);
    height: 180px;
    overflow: hidden;
    word-break: break-all;
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
    padding-top: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.loading-hex-overlay.active {
    opacity: 1;
}

/* WW Welcome / Switcher View Styles */
.ww-welcome-container {
    max-width: 900px;
    width: 100%;
    margin: 50px auto 0 auto;
    padding: 20px;
}

.ww-welcome-header {
    text-align: left;
    margin-bottom: 40px;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    padding: 30px;
    position: relative;
}

.ww-welcome-header::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 20px;
    width: 60px;
    height: 3px;
    background-color: var(--text-primary);
}

.ww-welcome-header h2 {
    font-size: 1.6rem;
    letter-spacing: 2px;
    margin-top: 15px;
    margin-bottom: 20px;
    color: #ffffff;
}

.welcome-disclaimer {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.disclaimer-highlight {
    font-family: var(--font-mono);
    color: #ffffff;
    font-size: 0.85rem;
    letter-spacing: 1px;
    border-left: 2px solid #ffffff;
    padding-left: 15px;
    margin-top: 10px;
    line-height: 1.5;
}

.ww-welcome-hubs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.ww-hub-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 35px 25px;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 230px;
    position: relative;
}

.ww-hub-card::before {
    content: '// TETHYS ARCHIVE LINK';
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 0.6rem;
    color: var(--text-muted);
}

.ww-hub-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 1px;
    font-family: var(--font-mono);
}

.ww-hub-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-top: 15px;
    flex: 1;
    font-family: var(--font-sans);
}

.ww-hub-action {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
    transition: var(--transition);
}

.ww-hub-card:hover {
    background-color: var(--text-primary);
    border-color: var(--text-primary);
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.05);
}

.ww-hub-card:hover .ww-hub-title {
    color: var(--bg-primary);
}

.ww-hub-card:hover .ww-hub-desc {
    color: rgba(0, 0, 0, 0.7);
}

.ww-hub-card:hover .ww-hub-action {
    color: var(--bg-primary);
    border-color: rgba(0, 0, 0, 0.15);
}

/* Arknights PRTS Terminal Styles */
.prts-terminal-container {
    max-width: 750px;
    width: 100%;
    background-color: #000000;
    border: 1px solid #1a2c1f; /* PRTS Dark Green borders */
    margin: 80px auto 0 auto;
    padding: 40px;
    position: relative;
    box-shadow: 0 0 30px rgba(13, 238, 128, 0.03);
}

.prts-terminal-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: #0dee80; /* Rhodes Green Accent */
    box-shadow: 0 0 10px #0dee80;
}

.prts-logo-row {
    margin-bottom: 5px;
}

.prts-logo-box {
    display: inline-block;
    background-color: #0dee80;
    color: #000000;
    font-size: 1.3rem;
    font-weight: 900;
    letter-spacing: 3px;
    padding: 3px 12px;
    font-family: var(--font-mono);
}

.prts-sub {
    font-size: 0.65rem;
    color: #8fa095;
    letter-spacing: 2px;
    margin-top: 5px;
    text-transform: uppercase;
}

.prts-status-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: #0dee80;
    margin-top: 15px;
    letter-spacing: 1px;
}

.blink-cursor {
    animation: cursor-blink 1s infinite step-end;
    font-weight: bold;
}

@keyframes cursor-blink {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

.prts-body {
    margin-top: 35px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.prts-warning-box {
    border: 1px solid rgba(13, 238, 128, 0.15);
    background-color: rgba(13, 238, 128, 0.02);
    padding: 20px;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #b0c0b5;
}

.warning-tag {
    display: inline-block;
    color: #ff3333;
    border: 1px solid #ff3333;
    font-weight: bold;
    font-size: 0.65rem;
    padding: 1px 6px;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.prts-status-info {
    font-size: 0.8rem;
    color: #8fa095;
    line-height: 1.8;
}

.prts-highlight {
    color: #0dee80;
    font-weight: bold;
    text-shadow: 0 0 8px rgba(13, 238, 128, 0.4);
}

.prts-actions {
    margin-top: 40px;
    border-top: 1px solid #1a2c1f;
    padding-top: 25px;
}

.prts-btn {
    background-color: transparent;
    color: #0dee80;
    border: 1px solid #0dee80;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 2px;
    padding: 10px 24px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.prts-btn:hover {
    background-color: #0dee80;
    color: #000000;
    box-shadow: 0 0 12px rgba(13, 238, 128, 0.35);
}

/* Responsive Overrides */
@media (max-width: 768px) {
    .landing-hubs,
    .ww-welcome-hubs {
        grid-template-columns: 1fr;
    }
    
    .hub-card,
    .ww-hub-card {
        height: 210px;
    }
}
/* Resonators Relations Map Styling */
.relations-map-container {
    margin-top: 20px;
    margin-bottom: 20px;
    width: 100%;
}

.btn-relations-map {
    width: 100%;
    height: 42px;
    max-height: 42px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    overflow: hidden;
    opacity: 1;
    transition: max-height 0.6s cubic-bezier(0.16, 1, 0.3, 1), 
                opacity 0.6s ease, 
                margin 0.6s ease, 
                padding 0.6s ease,
                border-color 0.3s ease,
                background-color 0.3s ease,
                color 0.3s ease;
}

.btn-relations-map:hover {
    background-color: var(--text-primary);
    color: var(--bg-primary);
    border-color: var(--text-primary);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.05);
}

.relations-map-panel {
    width: 100%;
    margin-top: 0;
    border: 0 solid var(--border-color);
    background-color: #000000;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 10px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    box-sizing: border-box;
    transition: max-height 0.6s cubic-bezier(0.16, 1, 0.3, 1), 
                opacity 0.6s ease, 
                margin 0.6s ease, 
                padding 0.6s ease, 
                border-width 0.6s ease;
}

.relations-map-iframe {
    width: 100%;
    height: 650px;
    border: none;
    background-color: #000000;
}

.btn-relations-map-close {
    width: 100%;
    height: 42px;
    margin-top: 10px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 2px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-relations-map-close:hover {
    background-color: var(--text-primary);
    color: var(--bg-primary);
    border-color: var(--text-primary);
}

/* Expanded state transitions */
.relations-map-container.expanded .btn-relations-map {
    max-height: 0;
    opacity: 0;
    padding: 0;
    margin: 0;
    border: none;
    pointer-events: none;
}

.relations-map-container.expanded .relations-map-panel {
    max-height: 800px;
    opacity: 1;
    margin-top: 15px;
    padding: 10px;
    border: 1px solid var(--border-color);
}

/* Language Toggle Switch */
.lang-toggle-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin-right: 15px;
}

.lang-label {
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    transition: color 0.3s ease;
    user-select: none;
}

.lang-label.active {
    color: var(--text-primary);
    font-weight: bold;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

/* Switch Container */
.switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 18px;
}

/* Hide default checkbox */
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* The slider */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    transition: .3s;
    border-radius: 9px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 10px;
    width: 10px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-secondary);
    transition: .3s;
    border-radius: 50%;
}

.switch input:checked + .slider {
    background-color: var(--text-primary);
    border-color: var(--text-primary);
}

.switch input:checked + .slider:before {
    transform: translateX(18px);
    background-color: var(--bg-primary);
}

/* Temporary Anomalies Popup Warning */
.anomalies-popup-panel {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 350px;
    background: rgba(10, 10, 15, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-top: 3px solid #ff3b30;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(255, 59, 48, 0.15);
    border-radius: 4px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    animation: anomalies-slide-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes anomalies-slide-in {
    0% { transform: translateY(30px) scale(0.95); opacity: 0; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

.popup-header {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 59, 48, 0.05);
}

.popup-title {
    font-size: 0.72rem;
    font-weight: bold;
    color: #ff3b30;
    letter-spacing: 0.5px;
    text-shadow: 0 0 8px rgba(255, 59, 48, 0.4);
}

.popup-close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s ease, transform 0.2s ease;
}

.popup-close-btn:hover {
    color: #ff3b30;
    transform: scale(1.1);
}

.popup-body {
    padding: 14px;
    font-size: 0.8rem;
    line-height: 1.45;
    color: var(--text-primary);
}

.popup-body a {
    color: var(--text-secondary);
    text-decoration: underline;
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

.popup-body a:hover {
    color: var(--text-primary);
    text-shadow: 0 0 8px var(--text-primary);
}

@media (max-width: 480px) {
    .anomalies-popup-panel {
        left: 20px;
        right: 20px;
        bottom: 20px;
        width: auto;
    }
}

/* Multi-Chapter AU Reader styles */
.chapters-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.chapters-section h3 {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.chapters-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chapter-link-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 12px 16px;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: var(--transition);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chapter-link-item:hover {
    border-color: var(--border-color-hover);
    color: var(--text-primary);
    background: var(--bg-secondary);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.02);
}

.chapter-link-item .arrow {
    transition: transform 0.2s ease;
}

.chapter-link-item:hover .arrow {
    transform: translateX(4px);
    color: var(--text-primary);
}

.chapter-nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
    margin: 25px 0;
}

.chapter-nav-bar.bottom {
    border-bottom: none;
    border-top: 1px solid var(--border-color);
    margin-bottom: 10px;
}

.chapter-nav-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 8px 16px;
    cursor: pointer;
    transition: var(--transition);
}

.chapter-nav-btn:hover:not(:disabled) {
    border-color: var(--border-color-hover);
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.chapter-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.chapter-title-header {
    margin: 20px 0 30px 0;
    text-align: center;
}

.chapter-title-header h2 {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.chapter-images-gallery {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px dashed var(--border-color);
}

.chapter-images-gallery h4 {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.chapter-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.chapter-gallery-item img {
    width: 100%;
    height: auto;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.chapter-gallery-item img:hover {
    border-color: var(--border-color-hover);
    transform: scale(1.02);
}


