/* ===== 用户反馈系统 - 响应式样式 ===== */

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Hiragino Sans GB", "Microsoft YaHei", Roboto, sans-serif;
    color: #333;
    background: linear-gradient(135deg, #e0f2fe 0%, #f0fdf4 100%);
    -webkit-font-smoothing: antialiased;
}

.page {
    min-height: 100vh;
    padding: 40px 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

/* 卡片容器 */
.card {
    width: 100%;
    max-width: 560px;
    background: #fff;
    border-radius: 14px;
    padding: 32px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

h1 {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 600;
    color: #1f2937;
}

.tip {
    margin: 0 0 24px;
    color: #6b7280;
    font-size: 14px;
}

/* ---- 表单项 ---- */
.form-item {
    margin-bottom: 20px;
}

.form-item > label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.form-item textarea,
.form-item input[type="text"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    color: #111827;
    background: #fafafa;
    resize: vertical;
    transition: border-color .2s, background .2s;
}

.form-item textarea:focus,
.form-item input[type="text"]:focus {
    outline: none;
    border-color: #3b82f6;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .15);
}

.counter {
    margin-top: 4px;
    text-align: right;
    font-size: 12px;
    color: #9ca3af;
}

/* ---- 上传区 ---- */
.upload-area {
    width: 100%;
    height: 110px;
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color .2s, background .2s;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #3b82f6;
    background: #eff6ff;
}

.upload-hint {
    text-align: center;
    color: #94a3b8;
}

.plus {
    font-size: 32px;
    line-height: 1;
    margin-bottom: 4px;
    color: #3b82f6;
}

.hint-text {
    font-size: 13px;
}

/* ---- 预览网格 ---- */
.preview-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 12px;
}

.preview-item {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
    background: #f1f5f9;
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.preview-item .remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    background: rgba(239, 68, 68, .92);
    color: #fff;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.img-error {
    margin-top: 8px;
    font-size: 13px;
    color: #ef4444;
    min-height: 18px;
}

/* ---- 按钮 ---- */
.btn-primary {
    width: 100%;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: transform .1s, box-shadow .2s;
}

.btn-primary:hover:not(:disabled) {
    box-shadow: 0 4px 12px rgba(37, 99, 235, .35);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(1px);
}

.btn-primary:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* ---- Toast ---- */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 20px;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    box-shadow: 0 4px 16px rgba(0,0,0,.15);
    opacity: 1;
    transition: opacity .3s;
    z-index: 100;
}
.toast.hidden { opacity: 0; pointer-events: none; }
.toast.success { background: #10b981; }
.toast.error   { background: #ef4444; }

/* ===== 管理员页通用 ===== */
.admin-page {
    min-height: 100vh;
    padding: 20px;
    background: #f1f5f9;
}

.admin-wrap {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,.05);
}

.admin-wrap h2 {
    margin: 0 0 16px;
    font-size: 18px;
    color: #1f2937;
}

/* 密码登录 */
.pwd-card {
    max-width: 360px;
    margin: 80px auto;
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0,0,0,.08);
    text-align: center;
}
.pwd-card h2 { margin: 0 0 20px; font-size: 18px; }
.pwd-card input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    margin-bottom: 12px;
}
.pwd-card button {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 8px;
    background: #3b82f6;
    color: #fff;
    font-size: 15px;
    cursor: pointer;
}
.pwd-card .err { color: #ef4444; font-size: 13px; margin-top: 8px; min-height: 18px; }

/* 列表 */
.fb-list {
    border-top: 1px solid #e5e7eb;
}
.fb-item {
    padding: 16px 0;
    border-bottom: 1px solid #e5e7eb;
}
.fb-item .head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.fb-item .user { font-weight: 500; color: #111827; }
.fb-item .time  { font-size: 12px; color: #9ca3af; }
.fb-item .content { color: #4b5563; font-size: 14px; line-height: 1.5; margin-bottom: 8px;
                     display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.fb-item .thumb { width: 48px; height: 48px; border-radius: 6px; object-fit: cover; }
.fb-item .status {
    display: inline-block; padding: 2px 8px; border-radius: 10px;
    font-size: 12px; font-weight: 500;
}
.status-pending { background: #fef3c7; color: #b45309; }
.status-done    { background: #d1fae5; color: #065f46; }
.fb-item .actions { margin-top: 10px; }
.fb-item .actions a, .fb-item .actions button {
    font-size: 13px; color: #3b82f6; background: none; border: none; cursor: pointer; margin-right: 12px;
}
.fb-item .actions button { color: #059669; }

/* 详情 */
.detail-user { font-weight: 600; color: #111827; }
.detail-meta { color: #9ca3af; font-size: 13px; margin-bottom: 16px; }
.detail-content {
    background: #f9fafb; border-radius: 8px; padding: 14px 16px;
    font-size: 14px; line-height: 1.7; white-space: pre-wrap; word-break: break-word;
    margin-bottom: 16px;
}
.detail-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.detail-images a img { width: 100%; border-radius: 8px; display: block; }

.back-btn {
    display: inline-block; padding: 6px 14px; margin-bottom: 16px;
    background: #f1f5f9; border-radius: 6px; color: #475569; text-decoration: none; font-size: 14px;
}

/* 分页 */
.pager { text-align: center; margin-top: 16px; color: #6b7280; font-size: 13px; }
.pager a, .pager span { margin: 0 4px; padding: 4px 10px; border-radius: 4px; }
.pager a { color: #3b82f6; text-decoration: none; }
.pager .current { background: #3b82f6; color: #fff; }

/* ===== 手机端 ===== */
@media (max-width: 480px) {
    .page { padding: 16px 12px; }
    .card { padding: 20px 16px; border-radius: 12px; }
    h1 { font-size: 18px; }
    .preview-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .admin-wrap { padding: 16px; border-radius: 10px; }
    .detail-images { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
}
