/* ===== 全局重置 & 字体 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    background: #f0f2f5;
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', sans-serif;
    color: #1a1a1a;
    padding-bottom: 40px;
}
a { text-decoration: none; color: inherit; }

/* ===== 导航栏 ===== */
.navbar {
    background: #1e293b;
    padding: 0 24px;
    border-bottom: 5px solid #f97316; /* 厨师橙 */
    box-shadow: 0 4px 0 #0f172a;
}
.nav-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}
.logo {
    font-size: 32px;
    font-weight: 900;
    color: #fff;
    letter-spacing: 1px;
    text-shadow: 4px 4px 0 #f97316;
    display: flex;
    align-items: center;
    gap: 8px;
}
.logo span { background: #f97316; padding: 0 10px; color: #1e293b; }
.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}
.user-badge {
    color: #facc15;
    background: #334155;
    padding: 6px 18px;
    border: 3px solid #facc15;
    font-weight: 900;
    font-size: 15px;
}
.btn-primary {
    background: #f97316;
    color: #fff;
    border: 3px solid #0f172a;
    padding: 8px 28px;
    font-weight: 900;
    font-size: 16px;
    cursor: pointer;
    transition: 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 5px 5px 0 #0f172a;
}
.btn-primary:hover {
    transform: translate(2px, 2px);
    box-shadow: 3px 3px 0 #0f172a;
    background: #ea580c;
}
.btn-danger {
    background: #dc2626;
    border-color: #0f172a;
    box-shadow: 5px 5px 0 #0f172a;
}
.btn-danger:hover { background: #b91c1c; transform: translate(2px,2px); box-shadow:3px 3px 0 #0f172a; }
.btn-success {
    background: #16a34a;
    border-color: #0f172a;
    box-shadow: 5px 5px 0 #0f172a;
}
.btn-success:hover { background: #15803d; transform: translate(2px,2px); box-shadow:3px 3px 0 #0f172a; }

/* ===== 板块标签 ===== */
.forum-tabs {
    max-width: 1280px;
    margin: 24px auto 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border: 4px solid #1e293b;
    background: #fff;
}
.tab {
    padding: 14px 32px;
    font-weight: 900;
    font-size: 16px;
    background: #f8fafc;
    border-right: 3px solid #1e293b;
    cursor: pointer;
    transition: 0.1s;
    color: #334155;
    flex: 0 0 auto;
}
.tab:last-child { border-right: none; }
.tab.active {
    background: #1e293b;
    color: #fff;
}
.tab:hover:not(.active) {
    background: #d1d5db;
}

/* ===== 帖子网格 ===== */
.post-grid {
    max-width: 1280px;
    margin: 28px auto 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 28px;
}

/* ===== 卡片 ===== */
.post-card {
    background: #ffffff;
    border: 4px solid #1e293b;
    padding: 22px;
    box-shadow: 8px 8px 0 rgba(0,0,0,0.12);
    transition: 0.15s linear;
    display: flex;
    flex-direction: column;
}
.post-card:hover {
    transform: translate(-3px, -3px);
    box-shadow: 12px 12px 0 rgba(0,0,0,0.08);
}
.card-header {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    align-items: center;
}
.tag-essence {
    background: #facc15;
    color: #1e293b;
    font-weight: 900;
    padding: 2px 14px;
    border: 3px solid #1e293b;
    font-size: 13px;
}
.tag-top {
    background: #f97316;
    color: #fff;
    font-weight: 900;
    padding: 2px 14px;
    border: 3px solid #1e293b;
    font-size: 13px;
}
.forum-name {
    background: #1e3a8a;
    color: #fff;
    font-weight: 900;
    padding: 2px 14px;
    border: 3px solid #1e293b;
    font-size: 13px;
}
.post-title {
    font-size: 22px;
    font-weight: 900;
    margin: 6px 0 12px 0;
    line-height: 1.3;
}
.post-excerpt {
    color: #475569;
    font-size: 15px;
    margin-bottom: 16px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 媒体方块 */
.media-blocks {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.media-item {
    background: #e2e8f0;
    border: 3px solid #1e293b;
    padding: 12px 0;
    text-align: center;
    font-weight: 900;
    font-size: 14px;
    flex: 1;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1e293b;
}
.media-item.img {
    background: #bfdbfe;
}
.media-item.video {
    background: #fecaca;
    border-color: #991b1b;
    color: #991b1b;
}

/* 网盘文件方块 */
.file-blocks {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}
.file-item {
    background: #dcfce7;
    border: 3px solid #1e293b;
    padding: 6px 18px;
    font-weight: 700;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #14532d;
}
.file-item:nth-child(2) {
    background: #fef08a;
    color: #713f12;
}

/* 卡片底部 */
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 16px;
    border-top: 4px solid #e2e8f0;
}
.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}
.avatar {
    font-size: 30px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e2e8f0;
    border: 3px solid #1e293b;
}
.username {
    font-weight: 800;
    font-size: 15px;
}
.level-tag {
    background: #1e293b;
    color: #facc15;
    padding: 0 10px;
    font-weight: 900;
    font-size: 13px;
    border: 3px solid #1e293b;
}
.action-stats {
    display: flex;
    gap: 16px;
    font-weight: 700;
    font-size: 15px;
    color: #475569;
}
.action-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ===== 分页 ===== */
.pagination {
    max-width: 1280px;
    margin: 30px auto;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}
.pagination a {
    background: #1e293b;
    color: #fff;
    padding: 10px 18px;
    border: 3px solid #1e293b;
    font-weight: 900;
    transition: 0.1s;
}
.pagination a:hover { background: #f97316; border-color: #f97316; }
.pagination a.active { background: #f97316; border-color: #f97316; }

/* ===== 表单（登录/注册/发帖） ===== */
.auth-box {
    max-width: 440px;
    margin: 60px auto;
    background: #fff;
    border: 4px solid #1e293b;
    padding: 40px 30px;
    box-shadow: 10px 10px 0 rgba(0,0,0,0.1);
}
.auth-box h2 {
    font-size: 28px;
    margin-bottom: 24px;
    text-align: center;
    background: #1e293b;
    color: #fff;
    padding: 10px 0;
    border: 4px solid #1e293b;
}
.auth-box label {
    font-weight: 800;
    display: block;
    margin: 12px 0 4px;
}
.auth-box input {
    width: 100%;
    padding: 12px 16px;
    border: 3px solid #1e293b;
    font-size: 16px;
    font-weight: 600;
}
.auth-box input:focus {
    outline: none;
    border-color: #f97316;
    background: #fff7ed;
}
.auth-box .btn-primary {
    width: 100%;
    justify-content: center;
    margin-top: 20px;
}
.auth-box .link {
    text-align: center;
    margin-top: 16px;
    font-weight: 700;
}
.auth-box .link a { color: #f97316; text-decoration: underline; }

/* ===== 发帖表单 ===== */
.post-form {
    max-width: 800px;
    margin: 40px auto;
    background: #fff;
    border: 4px solid #1e293b;
    padding: 30px;
    box-shadow: 10px 10px 0 rgba(0,0,0,0.1);
}
.post-form h2 {
    font-size: 26px;
    margin-bottom: 20px;
    background: #1e293b;
    color: #fff;
    padding: 10px 20px;
    border: 4px solid #1e293b;
}
.post-form .form-group { margin-bottom: 18px; }
.post-form label { font-weight: 800; display: block; margin-bottom: 4px; }
.post-form input, .post-form select, .post-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 3px solid #1e293b;
    font-size: 16px;
    font-weight: 500;
}
.post-form input:focus, .post-form select:focus, .post-form textarea:focus {
    outline: none;
    border-color: #f97316;
    background: #fff7ed;
}
.post-form textarea { min-height: 150px; resize: vertical; }
.post-form .upload-hint {
    background: #f1f5f9;
    padding: 12px;
    border: 3px solid #1e293b;
    font-weight: 700;
    margin: 10px 0;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}
.post-form .upload-hint span { display: flex; align-items: center; gap: 6px; }
.post-form .file-input-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.post-form .file-input-row input { flex: 1; min-width: 120px; }

/* ===== 帖子详情 ===== */
.post-detail {
    max-width: 900px;
    margin: 40px auto;
    background: #fff;
    border: 4px solid #1e293b;
    padding: 30px;
    box-shadow: 10px 10px 0 rgba(0,0,0,0.1);
}
.post-detail h1 { font-size: 30px; margin-bottom: 10px; }
.post-detail .meta {
    color: #64748b;
    margin-bottom: 20px;
    font-weight: 600;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}
.post-detail .content { font-size: 17px; line-height: 1.8; margin: 20px 0; }
.post-detail .media-show { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0; }
.post-detail .media-show img, .post-detail .media-show video {
    max-width: 100%; max-height: 400px; border: 3px solid #1e293b;
}
.post-detail .file-show { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.post-detail .file-show .file-item { background: #dcfce7; border: 3px solid #1e293b; padding: 6px 16px; font-weight: 700; }

/* 评论区域 */
.comment-section { margin-top: 30px; border-top: 4px solid #e2e8f0; padding-top: 20px; }
.comment-section h3 { font-size: 22px; margin-bottom: 16px; }
.comment-item {
    background: #f8fafc;
    border: 3px solid #1e293b;
    padding: 16px;
    margin-bottom: 14px;
}
.comment-item .comment-meta { display: flex; gap: 16px; font-weight: 700; margin-bottom: 6px; }
.comment-item .comment-content { font-size: 15px; line-height: 1.6; }
.comment-item .comment-actions { margin-top: 8px; display: flex; gap: 16px; }
.comment-item .comment-actions button { background: none; border: none; font-weight: 700; cursor: pointer; color: #f97316; }
.comment-item .comment-actions button:hover { text-decoration: underline; }
.comment-form { margin-top: 20px; display: flex; gap: 12px; flex-wrap: wrap; }
.comment-form textarea { flex: 1; min-width: 200px; border: 3px solid #1e293b; padding: 10px; }
.comment-form .btn-primary { flex-shrink: 0; }

/* ===== 后台管理 ===== */
.admin-container {
    max-width: 1280px;
    margin: 30px auto;
    background: #fff;
    border: 4px solid #1e293b;
    padding: 30px;
    box-shadow: 10px 10px 0 rgba(0,0,0,0.1);
}
.admin-container h1 {
    font-size: 32px;
    background: #1e293b;
    color: #fff;
    padding: 12px 20px;
    border: 4px solid #1e293b;
    margin: -30px -30px 30px -30px;
}
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px,1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.admin-stats .stat {
    background: #f8fafc;
    border: 3px solid #1e293b;
    padding: 16px;
    text-align: center;
    font-weight: 900;
}
.admin-stats .stat .num { font-size: 32px; color: #f97316; }
.admin-stats .stat .label { font-size: 16px; }
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}
.admin-table th, .admin-table td {
    border: 3px solid #1e293b;
    padding: 12px 16px;
    text-align: left;
    vertical-align: middle;
}
.admin-table th {
    background: #1e293b;
    color: #fff;
    font-weight: 900;
}
.admin-table tr:nth-child(even) { background: #f8fafc; }
.admin-table .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-table .actions a, .admin-table .actions button {
    padding: 4px 12px;
    border: 3px solid #1e293b;
    font-weight: 700;
    background: #e2e8f0;
    cursor: pointer;
    transition: 0.1s;
}
.admin-table .actions a:hover, .admin-table .actions button:hover {
    background: #f97316;
    color: #fff;
}
.admin-table .status-badge {
    padding: 2px 12px;
    border: 3px solid #1e293b;
    font-weight: 700;
}
.admin-table .status-badge.approved { background: #dcfce7; color: #14532d; }
.admin-table .status-badge.pending { background: #fef08a; color: #713f12; }
.admin-table .status-badge.blocked { background: #fecaca; color: #991b1b; }

/* ===== 搜索框 ===== */
.search-box {
    max-width: 600px;
    margin: 20px auto;
    display: flex;
    gap: 0;
    border: 4px solid #1e293b;
}
.search-box input {
    flex: 1;
    padding: 14px 20px;
    border: none;
    font-size: 18px;
    font-weight: 600;
}
.search-box input:focus { outline: none; }
.search-box button {
    background: #1e293b;
    color: #fff;
    border: none;
    padding: 14px 30px;
    font-weight: 900;
    font-size: 18px;
    cursor: pointer;
}
.search-box button:hover { background: #f97316; }

/* ===== 响应式 ===== */
@media (max-width: 640px) {
    .post-grid { grid-template-columns: 1fr; }
    .nav-inner { flex-wrap: wrap; height: auto; padding: 12px 0; gap: 12px; }
    .forum-tabs { overflow-x: auto; flex-wrap: nowrap; gap: 0; }
    .tab { flex: 0 0 auto; padding: 10px 16px; font-size: 14px; }
    .btn-primary { padding: 6px 16px; font-size: 14px; }
    .auth-box { margin: 20px 16px; padding: 20px; }
    .post-form { margin: 20px 16px; padding: 20px; }
    .post-detail { margin: 20px 16px; padding: 20px; }
    .admin-container { margin: 16px; padding: 16px; }
    .admin-container h1 { margin: -16px -16px 20px -16px; }
    .admin-stats { grid-template-columns: 1fr 1fr; }
    .admin-table { font-size: 13px; }
    .admin-table th, .admin-table td { padding: 8px; }
}