/* =============================================== */
/* ==         Article List (Stylized View)      == */
/* =============================================== */

.article-list-window {
    width: 90%;
    height: 80%;
    min-width: 600px;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out, width 0.3s ease-out, height 0.3s ease-out, top 0.3s ease-out, left 0.3s ease-out;
    background-color: var(--win98-bg) !important;
    border: 2px solid #ffffff;
    border-right-color: var(--win98-border-dark);
    border-bottom-color: var(--win98-border-dark);
    box-shadow: 2px 2px 0px rgba(0,0,0,0.5);
}

/* Title Bar Controls Fix */
.article-list-window .dialog-title-controls {
    display: flex;
    gap: 2px;
    align-items: center;
}

.article-list-window .dialog-maximize-button, 
.article-list-window .dialog-close-button {
    font-family: 'Arial', sans-serif;
    font-weight: bold;
    font-size: 10px;
    background-color: var(--win98-bg);
    color: black;
    border-top: 1px solid var(--win98-border-light);
    border-left: 1px solid var(--win98-border-light);
    border-right: 1px solid var(--win98-border-dark);
    border-bottom: 1px solid var(--win98-border-dark);
    width: 16px;
    height: 14px;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.article-list-window .dialog-maximize-button:active, 
.article-list-window .dialog-close-button:active {
    border-top: 1px solid var(--win98-border-dark);
    border-left: 1px solid var(--win98-border-dark);
    border-right: 1px solid var(--win98-border-light);
    border-bottom: 1px solid var(--win98-border-light);
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 5px;
}

.toolbar-btn {
    background: transparent;
    border: 1px solid transparent;
    padding: 2px 8px;
    font-family: var(--pixel-font-latin);
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.toolbar-btn:hover {
    border-top: 1px solid #ffffff;
    border-left: 1px solid #ffffff;
    border-right: 1px solid var(--win98-border-dark);
    border-bottom: 1px solid var(--win98-border-dark);
    background-color: rgba(0,0,0,0.05);
}

.toolbar-btn:active {
    border-top: 1px solid var(--win98-border-dark);
    border-left: 1px solid var(--win98-border-dark);
    border-right: 1px solid #ffffff;
    border-bottom: 1px solid #ffffff;
}

.toolbar-divider {
    width: 2px;
    height: 20px;
    background-color: var(--win98-border-dark);
    border-right: 1px solid #ffffff;
    margin: 0 4px;
}

/* Search Container */
.search-container {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid var(--win98-border-dark);
    border-top-color: #000;
    border-left-color: #000;
    padding: 2px 5px;
    gap: 5px;
}

.search-icon { font-size: 10px; }

#article-search {
    border: none;
    outline: none;
    font-family: var(--pixel-font-latin);
    font-size: 11px;
    width: 170px;
}

#article-search:focus {
    background-color: #ffffcc;
}

/* Main Body Layout */
.window-body-main {
    display: flex;
    flex: 1;
    overflow: hidden;
    background-color: #ffffff;
    margin: 4px;
    border: 2px solid var(--win98-border-dark);
}

/* Sidebar */
.explorer-sidebar {
    width: 180px;
    background-color: var(--lighter-green);
    border-right: 2px solid var(--win98-bg);
    display: flex;
    flex-direction: column;
    padding: 10px 0;
    overflow-y: auto;
}

.sidebar-section {
    margin-bottom: 15px;
}

.section-header {
    font-family: var(--pixel-font-latin);
    font-size: 10px;
    color: var(--win98-title-bg-dark);
    opacity: 0.6;
    padding: 0 10px;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-item {
    padding: 4px 15px;
    font-family: var(--pixel-font-latin);
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--dark-text);
}

.sidebar-item:hover {
    background-color: var(--pale-green);
}

.sidebar-item.active {
    background-color: var(--win98-title-bg-mid);
    color: white;
}

/* Sidebar Scrollbar */
.explorer-sidebar::-webkit-scrollbar {
    width: 12px;
}
.explorer-sidebar::-webkit-scrollbar-track {
    background: var(--lighter-green);
}
.explorer-sidebar::-webkit-scrollbar-thumb {
    background: var(--win98-bg);
    border: 2px solid var(--win98-border-light);
    border-right-color: var(--win98-border-dark);
    border-bottom-color: var(--win98-border-dark);
    box-shadow: inset 1px 1px 0px #dfdfdf;
}

/* List Container */
.list-container {
    flex: 1;
    background-color: #ffffff !important;
    padding: 0 !important;
    overflow-y: auto !important;
    position: relative;
    border: none !important;
}

/* Scanline Overlay */
.scanline-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    background: linear-gradient(rgba(180, 248, 200, 0) 50%, rgba(180, 248, 200, 0.05) 50%);
    background-size: 100% 4px;
}

.article-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    position: relative;
    z-index: 1;
}

/* 表头样式 */
.article-table thead th {
    position: sticky;
    top: 0;
    background-color: var(--lighter-green);
    padding: 6px 8px;
    text-align: left;
    border-right: 1px solid var(--win98-border-dark);
    border-bottom: 1px solid var(--win98-border-dark);
    box-shadow: inset 1px 1px 0px #ffffff;
    z-index: 10;
    font-weight: normal;
    color: var(--win98-title-bg-dark);
    font-family: var(--pixel-font-latin);
    font-size: 11px;
}

.col-date { width: 120px; }
.col-tags { width: 150px; }
.col-title { width: auto; }

/* Tile View Styles */
.article-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.article-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 10px;
    cursor: pointer;
    border: 1px solid transparent;
}

.article-card:hover {
    background-color: rgba(0, 120, 215, 0.1);
    border: 1px solid rgba(0, 120, 215, 0.3);
}

.card-icon {
    font-size: 40px;
    margin-bottom: 8px;
}

.card-title {
    font-family: '39_smoothregular', sans-serif;
    font-size: 14px;
    line-height: 1.2;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-date {
    font-family: var(--pixel-font-latin);
    font-size: 9px;
    color: #888;
}

/* Row Styles */
.article-row {
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.article-row td {
    padding: 10px 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

.article-row:hover {
    background-color: var(--win98-title-bg-mid);
    color: #ffffff !important;
}

.cell-date {
    font-family: var(--pixel-font-latin);
    font-size: 10px;
}

.title-text {
    font-family: '39_smoothregular', 'fzsongkebenxiukais', sans-serif;
    font-size: 18px; 
    font-weight: normal;
}

.article-row:hover .title-text {
    color: #ffffff;
}

.cell-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.tag-label {
    font-family: var(--pixel-font-latin), var(--pixel-font-cjk);
    font-size: 9px;
    padding: 2px 6px;
    background-color: #e1e1e1;
    color: #333;
    border: 1px solid var(--win98-border-dark);
}

.tag-label:hover {
    background-color: #ffffff;
    color: #000;
}

/* Preview Box */
.pixel-preview-box {
    position: absolute;
    width: 260px;
    background-color: #ffffcc;
    border: 1px solid #000;
    box-shadow: 4px 4px 0px rgba(0,0,0,0.1);
    padding: 0;
    pointer-events: none;
    display: none;
    z-index: 1000;
    font-family: var(--pixel-font-cjk);
    font-size: 12px;
}

.preview-header {
    background-color: #000;
    color: #fff;
    padding: 2px 8px;
    font-size: 9px;
    font-family: var(--pixel-font-latin);
}

.preview-body {
    padding: 10px;
    color: #333;
}

/* Status Bar */
.explorer-status-bar {
    display: flex;
    padding: 4px 8px;
    background-color: var(--win98-bg);
    border-top: 1px solid var(--win98-border-dark);
    font-size: 10px;
    font-family: var(--pixel-font-latin);
}

.status-item {
    border-left: 1px solid #ffffff;
    border-right: 1px solid var(--win98-border-dark);
    padding: 0 10px;
    flex-grow: 1;
}

.status-item:first-child { border-left: none; flex-grow: 2; }

@media (max-width: 900px) {
    .explorer-sidebar { display: none; }
    .col-tags { display: none; }
    .cell-tags { display: none; }
    .article-list-window { min-width: 95%; }
}
