/* ========== 基础重置 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    min-height: 100vh;
    background-color: #0f172a;
    color: #1e293b;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    display: none;
    align-items: flex-end;
    justify-content: center;
    z-index: 999;
}

.modal-content {
    width: 100%;
    max-width: 720px;
    max-height: 85vh;
    background: #fff;
    border-radius: 16px 16px 0 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-content h3 {
    padding: 16px 20px 12px;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
}

.form-actions {
    padding: 12px 20px 16px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.form-actions .btn {
    flex: 1;
}

.config-textarea {
    width: 100%;
    min-height: 240px;
    max-height: 40vh;
    font-family: monospace;
    font-size: 13px;
    line-height: 1.6;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    resize: vertical;
    box-sizing: border-box;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.radio-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 15px;
}

.radio-item input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* 固定背景：完全不随页面滚动移动 */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/css/bg.jpg');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    z-index: -1;
    transform: translateZ(0);
    will-change: transform;
}

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

/* ========== 通用组件 ========== */
.btn {
    border: none;
    outline: none;
    text-decoration: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    transition: .2s;
}
.btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
}
.btn-primary:hover {
    filter: brightness(1.08);
}
.btn-outline {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
}
.btn-outline:hover {
    background: rgba(255, 255, 255, 0.2);
}
.btn-danger {
    background: #fee2e2;
    color: #dc2626;
}
.btn-danger:hover {
    background: #fecdd3;
}
.btn-success {
    background: #dcfce7;
    color: #16a34a;
}
.btn-success:hover {
    background: #bbf7d0;
}

.res-type {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    margin-left: 8px;
}
.type-app {
    background: #ede9fe;
    color: #7c3aed;
}
.type-magisk {
    background: #e0f2fe;
    color: #0284c7;
}

.status-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    margin-left: 8px;
}
.status-pending {
    background: #fef3c7;
    color: #d97706;
}
.status-approved {
    background: #dcfce7;
    color: #16a34a;
}

.empty {
    text-align: center;
    padding: 48px 24px;
    color: #64748b;
    font-size: 14px;
}

.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 20px;
    border-radius: 12px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .15);
    animation: slideUp 0.3s ease;
}
.toast.success { background: #22c55e; }
.toast.error { background: #ef4444; }
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    padding: 16px;
}
.modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    width: 100%;
    max-width: 520px;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .15);
    max-height: 90vh;
    overflow-y: auto;
}
.modal-content h3 {
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 800;
}
.form-item {
    margin-bottom: 16px;
}
.form-item label {
    display: block;
    margin-bottom: 8px;
    color: #475569;
    font-weight: 800;
    font-size: 14px;
}
.form-item input,
.form-item textarea,
.form-item select {
    width: 100%;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 12px;
    padding: 12px 14px;
    background: rgba(248, 250, 252, 0.8);
    color: #1e293b;
    outline: none;
    font-size: 15px;
}
.form-item input:focus,
.form-item textarea:focus,
.form-item select:focus {
    border-color: #6366f1;
    background: #ffffff;
}
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
}

/* ========== 导航栏（全局玻璃态） ========== */
.navbar {
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.logo {
    font-size: 18px;
    font-weight: 900;
    color: #fff;
    flex-shrink: 0;
}
.nav-menu {
    display: flex;
    gap: 16px;
    align-items: center;
    flex: 1;
    justify-content: center;
}
.nav-menu a {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    white-space: nowrap;
    transition: color 0.2s;
}
.nav-menu a:hover,
.nav-menu a.active {
    color: #fff;
    font-weight: 800;
}
.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    flex-shrink: 0;
}
.user-info .btn {
    height: 32px;
    padding: 0 14px;
    font-size: 13px;
    border-radius: 999px;
}
.user-info .btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border: none;
}

/* ========== 通用容器与卡片（毛玻璃） ========== */
.container {
    max-width: 1200px;
    margin: 24px auto;
    padding: 0 16px;
}
.card {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
    border: 1px solid rgba(255, 255, 255, 0.5);
    margin-bottom: 16px;
}
.page-title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 24px;
}
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}
.search-box {
    flex: 1;
    min-width: 260px;
}
.search-box input {
    width: 100%;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 12px;
    padding: 10px 14px;
    background: rgba(248, 250, 252, 0.8);
    color: #1e293b;
    outline: none;
    font-size: 14px;
}
.search-box input:focus {
    border-color: #6366f1;
    background: #ffffff;
}

/* ========== 首页专属 ========== */
.home .container {
    margin: 0 auto;
    padding: 24px 16px 48px;
}
.filter-bar {
    display: inline-flex;
    gap: 8px;
    padding: 6px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    margin-bottom: 24px;
}
.filter-tab {
    padding: 8px 20px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    cursor: pointer;
    transition: 0.2s;
    user-select: none;
}
.filter-tab:hover {
    background: rgba(15, 23, 42, 0.08);
    color: #0f172a;
}
.filter-tab.active {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}
.resource-item {
    position: relative;
    display: flex;
    gap: 14px;
    padding: 18px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}
.resource-item::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 0 0, rgba(99, 102, 241, 0.12), transparent 35%);
    pointer-events: none;
}
.resource-item:hover {
    transform: translateY(-3px);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.96));
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}
.resource-item:active { transform: scale(0.98); }
.res-icon {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.95);
    display: grid;
    place-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}
.res-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.default-icon { font-size: 28px; }
.res-content {
    position: relative;
    z-index: 2;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
}
.res-header {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: space-between;
}
.res-title {
    font-size: 16px;
    font-weight: 800;
    color: #ffffff !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}
.home .res-type {
    background: rgba(255, 255, 255, 0.95);
    color: #7c3aed;
}
.res-meta {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.92);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
}
.home .empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 64px 24px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    border: 1px dashed rgba(255, 255, 255, 0.2);
}

/* ========== 管理列表页通用 ========== */
.review-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}
.review-item {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 14px;
    padding: 18px;
    transition: .2s;
}
.review-item:hover {
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .1);
    transform: translateY(-2px);
}
.review-item strong {
    font-size: 16px;
    color: #0f172a;
}
.review-item p {
    margin-top: 10px;
    color: #475569;
    font-size: 14px;
    line-height: 1.6;
    min-height: 44px;
}
.meta {
    font-size: 12px;
    color: #64748b;
    margin-top: 12px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}
.review-actions {
    margin-top: 14px;
    display: flex;
    gap: 10px;
}

/* 管理中心入口卡片 */
.admin-banner {
    background: linear-gradient(135deg,#6366f1,#8b5cf6);
    border: none;
    color: #fff;
}
.admin-banner h3 {
    margin: 0 0 4px 0;
    font-size: 18px;
}
.admin-banner p {
    margin: 0;
    color: #e0e7ff;
    font-size: 14px;
}
.admin-banner .btn {
    background: #fff;
    color: #6366f1;
}

/* ========== 详情页 ========== */
.detail-card { padding: 28px; }
.detail-title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 8px;
}
.detail-info {
    display: flex;
    gap: 20px;
    color: #64748b;
    font-size: 14px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(241, 245, 249, 0.8);
    flex-wrap: wrap;
}
.detail-desc {
    color: #475569;
    line-height: 1.8;
    margin-bottom: 24px;
    white-space: pre-wrap;
}
.download-section {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}
.download-btn {
    padding: 12px 32px;
    font-size: 15px;
}

/* ========== 表单页 ========== */
.form-page {
    max-width: 400px;
    margin: 60px auto;
}
.form-page h2 {
    text-align: center;
    margin-bottom: 24px;
    color: #1e293b;
}
.submit-btn {
    width: 100%;
    padding: 12px;
    font-size: 15px;
    margin-top: 8px;
}
.form-tip {
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
    color: #64748b;
}
.form-tip a { color: #6366f1; }

/* ========== 上传页 ========== */
.upload-area {
    border: 2px dashed rgba(203, 213, 225, 0.8);
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 16px;
}
.upload-area:hover { border-color: #6366f1; background: rgba(248, 250, 252, 0.5); }
.upload-area.dragover { border-color: #6366f1; background: #eff6ff; }
.upload-area p { color: #64748b; margin-top: 8px; font-size: 13px; }

/* ========== 响应式 ========== */
@media (max-width: 720px) {
    .nav-menu { gap: 12px; }
    .nav-menu a { font-size: 13px; }
    .user-info span { display: none; }
    .logo { font-size: 16px; }

    .resource-grid,
    .review-grid { grid-template-columns: 1fr; }

    .filter-bar {
        width: 100%;
        justify-content: space-between;
    }
    .filter-tab {
        flex: 1;
        text-align: center;
        padding: 8px 0;
    }

    .modal-content { padding: 20px; }
    .detail-info { gap: 12px; }
}
/* ========== 上传页适配 ========== */
.upload-page .card {
    max-width: 560px;
    margin: 0 auto;
}

.upload-page .form-group {
    margin-bottom: 16px;
}

.upload-page .form-group label {
    display: block;
    margin-bottom: 8px;
    color: #334155;
    font-weight: 700;
    font-size: 15px;
}

.upload-page .form-group input,
.upload-page .form-group textarea,
.upload-page .form-group select {
    width: 100%;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 12px;
    padding: 12px 14px;
    background: rgba(248, 250, 252, 0.9);
    color: #1e293b;
    outline: none;
    font-size: 15px;
    transition: 0.2s;
}

.upload-page .form-group input:focus,
.upload-page .form-group textarea:focus,
.upload-page .form-group select:focus {
    border-color: #6366f1;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.upload-area {
    border: 2px dashed rgba(148, 163, 184, 0.6);
    border-radius: 16px;
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    margin: 20px 0;
    background: rgba(248, 250, 252, 0.5);
}

.upload-area:hover {
    border-color: #6366f1;
    background: rgba(239, 246, 255, 0.7);
}

.upload-area.dragover {
    border-color: #6366f1;
    background: rgba(224, 231, 255, 0.6);
}

.upload-area .icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.upload-area p {
    color: #64748b;
    font-size: 14px;
    line-height: 1.8;
    margin: 0;
}

.upload-page .submit-btn {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    border-radius: 12px;
    margin-top: 8px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: 0.2s;
}

.upload-page .submit-btn:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.upload-page .submit-btn:active {
    transform: scale(0.99);
}
/* ========== 登录/注册页适配 ========== */
.form-page {
    max-width: 420px;
    margin: 60px auto;
}
.form-page.card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.15);
}
.form-page h2 {
    text-align: center;
    margin-bottom: 24px;
    color: #0f172a;
    font-weight: 800;
    font-size: 22px;
}
.form-group {
    margin-bottom: 16px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #334155;
    font-weight: 700;
    font-size: 14px;
}
.form-group input {
    width: 100%;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 12px;
    padding: 12px 14px;
    background: rgba(248, 250, 252, 0.9);
    color: #1e293b;
    outline: none;
    font-size: 15px;
    transition: 0.2s;
}
.form-group input:focus {
    border-color: #6366f1;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}
.form-page .submit-btn {
    width: 100%;
    padding: 13px;
    font-size: 15px;
    border-radius: 12px;
    margin-top: 8px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: 0.2s;
}
.form-page .submit-btn:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}
.form-page .submit-btn:active {
    transform: scale(0.99);
}
.form-tip {
    text-align: center;
    margin-top: 18px;
    font-size: 13px;
    color: #64748b;
}
.form-tip a {
    color: #6366f1;
    font-weight: 700;
}

/* 弹窗按钮清晰化增强 */
.modal-content {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
    border-radius: 16px;
    overflow: hidden;
}

.modal-content .btn {
    font-weight: 800;
    font-size: 15px;
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 12px 18px;
    cursor: pointer;
    transition: 0.2s;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.modal-content .btn-primary {
    background: linear-gradient(135deg, #1d4ed8, #4f46e5);
}

.modal-content .btn-danger {
    background: linear-gradient(135deg, #dc2626, #ef4444);
}

.modal-content .btn-outline {
    background: rgba(243, 244, 246, 0.95);
    color: #1f2937;
    border: 1px solid rgba(229, 231, 235, 0.8);
    text-shadow: none;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 18px 20px 20px;
    background: #fff;
    border-top: 1px solid rgba(229, 231, 235, 0.8);
}
/* ========== 管理列表卡片按钮清晰化修复 ========== */
.review-item {
    background: rgba(255, 255, 255, 0.92);
}

.review-item .btn {
    height: 34px;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 800;
    border-radius: 10px;
    border: none;
}

/* 主按钮：加深蓝紫，白字清晰 */
.review-item .btn-primary {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
}
.review-item .btn-primary:hover {
    filter: brightness(1.1);
}

/* 次要按钮：深色文字+浅灰实底，适配白卡片 */
.review-item .btn-outline {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #e2e8f0;
}
.review-item .btn-outline:hover {
    background: #e2e8f0;
    color: #1e293b;
}

/* 删除按钮：深红底+白字，对比度拉满 */
.review-item .btn-danger {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: #fff;
}
.review-item .btn-danger:hover {
    filter: brightness(1.08);
}
/* 筛选栏两行布局 */
.filter-bar {
    flex-direction: column;
    gap: 12px;
}

.filter-row {
    display: flex;
    gap: 10px;
    width: 100%;
}

.filter-row-center {
    justify-content: center;
}

/* 保持原有标签样式一致 */
.filter-row .filter-tab {
    margin: 0;
}
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    display: none;
    align-items: flex-end;
    justify-content: center;
    z-index: 999;
}

.modal-content {
    width: 100%;
    max-width: 720px;
    max-height: 85vh;
    background: #fff;
    border-radius: 16px 16px 0 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-content h3 {
    padding: 16px 20px 12px;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
}

.form-actions {
    padding: 12px 20px 16px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.form-actions .btn {
    flex: 1;
}

.config-textarea {
    width: 100%;
    min-height: 240px;
    max-height: 40vh;
    font-family: monospace;
    font-size: 13px;
    line-height: 1.6;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    resize: vertical;
    box-sizing: border-box;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.radio-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 15px;
}

.radio-item input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}
/* ========== 基础重置 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    min-height: 100vh;
    background-color: #0f172a;
    color: #1e293b;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/css/bg.jpg');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    z-index: -1;
    transform: translateZ(0);
    will-change: transform;
}
a {
    color: inherit;
    text-decoration: none;
}

/* ========== 通用组件 ========== */
.btn {
    border: none;
    outline: none;
    text-decoration: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    transition: .2s;
}
.btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-outline {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
}
.btn-outline:hover { background: rgba(255, 255, 255, 0.2); }
.btn-danger {
    background: #fee2e2;
    color: #dc2626;
}
.btn-danger:hover { background: #fecdd3; }
.btn-success {
    background: #dcfce7;
    color: #16a34a;
}
.btn-success:hover { background: #bbf7d0; }

/* ========== 资源卡片（深色毛玻璃） ========== */
.resource-item {
    position: relative;
    display: flex;
    gap: 14px;
    padding: 18px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}
.resource-item::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 0 0, rgba(99, 102, 241, 0.12), transparent 35%);
    pointer-events: none;
}
.resource-item:hover {
    transform: translateY(-3px);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.96));
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}
.resource-item:active { transform: scale(0.98); }
.res-icon {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.95);
    display: grid;
    place-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}
.res-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.default-icon { font-size: 28px; }
.res-content {
    position: relative;
    z-index: 2;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
}
.res-header {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: space-between;
}
.res-title {
    font-size: 16px;
    font-weight: 800;
    color: #ffffff !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}
.res-type {
    background: rgba(255, 255, 255, 0.95);
    color: #7c3aed;
}
.res-meta {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.92);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
}

/* ========== 深色卡片内的按钮样式适配 ========== */
.resource-item .btn {
    height: 32px;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 8px;
    border: none;
    transition: .2s;
}
.resource-item .btn-primary {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
}
.resource-item .btn-outline {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}
.resource-item .btn-danger {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: #fff;
}
.resource-item .btn-success {
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: #fff;
}

/* ========== 筛选栏（与首页一致） ========== */
.filter-bar {
    display: inline-flex;
    flex-direction: column;
    gap: 12px;
    padding: 6px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    margin-bottom: 24px;
}
.filter-row {
    display: flex;
    gap: 10px;
    width: 100%;
}
.filter-row-center {
    justify-content: center;
}
.filter-tab {
    padding: 8px 20px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    cursor: pointer;
    transition: 0.2s;
    user-select: none;
}
.filter-tab:hover {
    background: rgba(15, 23, 42, 0.08);
    color: #0f172a;
}
.filter-tab.active {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

/* ========== 白色卡片（弹窗、工具栏等） ========== */
.card {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
    border: 1px solid rgba(255, 255, 255, 0.5);
    margin-bottom: 16px;
}
.page-title { font-size: 22px; font-weight: 800; margin-bottom: 24px; }
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}
.search-box { flex: 1; min-width: 260px; }
.search-box input {
    width: 100%;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 12px;
    padding: 10px 14px;
    background: rgba(248, 250, 252, 0.8);
    color: #1e293b;
    outline: none;
    font-size: 14px;
}
.search-box input:focus { border-color: #6366f1; background: #ffffff; }

/* ========== 弹窗 ========== */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .65);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    padding: 16px;
}
.modal.active { display: flex; }
.modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    width: 100%;
    max-width: 520px;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .15);
    max-height: 90vh;
    overflow-y: auto;
}
.modal-content h3 { margin-bottom: 20px; font-size: 20px; font-weight: 800; }
.form-item { margin-bottom: 16px; }
.form-item label {
    display: block;
    margin-bottom: 8px;
    color: #475569;
    font-weight: 800;
    font-size: 14px;
}
.form-item input,
.form-item textarea,
.form-item select {
    width: 100%;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 12px;
    padding: 12px 14px;
    background: rgba(248, 250, 252, 0.8);
    color: #1e293b;
    outline: none;
    font-size: 15px;
}
.form-item input:focus,
.form-item textarea:focus,
.form-item select:focus { border-color: #6366f1; background: #ffffff; }
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
}
.config-textarea {
    width: 100%;
    min-height: 240px;
    max-height: 40vh;
    font-family: monospace;
    font-size: 13px;
    line-height: 1.6;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    resize: vertical;
    box-sizing: border-box;
}
.radio-group { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.radio-item { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 15px; }
.radio-item input[type="radio"] { width: 18px; height: 18px; cursor: pointer; }

/* ========== 导航栏 ========== */
.navbar {
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.logo { font-size: 18px; font-weight: 900; color: #fff; flex-shrink: 0; }
.nav-menu { display: flex; gap: 16px; align-items: center; flex: 1; justify-content: center; }
.nav-menu a { color: rgba(255, 255, 255, 0.85); font-size: 14px; white-space: nowrap; transition: color 0.2s; }
.nav-menu a:hover, .nav-menu a.active { color: #fff; font-weight: 800; }
.user-info { display: flex; align-items: center; gap: 10px; font-size: 13px; color: rgba(255, 255, 255, 0.9); flex-shrink: 0; }
.user-info .btn { height: 32px; padding: 0 14px; font-size: 13px; border-radius: 999px; }
.user-info .btn-primary { background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; border: none; }

/* ========== 响应式 ========== */
@media (max-width: 1024px) {
    .resource-grid, .review-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
    .nav-menu { gap: 12px; }
    .nav-menu a { font-size: 13px; }
    .user-info span { display: none; }
    .logo { font-size: 16px; }
    .resource-grid, .review-grid { grid-template-columns: 1fr; }
    .filter-bar { width: 100%; justify-content: space-between; }
    .filter-tab { flex: 1; text-align: center; padding: 8px 0; }
    .modal-content { padding: 20px; }
}

.resource-item {
    /* 原有样式保持不变 */
    position: relative;
    display: flex;
    flex-direction: column;   /* 新增：纵向排列 */
    gap: 14px;
    padding: 18px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.res-content {
    position: relative;
    z-index: 2;
    flex: 1;                  /* 占满剩余高度 */
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
}

.review-actions {
    margin-top: auto;          /* 推到底部 */
    display: flex;
    gap: 10px;
    flex-wrap: wrap;          /* 允许换行，但尽量一行 */
    align-items: center;
}
/* ========== 状态标签统一美化（实心圆角+白字） ========== */
.status-tag,
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    flex-shrink: 0;
    border: none;
}

/* 已公开 / 已通过：绿色 */
.status-tag.status-approved,
.status-badge.status-approved {
    background: #10b981;
    color: #fff;
}

/* 审核中：橙色 */
.status-tag.status-pending,
.status-badge.status-pending {
    background: #f59e0b;
    color: #fff;
}

/* 私密：灰色 */
.status-tag.status-private,
.status-badge.status-private {
    background: #6b7280;
    color: #fff;
}

/* 深色卡片内的类型标签：弱化区分，突出状态标签 */
.resource-item .res-type {
    background: rgba(255, 255, 255, 0.15);
    color: #c4b5fd;
    border: 1px solid rgba(196, 181, 253, 0.3);
}
/* 管理中心横幅文字清晰度修复 */
.card.admin-banner {
    background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
    color: #ffffff !important;
    border: none !important;
}
.card.admin-banner h3 {
    color: #ffffff !important;
}
.card.admin-banner p {
    color: #e0e7ff !important;
}
.card.admin-banner .btn {
    background: #ffffff !important;
    color: #6366f1 !important;
}
