
:root {
    /* Light Theme Colors */
    --color-background: #f4f6fb;
    --color-surface: #ffffff;
    --color-text: #1f2933;
    --color-subtle: #6b7a8f;
    --color-border: rgba(15, 23, 42, 0.08);
    --color-primary: #4f46e5;
    --color-primary-hover: #4338ca;
    --color-success: #10b981;
    --color-success-bg: rgba(16, 185, 129, 0.15);
    --color-warn: #f59e0b;
    --color-warn-bg: rgba(245, 158, 11, 0.15);
    --color-danger: #ef4444;
    --color-danger-bg: rgba(239, 68, 68, 0.15);
    --color-shadow: rgba(15, 23, 42, 0.08);
    --color-shadow-hover: rgba(15, 23, 42, 0.12);
}

/* Dark Theme Colors */
[data-theme="dark"] {
    --color-background: #0f172a;
    --color-surface: #1e293b;
    --color-text: #f1f5f9;
    --color-subtle: #94a3b8;
    --color-border: rgba(241, 245, 249, 0.1);
    --color-primary: #6366f1;
    --color-primary-hover: #818cf8;
    --color-success: #10b981;
    --color-success-bg: rgba(16, 185, 129, 0.2);
    --color-warn: #f59e0b;
    --color-warn-bg: rgba(245, 158, 11, 0.2);
    --color-danger: #ef4444;
    --color-danger-bg: rgba(239, 68, 68, 0.2);
    --color-shadow: rgba(0, 0, 0, 0.3);
    --color-shadow-hover: rgba(0, 0, 0, 0.5);
}

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    min-height: 100%;
}

body {
    margin: 0;
    background: var(--color-background);
    color: var(--color-text);
    font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', 'Helvetica Neue', Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
}

body.app-body {
    background: var(--color-background);
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    text-decoration: none;
    color: var(--color-primary);
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
}

#root {
    padding: 24px 0 96px;
}

.navbar {
    background: var(--color-surface) !important;
    color: var(--color-text);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.04);
}

.navbar .navbar-brand {
    color: var(--color-text) !important;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.navbar .navbar-brand:hover {
    color: var(--color-primary) !important;
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 1.25rem;
}

.nav-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-link {
    font-weight: 600;
    font-size: 14px;
    color: var(--color-subtle);
}

.nav-link:hover {
    color: var(--color-primary);
}

.nav-hello {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-subtle);
}

.page-shell {
    padding: 0 0 96px;
}

.filter-panel {
    margin-top: 16px;
}

.filter-panel-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    background: var(--color-surface);
    border-radius: 12px;
    padding: 10px 14px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(15, 23, 42, 0.04);
}

.filter-search {
    flex: 1 1 240px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.filter-button-groups {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.filter-group {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    padding: 2px 4px;
    border-radius: 8px;
}

.filter-group-admin {
    border-left: 1px solid var(--color-border);
    padding-left: 0.75rem;
}

.filter-actions {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
    justify-content: flex-end;
    flex: 0 1 220px;
}

.filter-input {
    flex: 1 1 auto;
    min-width: 120px;
    border-radius: 10px;
    border: 1px solid var(--color-border);
    background: var(--color-background);
    color: var(--color-text);
    padding: 7px 12px;
    font-size: 14px;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.page-selector {
    flex: 0 0 100%;
    width: 100%;
    border-radius: 10px;
    border: 1px solid var(--color-border);
    background: var(--color-background);
    color: var(--color-text);
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: border 0.2s ease, box-shadow 0.2s ease;
    order: -1;
}

.page-selector:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.12);
}

.filter-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.12);
}

/* Autocomplete Styles */
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    width: 100%;
    max-height: 400px;
    overflow-y: auto;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.15);
    z-index: 1000;
    display: none;
}

/* 데스크톱에서는 최대 너비 제한 */
@media (min-width: 768px) {
    .autocomplete-dropdown {
        right: auto;
        min-width: 300px;
        max-width: 450px;
        width: auto;
    }
}

.autocomplete-dropdown.is-visible {
    display: block;
}

.autocomplete-list {
    list-style: none;
    margin: 0;
    padding: 6px;
}

.autocomplete-item {
    padding: 10px 14px;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.autocomplete-item:hover,
.autocomplete-item.is-active {
    background: rgba(79, 70, 229, 0.08);
}

.autocomplete-item-name {
    flex: 1 1 auto;
    font-size: 14px;
    color: var(--color-text);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.autocomplete-item-type {
    flex: 0 0 auto;
    font-size: 11px;
    font-weight: 600;
    color: var(--color-subtle);
    background: rgba(148, 163, 184, 0.15);
    padding: 3px 9px;
    border-radius: 999px;
    letter-spacing: 0.03em;
}

.autocomplete-no-results {
    padding: 16px 14px;
    text-align: center;
    color: var(--color-subtle);
    font-size: 13px;
}

.autocomplete-loading {
    padding: 16px 14px;
    text-align: center;
    color: var(--color-subtle);
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Advanced Search Panel */
.advanced-search-panel {
    flex: 0 0 100%;
    width: 100%;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    margin-top: 12px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
    animation: slideDown 0.3s ease;
    order: 999;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.advanced-search-content {
    padding: 20px;
}

.advanced-field {
    margin-bottom: 16px;
}

.advanced-field:last-of-type {
    margin-bottom: 20px;
}

.advanced-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-subtle);
    margin-bottom: 8px;
}

.filter-select {
    border-radius: 10px;
    border: 1px solid var(--color-border);
    background: var(--color-background);
    color: var(--color-text);
    padding: 7px 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.filter-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.12);
}

.selected-items {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    min-height: 32px;
    padding: 6px;
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: 10px;
}

.selected-items:empty {
    min-height: 0;
    padding: 0;
    border: none;
    background: transparent;
}

.selected-item-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--color-primary);
    color: #ffffff;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
}

.selected-item-chip .remove-btn {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    margin-left: 2px;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.selected-item-chip .remove-btn:hover {
    opacity: 1;
}

.advanced-buttons {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.advanced-buttons .btn {
    flex: 1;
}

/* Mobile responsive */
@media (max-width: 767px) {
    .advanced-search-content {
        padding: 16px;
    }

    .advanced-field {
        margin-bottom: 14px;
    }

    .filter-select {
        font-size: 13px;
    }
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    font-weight: 600;
    border-radius: 10px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 5px 11px;
    line-height: 1.25;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 13px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-outline-primary {
    background: transparent;
    color: var(--color-primary);
    border-color: rgba(79, 70, 229, 0.55);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    color: #ffffff;
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-outline-secondary {
    line-height: 1.2;
    padding: 5px 11px;

    background: transparent;
    color: var(--color-text);
    border-color: rgba(148, 163, 184, 0.6);
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
    color: var(--color-primary);
    border-color: var(--color-primary);
    background: rgba(79, 70, 229, 0.08);
}

.btn-warning {
    background: #f59e0b;
    border-color: #f59e0b;
    color: #ffffff;
}

.btn-warning:hover,
.btn-warning:focus {
    background: #d97706;
    border-color: #d97706;
    color: #ffffff;
}

.btn-outline-danger {
    background: transparent;
    color: var(--color-danger);
    border-color: rgba(239, 68, 68, 0.55);
}

.btn-outline-danger:hover,
.btn-outline-danger:focus {
    color: #ffffff;
    background: var(--color-danger);
    border-color: var(--color-danger);
}

.work-card {
    display: flex;
    flex-direction: column;
    background: var(--color-surface);
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px var(--color-shadow);
    border: 1px solid var(--color-border);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    gap: 18px;
}

.work-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--color-shadow-hover);
    border-color: var(--color-primary);
}

.work-card-thumbnail {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    background: #e8ecf3;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.work-card-thumbnail-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.work-card-thumbnail-image {
    width: 100%;
    height: auto;
    max-height: 280px;
    display: block;
    object-fit: contain !important;
    object-position: center center !important;
}

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

.work-card-pagecount,
.pageCnt {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: #ffffff;
    font-size: 12px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* 즐겨찾기 배지는 버튼으로 대체되어 제거됨 */
/* .work-favorite-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

[data-theme="dark"] .work-favorite-badge {
    background: rgba(30, 41, 59, 0.95);
} */

.work-card-content {
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
}

.work-card-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.work-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.35;
    word-break: keep-all;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.work-card-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.meta-status {
    display: none; /* 메타데이터 완료 문구 숨김 */
    align-items: center;
    gap: 0.35rem;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    background: rgba(99, 102, 241, 0.12);
    color: #4338ca;
    transition: background 0.2s ease, color 0.2s ease;
}

.meta-status.is-pending {
    background: var(--color-warn-bg);
    color: var(--color-warn);
}

.meta-status.is-complete {
    background: var(--color-success-bg);
    color: var(--color-success);
}

.meta-status.is-updating {
    background: rgba(79, 70, 229, 0.15);
    color: var(--color-primary);
}

.meta-spinner {
    display: none;
    align-items: center;
    gap: 0.45rem;
    font-size: 13px;
    color: var(--color-primary);
}

.spinner-border {
    width: 1rem;
    height: 1rem;
    border: 0.15em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

.spinner-border-sm {
    width: 0.85rem;
    height: 0.85rem;
    border-width: 0.12em;
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}

.meta-action {
    margin-left: auto;
    display: flex;
    align-items: center;
}

.work-card-details {
    display: block;
}

.work-meta-table {
    width: 100%;
    border-collapse: collapse;
}

.work-meta-table tr {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 12px;
}

.work-meta-table tr:last-child {
    margin-bottom: 0;
}

.work-meta-table td {
    padding: 0;
    border: 0;
    background: transparent;
}

.meta-label {
    flex: 0 0 auto;
    min-width: 72px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-subtle);
}

.meta-value {
    flex: 1 1 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.meta-value.meta-empty {
    color: var(--color-subtle);
    opacity: 0.7;
}

.meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: rgba(148, 163, 184, 0.25);
    color: var(--color-text);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background 0.2s ease, color 0.2s ease;
}

.meta-chip:hover {
    background: rgba(79, 70, 229, 0.18);
    color: var(--color-primary);
}

.gFtiRZ {
    background: rgba(244, 67, 54, 0.85);
    color: #ffffff !important;
}

.tagblue {
    background: rgba(59, 130, 246, 0.85);
    color: #ffffff !important;
}

.kMyssS {
    background: rgba(75, 85, 99, 0.75);
    color: #ffffff !important;
}

.meta-link {
    color: var(--color-primary);
    font-size: 11px;
    opacity: 0.7;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.meta-link:hover {
    opacity: 1;
}

/* App layout components */
.app-shell {
    display: flex;
    justify-content: center;
    padding: 64px 16px 96px;
}

.app-card {
    width: 100%;
    max-width: 420px;
    background: var(--color-surface);
    border-radius: 18px;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
    border: 1px solid transparent;
    padding: 32px 34px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.app-card--wide {
    max-width: 720px;
    gap: 24px;
}

.app-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0;
    color: var(--color-text);
}

.app-subtitle {
    margin: 0;
    color: var(--color-subtle);
    font-size: 0.95rem;
    line-height: 1.5;
}

.app-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.app-form .form-group,
.app-form .app-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.app-form label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-subtle);
}

.app-input,
.app-form input[type="text"],
.app-form input[type="password"],
.app-form input[type="url"],
.app-form input[type="file"],
.app-form select {
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-background);
    color: var(--color-text);
    padding: 12px 14px;
    font-size: 15px;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.app-input:focus,
.app-form input:focus,
.app-form select:focus,
.app-form textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.16);
}

.app-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

/* 로그인 버튼 크게 표시 */
.btn-lg {
    font-size: 18px;
    padding: 14px 28px;
    font-weight: 600;
}

.btn-block {
    width: 100%;
    display: block;
}

.app-footer {
    font-size: 13px;
    color: var(--color-subtle);
}

.app-footer a,
.app-link {
    color: var(--color-primary);
    font-weight: 600;
}

.app-link:hover {
    color: var(--color-primary-hover);
}

.app-list {
    list-style: none;
    padding: 0;
    margin: 24px 0 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.app-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    background: var(--color-surface);
    border-radius: 12px;
    padding: 14px 18px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
    border: 1px solid transparent;
}

.app-list-item a {
    color: var(--color-text);
    font-weight: 600;
    word-break: break-all;
}

.app-badge {
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: var(--color-warn-bg);
    color: var(--color-warn);
}

.app-badge.is-success {
    background: var(--color-success-bg);
    color: var(--color-success);
}

/* Reader layout */
.reader-body {
    background: var(--color-background);
}

.reader-shell {
    padding: 0;
}

.reader-control-panel {
    margin-top: 16px;
}

.reader-control-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    background: var(--color-surface);
    border-radius: 12px;
    padding: 6px 10px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(15, 23, 42, 0.04);
}

.reader-actions {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.reader-gallery {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.reader-image {
    margin: 0;
    display: flex;
    justify-content: center;
}

.reader-image-media {
    width: 100%;
    height: auto;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.reader-gallery img {
    cursor: pointer;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

#comicscroll.horizontal img {
    width: 100%;
}

#comicscroll.vertical img,
.fitVertical img {
    max-width: 100%;
    height: auto;
}

/* Toast fallback */
.toast-message {
    min-width: 200px;
    padding: 10px 16px;
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    box-shadow: 0 14px 38px rgba(15, 23, 42, 0.18);
    background: var(--color-primary);
}

/* Responsive tweaks */
@media (min-width: 768px) {
    .work-card {
        flex-direction: row;
        align-items: stretch;
        padding: 22px;
        gap: 24px;
    }

    .work-card-thumbnail {
        width: 220px;
    }

    .work-card-content {
        padding-right: 8px;
    }

    .filter-panel-inner {
        gap: 1rem;
    }
}

@media (min-width: 1024px) {
    .work-card-thumbnail {
        width: 240px;
    }

    .work-card-thumbnail-image {
        max-height: 320px;
    }

    .work-card-title {
        font-size: 1.28rem;
        -webkit-line-clamp: 2;
    }
}

@media (max-width: 767px) {
    #root {
        padding: 16px 0 72px;
    }

    .filter-panel-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-actions {
        justify-content: flex-start;
    }

    .work-card {
        padding: 16px;
    }

    .work-card-thumbnail {
        width: 100%;
        min-height: 180px;
    }

    .work-card-thumbnail-image {
        max-height: 240px;
    }

    .app-card {
        padding: 24px 24px 28px;
    }

    .filter-panel-inner {
        flex-direction: column;
        gap: 0.5rem;
        padding: 8px 12px;
        align-items: stretch;
    }

    .filter-search {
        flex: 1 1 auto;
        width: 100%;
    }

    .filter-button-groups {
        width: 100%;
        flex-direction: column;
        gap: 0.5rem;
    }

    .filter-group {
        width: 100%;
        justify-content: stretch;
    }

    .filter-group .btn {
        flex: 1;
        font-size: 12px;
        padding: 6px 8px;
        white-space: nowrap;
    }

    .filter-group-admin {
        border-left: none;
        border-top: 1px solid var(--color-border);
        padding-left: 0;
        padding-top: 0.5rem;
    }

    .filter-input {
        min-width: 0;
        font-size: 13px;
    }

    .page-selector {
        font-size: 13px;
    }
}

/* =====================================================
   햄버거 사이드 메뉴
   ===================================================== */
.side-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none;
}

.side-menu.is-open {
    pointer-events: auto;
}

.side-menu-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.side-menu.is-open .side-menu-overlay {
    opacity: 1;
}

.side-menu-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    max-width: 80vw;
    height: 100%;
    background: var(--color-surface);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.side-menu.is-open .side-menu-content {
    transform: translateX(0);
}

.side-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border);
}

.side-menu-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text);
}

.btn-close {
    background: transparent;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: var(--color-text);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.btn-close:hover {
    background: var(--color-border);
}

.side-menu-nav {
    flex: 1;
    padding: 16px 0;
    overflow-y: auto;
}

.side-menu-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    color: var(--color-text);
    text-decoration: none;
    transition: background-color 0.2s ease;
    border-left: 3px solid transparent;
}

.side-menu-item:hover {
    background: var(--color-background);
    border-left-color: var(--color-primary);
    color: var(--color-text);
}

.side-menu-icon {
    font-size: 24px;
    width: 32px;
    text-align: center;
}

.side-menu-text {
    font-size: 16px;
    font-weight: 500;
}

/* 모바일 최적화 */
@media (max-width: 768px) {
    .side-menu-content {
        width: 280px;
    }

    .side-menu-header {
        padding: 16px 20px;
    }

    .side-menu-header h3 {
        font-size: 18px;
    }

    .side-menu-item {
        padding: 14px 20px;
    }

    .side-menu-icon {
        font-size: 22px;
        width: 28px;
    }

    .side-menu-text {
        font-size: 15px;
    }
}
