/* ============================================================
   图床系统 - 样式
   ============================================================ */
* { 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: #f0f2f5;
  color: #1f2329;
  min-height: 100vh;
}

.wrap { max-width: 860px; margin: 0 auto; padding: 32px 16px; }

/* 卡片 */
.card {
  background: #fff;
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.auth-card { max-width: 420px; margin: 8vh auto 0; }

h1 { font-size: 24px; margin-bottom: 4px; }
.sub { color: #6b7280; font-size: 14px; margin-bottom: 20px; }

/* Tab */
.tabs { display: flex; gap: 8px; margin-bottom: 20px; border-bottom: 1px solid #eee; }
.tab {
  padding: 8px 18px; border: none; background: none; cursor: pointer;
  font-size: 15px; color: #6b7280; border-bottom: 2px solid transparent;
}
.tab.active { color: #1677ff; border-bottom-color: #1677ff; font-weight: 600; }

/* 表单 */
.form { display: flex; flex-direction: column; gap: 12px; }
.form input {
  padding: 11px 14px; border: 1px solid #d9d9d9; border-radius: 8px;
  font-size: 15px; outline: none; transition: border-color .2s;
}
.form input:focus { border-color: #1677ff; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 9px 16px; border: none; border-radius: 8px; cursor: pointer;
  font-size: 14px; text-decoration: none; transition: opacity .15s;
}
.btn:hover { opacity: 0.88; }
.btn-primary { background: #1677ff; color: #fff; font-size: 15px; padding: 11px; }
.btn-ghost { background: #f0f2f5; color: #333; }
.btn-danger { background: #ff4d4f; color: #fff; }
.btn-mini { padding: 5px 10px; font-size: 12px; border-radius: 6px; background: #f0f2f5; color: #333; }
.btn-danger.btn-mini { background: #fff1f0; color: #ff4d4f; }

/* 消息 */
.msg { font-size: 13px; color: #ff4d4f; min-height: 18px; margin-top: 4px; }
.hidden { display: none !important; }

/* 顶栏 */
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; flex-wrap: wrap; gap: 8px; }
.userbox { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #333; }

/* 上传区 */
.upload-zone {
  border: 2px dashed #d9d9d9; border-radius: 12px; padding: 36px 20px;
  text-align: center; cursor: pointer; transition: all .2s; background: #fafafa;
}
.upload-zone:hover, .upload-zone.dragging { border-color: #1677ff; background: #eef6ff; }
.up-title { font-size: 16px; color: #333; }
.up-sub { font-size: 13px; color: #999; margin-top: 6px; }

/* 上传结果 */
.result-list { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.result-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  background: #f6ffed; border: 1px solid #b7eb8f; border-radius: 8px; font-size: 13px;
}
.result-item .ok { color: #52c41a; font-weight: 600; white-space: nowrap; }
.result-item input {
  flex: 1; min-width: 0; border: none; background: transparent; font-size: 12px; color: #555; outline: none;
}

/* 图库 */
.section-title { font-size: 17px; margin: 24px 0 12px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.g-item {
  border: 1px solid #eee; border-radius: 10px; overflow: hidden; background: #fff;
  display: flex; flex-direction: column;
}
.g-item img { width: 100%; height: 140px; object-fit: cover; display: block; background: #f7f7f7; }
.g-info { padding: 8px 10px 4px; }
.g-name { font-size: 13px; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-size { font-size: 12px; color: #999; margin-top: 2px; }
.g-actions { display: flex; gap: 6px; padding: 0 10px 10px; }
.g-actions .btn-mini { flex: 1; }

.empty { color: #999; font-size: 14px; text-align: center; padding: 30px 0; }
