:root {
    color-scheme: light dark;
    --primary: #1e88e5;
    --primary-dark: #1565c0;
    --primary-light: #42a5f5;
    --secondary: #64b5f6;
    --success: #4caf50;
    --warning: #ff9800;
    --danger: #f44336;
    --info: #03a9f4;
    --bg-light: #f0f7ff;
    --glass-bg: rgba(255, 255, 255, 0.55);
    --glass-bg-strong: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.8);
    --glass-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
    --text-primary: #1a237e;
    --text-secondary: #5c6bc0;
    --text-muted: #78909c;
    --radius: 16px;
    --radius-sm: 10px;
    --radius-lg: 24px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 25%, #e1f5fe 50%, #e8eaf6 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: -20%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(100, 181, 246, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
    animation: float 20s ease-in-out infinite;
}

body::after {
    content: '';
    position: fixed;
    bottom: -20%;
    right: -10%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(30, 136, 229, 0.25) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
    animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: var(--radius);
}

.glass-strong {
    background: var(--glass-bg-strong);
    backdrop-filter: blur(25px) saturate(200%);
    -webkit-backdrop-filter: blur(25px) saturate(200%);
    border: 1.5px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 12px 48px rgba(31, 38, 135, 0.2);
    border-radius: var(--radius);
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(25px) saturate(200%);
    -webkit-backdrop-filter: blur(25px) saturate(200%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 20px rgba(31, 38, 135, 0.1);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--primary-dark);
    font-size: 22px;
    font-weight: 700;
    white-space: nowrap;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(30, 136, 229, 0.4);
}

.search-box {
    flex: 1;
    max-width: 500px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 20px 12px 50px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 50px;
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 12px rgba(31, 38, 135, 0.08);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-input:focus {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--primary-light);
    box-shadow: 0 4px 20px rgba(30, 136, 229, 0.2);
    transform: translateY(-1px);
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 18px;
    pointer-events: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-btn {
    padding: 10px 22px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 50px;
    color: var(--primary-dark);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-btn:hover {
    background: rgba(30, 136, 229, 0.1);
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 136, 229, 0.2);
}

.nav-btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(30, 136, 229, 0.35);
}

.nav-btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    box-shadow: 0 6px 25px rgba(30, 136, 229, 0.45);
}

.user-menu {
    position: relative;
}

.user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 200px;
    padding: 8px;
    z-index: 1001;
}

.user-dropdown.show {
    display: block;
}

.user-dropdown a {
    display: block;
    padding: 10px 16px;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
}

.user-dropdown a:hover {
    background: rgba(30, 136, 229, 0.1);
    color: var(--primary-dark);
}

.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid rgba(30, 136, 229, 0.1);
}

.section-title h2 {
    font-size: 24px;
    color: var(--primary-dark);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title h2::before {
    content: '';
    width: 6px;
    height: 28px;
    background: linear-gradient(180deg, var(--primary), var(--primary-dark));
    border-radius: 3px;
}

.section-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 50px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn:hover {
    background: rgba(30, 136, 229, 0.1);
    color: var(--primary-dark);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(30, 136, 229, 0.3);
}

.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
}

.book-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(31, 38, 135, 0.1);
}

.book-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(31, 38, 135, 0.25);
    border-color: var(--primary-light);
}

.book-cover {
    position: relative;
    width: 100%;
    padding-top: 140%;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    overflow: hidden;
}

.book-cover img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(30, 136, 229, 0.1), rgba(100, 181, 246, 0.2));
    color: var(--primary-dark);
}

.no-cover-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.6;
}

.no-cover-text {
    font-size: 14px;
    font-weight: 500;
    opacity: 0.7;
}

.book-info {
    padding: 16px;
}

.book-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 44px;
    line-height: 1.4;
}

.book-meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
}

.book-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.book-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(31, 38, 135, 0.08);
}

.stat-item {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.download-btn {
    padding: 6px 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.download-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(30, 136, 229, 0.4);
}

.placeholder-section {
    padding: 80px 40px;
    text-align: center;
    margin: 40px 0;
}

.placeholder-icon {
    font-size: 80px;
    margin-bottom: 24px;
    opacity: 0.4;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.placeholder-title {
    font-size: 24px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-weight: 600;
}

.placeholder-desc {
    font-size: 14px;
    color: var(--text-muted);
}

.placeholder-tags {
    margin-top: 28px;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.tag {
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 13px;
    background: linear-gradient(135deg, rgba(30, 136, 229, 0.1), rgba(30, 136, 229, 0.05));
    color: var(--primary-dark);
    border: 1px solid rgba(30, 136, 229, 0.2);
    backdrop-filter: blur(8px);
}

.tabs-container {
    display: flex;
    gap: 8px;
    padding: 8px;
    margin: 32px 0 28px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    position: sticky;
    top: 10px;
    z-index: 50;
}

.tabs-container::-webkit-scrollbar { display: none; }

.tab-btn {
    flex: 0 0 auto;
    padding: 12px 26px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.tab-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 14px;
    background: transparent;
    transition: all 0.3s;
}

.tab-btn:hover::before {
    background: rgba(30, 136, 229, 0.08);
}

.tab-btn.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(30, 136, 229, 0.95), rgba(100, 181, 246, 0.95));
    box-shadow:
        0 8px 24px rgba(30, 136, 229, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 2px;
}

.tab-panel {
    animation: fadeSlideIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.page-btn {
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 44px;
    text-align: center;
}

.page-btn:hover {
    background: rgba(30, 136, 229, 0.1);
    color: var(--primary-dark);
    border-color: var(--primary-light);
}

.page-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(30, 136, 229, 0.3);
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(31, 38, 135, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.show {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    width: 100%;
    max-width: 450px;
    padding: 32px;
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
    text-align: center;
    margin-bottom: 28px;
}

.modal-title {
    font-size: 22px;
    color: var(--primary-dark);
    font-weight: 700;
    margin-bottom: 6px;
}

.modal-subtitle {
    font-size: 13px;
    color: var(--text-muted);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.modal-close:hover {
    background: rgba(244, 67, 54, 0.1);
    color: var(--danger);
    transform: rotate(90deg);
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 13px 18px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1.5px solid rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
    transition: all 0.3s;
    font-family: inherit;
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input:focus {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(30, 136, 229, 0.12);
}

.form-row {
    display: flex;
    gap: 12px;
}

.form-row .form-group {
    flex: 1;
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(30, 136, 229, 0.35);
    font-family: inherit;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    box-shadow: 0 6px 25px rgba(30, 136, 229, 0.45);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1.5px solid rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    color: var(--primary-dark);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.btn-secondary:hover {
    background: rgba(30, 136, 229, 0.1);
    border-color: var(--primary-light);
}

.btn-danger {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--danger), #d32f2f);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.btn-danger:hover {
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.4);
}

.btn-verify {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    padding: 9px 16px;
    background: rgba(30, 136, 229, 0.1);
    border: 1px solid var(--primary-light);
    border-radius: 8px;
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-verify:hover:not(:disabled) {
    background: var(--primary);
    color: white;
}

.btn-verify:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-link {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: var(--text-muted);
}

.form-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.form-link a:hover {
    text-decoration: underline;
}

.alert {
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.alert-success {
    background: rgba(76, 175, 80, 0.12);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: #2e7d32;
}

.alert-error {
    background: rgba(244, 67, 54, 0.12);
    border: 1px solid rgba(244, 67, 54, 0.3);
    color: #c62828;
}

.alert-info {
    background: rgba(3, 169, 244, 0.12);
    border: 1px solid rgba(3, 169, 244, 0.3);
    color: #0277bd;
}

.alert-warning {
    background: rgba(255, 152, 0, 0.12);
    border: 1px solid rgba(255, 152, 0, 0.3);
    color: #ef6c00;
}

.footer {
    margin-top: 80px;
    padding: 40px 0 30px;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.5);
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

.footer-container a {
    color: var(--primary);
    text-decoration: none;
}

.admin-layout {
    min-height: 100vh;
    display: flex;
}

.admin-sidebar {
    width: 260px;
    flex-shrink: 0;
    padding: 24px 16px;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border-right: 1px solid rgba(255, 255, 255, 0.7);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.admin-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px 24px;
    border-bottom: 1px solid rgba(31, 38, 135, 0.1);
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-dark);
}

.admin-menu {
    list-style: none;
}

.admin-menu li {
    margin-bottom: 4px;
}

.admin-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.admin-menu a:hover {
    background: rgba(30, 136, 229, 0.1);
    color: var(--primary-dark);
}

.admin-menu a.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(30, 136, 229, 0.3);
}

.admin-menu .menu-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.admin-menu .menu-badge {
    margin-left: auto;
    padding: 2px 8px;
    background: rgba(244, 67, 54, 0.15);
    color: var(--danger);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.admin-content {
    flex: 1;
    padding: 30px 40px;
    min-width: 0;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 16px;
}

.admin-page-title {
    font-size: 28px;
    color: var(--primary-dark);
    font-weight: 700;
}

.admin-user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.admin-avatar {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
}

.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}

.stat-icon.blue { background: linear-gradient(135deg, rgba(30, 136, 229, 0.2), rgba(100, 181, 246, 0.3)); color: var(--primary-dark); }
.stat-icon.green { background: linear-gradient(135deg, rgba(76, 175, 80, 0.2), rgba(129, 199, 132, 0.3)); color: #2e7d32; }
.stat-icon.orange { background: linear-gradient(135deg, rgba(255, 152, 0, 0.2), rgba(255, 183, 77, 0.3)); color: #ef6c00; }
.stat-icon.purple { background: linear-gradient(135deg, rgba(156, 39, 176, 0.2), rgba(186, 104, 200, 0.3)); color: #7b1fa2; }

.stat-info h3 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-info p {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.data-table-wrap {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
}

.data-table thead th {
    padding: 14px 16px;
    background: rgba(30, 136, 229, 0.08);
    color: var(--primary-dark);
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
    border-bottom: 2px solid rgba(30, 136, 229, 0.15);
}

.data-table thead th:first-child {
    border-radius: 12px 0 0 0;
}

.data-table thead th:last-child {
    border-radius: 0 12px 0 0;
}

.data-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(31, 38, 135, 0.06);
    color: var(--text-primary);
    vertical-align: middle;
}

.data-table tbody tr:hover td {
    background: rgba(30, 136, 229, 0.04);
}

.data-table tbody tr:last-child td:first-child {
    border-radius: 0 0 0 12px;
}

.data-table tbody tr:last-child td:last-child {
    border-radius: 0 0 12px 0;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-active { background: rgba(76, 175, 80, 0.15); color: #2e7d32; }
.status-banned { background: rgba(244, 67, 54, 0.15); color: #c62828; }
.status-muted { background: rgba(255, 152, 0, 0.15); color: #ef6c00; }
.status-pending { background: rgba(3, 169, 244, 0.15); color: #0277bd; }
.status-published { background: rgba(76, 175, 80, 0.15); color: #2e7d32; }
.status-draft { background: rgba(156, 39, 176, 0.15); color: #7b1fa2; }

.action-btns {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.action-btn:hover {
    background: rgba(30, 136, 229, 0.1);
    color: var(--primary-dark);
    border-color: var(--primary-light);
}

.action-btn.edit:hover { background: rgba(30, 136, 229, 0.15); color: var(--primary-dark); }
.action-btn.delete:hover { background: rgba(244, 67, 54, 0.15); color: #c62828; border-color: rgba(244, 67, 54, 0.3); }
.action-btn.mute:hover { background: rgba(255, 152, 0, 0.15); color: #ef6c00; border-color: rgba(255, 152, 0, 0.3); }

.filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-input {
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
    font-family: inherit;
    transition: all 0.2s;
}

.filter-input:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}

select.filter-input {
    cursor: pointer;
    padding-right: 36px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235c6bc0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    appearance: none;
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.login-box {
    width: 100%;
    max-width: 420px;
    padding: 40px 36px;
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 36px;
    margin: 0 auto 16px;
    box-shadow: 0 8px 24px rgba(30, 136, 229, 0.4);
}

.login-logo-text {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-dark);
}

.hero-banner {
    padding: 50px 40px;
    margin-bottom: 40px;
    background: linear-gradient(135deg, rgba(30, 136, 229, 0.15), rgba(100, 181, 246, 0.2));
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(30, 136, 229, 0.2), transparent 70%);
    border-radius: 50%;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
}

.hero-title {
    font-size: 36px;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 28px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.hero-btn {
    padding: 14px 28px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.hero-btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 6px 20px rgba(30, 136, 229, 0.4);
}

.hero-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(30, 136, 229, 0.5);
}

.hero-btn-secondary {
    background: rgba(255, 255, 255, 0.8);
    color: var(--primary-dark);
    border: 1.5px solid rgba(255, 255, 255, 0.9);
}

.hero-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-3px);
}

.book-detail-modal {
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 0;
}

.book-detail-header {
    padding: 24px 32px;
    border-bottom: 1px solid rgba(31, 38, 135, 0.1);
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    z-index: 10;
}

.book-detail-body {
    display: flex;
    gap: 32px;
    padding: 32px;
}

.book-detail-cover {
    flex-shrink: 0;
    width: 200px;
}

.book-detail-cover .book-cover {
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(31, 38, 135, 0.2);
}

.book-detail-info {
    flex: 1;
    min-width: 0;
}

.book-detail-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.book-detail-meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 24px;
    margin-bottom: 24px;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.meta-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.meta-value {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

.book-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.keyword-tag {
    padding: 4px 12px;
    background: rgba(30, 136, 229, 0.1);
    color: var(--primary-dark);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.book-detail-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
}

/* ===== 社区板块 ===== */
.community-login-tip {
    padding: 32px 24px;
    margin-bottom: 24px;
    text-align: center;
    border-radius: 16px;
}

.community-post-form {
    padding: 24px 26px;
    margin-bottom: 28px;
    border-radius: 16px;
}

.community-post-form-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.community-post-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.community-topics { margin-top: 4px; }

.community-topic-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.community-topic-card {
    padding: 18px 22px;
    border-radius: 14px;
    transition: transform .2s, box-shadow .2s, border-color .2s;
}

.community-topic-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(30, 136, 229, 0.12);
}

.community-topic-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.community-topic-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    flex: 1;
    min-width: 0;
}

.community-topic-meta {
    font-size: 12px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.community-topic-content {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 12px;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.community-topic-card-foot {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 12px;
    border-top: 1px solid rgba(30, 136, 229, 0.08);
}

.community-topic-author {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-right: auto;
}

.community-topic-views {
    font-size: 12px;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* 回复按钮 - 社交平台风格 */
.topic-reply-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    color: var(--text-muted);
    border: none;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s ease;
    font-family: inherit;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    line-height: 1.4;
}
.topic-reply-toggle:hover {
    background: rgba(30, 136, 229, 0.08);
    color: var(--primary);
}
.topic-reply-toggle:active {
    transform: scale(0.94);
}
.topic-reply-toggle.is-open {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 10px rgba(30, 136, 229, 0.3);
}
.topic-reply-toggle.is-open:hover {
    background: var(--primary-dark);
}
.topic-reply-toggle .reply-count-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: rgba(30, 136, 229, 0.12);
    color: var(--primary-dark);
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    transition: all .2s;
}
.topic-reply-toggle:hover .reply-count-label {
    background: rgba(30, 136, 229, 0.2);
}
.topic-reply-toggle.is-open .reply-count-label {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

/* 管理员徽章 */
.admin-badge {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: #fff;
    line-height: 1.4;
    vertical-align: middle;
    box-shadow: 0 2px 6px rgba(245, 124, 0, 0.25);
}

/* 置顶标识 */
.pin-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    background: linear-gradient(135deg, #ffc107, #ff9800);
    color: #fff;
    line-height: 1.4;
    vertical-align: middle;
    box-shadow: 0 2px 6px rgba(255, 152, 0, 0.25);
}

/* 置顶帖卡片 */
.community-topic-card.is-pinned {
    border: 1px solid rgba(255, 152, 0, 0.35);
    background: linear-gradient(135deg, rgba(255, 248, 225, 0.5), rgba(255, 243, 224, 0.3));
}

.community-topic-card.is-pinned:hover {
    box-shadow: 0 10px 28px rgba(255, 152, 0, 0.18);
}

/* Flash 消息提示（后台通用） */
.flash-message {
    padding: 12px 18px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.6;
    border-left: 4px solid;
    animation: fadeSlideIn .3s both;
}

.flash-message.flash-success {
    background: rgba(76, 175, 80, 0.1);
    color: #2e7d32;
    border-color: #4caf50;
}

.flash-message.flash-error {
    background: rgba(244, 67, 54, 0.1);
    color: #c62828;
    border-color: #f44336;
}

/* 下载限额弹框内 number 输入框优化 */
.modal input[type="number"] {
    -moz-appearance: textfield;
}
.modal input[type="number"]::-webkit-outer-spin-button,
.modal input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.modal input[type="number"] {
    -webkit-appearance: none;
    appearance: textfield;
}

.book-detail-desc {
    margin-top: 8px;
    padding: 16px 18px;
    background: rgba(30, 136, 229, 0.06);
    border: 1px solid rgba(30, 136, 229, 0.12);
    border-radius: 12px;
}

/* ========== 社区帖子回复区域 ========== */
.topic-reply-section {
    margin-top: 14px;
    padding: 16px;
    background: rgba(248, 250, 252, 0.8);
    border-radius: 12px;
    border: 1px solid rgba(30, 136, 229, 0.1);
    animation: fadeSlideIn .25s ease;
}
.topic-reply-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 6px;
    margin: -4px 0 4px;
}
.topic-reply-list::-webkit-scrollbar {
    width: 5px;
}
.topic-reply-list::-webkit-scrollbar-thumb {
    background: rgba(30, 136, 229, 0.2);
    border-radius: 3px;
}
.topic-reply-list::-webkit-scrollbar-track {
    background: transparent;
}
.topic-reply-loading,
.topic-reply-empty {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    padding: 20px 0;
}
.topic-reply-item {
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    animation: fadeSlideIn .2s ease;
    transition: border-color .15s;
}
.topic-reply-item:hover {
    border-color: rgba(30, 136, 229, 0.15);
}
.topic-reply-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 12.5px;
}
.topic-reply-author {
    color: var(--primary-dark);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}
.topic-reply-time {
    color: var(--text-muted);
    font-size: 11px;
    white-space: nowrap;
}
.topic-reply-content {
    font-size: 14px;
    line-height: 1.65;
    color: var(--text-primary);
    word-break: break-word;
}
.reply-mine-tag {
    display: inline-block;
    margin-left: 4px;
    background: rgba(30, 136, 229, 0.12);
    color: var(--primary-dark);
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 6px;
    font-weight: 600;
}

/* 回复表单 */
.topic-reply-form {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(30, 136, 229, 0.12);
}
.reply-textarea {
    width: 100%;
    min-height: 76px;
    max-height: 200px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.95);
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    resize: vertical;
    transition: border-color .2s, box-shadow .2s;
    box-sizing: border-box;
}
.reply-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
    background: #fff;
}
.reply-textarea::placeholder {
    color: var(--text-muted);
}
.reply-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}
.reply-char-count {
    font-size: 12px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}
.reply-submit-btn {
    padding: 8px 24px !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(30, 136, 229, 0.2);
    transition: all .2s !important;
}
.reply-submit-btn:hover {
    box-shadow: 0 4px 12px rgba(30, 136, 229, 0.3) !important;
    transform: translateY(-1px);
}
.reply-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}
.reply-login-hint {
    text-align: center;
    padding: 16px;
    margin-top: 14px;
    color: var(--text-muted);
    font-size: 13px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 8px;
    border: 1px dashed var(--border-color);
}
.reply-login-hint a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    padding: 2px 8px;
    background: rgba(30, 136, 229, 0.08);
    border-radius: 6px;
    transition: background .2s;
}
.reply-login-hint a:hover {
    background: rgba(30, 136, 229, 0.15);
}

@media (max-width: 600px) {
    .community-topic-card-foot {
        flex-wrap: wrap;
        gap: 10px;
    }
    .community-topic-author {
        margin-right: 0;
        width: 100%;
    }
    .topic-reply-toggle {
        padding: 6px 12px;
        font-size: 12.5px;
    }
    .topic-reply-list {
        max-height: 280px;
    }
    .reply-textarea {
        min-height: 60px;
        font-size: 13px;
    }
    .topic-reply-section {
        padding: 12px;
        margin-top: 10px;
    }
    .topic-reply-item {
        padding: 10px;
    }
    .topic-reply-content {
        font-size: 13px;
    }
    .reply-submit-btn {
        padding: 7px 18px !important;
        font-size: 13px !important;
    }
    .reply-form-actions {
        gap: 8px;
    }
}
@media (max-width: 380px) {
    .community-topic-card-foot {
        gap: 8px;
    }
    .topic-reply-toggle {
        padding: 5px 10px;
        font-size: 12px;
    }
    .topic-reply-toggle .reply-count-label {
        min-width: 18px;
        height: 18px;
        font-size: 10px;
    }
    .community-topic-views {
        font-size: 11px;
    }
}

.book-desc-text {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* ===== 子分类 Tab & 筛选 ===== */
.sub-tabs-container {
    padding: 16px 20px;
    margin-bottom: 24px;
    border-radius: 18px;
}
.sub-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.sub-tab-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 22px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    background: rgba(255,255,255,0.4);
    border: 1px solid rgba(30,136,229,0.12);
    transition: all 0.25s ease;
}
.sub-tab-btn:hover {
    background: rgba(30,136,229,0.08);
    color: var(--primary-dark);
    transform: translateY(-1px);
}
.sub-tab-btn.active {
    background: linear-gradient(135deg, var(--primary), #42a5f5);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 6px 20px rgba(30,136,229,0.3);
}
.filter-bar {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed rgba(30,136,229,0.15);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.chip {
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    text-decoration: none;
    color: var(--text-secondary);
    background: rgba(255,255,255,0.55);
    border: 1px solid rgba(30,136,229,0.15);
    transition: all .2s ease;
}
.chip:hover {
    background: rgba(30,136,229,0.08);
    color: var(--primary-dark);
}
.chip.active {
    background: var(--primary);
    color: #fff;
    border-color: transparent;
}
.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    z-index: 2;
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
.rank-badge.rank-1 { background: linear-gradient(135deg,#ff9800,#ffc107); color:#5d4037; }
.rank-badge.rank-2 { background: linear-gradient(135deg,#90a4ae,#cfd8dc); color:#37474f; }
.rank-badge.rank-3 { background: linear-gradient(135deg,#8d6e63,#bcaaa4); color:#4e342e; }

/* ===== 评论系统 ===== */
.book-detail-comments {
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px dashed rgba(30,136,229,0.18);
}
.comments-title {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}
.comments-count {
    color: var(--primary);
    font-size: 14px;
    font-weight: 500;
}
.msg-form {
    padding: 16px;
    margin-bottom: 20px;
    border-radius: 14px;
}
.msg-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(30,136,229,0.15);
    background: rgba(255,255,255,0.55);
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    min-height: 80px;
    outline: none;
    color: var(--text-primary);
    transition: all .2s;
    font-family: inherit;
    box-sizing: border-box;
}
.msg-form textarea:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(30,136,229,0.1);
}
.msg-form-footer {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.msg-login-hint {
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}
.msg-login-hint a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px dashed var(--primary);
}
.messages-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 480px;
    overflow-y: auto;
    padding-right: 6px;
}
.msg-empty {
    padding: 34px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    background: rgba(255,255,255,0.4);
    border-radius: 14px;
}
.msg-item {
    display: flex;
    gap: 12px;
}
.msg-avatar {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg,#64b5f6,#1976d2);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(30,136,229,0.25);
    overflow: hidden;
}
.msg-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.msg-body {
    flex: 1;
    min-width: 0;
    background: rgba(255,255,255,0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: 12px;
    padding: 12px 14px;
}
.msg-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}
.msg-user {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-dark);
}
.msg-tag {
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
}
.msg-tag.mine { background: rgba(30,136,229,0.12); color: var(--primary); }
.msg-tag.wait { background: rgba(255,152,0,0.15); color: #ef6c00; }
.msg-tag.admin-tag {
    background: linear-gradient(135deg,#2e7d32,#66bb6a);
    color: #fff;
    box-shadow: 0 3px 8px rgba(46,125,50,0.3);
    letter-spacing: .5px;
}
.msg-time {
    margin-left: auto;
    font-size: 12px;
    color: var(--text-muted);
}
.msg-content {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-wrap: break-word;
}
.msg-reply {
    margin-top: 10px;
    padding: 10px 14px;
    background: linear-gradient(135deg, rgba(30,136,229,0.08), rgba(100,181,246,0.06));
    border-left: 3px solid var(--primary);
    border-radius: 0 10px 10px 0;
}
.msg-reply-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 4px;
}
.msg-reply-content {
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-secondary);
    white-space: pre-wrap;
}

.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    min-width: 280px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: toastIn 0.3s ease;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

.toast.success { background: rgba(76, 175, 80, 0.95); color: white; }
.toast.error { background: rgba(244, 67, 54, 0.95); color: white; }
.toast.info { background: rgba(3, 169, 244, 0.95); color: white; }
.toast.warning { background: rgba(255, 152, 0, 0.95); color: white; }

.empty-state {
    padding: 80px 40px;
    text-align: center;
}

.empty-state-icon {
    font-size: 72px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-state-title {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 600;
}

.empty-state-desc {
    font-size: 14px;
    color: var(--text-muted);
}

/* ===== 自适应：中等屏幕 ===== */
@media (max-width: 900px) {
    .admin-layout { flex-direction: column; }
    .admin-sidebar {
        width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.7);
        padding: 16px 12px;
    }
    .admin-menu {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }
    .admin-menu li { margin-bottom: 0; flex: 0 0 auto; }
    .admin-menu a { padding: 8px 12px; font-size: 13px; }
    .admin-logo { padding: 6px 10px 12px; font-size: 16px; }
    .admin-content { padding: 24px 20px; }
    .admin-page-title { font-size: 22px; }
}

/* ===== 自适应：手机屏幕 ===== */
@media (max-width: 768px) {
    /* 导航栏 */
    .nav-container { flex-wrap: wrap; padding: 0 14px; gap: 12px; }
    .logo { font-size: 18px; gap: 8px; }
    .logo-icon { width: 38px; height: 38px; font-size: 20px; border-radius: 10px; }
    .search-box { order: 3; flex-basis: 100%; max-width: 100%; }
    .search-input { padding: 10px 16px 10px 44px; font-size: 13px; }
    .search-icon { left: 14px; font-size: 16px; }
    .nav-btn { padding: 8px 16px; font-size: 13px; }
    .nav-links { gap: 8px; }

    /* 主容器 */
    .main-container { padding: 18px 14px; }

    /* Hero */
    .hero-banner { padding: 30px 20px; margin-bottom: 28px; border-radius: 18px; }
    .hero-title { font-size: 22px; margin-bottom: 10px; }
    .hero-subtitle { font-size: 14px; margin-bottom: 20px; }
    .hero-btn { padding: 11px 22px; font-size: 14px; }

    /* 标题区 */
    .section-title { margin-bottom: 18px; padding-bottom: 12px; flex-wrap: wrap; gap: 10px; }
    .section-title h2 { font-size: 19px; gap: 8px; }
    .section-title h2::before { height: 22px; }

    /* Tab 容器 */
    .tabs-container { padding: 6px; margin: 22px 0 20px; top: 0; }
    .tab-btn { padding: 9px 18px; font-size: 13px; }

    /* 书籍网格 */
    .book-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
    .book-info { padding: 12px; }
    .book-title { font-size: 14px; min-height: 38px; }
    .book-meta { font-size: 11px; }
    .book-stats { margin-top: 10px; padding-top: 10px; }
    .download-btn { padding: 5px 12px; font-size: 11px; }

    /* 子分类 */
    .sub-tabs-container { padding: 12px 14px; margin-bottom: 18px; }
    .sub-tab-btn { padding: 8px 16px; font-size: 13px; }

    /* 模态框 */
    .modal-overlay { padding: 12px; }
    .modal { max-width: 100% !important; padding: 24px 20px; }
    .modal-header { margin-bottom: 20px; }
    .modal-title { font-size: 19px; }
    .modal-subtitle { font-size: 12px; }
    .form-input { padding: 11px 14px; font-size: 13px; }
    .btn-primary { padding: 12px; font-size: 14px; }
    .form-row { flex-direction: column; gap: 0; }

    /* 书籍详情弹窗 */
    .book-detail-modal { max-height: 94vh; }
    .book-detail-header { padding: 16px 18px; }
    .book-detail-body { flex-direction: column; padding: 18px; gap: 20px; }
    .book-detail-cover { width: 100%; max-width: 180px; margin: 0 auto; }
    .book-detail-title { font-size: 20px; margin-bottom: 12px; }
    .book-detail-meta { grid-template-columns: 1fr 1fr; gap: 10px 14px; margin-bottom: 18px; }
    .book-detail-actions { gap: 8px; margin-top: 18px; }
    .book-detail-actions .btn-primary,
    .book-detail-actions .btn-secondary { flex: 1; text-align: center; padding: 11px 16px; font-size: 13px; }

    /* 简介 */
    .book-detail-desc { padding: 12px 14px; }
    .book-desc-text { font-size: 13px; line-height: 1.7; }

    /* 社区板块 */
    .community-post-form { padding: 18px 16px; }
    .community-login-tip { padding: 24px 18px; }
    .community-topic-card { padding: 14px 16px; }
    .community-topic-title { font-size: 15px; }
    .community-topic-content { font-size: 13px; line-height: 1.6; }
    .community-post-form-actions { flex-direction: column-reverse; align-items: stretch; }
    .community-post-form-actions .btn-primary { width: 100%; }

    /* 分页 */
    .pagination { gap: 6px; margin-top: 28px; }
    .page-btn { padding: 8px 12px; font-size: 13px; min-width: 38px; }

    /* 评论 */
    .messages-list { max-height: 360px; }
    .msg-form textarea { min-height: 70px; font-size: 13px; }

    /* 后台表格 */
    .data-table thead th { padding: 10px 8px; font-size: 12px; }
    .data-table tbody td { padding: 10px 8px; font-size: 12px; }
    .action-btns { gap: 4px; }
    .action-btn { padding: 5px 8px; font-size: 11px; }

    /* 后台统计卡片 */
    .stat-cards { gap: 14px; }
    .stat-card { padding: 18px; gap: 14px; }
    .stat-icon { width: 46px; height: 46px; font-size: 22px; border-radius: 12px; }
    .stat-info h3 { font-size: 22px; }

    /* 后台头部 */
    .admin-header { margin-bottom: 22px; gap: 12px; }
    .admin-user-info { gap: 10px; }
    .admin-avatar { width: 38px; height: 38px; font-size: 14px; }
    .toolbar { gap: 10px; }
    .filter-input { font-size: 13px; padding: 8px 12px; }

    /* 登录页 */
    .login-box { padding: 28px 22px; }
    .login-logo-icon { width: 58px; height: 58px; font-size: 28px; }
    .login-logo-text { font-size: 19px; }

    /* Toast */
    .toast-container { top: 14px; right: 14px; left: 14px; }
    .toast { min-width: auto; font-size: 13px; padding: 12px 16px; }

    /* 空状态 */
    .empty-state { padding: 50px 20px; }
    .empty-state-icon { font-size: 56px; }
    .placeholder-section { padding: 50px 24px; }
    .placeholder-icon { font-size: 60px; }
}

/* ===== 超小屏幕（≤380px） ===== */
@media (max-width: 380px) {
    .book-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
    .book-detail-meta { grid-template-columns: 1fr; }
    .hero-title { font-size: 19px; }
    .nav-btn { padding: 7px 12px; font-size: 12px; }
    .community-topic-card { padding: 12px 14px; }
    .community-topic-title { font-size: 14px; }
    .tabs-container { padding: 4px; }
    .tab-btn { padding: 8px 14px; font-size: 12px; }
    .sub-tabs { flex-wrap: wrap; gap: 6px; }
    .sub-tab-btn { padding: 6px 12px; font-size: 12px; }
}

/* ===== 黑夜模式：跟随系统 ===== */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-light: #0d1421;
        --glass-bg: rgba(22, 27, 40, 0.6);
        --glass-bg-strong: rgba(28, 34, 50, 0.82);
        --glass-border: rgba(70, 90, 130, 0.35);
        --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
        --text-primary: #e6edf3;
        --text-secondary: #9eb1d9;
        --text-muted: #7a8bab;
        --primary: #4a9eff;
        --primary-dark: #2e7dd6;
        --primary-light: #6bb5ff;
        --secondary: #5a9cf0;
    }

    body {
        background: linear-gradient(135deg, #0d1421 0%, #131b2e 30%, #0f1828 60%, #101a2e 100%);
        color: var(--text-primary);
    }

    body::before {
        background: radial-gradient(circle, rgba(74, 158, 255, 0.15) 0%, transparent 70%);
    }
    body::after {
        background: radial-gradient(circle, rgba(46, 125, 214, 0.12) 0%, transparent 70%);
    }

    /* 玻璃质感组件 */
    .glass {
        background: var(--glass-bg);
        border-color: var(--glass-border);
    }
    .glass-strong {
        background: var(--glass-bg-strong);
        border-color: rgba(70, 90, 130, 0.45);
        box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
    }

    /* 导航栏 */
    .navbar {
        background: rgba(22, 27, 40, 0.55);
        border-bottom-color: rgba(70, 90, 130, 0.3);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }
    .search-input {
        background: rgba(30, 36, 52, 0.7);
        border-color: rgba(70, 90, 130, 0.3);
        color: var(--text-primary);
    }
    .search-input::placeholder { color: var(--text-muted); }
    .search-input:focus {
        background: rgba(30, 36, 52, 0.95);
        border-color: var(--primary-light);
    }
    .nav-btn {
        background: rgba(30, 36, 52, 0.6);
        border-color: rgba(70, 90, 130, 0.3);
        color: var(--text-secondary);
    }
    .nav-btn:hover {
        background: rgba(74, 158, 255, 0.12);
        border-color: var(--primary-light);
    }

    /* 表单元素 */
    .form-input {
        background: rgba(30, 36, 52, 0.7);
        border-color: rgba(70, 90, 130, 0.35);
        color: var(--text-primary);
    }
    .form-input::placeholder { color: var(--text-muted); }
    .form-input:focus {
        background: rgba(30, 36, 52, 0.95);
        border-color: var(--primary-light);
    }
    textarea.form-input {
        background: rgba(30, 36, 52, 0.7);
        color: var(--text-primary);
    }
    .filter-input {
        background: rgba(30, 36, 52, 0.7);
        border-color: rgba(70, 90, 130, 0.35);
        color: var(--text-primary);
    }
    select.filter-input {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239eb1d9' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    }

    /* Hero */
    .hero-banner {
        background: linear-gradient(135deg, rgba(74, 158, 255, 0.15), rgba(46, 125, 214, 0.18));
    }
    .hero-btn-secondary {
        background: rgba(30, 36, 52, 0.8);
        color: var(--primary-light);
        border-color: rgba(70, 90, 130, 0.4);
    }

    /* 书籍卡片 */
    .book-cover {
        background: linear-gradient(135deg, #1a2238, #243054);
    }
    .no-cover {
        background: linear-gradient(135deg, rgba(74, 158, 255, 0.1), rgba(46, 125, 214, 0.15));
        color: var(--primary-light);
    }
    .book-stats {
        border-top-color: rgba(70, 90, 130, 0.2);
    }

    /* Tab 按钮 */
    .tab-btn:hover::before { background: rgba(74, 158, 255, 0.1); }

    /* 模态框遮罩 */
    .modal-overlay {
        background: rgba(0, 0, 0, 0.65);
    }
    .modal-close {
        background: rgba(30, 36, 52, 0.6);
        border-color: rgba(70, 90, 130, 0.3);
        color: var(--text-secondary);
    }

    /* 后台布局 */
    .admin-sidebar {
        background: rgba(22, 27, 40, 0.7);
        border-right-color: rgba(70, 90, 130, 0.3);
    }
    .admin-logo { border-bottom-color: rgba(70, 90, 130, 0.2); }
    .admin-menu a:hover {
        background: rgba(74, 158, 255, 0.12);
    }

    /* 后台表格 */
    .data-table thead th {
        background: rgba(74, 158, 255, 0.1);
        border-bottom-color: rgba(70, 90, 130, 0.3);
    }
    .data-table tbody td {
        border-bottom-color: rgba(70, 90, 130, 0.12);
    }
    .data-table tbody tr:hover td {
        background: rgba(74, 158, 255, 0.06);
    }
    .action-btn {
        background: rgba(30, 36, 52, 0.7);
        border-color: rgba(70, 90, 130, 0.3);
        color: var(--text-secondary);
    }

    /* 状态徽章保持色彩对比 */
    .status-active { background: rgba(76, 175, 80, 0.2); color: #81c784; }
    .status-banned { background: rgba(244, 67, 54, 0.2); color: #ef9a9a; }
    .status-muted { background: rgba(255, 152, 0, 0.2); color: #ffcc80; }
    .status-pending { background: rgba(3, 169, 244, 0.2); color: #81d4fa; }
    .status-published { background: rgba(76, 175, 80, 0.2); color: #81c784; }
    .status-draft { background: rgba(156, 39, 176, 0.2); color: #ce93d8; }

    /* Alert */
    .alert-success { background: rgba(76, 175, 80, 0.15); color: #81c784; border-color: rgba(76, 175, 80, 0.35); }
    .alert-error { background: rgba(244, 67, 54, 0.15); color: #ef9a9a; border-color: rgba(244, 67, 54, 0.35); }
    .alert-info { background: rgba(3, 169, 244, 0.15); color: #81d4fa; border-color: rgba(3, 169, 244, 0.35); }
    .alert-warning { background: rgba(255, 152, 0, 0.15); color: #ffcc80; border-color: rgba(255, 152, 0, 0.35); }

    /* 子分类与筛选 */
    .sub-tab-btn {
        background: rgba(30, 36, 52, 0.4);
        border-color: rgba(70, 90, 130, 0.25);
        color: var(--text-secondary);
    }
    .sub-tab-btn:hover { background: rgba(74, 158, 255, 0.1); }
    .chip {
        background: rgba(30, 36, 52, 0.55);
        border-color: rgba(70, 90, 130, 0.25);
        color: var(--text-secondary);
    }
    .chip:hover { background: rgba(74, 158, 255, 0.1); }
    .keyword-tag { background: rgba(74, 158, 255, 0.15); color: var(--primary-light); }

    /* 书籍简介 */
    .book-detail-desc {
        background: rgba(74, 158, 255, 0.08);
        border-color: rgba(74, 158, 255, 0.18);
    }
    .book-desc-text { color: var(--text-secondary); }

    /* 书籍详情头部 */
    .book-detail-header {
        background: rgba(28, 34, 50, 0.9);
        border-bottom-color: rgba(70, 90, 130, 0.2);
    }

    /* 评论 */
    .msg-form textarea {
        background: rgba(30, 36, 52, 0.6);
        border-color: rgba(70, 90, 130, 0.25);
        color: var(--text-primary);
    }
    .msg-form textarea:focus {
        background: rgba(30, 36, 52, 0.95);
        border-color: var(--primary);
    }
    .msg-body {
        background: rgba(30, 36, 52, 0.55);
        border-color: rgba(70, 90, 130, 0.25);
    }
    .msg-empty { background: rgba(30, 36, 52, 0.4); }
    .msg-reply {
        background: linear-gradient(135deg, rgba(74, 158, 255, 0.1), rgba(46, 125, 214, 0.06));
    }

    /* 社区回复区域 */
    .topic-reply-section {
        background: rgba(22, 27, 40, 0.5);
        border-color: rgba(70, 90, 130, 0.2);
    }
    .topic-reply-item {
        background: rgba(30, 36, 52, 0.6);
        border-color: rgba(70, 90, 130, 0.15);
    }
    .topic-reply-item:hover {
        border-color: rgba(74, 158, 255, 0.25);
    }
    .reply-textarea {
        background: rgba(30, 36, 52, 0.7);
        border-color: rgba(70, 90, 130, 0.3);
        color: var(--text-primary);
    }
    .reply-textarea:focus {
        background: rgba(30, 36, 52, 0.95);
        border-color: var(--primary);
    }
    .reply-textarea::placeholder { color: var(--text-muted); }
    .reply-login-hint {
        background: rgba(30, 36, 52, 0.5);
        border-color: rgba(70, 90, 130, 0.25);
    }

    /* 分页 */
    .page-btn {
        background: rgba(30, 36, 52, 0.6);
        border-color: rgba(70, 90, 130, 0.3);
        color: var(--text-secondary);
    }
    .page-btn:hover {
        background: rgba(74, 158, 255, 0.12);
        border-color: var(--primary-light);
    }

    /* Footer */
    .footer {
        background: rgba(22, 27, 40, 0.4);
        border-top-color: rgba(70, 90, 130, 0.25);
    }

    /* 空状态 */
    .placeholder-icon {
        background: linear-gradient(135deg, var(--primary), var(--secondary));
        -webkit-background-clip: text;
        background-clip: text;
    }

    /* 用户下拉 */
    .user-dropdown a:hover {
        background: rgba(74, 158, 255, 0.12);
    }

    /* Toast */
    .toast { box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5); }
}

/* ===== 手机端完整适配修复 ===== */
@media (max-width: 768px) {
    /* 表单元素 */
    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group input[type="password"],
    .form-group input[type="number"],
    .form-group input[type="url"],
    .form-group input[type="tel"],
    .form-group textarea,
    .form-group select {
        width: 100% !important;
        padding: 12px 14px !important;
        font-size: 16px !important;
        border-radius: 10px !important;
    }
    
    /* 表单标签 */
    .form-label {
        font-size: 14px !important;
        margin-bottom: 8px !important;
        display: block !important;
    }
    
    /* 按钮 */
    .btn-primary, .btn-secondary, .btn-danger {
        width: 100% !important;
        padding: 14px 20px !important;
        font-size: 15px !important;
        border-radius: 12px !important;
        margin-bottom: 10px !important;
    }
    
    /* 卡片和玻璃效果 */
    .glass, .glass-strong {
        padding: 16px !important;
        margin: 0 0 16px 0 !important;
        border-radius: 16px !important;
    }
    
    /* 管理后台 */
    .admin-content {
        padding: 16px 12px !important;
        overflow-x: auto !important;
    }
    
    .admin-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
        padding: 14px !important;
    }
    
    .admin-user-info {
        width: 100% !important;
        flex-wrap: wrap !important;
    }
    
    .admin-page-title {
        font-size: 20px !important;
    }
    
    /* 管理后台表格 */
    .admin-content table {
        width: 100% !important;
        min-width: 600px !important;
    }
    
    .admin-content table th,
    .admin-content table td {
        padding: 10px 8px !important;
        font-size: 12px !important;
        white-space: nowrap !important;
    }
    
    /* 管理后台网格布局 */
    .admin-content .glass-strong > div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
    
    /* 弹窗/模态框 */
    .modal, .dialog {
        width: 95% !important;
        max-width: 95% !important;
        margin: 20px auto !important;
        padding: 20px !important;
    }
    
    /* 提示消息 */
    .flash-message {
        padding: 12px 16px !important;
        margin: 0 0 16px 0 !important;
        font-size: 14px !important;
        border-radius: 10px !important;
    }
    
    /* 图片预览 */
    img {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* 滚动条优化 */
    ::-webkit-scrollbar {
        width: 6px;
        height: 6px;
    }
    
    ::-webkit-scrollbar-thumb {
        background: rgba(0,0,0,0.2);
        border-radius: 3px;
    }
    
    /* 侧边栏菜单项 */
    .admin-menu {
        overflow-x: auto !important;
        flex-wrap: nowrap !important;
        padding-bottom: 4px !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .admin-menu li {
        flex: 0 0 auto !important;
    }
    
    .admin-menu a {
        padding: 8px 10px !important;
        font-size: 12px !important;
        white-space: nowrap !important;
    }
    
    /* 统计卡片 */
    .admin-content .glass-strong > div[style*="grid-template-columns:1fr 1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
    
    /* 下载按钮 */
    .download-btn {
        padding: 12px 20px !important;
        font-size: 14px !important;
        width: 100% !important;
    }
    
    /* 用户信息区域 */
    .user-info-card {
        padding: 12px !important;
    }
    
    /* 书籍详情 */
    .book-detail-info {
        padding: 12px !important;
    }
    
    /* 分页 */
    .pagination {
        flex-wrap: wrap !important;
        gap: 6px !important;
    }
    
    .pagination a, .pagination span {
        padding: 8px 12px !important;
        font-size: 13px !important;
    }
}

/* 超小屏幕适配 */
@media (max-width: 380px) {
    .admin-menu a {
        padding: 6px 8px !important;
        font-size: 11px !important;
    }
    
    .admin-header {
        padding: 10px !important;
    }
    
    .admin-page-title {
        font-size: 18px !important;
    }
    
    .glass, .glass-strong {
        padding: 12px !important;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 10px 12px !important;
        font-size: 15px !important;
    }
}

/* 暗色模式手机适配 */
@media (max-width: 768px) and (prefers-color-scheme: dark) {
    .admin-content table {
        background: rgba(30, 30, 40, 0.9) !important;
    }
    
    .admin-content table th {
        background: rgba(40, 40, 60, 0.95) !important;
    }
    
    .admin-content table tr:nth-child(even) {
        background: rgba(35, 35, 50, 0.8) !important;
    }
}