/* Unified application design system. Business components and API contracts stay unchanged. */
:root {
  --primary: #5b5cf0;
  --primary-strong: #4338ca;
  --primary-soft: rgba(91, 92, 240, .11);
  --accent: #0f9f8f;
  --success: #079669;
  --warning: #d97706;
  --danger: #e5484d;
  --bg: #f4f6fa;
  --bg-elevated: #eef1f7;
  --surface: rgba(255, 255, 255, .92);
  --surface-solid: #ffffff;
  --surface-muted: #f8f9fc;
  --text: #171a2b;
  --text-secondary: #667085;
  --text-tertiary: #98a2b3;
  --border: rgba(23, 26, 43, .09);
  --border-strong: rgba(23, 26, 43, .15);
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-sm: 0 8px 24px rgba(16, 24, 40, .06);
  --shadow: 0 20px 55px rgba(16, 24, 40, .09);
  --shadow-lg: 0 32px 90px rgba(16, 24, 40, .15);
  --radius-xs: 10px;
  --radius-sm: 14px;
  --radius: 20px;
  --radius-lg: 28px;
  --header-h: 68px;
  --sidebar-w: 236px;
  --content-max: 1480px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

[data-theme="dark"] {
  --bg: #090c14;
  --bg-elevated: #0f1420;
  --surface: rgba(18, 24, 37, .92);
  --surface-solid: #121825;
  --surface-muted: #171e2d;
  --text: #f4f6fb;
  --text-secondary: #a5aec0;
  --text-tertiary: #727d92;
  --border: rgba(255, 255, 255, .09);
  --border-strong: rgba(255, 255, 255, .16);
  --primary-soft: rgba(129, 124, 255, .16);
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .22);
  --shadow-sm: 0 10px 30px rgba(0, 0, 0, .22);
  --shadow: 0 24px 65px rgba(0, 0, 0, .30);
  --shadow-lg: 0 36px 100px rgba(0, 0, 0, .42);
}

* { box-sizing: border-box; }
html, body, #app { width: 100%; max-width: 100%; }
html { overflow-x: hidden; scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 7% -8%, rgba(91, 92, 240, .13), transparent 30rem),
    radial-gradient(circle at 100% 18%, rgba(15, 159, 143, .08), transparent 27rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .28;
  background-image: linear-gradient(rgba(91, 92, 240, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(91, 92, 240, .035) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(to bottom, #000, transparent 62%);
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button, a, .sidebar-item, .feed-card { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(91, 92, 240, .25);
  outline-offset: 2px;
}
::selection { color: #fff; background: var(--primary); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { border: 3px solid transparent; border-radius: 99px; background: var(--border-strong); background-clip: padding-box; }

/* Application shell */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(22px) saturate(145%);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: calc(var(--content-max) + 80px);
  height: 100%;
  margin: auto;
  padding: 0 32px;
  min-width: 0;
}
.logo {
  display: inline-flex;
  align-items: center;
  min-width: 64px;
  color: var(--text) !important;
  background: none !important;
  -webkit-text-fill-color: currentColor !important;
  font-size: 22px;
  font-weight: 850;
  letter-spacing: -.06em;
}
.header-right { display: flex; align-items: center; gap: 10px; }
.header-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  transition: transform .2s var(--ease), color .2s, border-color .2s, background .2s;
}
.header-btn:hover { color: var(--primary); border-color: rgba(91, 92, 240, .25); transform: translateY(-2px); }
.user-menu {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 4px 10px 4px 4px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.user-menu:hover { border-color: var(--border); background: var(--surface); }
.username { max-width: 120px; overflow: hidden; color: var(--text); font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 13px;
  color: #fff !important;
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  box-shadow: 0 10px 24px rgba(91, 92, 240, .24);
  font-size: 13px;
  font-weight: 750;
  transition: transform .2s var(--ease), box-shadow .2s;
}
.login-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(91, 92, 240, .32); }

.app-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  align-items: start;
  gap: 28px;
  width: 100%;
  max-width: calc(var(--content-max) + 80px);
  min-height: calc(100vh - var(--header-h));
  margin: auto;
  padding: 28px 32px 64px;
  min-width: 0;
}
.app-layout.guest-layout { grid-template-columns: minmax(0, 1fr); }
.app-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 28px);
  width: auto;
  height: max-content;
  padding: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px);
}
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 48px;
  margin: 3px 0;
  padding: 0 14px;
  color: var(--text-secondary);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 680;
  transition: color .2s, background .2s, transform .2s var(--ease);
}
.sidebar-item i { width: 22px; font-size: 19px; text-align: center; }
.sidebar-item:hover { color: var(--primary); background: var(--primary-soft); transform: translateX(2px); }
.sidebar-item.active { color: #fff; background: linear-gradient(135deg, var(--primary-strong), #6d3bd1); box-shadow: 0 11px 26px rgba(67, 56, 202, .24); }
.app-content { min-width: 0; margin: 0 !important; padding: 0 !important; }
.app-footer { display: none; }
.app-loading { min-height: 100vh; display: grid; place-content: center; color: var(--text-secondary); }

/* Shared page structure */
.home-page, .discover-page, .profile-page, .settings-page, .publish-page,
.notifications-page, .messages-page, .points-page, .admin-page, .next-page,
.work-detail { width: 100%; max-width: var(--content-max); min-width: 0; margin: 0 auto; }
.page-header, .admin-header { position: relative; margin: 2px 0 24px; }
.page-header h1, .admin-header h1, .settings-title, .publish-title {
  margin: 0 0 7px;
  color: var(--text);
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.12;
  letter-spacing: -.045em;
}
.page-header p, .admin-header p { margin: 0; color: var(--text-secondary); line-height: 1.7; }
.section-title { margin: 0 0 18px; font-size: 18px; letter-spacing: -.02em; }
.empty-state { padding: 72px 20px; color: var(--text-secondary); text-align: center; }

/* Element UI normalization */
.el-card, .auth-card, .publish-form, .settings-page > .el-tabs, .profile-content,
.work-info, .comments-section, .message-layout, .notification-list, .next-card,
.admin-page > .el-tabs, .points-task-section, .points-history-section {
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  background: var(--surface) !important;
  box-shadow: var(--shadow-sm) !important;
  backdrop-filter: blur(18px);
}
.el-card__header, .el-dialog__header, .el-dialog__footer { border-color: var(--border) !important; }
.el-input__inner, .el-textarea__inner {
  color: var(--text) !important;
  border-color: var(--border-strong) !important;
  border-radius: 12px !important;
  background: var(--surface-solid) !important;
  transition: border-color .2s, box-shadow .2s !important;
}
.el-input__inner { min-height: 40px; }
.el-input__inner:focus, .el-textarea__inner:focus { border-color: var(--primary) !important; box-shadow: 0 0 0 4px rgba(91, 92, 240, .11) !important; }
.el-input__count { color: var(--text-tertiary) !important; background: transparent !important; }
.el-button { border-radius: 11px !important; font-weight: 650 !important; transition: transform .18s var(--ease), box-shadow .18s, opacity .18s !important; }
.el-button:not(.is-disabled):hover { transform: translateY(-1px); }
.el-button--primary { border-color: transparent !important; background: linear-gradient(135deg, var(--primary), #7c3aed) !important; box-shadow: 0 8px 20px rgba(91, 92, 240, .21); }
.el-button--default { color: var(--text) !important; border-color: var(--border-strong) !important; background: var(--surface-solid) !important; }
.el-dialog { overflow: hidden; border: 1px solid var(--border); border-radius: 22px !important; background: var(--surface-solid) !important; box-shadow: var(--shadow-lg) !important; }
.el-dialog__header { padding: 22px 25px 17px !important; }
.el-dialog__body { padding: 23px 25px !important; color: var(--text-secondary) !important; }
.el-dialog__footer { padding: 16px 25px 22px !important; }
.el-dialog__title, .el-form-item__label, .el-tabs__item, .el-table, .el-table th, .el-table tr, .el-descriptions__body { color: var(--text) !important; }
.el-form-item__label { font-weight: 620; }
.el-table, .el-table th, .el-table tr, .el-table td { background: transparent !important; }
.el-table::before, .el-table__fixed::before, .el-table__fixed-right::before { background: var(--border) !important; }
.el-table td, .el-table th.is-leaf { border-color: var(--border) !important; }
.el-table th { height: 48px; color: var(--text-secondary) !important; background: var(--surface-muted) !important; font-size: 12px; font-weight: 760; }
.el-table--enable-row-hover .el-table__body tr:hover > td { background: var(--primary-soft) !important; }
.el-tabs__nav-wrap::after { height: 1px !important; background: var(--border) !important; }
.el-tabs__item { height: 46px; color: var(--text-secondary) !important; font-weight: 650; }
.el-tabs__item.is-active { color: var(--primary) !important; }
.el-tabs__active-bar { height: 3px !important; border-radius: 99px; background: var(--primary) !important; }
.el-dropdown-menu, .el-select-dropdown, .el-picker-panel {
  border-color: var(--border) !important;
  border-radius: 14px !important;
  background: var(--surface-solid) !important;
  box-shadow: var(--shadow) !important;
}
.el-dropdown-menu__item, .el-select-dropdown__item { color: var(--text) !important; }
.el-dropdown-menu__item:hover, .el-select-dropdown__item.hover { color: var(--primary) !important; background: var(--primary-soft) !important; }
.el-alert { border-radius: 13px !important; }
.el-tag { border-radius: 8px !important; font-weight: 650; }
.el-empty__description p { color: var(--text-secondary) !important; }
[data-theme="dark"] .el-loading-mask { background: rgba(9, 12, 20, .78) !important; }

/* Authentication */
.auth-page { min-height: calc(100vh - 160px); display: grid; place-items: center; padding: 38px 16px; }
.auth-card { position: relative; width: min(450px, 100%); padding: 40px; overflow: hidden; }
.auth-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, var(--primary), #8b5cf6, var(--accent)); }
.auth-title { margin: 0; color: var(--text); font-size: 30px; line-height: 1.2; text-align: center; letter-spacing: -.045em; }
.auth-subtitle { margin: 9px 0 28px; color: var(--text-secondary); text-align: center; }
.auth-links { display: flex; justify-content: center; margin-top: 16px; color: var(--primary); font-size: 13px; font-weight: 650; }
.auth-card .el-button { width: 100%; min-height: 44px; }

/* Home and content cards */
.home-announcements { display: grid; gap: 10px; margin-bottom: 18px; }
.home-announcement { display: grid; grid-template-columns: 36px minmax(0, 1fr) 36px; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid rgba(91, 92, 240, .16); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-xs); }
.home-announcement > i { display: grid; place-items: center; width: 36px; height: 36px; color: var(--primary); border-radius: 11px; background: var(--primary-soft); }
.home-announcement strong { font-size: 13px; }
.home-announcement p { margin: 3px 0 0; color: var(--text-secondary); font-size: 12px; line-height: 1.5; }
.home-announcement button { width: 34px; height: 34px; color: var(--text-tertiary); border: 0; border-radius: 10px; background: transparent; cursor: pointer; }
.home-announcement button:hover { color: var(--danger); background: rgba(229, 72, 77, .08); }
.welcome-card {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 370px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 54px clamp(24px, 7vw, 88px);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, var(--surface-solid), color-mix(in srgb, var(--surface-solid) 78%, #eeecff));
  box-shadow: var(--shadow);
  text-align: center;
}
.welcome-card::before, .welcome-card::after { content: ""; position: absolute; z-index: -1; width: 330px; height: 330px; border-radius: 50%; filter: blur(2px); }
.welcome-card::before { top: -190px; left: -90px; background: radial-gradient(circle, rgba(91, 92, 240, .25), transparent 68%); }
.welcome-card::after { right: -90px; bottom: -210px; background: radial-gradient(circle, rgba(15, 159, 143, .18), transparent 68%); }
.welcome-card h3 { width: 100%; max-width: 760px; margin: 0 0 13px; overflow-wrap: anywhere; font-size: clamp(31px, 5vw, 54px); line-height: 1.08; letter-spacing: -.06em; }
.welcome-card > p { max-width: 610px; margin: 0 0 21px; color: var(--text-secondary); font-size: 15px; line-height: 1.75; }
.hero-eyebrow, .points-eyebrow, .admin-eyebrow, .eyebrow, .card-kicker { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 16px; color: var(--primary); font-size: 10px; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
.hero-pills { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-bottom: 25px; }
.hero-pills span { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 11px; color: var(--text-secondary); border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-size: 11px; font-weight: 650; }
.welcome-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 21px; color: #fff; border-radius: 14px; background: linear-gradient(135deg, var(--primary), #7c3aed); box-shadow: 0 14px 30px rgba(91, 92, 240, .27); font-size: 13px; font-weight: 750; transition: transform .2s var(--ease), box-shadow .2s; }
.welcome-btn:hover { transform: translateY(-2px); box-shadow: 0 18px 36px rgba(91, 92, 240, .34); }
.feed-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.feed-card { min-width: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-xs); cursor: pointer; transition: transform .25s var(--ease), border-color .25s, box-shadow .25s; }
.feed-card:hover { border-color: rgba(91, 92, 240, .23); transform: translateY(-5px); box-shadow: var(--shadow); }
.feed-cover { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-muted); }
.feed-cover img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .45s var(--ease); }
.feed-card:hover .feed-cover img { transform: scale(1.045); }
.feed-badge, .feed-price { position: absolute; top: 12px; display: inline-flex; align-items: center; min-height: 27px; padding: 0 9px; color: #fff; border-radius: 9px; background: rgba(17, 24, 39, .74); backdrop-filter: blur(9px); font-size: 11px; font-weight: 750; }
.feed-badge { left: 12px; }
.feed-price { right: 12px; }
.feed-body { padding: 15px 16px 16px; }
.feed-title { min-height: 42px; margin: 0 0 13px; overflow: hidden; font-size: 14px; line-height: 1.5; letter-spacing: -.01em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.feed-meta, .feed-author, .feed-stats { display: flex; align-items: center; }
.feed-meta { justify-content: space-between; gap: 10px; color: var(--text-secondary); font-size: 11px; }
.feed-author { min-width: 0; gap: 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-author-avatar { flex: 0 0 auto; width: 25px; height: 25px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: var(--surface-muted); }
.feed-author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.feed-stats { flex: 0 0 auto; gap: 4px; }
.load-more { display: block; min-width: 150px; min-height: 43px; margin: 28px auto 0; color: var(--primary); border: 1px solid rgba(91, 92, 240, .23); border-radius: 13px; background: var(--surface); cursor: pointer; font-weight: 700; }

/* Discover, profile and forms */
.discover-search { margin-bottom: 22px; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.discover-search .el-input__inner { min-height: 48px; padding-left: 42px; font-size: 15px; }
.discover-home, .discover-results { display: grid; gap: 22px; }
.section { padding: 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.hot-tag { display: inline-flex; align-items: center; justify-content: space-between; gap: 14px; min-width: 130px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface-solid); cursor: pointer; transition: border-color .2s, transform .2s; }
.hot-tag:hover { border-color: rgba(91, 92, 240, .25); transform: translateY(-2px); }
.hot-tag-count { color: var(--text-tertiary); font-size: 11px; }
.user-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.user-card { display: flex; align-items: center; gap: 13px; padding: 15px; border: 1px solid var(--border); border-radius: 15px; background: var(--surface-solid); cursor: pointer; transition: transform .2s, border-color .2s; }
.user-card:hover { border-color: rgba(91, 92, 240, .25); transform: translateY(-2px); }
.user-card-info { min-width: 0; }
.user-card-name, .user-card-id, .user-card-bio { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-card-name { font-size: 13px; font-weight: 750; }
.user-card-id, .user-card-bio { margin-top: 3px; color: var(--text-secondary); font-size: 11px; }
.profile-header { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
.profile-banner { min-height: 220px; background-color: var(--bg-elevated); background-size: cover; background-position: center; }
.profile-info { position: relative; padding: 0 28px 26px; }
.profile-avatar-wrap { margin-top: -54px; }
.profile-avatar-wrap .el-avatar { border: 5px solid var(--surface-solid); box-shadow: var(--shadow-sm); }
.profile-name { margin: 13px 0 3px; font-size: 25px; letter-spacing: -.04em; }
.profile-username, .profile-bio { color: var(--text-secondary); }
.profile-bio { max-width: 680px; margin-top: 13px; line-height: 1.7; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.profile-stats { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 20px; }
.stat-item { display: flex; flex-direction: column; gap: 2px; }
.stat-num { font-size: 18px; font-weight: 800; }
.stat-label { color: var(--text-secondary); font-size: 11px; }
.profile-content { margin-top: 20px; padding: 18px 22px 24px; }
.publish-form, .settings-page > .el-tabs { margin-top: 18px; padding: 25px; }
.publish-page, .settings-page { max-width: 960px; }
.tag-input-wrap { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.invite-section, .verification-panel { max-width: 720px; min-height: 260px; padding: 8px 2px; }
.invite-hint { margin: 0 0 15px; color: var(--text-secondary); }
.invite-code-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; margin-bottom: 9px; padding: 13px 14px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface-solid); }
.invite-code-text { overflow: hidden; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-weight: 750; text-overflow: ellipsis; }
.invite-status { color: var(--text-secondary); font-size: 11px; }
.copy-btn { min-height: 32px; padding: 0 10px; color: var(--primary); border: 0; border-radius: 9px; background: var(--primary-soft); cursor: pointer; font-weight: 700; }
.verification-status-card { margin: 16px 0; padding: 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-solid); }
.verification-status-card p { margin: 9px 0 0; color: var(--text-secondary); line-height: 1.6; }
.profile-media-editor { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 22px; margin-bottom: 20px; }
.profile-media-editor label { display: block; margin-bottom: 9px; color: var(--text-secondary); font-size: 12px; font-weight: 650; }
.profile-edit-avatar { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.profile-edit-background { min-height: 110px; display: grid; place-items: center; margin-bottom: 10px; color: var(--text-secondary); border: 1px dashed var(--border-strong); border-radius: 14px; background: var(--surface-muted); background-size: cover; background-position: center; }
.crop-stage { display: grid; place-items: center; overflow: hidden; border-radius: 16px; background: #10131d; }
.crop-stage canvas { display: block; width: min(100%, 430px); aspect-ratio: 1; object-fit: contain; }
.crop-stage-wide canvas { width: 100%; aspect-ratio: 3 / 1; }
.crop-controls { display: grid; grid-template-columns: 52px 1fr; align-items: center; gap: 10px; margin-top: 17px; color: var(--text-secondary); font-size: 11px; }

/* Work detail and comments */
.work-detail { max-width: 1040px; }
.media-viewer { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0; background: #080a0f; box-shadow: var(--shadow); }
.media-viewer img { width: 100%; max-height: 76vh; display: block; object-fit: contain; }
.work-info { padding: 24px 26px; border-radius: 0 0 var(--radius) var(--radius) !important; }
.work-author { display: flex; align-items: center; gap: 11px; cursor: pointer; }
.work-author-text { display: flex; flex-direction: column; gap: 3px; }
.work-author-name { font-size: 13px; font-weight: 750; }
.work-author-time { color: var(--text-tertiary); font-size: 11px; }
.work-title-text { margin: 22px 0 10px; font-size: clamp(24px, 4vw, 38px); line-height: 1.18; letter-spacing: -.045em; }
.work-desc { margin: 0; color: var(--text-secondary); line-height: 1.8; white-space: pre-wrap; }
.work-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 17px; }
.work-tag { padding: 6px 9px; color: var(--primary); border-radius: 9px; background: var(--primary-soft); font-size: 11px; cursor: pointer; }
.action-bar { display: flex; align-items: center; gap: 8px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.action-item { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 13px; color: var(--text-secondary); border: 1px solid var(--border); border-radius: 11px; background: var(--surface-solid); cursor: pointer; }
.action-item:hover, .action-item.liked, .action-item.favorited { color: var(--primary); border-color: rgba(91, 92, 240, .22); background: var(--primary-soft); }
.comments-section { margin-top: 20px; padding: 24px 26px; }
.comments-title { margin: 0 0 18px; font-size: 18px; }
.comment-input-wrap { margin-bottom: 24px; padding: 13px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-muted); }
.comment-input { width: 100%; min-height: 40px; padding: 0 13px; color: var(--text); border: 1px solid var(--border); border-radius: 11px; background: var(--surface-solid); }
.comment-send { flex: 0 0 auto; min-width: 72px; color: #fff; border: 0; border-radius: 11px; background: var(--primary); cursor: pointer; font-weight: 700; }
.comment-send:disabled { opacity: .45; cursor: not-allowed; }
.comment-item { display: flex; align-items: flex-start; gap: 11px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.comment-body { min-width: 0; flex: 1; }
.comment-user { font-size: 12px; font-weight: 750; }
.comment-text { margin-top: 5px; line-height: 1.7; overflow-wrap: anywhere; }
.comment-meta { display: flex; gap: 13px; margin-top: 7px; color: var(--text-tertiary); font-size: 11px; }
.comment-reply-btn { color: var(--primary); cursor: pointer; }
.comment-replies { margin-top: 11px; padding-left: 14px; border-left: 2px solid var(--primary-soft); }
.reply-indicator { margin-bottom: 8px; color: var(--text-secondary); font-size: 11px; }
.lock-overlay { min-height: 430px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.lock-overlay-content { text-align: center; }

/* Notifications and messages */
.notifications-page { max-width: 900px; }
.notification-list { overflow: hidden; }
.notification-item { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 13px; padding: 16px 18px; border-bottom: 1px solid var(--border); transition: background .2s; }
.notification-item:hover { background: var(--primary-soft); }
.notif-icon { display: grid; place-items: center; width: 42px; height: 42px; color: var(--primary); border-radius: 13px; background: var(--primary-soft); }
.notif-body { min-width: 0; }
.notif-text { line-height: 1.55; }
.notif-time { margin-top: 4px; color: var(--text-tertiary); font-size: 11px; }
.notif-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); }
.messages-page { max-width: 1180px; }
.msg-layout, .message-layout { display: grid; grid-template-columns: 330px minmax(0, 1fr); min-height: 680px; overflow: hidden; }
.conv-panel { border-right: 1px solid var(--border); background: var(--surface); }
.conv-header, .chat-header { display: flex; align-items: center; justify-content: space-between; min-height: 68px; padding: 0 18px; border-bottom: 1px solid var(--border); }
.conv-list { overflow-y: auto; }
.conv-item { display: flex; align-items: center; gap: 11px; padding: 14px 16px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background .2s; }
.conv-item:hover, .conv-item.active { background: var(--primary-soft); }
.conv-info { min-width: 0; flex: 1; }
.conv-name, .conv-preview { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-name { font-size: 13px; font-weight: 750; }
.conv-preview, .conv-time { margin-top: 4px; color: var(--text-tertiary); font-size: 10px; }
.chat-panel { min-width: 0; display: flex; flex-direction: column; background: var(--surface-solid); }
.chat-title { font-weight: 750; }
.chat-messages { min-height: 0; flex: 1; overflow-y: auto; padding: 20px; }
.chat-msg { display: flex; align-items: flex-end; gap: 8px; margin-bottom: 14px; }
.chat-msg.own { justify-content: flex-end; }
.msg-content { max-width: min(72%, 560px); }
.msg-bubble { padding: 10px 13px; color: var(--text); border-radius: 15px 15px 15px 5px; background: var(--surface-muted); line-height: 1.6; overflow-wrap: anywhere; }
.chat-msg.own .msg-bubble { color: #fff; border-radius: 15px 15px 5px; background: linear-gradient(135deg, var(--primary), #7357db); }
.msg-time { margin-top: 4px; color: var(--text-tertiary); font-size: 9px; }
.chat-input { display: flex; gap: 9px; padding: 14px 16px; border-top: 1px solid var(--border); }
.chat-empty { min-height: 100%; display: grid; place-content: center; color: var(--text-secondary); text-align: center; }
.msg-media-img { max-width: 320px; border-radius: 13px; }

/* Points */
.points-page { max-width: 980px; }
.points-card { position: relative; isolation: isolate; overflow: hidden; padding: 30px; color: #fff; border: 0 !important; border-radius: var(--radius-lg) !important; background: linear-gradient(135deg, #3534a8, #6d3bd1 58%, #0f8f84) !important; box-shadow: 0 28px 70px rgba(67, 56, 202, .26) !important; }
.points-card::after { content: ""; position: absolute; z-index: -1; right: -80px; top: -110px; width: 300px; height: 300px; border-radius: 50%; background: rgba(255, 255, 255, .10); }
.points-label { color: rgba(255, 255, 255, .70); font-size: 12px; font-weight: 650; }
.points-value { margin: 7px 0 18px; font-size: 48px; font-weight: 850; letter-spacing: -.05em; }
.points-streak { color: rgba(255, 255, 255, .75); font-size: 12px; }
.points-task-section, .points-history-section { margin-top: 18px; padding: 22px; }
.points-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.points-section-head h3 { margin: 2px 0 0; }
.points-section-head > span { color: var(--text-secondary); font-size: 11px; }
.points-task-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.points-task-item { display: grid; grid-template-columns: 43px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 15px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-solid); }
.task-icon { width: 43px; height: 43px; display: grid; place-items: center; color: var(--primary); border-radius: 13px; background: var(--primary-soft); font-size: 18px; }
.points-task-item strong { font-size: 13px; }
.points-task-item p { margin: 4px 0 0; color: var(--text-secondary); font-size: 11px; line-height: 1.5; }

/* Administration */
.admin-page, .next-page { max-width: var(--content-max); min-width: 0; }
.admin-header { min-height: 104px; display: flex; flex-direction: column; justify-content: center; padding: 22px 270px 22px 25px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.next-admin-link { position: absolute; top: 50%; right: 24px; display: inline-flex; align-items: center; min-height: 43px; padding: 0 16px; color: #fff; border-radius: 12px; background: linear-gradient(135deg, #17203a, #4338ca); box-shadow: 0 10px 24px rgba(30, 41, 59, .18); font-size: 12px; font-weight: 750; transform: translateY(-50%); }
.admin-stats, .metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin: 17px 0; }
.stat-card, .metric { position: relative; min-width: 0; min-height: 108px; display: flex; align-items: center; gap: 14px; overflow: hidden; padding: 18px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm); }
.stat-card > i { flex: 0 0 auto; width: 44px; height: 44px; display: grid; place-items: center; color: var(--primary); border-radius: 13px; background: var(--primary-soft); font-size: 20px; }
.stat-info, .metric { flex-direction: column; align-items: flex-start; justify-content: center; }
.stat-value, .metric strong { font-size: 25px; font-weight: 850; letter-spacing: -.035em; }
.stat-desc, .metric span, .metric small { color: var(--text-secondary); font-size: 11px; }
.admin-page > .el-tabs { padding: 12px 20px 22px; overflow: hidden; }
.admin-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin: 10px 0 15px; }
.admin-toolbar-split, .table-tools { justify-content: space-between; }
.admin-toolbar-split > div, .table-tools > div { display: flex; flex-direction: column; gap: 3px; }
.toolbar-caption, .table-tools > div span, .field-help { color: var(--text-secondary); font-size: 11px; line-height: 1.55; }
.admin-table-shell { width: 100%; overflow: hidden; border: 1px solid var(--border); border-radius: 14px; }
.admin-table-shell .el-table { border-radius: 0; }
.row-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.row-actions .el-button + .el-button { margin-left: 0; }
.admin-user-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.admin-user-cell > div, .work-title-cell, .login-place { display: flex; flex-direction: column; min-width: 0; }
.admin-user-cell strong, .work-title-cell strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-user-cell small, .work-title-cell small, .login-place small { margin-top: 3px; color: var(--text-secondary); font-size: 10px; }
.muted-text, .work-metrics, .ua-preview { color: var(--text-secondary); font-size: 11px; }
.ua-preview { display: block; max-width: 100%; overflow: hidden; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.inline-robot-tag { margin-left: 6px; }
.existing-media-list { display: flex; flex-wrap: wrap; gap: 6px; }
.existing-media-list span { max-width: 100%; padding: 6px 9px; overflow: hidden; color: var(--text-secondary); border: 1px solid var(--border); border-radius: 8px; background: var(--surface-muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.next-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; margin-bottom: 18px; padding: 30px; color: #fff; border: 1px solid rgba(255, 255, 255, .10); border-radius: var(--radius-lg); background: linear-gradient(135deg, #111827, #312e81 58%, #4c1d95); box-shadow: var(--shadow); }
.next-page-head h1 { margin: 0 0 8px; font-size: clamp(30px, 4vw, 42px); letter-spacing: -.05em; }
.next-page-head p { margin: 0; color: rgba(255, 255, 255, .7); }
.next-page-head .eyebrow { color: #c4b5fd; }
.head-actions { display: flex; align-items: center; gap: 9px; }
.next-back { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 41px; padding: 0 14px; color: #fff; border: 1px solid rgba(255, 255, 255, .18); border-radius: 11px; background: rgba(255, 255, 255, .09); }
.next-card { margin-bottom: 18px; padding: 22px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.card-head h2 { margin: 0 0 5px; font-size: 18px; }
.card-head p { margin: 0; color: var(--text-secondary); font-size: 11px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; }
.table-card { padding: 7px 18px 18px; overflow: hidden; }
.table-tools { display: flex; align-items: center; padding: 15px 0; }
.table-tools .el-input { width: 330px; }

/* Verification gate */
.immersive-layout, .immersive-content { min-height: 100vh; }
.verification-gate { min-height: 100vh; display: grid; place-items: center; padding: 28px; background: radial-gradient(circle at 20% 10%, #302f76, transparent 35%), linear-gradient(135deg, #090d18, #161c35 55%, #0d302f); }
.verify-shell { width: min(1000px, 100%); display: grid; grid-template-columns: .9fr 1.1fr; overflow: hidden; border: 1px solid rgba(255, 255, 255, .13); border-radius: 30px; background: #fff; box-shadow: 0 42px 110px rgba(0, 0, 0, .42); }
.verify-visual { position: relative; min-height: 620px; display: grid; place-content: center; justify-items: center; gap: 22px; overflow: hidden; color: #dddafe; background: radial-gradient(circle, rgba(129, 124, 255, .25), transparent 34%), linear-gradient(145deg, #11162a, #29245c); }
.verify-visual::before { content: ""; position: absolute; inset: 0; opacity: .35; background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px); background-size: 34px 34px; }
.verify-face-frame { position: relative; z-index: 2; width: 178px; height: 218px; display: grid; place-items: center; border: 2px solid #9d97ff; border-radius: 45% 45% 40% 40%; box-shadow: 0 0 40px rgba(157, 151, 255, .48), inset 0 0 34px rgba(157, 151, 255, .12); }
.verify-face-frame i { font-size: 53px; }
.verify-visual > span { position: relative; z-index: 2; font-size: 11px; letter-spacing: .14em; }
.verify-orbit { position: absolute; border: 1px solid rgba(157, 151, 255, .26); border-radius: 50%; animation: verify-spin 13s linear infinite; }
.orbit-one { width: 330px; height: 330px; }
.orbit-two { width: 420px; height: 420px; animation-direction: reverse; animation-duration: 19s; }
.verify-content { padding: 54px 50px; color: #171a2b; }
.verify-content h1 { margin: 0 0 12px; font-size: 34px; letter-spacing: -.045em; }
.verify-lead { margin: 0 0 23px; color: #667085; line-height: 1.75; }
.verify-instruction { display: flex; gap: 12px; margin-bottom: 17px; padding: 15px; border-radius: 15px; background: #f0efff; }
.verify-instruction > i { color: #5b5cf0; font-size: 21px; }
.verify-instruction p { margin: 4px 0 0; color: #545b6d; line-height: 1.55; }
.verify-upload .el-upload, .verify-upload .el-upload-dragger { width: 100%; }
.verify-upload .el-upload-dragger { height: 145px; border-radius: 15px; background: #fafaff; }
.verify-submit { width: 100%; min-height: 45px; margin-top: 17px; }
.verify-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 15px; }
.verify-pending-card { display: flex; align-items: center; gap: 13px; padding: 18px; border-radius: 15px; background: #ecfbf7; }
.verify-pending-card > i { color: #079669; font-size: 28px; }
.verify-pending-card p { margin: 4px 0 0; color: #66746f; font-size: 11px; line-height: 1.5; }
@keyframes verify-spin { to { transform: rotate(360deg); } }

/* Responsive states */
@media (max-width: 1250px) {
  :root { --sidebar-w: 84px; }
  .sidebar-item { justify-content: center; padding: 0; }
  .sidebar-item:hover { transform: translateY(-1px); }
  .sidebar-text { display: none; }
  .feed-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .admin-stats, .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .feed-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .user-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .msg-layout, .message-layout { grid-template-columns: 290px minmax(0, 1fr); }
  .verify-shell { grid-template-columns: .75fr 1.25fr; }
  .verify-content { padding: 42px 34px; }
}

@media (max-width: 760px) {
  :root { --header-h: 60px; }
  .header-inner { padding: 0 14px; }
  .header-right { flex: 0 0 auto; min-width: 0; }
  .logo { font-size: 20px; }
  .username { display: none; }
  .user-menu { padding-right: 4px; }
  .app-layout { display: block; padding: 14px 12px 88px; }
  .app-sidebar { position: fixed; z-index: 120; top: auto; right: 10px; bottom: 10px; left: 10px; display: flex; justify-content: space-around; height: 64px; padding: 7px; border-radius: 18px; box-shadow: 0 18px 50px rgba(16, 24, 40, .22); }
  .sidebar-item { flex: 1; min-width: 0; height: 48px; min-height: 48px; margin: 0; }
  .sidebar-item i { width: auto; }
  .feed-grid, .user-list, .points-task-grid { grid-template-columns: 1fr; }
  .welcome-card { min-height: 340px; padding: 40px 22px; border-radius: 22px; }
  .welcome-card h3 { font-size: clamp(28px, 9vw, 34px); line-height: 1.16; }
  .welcome-card > p { width: 100%; overflow-wrap: anywhere; }
  .feed-cover { aspect-ratio: 16 / 10; }
  .profile-banner { min-height: 150px; }
  .profile-info { padding: 0 18px 22px; }
  .profile-media-editor { grid-template-columns: 1fr; }
  .publish-form, .settings-page > .el-tabs { padding: 18px; }
  .msg-layout, .message-layout { display: block; min-height: 620px; }
  .conv-panel { border-right: 0; }
  .chat-panel { min-height: 620px; }
  .notification-item { grid-template-columns: 40px minmax(0, 1fr) auto; padding: 14px; }
  .points-card { padding: 24px; }
  .points-value { font-size: 42px; }
  .admin-header { min-height: auto; padding: 20px; }
  .next-admin-link { position: static; width: max-content; margin-top: 15px; transform: none; }
  .admin-stats { grid-template-columns: 1fr !important; }
  .admin-page > .el-tabs { padding: 10px 12px 18px; }
  .admin-page > .el-tabs > .el-tabs__header { overflow-x: auto; }
  .admin-table-shell { overflow-x: auto; }
  .admin-table-shell .el-table { min-width: 940px; }
  .next-page-head, .card-head { display: block; }
  .next-page-head { padding: 22px; }
  .head-actions { width: 100%; flex-direction: column; align-items: stretch; margin-top: 18px; }
  .head-actions .el-button, .head-actions .next-back { width: 100%; margin: 0; }
  .form-grid { grid-template-columns: 1fr; }
  .table-tools { align-items: stretch; flex-direction: column; gap: 12px; }
  .table-tools .el-input { width: 100%; }
  .el-dialog { width: calc(100% - 22px) !important; margin-top: 4vh !important; }
  .el-dialog__header, .el-dialog__body, .el-dialog__footer { padding-left: 18px !important; padding-right: 18px !important; }
  .el-form-item__label { float: none !important; width: auto !important; padding-bottom: 7px !important; text-align: left !important; }
  .el-form-item__content { margin-left: 0 !important; }
  .verification-gate { padding: 0; }
  .verify-shell { min-height: 100vh; grid-template-columns: 1fr; border: 0; border-radius: 0; }
  .verify-visual { min-height: 235px; }
  .verify-face-frame { width: 96px; height: 122px; border-radius: 39px; }
  .verify-face-frame i { font-size: 32px; }
  .orbit-one { width: 190px; height: 190px; }
  .orbit-two { width: 250px; height: 250px; }
  .verify-content { padding: 28px 21px 36px; }
  .verify-content h1 { font-size: 27px; }
  .verify-actions { align-items: stretch; flex-direction: column; }
  .auth-card { padding: 32px 22px; }
}

@media (max-width: 430px) {
  .header-btn { width: 37px; height: 37px; }
  .login-btn { min-height: 38px; padding: 0 13px; }
  .hero-pills span:nth-child(n + 3) { display: none; }
  .action-bar { justify-content: space-between; }
  .action-item { min-width: 0; padding: 0 10px; }
  .points-task-item { grid-template-columns: 43px minmax(0, 1fr); }
  .points-task-item .el-tag { grid-column: 2; width: max-content; }
  .invite-code-item { grid-template-columns: minmax(0, 1fr) auto; }
  .invite-code-item .copy-btn { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
