/* 管理页面 — 整站统一金色游戏风格
 * 与首页 style.css 配色体系保持一致
 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "微软雅黑", "PingFang SC", Arial, sans-serif;
    background: #f5f0e1;
    color: #3d2817;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.wrap {
    width: 92%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 20px;
}

/* ===== 顶部导航 ===== */
.admin-header {
    background: linear-gradient(180deg, #fffdf5 0%, #faf5e6 100%);
    border: 2px solid #daa520;
    border-radius: 10px;
    padding: 15px 25px;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(139,105,20,0.15), inset 0 1px 0 rgba(255,215,0,0.3);
    flex-wrap: wrap;
    gap: 10px;
}

.admin-header h1 {
    color: #8b0000;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: 1px 1px 2px rgba(218,165,32,0.3);
}

.admin-header .nav-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-header .nav-links a {
    color: #5c4033;
    text-decoration: none;
    padding: 7px 16px;
    border: 1px solid #d4b87a;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    background: #ffffff;
}

.admin-header .nav-links a:hover {
    background: #faf0d4;
    color: #8b0000;
    border-color: #daa520;
    box-shadow: 0 2px 6px rgba(218,165,32,0.2);
}

.admin-header .nav-links a.active {
    background: linear-gradient(180deg, #daa520 0%, #b8860b 100%);
    color: #fffdf5;
    border-color: #8b6914;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(139,105,20,0.3);
}

/* ===== 表单容器 ===== */
.form-container {
    background: linear-gradient(180deg, #fffdf5 0%, #faf5e6 100%);
    border: 2px solid #daa520;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(139,105,20,0.12), inset 0 1px 0 rgba(255,215,0,0.2);
}

.form-container h2 {
    color: #8b0000;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e8d5a0;
}

/* ===== 表单组 ===== */
.form-group {
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
}

.form-group > label {
    display: inline-block;
    width: 140px;
    min-width: 140px;
    color: #5c4033;
    font-weight: 600;
    font-size: 14px;
    padding-top: 10px;
    text-align: right;
    padding-right: 15px;
    flex-shrink: 0;
    line-height: 1.4;
}

.form-group > label .required {
    color: #c0392b;
    margin-left: 3px;
    font-weight: 700;
}

.form-group .form-control {
    flex: 1;
    max-width: 600px;
    min-width: 0;
}

/* 统一输入框尺寸：高度40px */
.form-group input[type="text"],
.form-group input[type="url"],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 9px 14px;
    min-height: 40px;
    background: #ffffff;
    border: 1px solid #d4b87a;
    border-radius: 6px;
    color: #3d2817;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #daa520;
    box-shadow: 0 0 0 3px rgba(218,165,32,0.15);
    background: #fffdf5;
}

.form-group textarea {
    min-height: 90px;
    resize: vertical;
    padding: 10px 14px;
    line-height: 1.6;
}

.form-group select {
    cursor: pointer;
    appearance: none;
    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='%23b8860b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

/* ===== 复选框组 ===== */
.form-group .checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
    padding-top: 8px;
}

.form-group .checkbox-group label {
    width: auto;
    min-width: auto;
    padding: 0;
    text-align: left;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
    color: #3d2817;
    font-size: 14px;
    gap: 0;
}

.form-group .checkbox-group label input[type="checkbox"] {
    margin-right: 7px;
    width: 18px;
    height: 18px;
    min-height: 18px;
    accent-color: #daa520;
    cursor: pointer;
    flex-shrink: 0;
}

/* ===== 单行复选框（开关类） ===== */
.check-row {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    padding: 9px 0;
    gap: 10px;
    width: 100%;
    font-weight: normal;
    text-align: left;
    color: #3d2817;
    font-size: 14px;
    line-height: 1.6;
}

.check-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    accent-color: #daa520;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
}

.check-row span {
    flex: 1;
    line-height: 1.6;
    color: #3d2817;
}

.check-row span b {
    color: #8b0000;
    font-weight: 700;
}

/* ===== 单选框组 ===== */
.form-group .radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
    padding-top: 8px;
}

.form-group .radio-group label {
    width: auto;
    min-width: auto;
    padding: 0;
    text-align: left;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
    color: #3d2817;
    font-size: 14px;
}

.form-group .radio-group label input[type="radio"] {
    margin-right: 7px;
    width: 18px;
    height: 18px;
    accent-color: #daa520;
    cursor: pointer;
    flex-shrink: 0;
}

/* ===== 按钮 ===== */
.btn-group {
    margin-top: 28px;
    padding-left: 155px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn {
    padding: 9px 24px;
    min-height: 40px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-family: inherit;
    box-sizing: border-box;
}

.btn-primary {
    background: linear-gradient(180deg, #daa520 0%, #b8860b 100%);
    color: #fffdf5;
    border-color: #8b6914;
    box-shadow: 0 2px 6px rgba(139,105,20,0.3), inset 0 1px 0 rgba(255,215,0,0.3);
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.btn-primary:hover {
    background: linear-gradient(180deg, #e8b830 0%, #c9971c 100%);
    border-color: #daa520;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(218,165,32,0.35), inset 0 1px 0 rgba(255,215,0,0.4);
}

.btn-secondary {
    background: #ffffff;
    color: #5c4033;
    border: 1px solid #d4b87a;
}

.btn-secondary:hover {
    background: #faf0d4;
    border-color: #daa520;
    color: #8b0000;
}

.btn-danger {
    background: linear-gradient(180deg, #e74c3c 0%, #c0392b 100%);
    color: #fff;
    border-color: #a93226;
    box-shadow: 0 2px 6px rgba(192,57,43,0.3);
}

.btn-danger:hover {
    background: linear-gradient(180deg, #ec5848 0%, #d04030 100%);
    border-color: #c0392b;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(192,57,43,0.35);
}

.btn-sm {
    padding: 5px 14px;
    min-height: 30px;
    font-size: 12px;
    border-radius: 4px;
}

/* ===== 管理列表表格 ===== */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: #fffdf5;
    border: 2px solid #daa520;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(139,105,20,0.1);
}

.admin-table thead th {
    background: linear-gradient(180deg, #faf0d4 0%, #f0e0b8 100%);
    color: #8b0000;
    padding: 12px 10px;
    font-size: 13px;
    font-weight: 700;
    border: 1px solid #e8d5a0;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.admin-table tbody tr {
    transition: background 0.2s;
}

.admin-table tbody tr:nth-child(odd) {
    background: #fffdf5;
}

.admin-table tbody tr:nth-child(even) {
    background: #faf5e6;
}

.admin-table tbody tr:hover {
    background: #faf0d4;
}

.admin-table td {
    padding: 10px;
    border: 1px solid #ede0c0;
    font-size: 13px;
    color: #3d2817;
    vertical-align: middle;
}

.admin-table .game-name {
    font-weight: 700;
    color: #8b0000;
}

.admin-table .action-btns {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* ===== 标签 ===== */
.tag {
    display: inline-block;
    padding: 3px 8px;
    font-size: 11px;
    color: #fff;
    border-radius: 4px;
    margin-right: 3px;
    letter-spacing: 0.3px;
    font-weight: 600;
}

.tag-hot  { background: linear-gradient(180deg, #e74c3c, #c0392b); }
.tag-rec  { background: linear-gradient(180deg, #27ae60, #1e8449); }
.tag-new  { background: linear-gradient(180deg, #daa520, #b8860b); }
.tag-wait { background: linear-gradient(180deg, #f39c12, #d68910); }
.tag-pass { background: linear-gradient(180deg, #27ae60, #1e8449); }
.tag-fail { background: linear-gradient(180deg, #c0392b, #922b21); }

/* ===== 后台版本/经验 突出显示 ===== */
.admin-version {
    display: block;
    width: 100%;
    box-sizing: border-box;
    color: #b8860b;
    font-weight: 700;
    background: linear-gradient(135deg, #fdf6e3 0%, #faf0d4 100%);
    border-radius: 6px;
    padding: 8px 12px;
    text-align: center;
    letter-spacing: 0.3px;
    border: 1px solid #e8d5a0;
    line-height: 1.25;
}

.admin-exp {
    display: block;
    width: 100%;
    box-sizing: border-box;
    color: #8b0000;
    font-weight: 700;
    background: linear-gradient(135deg, #fdf0e8 0%, #fae5d8 100%);
    border-radius: 6px;
    padding: 8px 12px;
    text-align: center;
    letter-spacing: 0.3px;
    border: 1px solid #e8c8b0;
    line-height: 1.25;
}

/* ===== 审核状态提示条 ===== */
.review-notice {
    background: #fdf6e3;
    border: 1px solid #daa520;
    border-radius: 8px;
    padding: 14px 20px;
    margin-bottom: 25px;
    color: #5c4033;
    font-size: 14px;
    line-height: 1.6;
    display: flex;
    align-items: center;
    gap: 10px;
}

.review-notice.success {
    background: #e9f8ee;
    border-color: #27ae60;
    color: #1a7a3a;
}

.review-notice .icon {
    font-size: 22px;
    flex-shrink: 0;
}

/* ===== Tab切换 ===== */
.admin-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    border-bottom: 2px solid #daa520;
    flex-wrap: wrap;
}

.admin-tabs .tab {
    padding: 10px 22px;
    background: #faf5e6;
    color: #5c4033;
    border: 1px solid #d4b87a;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    position: relative;
    top: 2px;
    user-select: none;
}

.admin-tabs .tab:hover {
    background: #faf0d4;
    color: #8b0000;
}

.admin-tabs .tab.active {
    background: #fffdf5;
    color: #8b0000;
    border-color: #daa520;
    border-top: 3px solid #daa520;
    top: 1px;
    font-weight: 700;
}

.admin-tabs .tab .badge {
    display: inline-block;
    padding: 1px 9px;
    background: #c0392b;
    color: #fff;
    border-radius: 10px;
    font-size: 11px;
    margin-left: 6px;
    font-weight: 600;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* ===== 登录状态 ===== */
.user-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #5c4033;
    font-size: 13px;
    padding: 6px 14px;
    background: #faf0d4;
    border: 1px solid #d4b87a;
    border-radius: 6px;
}

.user-bar .user-name {
    font-weight: 700;
    color: #8b0000;
}

.user-bar .btn-logout {
    padding: 4px 12px;
    background: #ffffff;
    color: #c0392b;
    border: 1px solid #e8b0a8;
    border-radius: 4px;
    text-decoration: none;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
}

.user-bar .btn-logout:hover {
    background: #c0392b;
    color: #ffffff;
    border-color: #c0392b;
}

/* ===== 管理员头部 ===== */
.admin-header .user-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* ===== 提交人信息 ===== */
.submitter-info {
    font-size: 11px;
    color: #8b6914;
    line-height: 1.4;
    margin-top: 4px;
}

/* ===== 设置区块 ===== */
.settings-section {
    margin-bottom: 25px;
    padding: 22px;
    background: #fffdf5;
    border: 1px solid #e8d5a0;
    border-radius: 8px;
}

.settings-section h3 {
    color: #8b0000;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e8d5a0;
}

/* ===== 设置面板子Tab ===== */
.admin-subtabs {
    display: flex;
    gap: 4px;
    margin-bottom: 0;
    border-bottom: 2px solid #daa520;
    flex-wrap: wrap;
}

.admin-subtabs .subtab {
    padding: 9px 20px;
    background: #faf5e6;
    color: #5c4033;
    border: 1px solid #d4b87a;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
    position: relative;
    top: 2px;
    user-select: none;
}

.admin-subtabs .subtab:hover {
    background: #faf0d4;
    color: #8b0000;
}

.admin-subtabs .subtab.active {
    background: #ffffff;
    color: #8b0000;
    border-color: #daa520;
    border-top: 2px solid #daa520;
    top: 1px;
    font-weight: 700;
}

.subtab-panel {
    display: none;
    background: #ffffff;
    padding: 22px;
    border: 1px solid #daa520;
    border-top: none;
    border-radius: 0 0 8px 8px;
}

.subtab-panel.active {
    display: block;
}

.settings-section .hint-text {
    color: #8b6914;
    font-size: 12px;
    margin-left: 10px;
    font-weight: normal;
}

/* ===== 提示框 ===== */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 14px 28px;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    z-index: 9999;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    animation: toastIn 0.3s ease-out;
}

.toast-success { background: linear-gradient(180deg, #27ae60, #1e8449); border: 1px solid #196f3d; }
.toast-error   { background: linear-gradient(180deg, #e74c3c, #c0392b); border: 1px solid #a93226; }
.toast-info    { background: linear-gradient(180deg, #daa520, #b8860b); border: 1px solid #8b6914; }

@keyframes toastIn {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
    to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* ===== 统计卡片 ===== */
.stats-bar {
    display: flex;
    gap: 16px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.stat-card {
    flex: 1;
    min-width: 160px;
    background: linear-gradient(180deg, #fffdf5 0%, #faf5e6 100%);
    border: 2px solid #daa520;
    border-radius: 10px;
    padding: 22px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(139,105,20,0.12), inset 0 1px 0 rgba(255,215,0,0.3);
    transition: transform 0.2s;
}

.stat-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(139,105,20,0.2); }

.stat-card .stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #8b0000;
    text-shadow: 1px 1px 2px rgba(218,165,32,0.2);
}

.stat-card .stat-label {
    font-size: 13px;
    color: #8b6914;
    margin-top: 6px;
    font-weight: 500;
}

/* ===== 工具栏 ===== */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.toolbar .search-box {
    display: flex;
    gap: 10px;
}

.toolbar .search-box input {
    padding: 8px 14px;
    min-height: 36px;
    background: #ffffff;
    border: 1px solid #d4b87a;
    border-radius: 6px;
    color: #3d2817;
    font-size: 13px;
    width: 260px;
    transition: all 0.2s;
    font-family: inherit;
}

.toolbar .search-box input:focus {
    outline: none;
    border-color: #daa520;
    box-shadow: 0 0 0 3px rgba(218,165,32,0.12);
}

/* ===== 分页 ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.pagination button {
    padding: 7px 14px;
    min-height: 34px;
    background: #ffffff;
    border: 1px solid #d4b87a;
    color: #5c4033;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    font-family: inherit;
}

.pagination button:hover:not(:disabled) {
    background: #faf0d4;
    color: #8b0000;
    border-color: #daa520;
}

.pagination button.active {
    background: linear-gradient(180deg, #daa520, #b8860b);
    color: #fffdf5;
    border-color: #8b6914;
    font-weight: 700;
}

.pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ===== 模态框 ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(61, 40, 23, 0.5);
    backdrop-filter: blur(2px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9998;
}

.modal-box {
    background: linear-gradient(180deg, #fffdf5 0%, #faf5e6 100%);
    border: 2px solid #daa520;
    border-radius: 12px;
    padding: 28px;
    max-width: 460px;
    width: 92%;
    text-align: center;
    box-shadow: 0 18px 48px rgba(61,40,23,0.3), inset 0 1px 0 rgba(255,215,0,0.3);
}

.modal-box h3 {
    color: #8b0000;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 14px;
}

.modal-box p {
    color: #5c4033;
    margin-bottom: 22px;
    font-size: 14px;
    line-height: 1.7;
}

.modal-box .modal-btns {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* ===== 横幅编辑行 ===== */
.banner-row {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 12px;
    background: #faf5e6;
    border: 1px solid #e8d5a0;
    border-radius: 6px;
    margin-bottom: 10px;
}

.banner-row input[type="text"] {
    flex: 1;
    padding: 8px 12px;
    min-height: 36px;
    border: 1px solid #d4b87a;
    border-radius: 4px;
    font-size: 13px;
    color: #3d2817;
    background: #ffffff;
    font-family: inherit;
}

.banner-row input[type="text"]:focus {
    outline: none;
    border-color: #daa520;
    box-shadow: 0 0 0 3px rgba(218,165,32,0.12);
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .form-group {
        flex-direction: column;
    }
    .form-group > label {
        width: 100%;
        text-align: left;
        padding-right: 0;
        padding-top: 0;
        margin-bottom: 6px;
    }
    .form-group .form-control {
        max-width: 100%;
    }
    .btn-group {
        padding-left: 0;
    }
    .wrap {
        width: 96%;
        padding: 12px;
    }
    .form-container {
        padding: 20px;
    }
}
