/* Design System Tokens */
:root {
    --bg-body: #1e1e1e;
    --bg-card: #2c2c2c;
    --bg-element-dark: #1e1e1e;
    --color-red-primary: #ff0000;
    --color-red-hover: #ff0000A0;
    --text-main: #cccccc;
    --text-light: #ffffff;
    --text-muted: #a3a3a3;
    --border-color: #cccccc40;
    --radius-xl: 16px;
    --radius-lg: 12px;
    --transition: all 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Reset & Custom Scrollbar */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

section {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: "Roboto", Arial, sans-serif;
    overflow-x: hidden;
    overflow-y: auto;
    height: 100vh;
    top: 0;
}

/* Ambient Glow Background System */
.glow-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.glow-1 {
    position: absolute;
    top: 0px;
    left: -150px;
    width: 400px;
    height: 100%;
    background: rgba(239, 68, 68, 0.08);
    border-radius: 50%;
    filter: blur(100px);
}
.glow-2 {
    position: absolute;
    top: 0px;
    right: -200px;
    width: 500px;
    height: 100%;
    background: rgba(153, 27, 27, 0.04);
    border-radius: 50%;
    filter: blur(130px);
}

/* Layout Structure (pt leaves clean room for your 50px navbar) */
.page-wrapper {
    position: relative;
    z-index: 10;
    padding-top: 50px;
    max-width: 56rem;
    width: 100%;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
    padding-bottom: 80px;
}

header {
    margin-top: 48px;
    margin-bottom: 48px;
}
header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-light);
    letter-spacing: -0.025em;
}
header h1 span {
    background: linear-gradient(to right, #ef4444, #f43f5e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
header p {
    margin-top: 12px;
    color: var(--text-muted);
    font-size: 1rem;
}

/* Deep-Link Isolated Banner Alert */
.isolated-view-banner {
    display: none;
    background: #ff00001a;
    border: 1px solid #ff000033;
    border-radius: var(--radius-lg);
    padding: 14px 20px;
    margin-bottom: 32px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.isolated-view-banner p {
    font-size: 0.875rem;
    color: #f87171;
}
.btn-clear-link {
    background: var(--color-red-primary);
    color: var(--text-light);
    border: none;
    padding: 6px 14px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}
.btn-clear-link:hover {
    background: var(--color-red-hover);
}

/* Modern Filter Control Panel */
.filter-dashboard {
    background-color: rgba(44, 44, 44, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 16px;
    margin-bottom: 48px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
}
.filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.btn-filter {
    background-color: #242424;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 8px 16px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition);
}
.btn-filter:hover {
    color: var(--text-light);
    /* background-color: #333333; */
    border-color: #ff000060;
}
.btn-filter.active-page {
    background-color: var(--color-red-primary);
    color: var(--text-light);
}
.btn-filter.active-type {
    background-color: color-mix(in srgb, #242424 95%, red);
    color: #ff0000;
    border-color: #ff000060;
}

/* Timeline Track Components */
.timeline-track {
    position: relative;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    margin-left: 24px;
}
.log-entry {
    position: relative;
    padding-left: 40px;
    margin-bottom: 40px;
}
.log-entry::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 26px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background-color: #404040;
    box-shadow: 0 0 0 4px var(--bg-body);
    transition: var(--transition);
}
.log-entry.major-release::before {
    background-color: var(--color-red-primary);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15), 0 0 0 2px var(--bg-body);
}
.log-entry:hover::before {
    transform: scale(1.3);
}

.log-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
    transition: var(--transition);
}
.log-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.card-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.title-meta-area {
    display: flex;
    align-items: center;
    gap: 12px;
}
.version-badge {
    font-family: monospace;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #242424;
    color: var(--text-muted);
}
.major-release .version-badge {
    background: #ff00001a;
    border-color: #ff000033;
    color: #f87171;
}
.card-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-light);
    transition: var(--transition);
}
.log-card:hover {
    border-color: #cccccc60;
}

.right-header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}
.card-header time {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Direct Deep Link Link Copier Button */
.btn-share-log {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 6px;
    transition: var(--transition);
}
.btn-share-log:hover {
    color: var(--text-light);
    background: #333333;
}

/* Typography Styling */
.log-content {
    font-size: 0.875rem;
    color: #d4d4d4;
    line-height: 1.625;
}
.log-content h3 {
    color: var(--text-light);
    font-size: 1rem;
    font-weight: 700;
    margin-top: 20px;
    margin-bottom: 8px;
}
.log-content ul {
    list-style-type: disc;
    padding-left: 20px;
    /* margin-bottom: 12px; */
}
.log-content ul li {
    margin-bottom: 4px;
}
.log-content a {
    color: #ff0000;
}
.log-content strong {
    color: white;
    font-weight: 600;
}

.log-content a strong {
    color: #ff0000;
}
.log-content blockquote {
    border-left: 3px solid var(--color-red-primary);
    padding-left: 12px;
    color: var(--text-muted);
    font-style: italic;
    margin: 16px 0;
}

/* --- IMAGE ENGINE STYLING --- */

/* Base Image Properties (Solitary Images) */
.log-content img {
    width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: contain; /* Fix: Ensures top/bottom are never cut off */
    background-color: var(--bg-element-dark);
    border-radius: var(--radius-lg);
    border: 1px solid #cccccc60;
    margin-top: 16px;
    display: block;
    cursor: pointer;
    transition: var(--transition);
}
.log-content img:hover {
    transform: scale(1.01);
    border-color: #cccccc80;
}

/* Multiple Image Multi-Column Grid System */
.log-content .md-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
    margin-top: 16px;
    margin-bottom: 16px;
}
.log-content .md-image-grid img {
    margin-top: 0;
    height: 220px; /* Uniform rows for clean grids */
    object-fit: cover; /* Crops cleanly to match grid alignment constraints */
}

/* Dynamic Loading Indicators */
.scroll-status-trigger {
    height: 40px;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.spinner {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--color-red-primary);
    animation: spin 0.8s linear infinite;
    display: none;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Fullscreen Lightbox Overlay Window */
.lightbox-overlay {
    position: fixed;
    z-index: 9999;
    top: 50px;
    left: 0;
    width: 100vw;
    height: calc(100vh - 50px);
    background-color: rgba(10, 10, 10, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease-in-out;
}
.lightbox-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.lightbox-content {
    max-width: 92%;
    max-height: 88%;
    object-fit: contain;
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    transform: scale(0.95);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.lightbox-overlay.active .lightbox-content {
    transform: scale(1);
}
.lightbox-close {
    position: absolute;
    top: 24px;
    right: 32px;
    color: var(--text-muted);
    font-size: 2.5rem;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    transition: var(--transition);
}
.lightbox-close:hover {
    color: var(--text-light);
    transform: rotate(90deg);
}

.empty-state {
    padding-left: 24px;
    font-style: italic;
    color: var(--text-muted);
    font-size: 0.875rem;
}