:root {
    --bg-main: #f4f7f6;
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    --text-main: #333333;
    --text-muted: #666666;
    --border-color: #eeeeee;
    --hover-color: #f8f9fa;
    --bg-header-grey: #f8f9fa;
    --modal-bg: rgba(0, 0, 0, 0.5);
    --bg-color: #ffffff;
    --text-color: #333333;
    --card-bg: #f9f9f9;
    --input-bg: #ffffff;
    --input-text: #333333;
    --input-border: #cccccc;
}

:root[data-theme="dark"] {
    --bg: #121212;
    --text-main: #ffffff;
    --border: #333333;
    --nav-bg: #1f1f1f;
}

html {
    scroll-behavior: auto !important;
}

.htmx-swapping {
    opacity: 0;
}
.htmx-settling {
    opacity: 0;
    transition: opacity 0.2s ease-in;
}

[data-theme='dark'] {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --card-bg: #1e1e1e;
    --input-bg: #2d2d2d;
    --input-text: #eeeeee;
    --input-border: #444444;
    --option-bg: #333333;
    --option-border: #444444;
    --option-text: #e0e0e0;
    --option-active-bg: #444444;
}

[data-theme="dark"] {
    --bg-main: #121212;
    --bg-card: #1e1e1e;
    --bg-sidebar: #181818;
    --text-main: #e0e0e0;
    --text-muted: #aaaaaa;
    --border-color: #333333;
    --hover-color: #2c2c2c;
    --modal-bg: rgba(0, 0, 0, 0.8);
    --bg-header-grey: #2c2c2c;
}

@font-face {
    font-family: 'Material Symbols Outlined';
    font-style: normal;
    font-weight: 100 700;
    font-display: block;
    src: url('/static/fonts/material-symbols-outlined-v314-latin-regular.woff2') format('woff2');
}

.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-main) !important;
    color: var(--text-main) !important;
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

.explorer-card,
.sidebar,
.modal-content,
.novel-item {
    background-color: var(--bg-card) !important;
    color: var(--text-main) !important;
    border-color: var(--border-color) !important;
}

.text-muted,
.up-status,
.author-name div,
.no-data p {
    color: var(--text-muted) !important;
}

.menu-item:hover,
.dropdown-item:hover,
.novel-item:hover {
    background-color: var(--hover-color) !important;
}

hr,
.divider,
.sidebar-header {
    border-color: var(--border-color) !important;
}

header {
    background-color: var(--bg-card) !important;
    color: var(--text-main) !important;
    border-bottom: 1px solid var(--border-color) !important;
}

header .header-title {
    color: var(--text-main) !important;
}

header .material-symbols-outlined {
    color: var(--text-main) !important;
    opacity: 1;
}

header .badge {
    border: 2px solid var(--bg-card) !important;
}

.sidebar .menu-item,
.sidebar .menu-item span,
#theme-text,
#theme-icon {
    color: var(--text-main) !important;
    text-decoration: none;
}

.sidebar .menu-item:hover {
    background-color: var(--hover-color) !important;
    color: var(--text-main) !important;
}

.user-info-box span,
.sidebar-header span {
    color: var(--text-main) !important;
}

.sidebar-footer .footer-item {
    color: var(--text-muted) !important;
}

.novel-info h3,
.novel-item h3 {
    color: var(--text-main) !important;
}

.novel-title,
h1.novel-title {
    color: var(--text-main) !important;
}

.no-data p,
.no-data .material-symbols-outlined {
    color: var(--text-muted) !important;
}

.description,
.author-name span,
.up-name {
    color: var(--text-main) !important;
}

.explorer-header {
    background-color: var(--bg-header-grey) !important;
    border-bottom: 1px solid var(--border-color) !important;
    color: var(--text-main) !important;
}

.explorer-header div,
.explorer-header span {
    color: var(--text-main) !important;
}

.more-btn .material-symbols-outlined {
    color: var(--text-main) !important;
}


.dropdown-item {
    color: var(--text-main) !important;
}

.dropdown-item .material-symbols-outlined {
    color: var(--text-muted) !important;
}

.dropdown-item:hover {
    background-color: var(--hover-color) !important;
}


.dropdown-item.delete {
    color: #ff5252 !important;
}

[data-theme="dark"] .modal-content {
    background-color: #242424 !important;
    color: var(--text-main) !important;
    border: 1px solid #444 !important;
}

[data-theme="dark"] .modal-content h3 {
    color: var(--text-main) !important;
}

[data-theme="dark"] .status-item-card {
    background-color: #333333 !important;
    border: 1px solid #444 !important;
    color: var(--text-main) !important;
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 8px;
    display: block;
    cursor: pointer;
}

[data-theme="dark"] .status-item-card:hover {
    background-color: #444444 !important;
}

[data-theme="dark"] .status-label-text {
    color: var(--text-main) !important;
}

[data-theme="dark"] button[type="button"],
[data-theme="dark"] .btn-cancel {
    background-color: #3d3d3d !important;
    color: var(--text-main) !important;
    border: none !important;
}

[data-theme="dark"] .status-options-wrapper::-webkit-scrollbar-thumb {
    background: #555 !important;
}

[data-theme="dark"] div[style*="border-top"] {
    border-top: 1px solid #444 !important;
}

[data-theme="dark"] .btn-google-login-sidebar {
    background-color: #2c2c2c !important;
    color: var(--text-main) !important;
    border: 1px solid #444 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 0.2s;
}

[data-theme="dark"] .btn-google-login-sidebar:hover {
    background-color: #3d3d3d !important;
}

[data-theme="dark"] .filter-modal .modal-header {
    background-color: var(--bg-header-grey) !important;
    border-bottom: 1px solid var(--border-color) !important;
    color: var(--text-main) !important;
}

[data-theme="dark"] .filter-modal input[type="text"],
[data-theme="dark"] .filter-modal select {
    background-color: #333333 !important;
    color: var(--text-main) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 6px;
    padding: 8px;
}

[data-theme="dark"] .filter-modal input::placeholder {
    color: var(--text-muted) !important;
}

[data-theme="dark"] .filter-modal label,
[data-theme="dark"] .filter-modal .filter-label,
[data-theme="dark"] .filter-modal .tag-name,
[data-theme="dark"] .filter-modal .tag-count {
    color: var(--text-main) !important;
}

[data-theme="dark"] .filter-actions .btn-reset {
    background-color: #444444 !important;
    color: var(--text-main) !important;
    border: none !important;
}

[data-theme="dark"] .filter-modal .close-modal {
    color: var(--text-main) !important;
}

[data-theme="dark"] .tag-list-item {
    background-color: #2c2c2c !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-main) !important;
    padding: 6px 12px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

[data-theme="dark"] .tag-list-item:hover {
    background-color: #3d3d3d !important;
    border-color: var(--text-muted) !important;
}

[data-theme="dark"] .tag-name,
[data-theme="dark"] .tag-count {
    color: var(--text-main) !important;
}

[data-theme="dark"] .tag-count {
    opacity: 0.7;
    font-size: 0.8rem;
}

[data-theme="dark"] .tag-list-item input[type="checkbox"] {
    accent-color: #007bff;
    filter: brightness(0.8);
}

[data-theme="dark"] .tag-list-item:has(input:checked) {
    background-color: #004a99 !important;
    border-color: #007bff !important;
}

[data-theme="dark"] .filter-tags-list {
    background-color: #1a1a1a !important;
    border: 1px solid var(--border-color) !important;
    padding: 12px !important;
    border-radius: 8px !important;
    max-height: 300px;
    overflow-y: auto;

    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
}

[data-theme="dark"] .tag-list-item {
    background-color: #2c2c2c !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-main) !important;
    padding: 10px 15px !important;
    border-radius: 6px !important;
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    box-sizing: border-box;
}

[data-theme="dark"] .tag-name {
    flex-grow: 1;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    background: none;
    border: none;
    padding: 4px 0;
    color: #444;
    transition: color 0.2s ease;
}

[data-theme="dark"] .btn-back {
    color: #ccc;
}

.btn-back:hover {
    color: #000;
}

[data-theme="dark"] .btn-back:hover {
    color: #fff;
}

input[type="text"],
input[type="url"],
textarea,
select {
    background-color: var(--input-bg);
    color: var(--input-text);
    border: 1px solid var(--input-border);
    border-radius: 4px;
    padding: 8px;
}

.modal-content input[type="text"] {
    background-color: var(--input-bg);
    color: var(--input-text);
    border: 1px solid var(--input-border);
}

[data-theme='dark'] .tag-selector-container,
[data-theme='dark'] .tag-table {
    background-color: #1e1e1e !important;
    border-color: #444444 !important;
}

[data-theme='dark'] .tag-table td {
    border-bottom: 1px solid #333 !important;
}

[data-theme='dark'] .tag-label {
    color: #e0e0e0 !important;
}

[data-theme='dark'] .modal-content {
    background-color: #1e1e1e !important;
    color: #ffffff !important;
}


/* Bottom Player Bar */
#global-player {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    border-top: 1px solid #ddd;
    display: none;
    z-index: 9999;
    padding: 10px 20px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.player-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 15px;
}

#progress-container {
    flex-grow: 1;
    height: 5px;
    background: #eee;
    cursor: pointer;
    position: relative;
}

#progress-bar {
    height: 100%;
    background: #007bff;
    width: 0%;
}


/* --- HOME ---  */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f9f9f9;
    color: #0f0f0f;
    overflow-x: hidden;
}

/* Header Section */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
}

.header-title {
    font-weight: bold;
    font-size: 1.1rem;
}

/* --- Sidebar Style --- */
.sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background: #fff;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    transition: 0.3s;
    z-index: 1001;
    padding: 20px;
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 1000;
}

.overlay.active {
    display: block;
}

/* User Profile in Sidebar */
.user-info-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 0;
}

.user-avatar-lg {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #f0f0f0;
}

/* Menu Items */
.menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    text-decoration: none;
    color: #333;
    border-radius: 8px;
    margin-bottom: 5px;
}

.menu-item:hover {
    background: #f5f5f5;
}

.btn-google-login-sidebar {
    background: #fff;
    border: 1px solid #dcdcdc;
    padding: 10px;
    border-radius: 8px;
    width: 100%;
    justify-content: center;
}

/* --- Main Content --- */
.hero {
    padding: 20px 15px;
}

.hero h1 {
    font-size: 1.5rem;
    color: #cc0000;
}

.hero h2 {
    font-size: 1rem;
    color: #606060;
    font-weight: normal;
    margin-top: 5px;
}

.explorer-card {
    margin-top: 15px;
    margin-right: 15px;
    margin-left: 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.explorer-header {
    background: #e1e1e1;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ccc;
}

.novel-comment-card {
    margin-bottom: 150px;
}

.btn-add-novel {
    background: #007bff;
    color: white;
    border: none;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    text-decoration: none;
}

.btn-add-novel:hover {
    background: #0056b3;
}

.explorer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 15px;
}

.novel-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0;
    border-bottom: none;
    transition: transform 0.2s;
}

.novel-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #f0f0f0;
    color: #cc0000;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.novel-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.badge-status {
    top: 8px !important;
    left: 8px !important;
    bottom: unset !important;
    height: auto !important;
    width: fit-content;
    position: absolute;
    font-size: 0.65rem;
    padding: 4px 10px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 5;
}

.status-completed {
    background: #28a745;
    color: white;
}

.status-ongoing {
    background: #007bff;
    color: white;
}

.thumb-badge {
    position: absolute;
    bottom: 8px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    color: white;
    backdrop-filter: blur(4px);
}

.badge-genre {
    left: 8px;
    background: rgba(204, 0, 0, 0.85);
}

.badge-ep {
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
}

.novel-info h3 {
    font-size: 1.1rem;
    line-height: 1.4;
    margin: 0 5px;
    color: #0f0f0f;
    font-weight: 600;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    max-width: 100%;
}

.no-data {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

@media (max-width: 360px) {
    .explorer-content {
        grid-template-columns: 1fr;
    }
}

.novel-info h3 {
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.novel-info p {
    font-size: 0.8rem;
    color: #606060;
}

.no-cover-fallback-thumb {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ffebeb 0%, #f0f2f5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cc0000;
}

.no-cover-fallback-thumb span {
    font-size: 3rem;
    opacity: 0.2;
}

.badge-status {
    top: 8px !important;
    left: 8px !important;
    bottom: unset !important;
    height: auto !important;
    position: absolute;
    z-index: 10;
}

.badge-price {
    top: 8px !important;
    right: 8px !important;
    left: unset !important;
    bottom: unset !important;
    position: absolute;
    z-index: 10;
    background-color: rgba(255, 255, 255, 0.849);
    color: rgb(255, 24, 24);
    padding: 0px 2px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.price-free {
    color: #0a7c3a !important;
}

/* - - -  - -  - -  - - css ตัวกรอง  - - -  - -  - -  - - */
/* ==========================================
   1. Layout: Filter Sidebar (Right Drawer)
   ========================================== */
#filterModal {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    height: 100vh;
    background: #ffffff;
    z-index: 1001;
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    display: block !important;
}

#filterModal.active {
    right: 0;
}

.filter-modal {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fcfcfc;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #333;
}

.close-modal {
    font-size: 24px;
    cursor: pointer;
    color: #999;
    transition: 0.3s;
}

.close-modal:hover {
    color: #cc0000;
}

/* ==========================================
   2. Form Elements (Inputs & Dropdowns)
   ========================================== */
#filterForm {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #555;
}

.form-group input[type="text"],
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #444;
    background-color: #fff;
    transition: all 0.3s;
    outline: none;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #cc0000;
    box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.1);
}

/* ==========================================
   3. Tag Selection (Checkbox as Buttons)
   ========================================== */

.filter-tags-list {
    display: flex;
    flex-direction: column;
    border: 1px solid #ddd;
    border-radius: 6px;
    max-height: 250px;
    overflow-y: auto;
    background: white;
}

.tag-list-item {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;

    padding: 8px 12px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: 0.2s;
    white-space: nowrap;
}

.tag-list-item input[type="checkbox"] {
    margin: 0 10px 0 0;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.tag-name {
    font-size: 14px;
    color: #333;
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tag-count {
    font-size: 13px;
    color: #888;
    margin-left: 8px;
    flex-shrink: 0;
}

.tag-list-item:hover {
    background-color: #f8f9fa;
}

.tag-list-item:has(input:checked) {
    background-color: #eef6ff;
}

.tag-list-item:has(input:checked) .tag-name {
    color: #007bff;
    font-weight: bold;
}

/* ==========================================
   4. Action Buttons (Search & Reset)
   ========================================== */

.filter-actions {
    padding: 0;
    border-top: 1px solid #eee;
    display: flex;
    width: 100%;
}

.filter-actions button {
    flex: 1;
    padding: 8px 0;
    border: none;
    border-radius: 0;
    font-size: 0.95rem;
    cursor: pointer;
}

.btn-reset {
    background-color: #f8f9fa;
    color: #666;
}

.btn-submit {
    background-color: #007bff;
    color: white;
}

.btn-reset:hover {
    background-color: #e2e6ea;
}

.btn-submit:hover {
    background-color: #0056b3;
}

.btn-reset {
    flex: 1;
    padding: 12px;
    background: #f0f0f0;
    border: none;
    border-radius: 8px;
    color: #666;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.btn-reset:hover {
    background: #e5e5e5;
    color: #333;
}

.btn-submit {
    flex: 2;
    padding: 12px;
    background: #cc0000;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.btn-submit:hover {
    background: #b30000;
    box-shadow: 0 4px 10px rgba(204, 0, 0, 0.2);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.overlay.active {
    display: block;
    opacity: 1;
}


.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    padding-bottom: 10px;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 15px;
    background: white;
    padding: 8px 15px;
    border-radius: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #f0f0f0;
    color: #444;
    text-decoration: none;
    transition: 0.3s;
}

.page-link:hover {
    background: #cc0000;
    color: white;
}

.page-info {
    font-size: 0.9rem;
    font-weight: 600;
    color: #666;
}

.sidebar {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background: #fff;
    padding: 20px;
    z-index: 1001;
    transition: 0.3s;
}

.sidebar-content {
    flex: 0 1 auto;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 10px;
    padding-bottom: 60px;
    border-top: 1px solid #eee;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-item {
    text-decoration: none;
    color: #888;
    font-size: 0.75rem;
    padding: 5px 0;
    transition: 0.2s;
}

.footer-item:hover {
    color: #cc0000;
    text-decoration: underline;
}

/* ads  */
.ads {
    margin: 4px;
    padding: 0;
    overflow: hidden;
}

.ads img {
    width: 100%;
    height: auto;
    display: block;
}


/* CSS สำหรับ PC (Desktop) */
@media (min-width: 1024px) {

    /* 1. ยกเลิก Overlay (ฉากดำ) บน PC */
    .overlay.active {
        display: none !important;
    }

    /* 2. จัดการ Sidebar ด้านซ้าย (260px) */
    .sidebar {
        left: 0 !important;
        top: 60px;
        width: 260px;
        height: calc(100vh - 60px);
        position: fixed;
        box-shadow: none;
        border-right: 1px solid var(--border-color);
        transition: 0.3s;
    }

    /* 3. จัดการ Filter ด้านขวา (240px) */
    #filterModal {
        right: 0 !important;
        left: auto;
        top: 60px;
        width: 300px;
        height: calc(100vh - 60px);
        position: fixed;
        background: var(--bg-card);
        border-left: 1px solid var(--border-color);
        box-shadow: none;
        transition: 0.3s;
    }

    #filterModal .close-modal {
        display: none;
    }

    header {
        z-index: 1002;
    }

    /* 6. ส่วน Filter Form */
    .filter-modal {
        padding: 0;
    }

    .filter-actions {
        position: sticky;
        bottom: 0;
        background: var(--bg-card);
        padding: 15px;
    }

    header>.material-symbols-outlined,
    .filter-icon-container {
        display: none !important;
    }

    header {
        justify-content: center !important;
    }

    .sidebar-header .material-symbols-outlined,
    .close-modal {
        display: none !important;
    }

    .hero,
    .explorer-card,
    .pagination-container {
        margin-left: 280px;
        margin-right: 320px;
        width: auto;
    }

    .explorer-content {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px;
        padding: 20px;
    }

}