@import url("./home-notice-rich.css");

:root {
    --app-primary: #ff6c02;
    --app-primary-light: #fff5eb;
    --app-bg: #f5f6f8;
    --app-card: #ffffff;
    --app-text: #1a1a1a;
    --app-text-secondary: #888;
    --app-border: #eee;
    --app-tabbar-height: 56px;
    --app-header-height: 48px;
    --app-max-width: 960px;
    --home-notice-text-width: 363px;
    --mobile-pad-x: 2px;
    --mobile-card-pad-x: 4px;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--app-bg);
    color: var(--app-text);
    -webkit-tap-highlight-color: transparent;
}

.app-wrapper {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    max-width: var(--app-max-width);
    margin: 0 auto;
    background: var(--app-bg);
    position: relative;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--app-header-height);
    line-height: var(--app-header-height);
    background: var(--app-card);
    border-bottom: 1px solid var(--app-border);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
}

.app-header-title {
    font-size: 17px;
    font-weight: 600;
    line-height: 1.2;
}

.app-header-right {
    position: absolute;
    right: 8px;
    top: 0;
    height: var(--app-header-height);
    display: flex;
    align-items: center;
    gap: 4px;
    max-width: 58%;
}

.app-header-mine-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    line-height: 1.25;
    font-size: 10px;
    color: var(--app-text-secondary);
    max-width: calc(100% - 36px);
}

.app-header-mine-meta span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.app-header-menu-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--app-text);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
}

.app-header-menu-btn .layui-icon {
    font-size: 22px;
}

.app-header-menu-btn:active {
    background: var(--app-bg);
}

/* 右侧抽屉菜单 */
.app-drawer-mask {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 500;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
}

.app-drawer-mask.show {
    opacity: 1;
    visibility: visible;
}

.app-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: min(78vw, 280px);
    max-width: var(--app-max-width);
    height: 100%;
    height: 100dvh;
    background: var(--app-card);
    z-index: 501;
    transform: translateX(100%);
    transition: transform 0.28s ease;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
}

.app-drawer.show {
    transform: translateX(0);
}

body.app-drawer-open {
    overflow: hidden;
}

.app-drawer-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 16px;
    border-bottom: 1px solid var(--app-border);
    background: linear-gradient(180deg, var(--app-primary-light) 0%, #fff 100%);
}

.app-drawer-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    flex-shrink: 0;
}

.app-drawer-user {
    min-width: 0;
}

.app-drawer-user strong {
    display: block;
    font-size: 16px;
    margin-bottom: 4px;
}

.app-drawer-user span {
    font-size: 12px;
    color: var(--app-text-secondary);
}

.app-drawer-menu {
    padding: 8px 0;
    flex: 1;
}

.app-drawer-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    text-decoration: none;
    color: inherit;
    font-size: 15px;
    transition: background 0.15s;
}

.app-drawer-item .layui-icon {
    font-size: 20px;
    color: var(--app-primary);
    width: 24px;
    text-align: center;
}

.app-drawer-item:active {
    background: var(--app-bg);
}

.app-drawer-item-danger .layui-icon,
.app-drawer-item-danger span {
    color: #f56c6c;
}

@media (min-width: 1024px) {
    .app-drawer {
        right: calc(50% - var(--app-max-width) / 2);
    }

    .app-drawer-mask {
        max-width: var(--app-max-width);
        left: 50%;
        transform: translateX(-50%);
        right: auto;
        width: 100%;
    }
}

.app-main {
    flex: 1;
    overflow-y: auto;
    padding: 12px var(--mobile-pad-x, 4px) calc(var(--app-tabbar-height) + 12px + env(safe-area-inset-bottom));
    -webkit-overflow-scrolling: touch;
    position: relative;
    overscroll-behavior-y: contain;
}

/* 下拉刷新提示：仅下拉时挂到 body，平时页面无此元素 */
.app-ptr {
    display: none;
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: var(--app-max-width);
    top: var(--app-header-height);
    height: 48px;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 90;
    color: var(--app-text-secondary);
    font-size: 13px;
    background: transparent;
}

.app-ptr.is-show {
    display: flex;
}

.app-ptr-inner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.app-ptr-icon {
    font-size: 16px;
    transition: transform 0.15s;
}

.app-ptr.is-ready {
    color: var(--app-primary);
}

.app-ptr.is-ready .app-ptr-icon {
    transform: rotate(180deg);
}

.app-ptr.is-refreshing .app-ptr-icon {
    animation: app-ptr-spin 0.8s linear infinite;
    transform: none;
}

.app-main.is-ptr-pulling {
    transition: none;
}

.app-main.is-ptr-releasing,
.app-main.is-ptr-refreshing {
    transition: transform 0.25s ease;
}

@keyframes app-ptr-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 底部导航 */
.app-tabbar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: var(--app-max-width);
    height: calc(var(--app-tabbar-height) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--app-card);
    border-top: 1px solid var(--app-border);
    display: flex;
    z-index: 200;
}

.app-tabbar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--app-text-secondary);
    font-size: 11px;
    gap: 2px;
    transition: color 0.2s;
    padding: 6px 0;
}

.app-tabbar-item .layui-icon {
    font-size: 22px;
    line-height: 1;
}

.app-tabbar-item.active {
    color: var(--app-primary);
}

.app-tabbar-item:active {
    opacity: 0.7;
}

/* 卡片列表 */
.app-card {
    background: var(--app-card);
    border-radius: 12px;
    padding: 10px var(--mobile-card-pad-x, 6px);
    margin-bottom: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.app-card-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 8px;
}

.app-card-desc {
    font-size: 13px;
    color: var(--app-text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* 消息列表 */
.msg-list-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--app-border);
    cursor: pointer;
}

.msg-list-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.msg-avatar {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--app-primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--app-primary);
    font-size: 20px;
}

.msg-body {
    flex: 1;
    min-width: 0;
}

.msg-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.msg-title {
    font-size: 15px;
    font-weight: 500;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.msg-time {
    font-size: 12px;
    color: var(--app-text-secondary);
    flex-shrink: 0;
    margin-left: 8px;
}

.msg-preview {
    font-size: 13px;
    color: var(--app-text-secondary);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.msg-badge {
    display: inline-block;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    padding: 0 5px;
    background: #f56c6c;
    color: #fff;
    font-size: 11px;
    border-radius: 9px;
    text-align: center;
    margin-left: 6px;
}

/* 通知列表 */
.notice-list-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--app-border);
    cursor: pointer;
}

.notice-list-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.notice-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 20px;
}

.notice-icon-system {
    background: var(--app-primary-light);
    color: var(--app-primary);
}

.notice-icon-safe {
    background: #fff3e8;
    color: #ff9800;
}

.notice-icon-update {
    background: #eef7ff;
    color: #2196f3;
}

.notice-body {
    flex: 1;
    min-width: 0;
}

.notice-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.notice-title {
    font-size: 15px;
    font-weight: 500;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notice-time {
    font-size: 12px;
    color: var(--app-text-secondary);
    flex-shrink: 0;
    margin-left: 8px;
}

.notice-preview {
    font-size: 13px;
    color: var(--app-text-secondary);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notice-badge {
    display: inline-block;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    padding: 0 5px;
    background: #f56c6c;
    color: #fff;
    font-size: 11px;
    border-radius: 9px;
    text-align: center;
    margin-left: 6px;
}

/* 首页 */
.home-banner {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #ff6c02 0%, #ff9a44 100%);
    padding: 24px 20px;
    color: #fff;
}

.home-banner-tag {
    display: inline-block;
    font-size: 12px;
    padding: 2px 10px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.22);
    margin-bottom: 10px;
}

.home-banner h2 {
    margin: 0 0 8px;
    font-size: 22px;
    line-height: 1.35;
}

.home-banner p {
    margin: 0;
    font-size: 14px;
    opacity: 0.92;
    line-height: 1.5;
}

.home-notice-card {
    padding-bottom: 14px;
}

.home-notice-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--app-border);
}

.home-notice-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--app-primary-light);
    color: var(--app-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.home-notice-title {
    margin: 0 0 4px;
    font-size: 17px;
    font-weight: 600;
}

.home-notice-meta {
    margin: 0;
    font-size: 13px;
    color: var(--app-text-secondary);
}

.home-notice-body {
    font-size: 14px;
    line-height: 1.7;
    color: var(--app-text);
    overflow-x: hidden;
}

.home-notice-rich {
    max-width: 100%;
    box-sizing: border-box;
}

.home-notice-list {
    margin: 0 0 12px;
    padding-left: 18px;
    color: var(--app-text);
}

.home-notice-body ol {
    margin: 0 0 12px;
    padding-left: 22px;
    color: var(--app-text);
    list-style: decimal;
}

.home-notice-body ol li,
.home-notice-list li {
    margin-bottom: 6px;
}

.home-notice-tip {
    padding: 10px 12px;
    background: #fff8f0;
    border-radius: 8px;
    font-size: 13px;
    color: #b86a00;
    margin-bottom: 0 !important;
}

.home-notice-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--app-border);
}

.home-notice-tags span {
    font-size: 12px;
    color: var(--app-primary);
    background: var(--app-primary-light);
    padding: 4px 10px;
    border-radius: 20px;
}

.home-join-desc {
    margin: 0 0 14px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--app-text-secondary);
    text-align: center;
}

.home-join-steps {
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
    counter-reset: join-step;
}

.home-join-steps li {
    position: relative;
    padding-left: 36px;
    margin-bottom: 14px;
    counter-increment: join-step;
}

.home-join-steps li::before {
    content: counter(join-step);
    position: absolute;
    left: 0;
    top: 2px;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    border-radius: 50%;
    background: var(--app-primary);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}

.home-join-steps li strong {
    display: block;
    font-size: 15px;
    margin-bottom: 4px;
}

.home-join-steps li span {
    display: block;
    font-size: 13px;
    color: var(--app-text-secondary);
    line-height: 1.5;
}

.home-join-actions {
    text-align: center;
    padding-top: 4px;
}

.home-join-actions .app-btn-submit {
    width: 100%;
}

.home-qrcode-box {
    text-align: center;
    margin: 8px 0 16px;
    padding: 16px 12px;
    background: #fafafa;
    border-radius: 12px;
    border: 1px dashed #ddd;
}

.home-qrcode-frame {
    width: 200px;
    height: 200px;
    margin: 0 auto 12px;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    position: relative;
}

.home-qrcode-img {
    display: none;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
}

.home-qrcode-img-show {
    display: block !important;
}

.home-qrcode-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--app-text-secondary);
    padding: 16px;
    box-sizing: border-box;
}

.home-qrcode-placeholder .layui-icon {
    font-size: 40px;
    color: #07c160;
    margin-bottom: 10px;
}

.home-qrcode-placeholder p {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 500;
    color: var(--app-text);
}

.home-qrcode-placeholder span {
    font-size: 12px;
    line-height: 1.5;
    color: var(--app-text-secondary);
}

.home-qrcode-tip {
    margin: 0;
    font-size: 14px;
    color: var(--app-text-secondary);
}

.home-join-link {
    display: inline-block;
    margin-top: 12px;
    font-size: 14px;
    color: var(--app-primary);
    text-decoration: none;
}

.notice-pin-card {
    position: relative;
    border: 1px solid #ffe0c2;
    background: linear-gradient(180deg, #fffaf5 0%, #fff 40%);
}

.notice-pin-label {
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 11px;
    color: #fff;
    background: var(--app-primary);
    padding: 2px 8px;
    border-radius: 4px;
}

.notice-list-item-static {
    cursor: default;
}

.notice-detail {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--app-text);
}

.notice-detail p {
    margin: 0 0 10px;
}

.notice-detail-list {
    margin: 0 0 10px;
    padding-left: 18px;
}

.notice-detail-list li {
    margin-bottom: 6px;
}

.notice-detail a {
    color: var(--app-primary);
    text-decoration: none;
}

.notice-detail-footer {
    font-size: 13px;
    color: var(--app-text-secondary);
    margin-bottom: 0 !important;
}

.home-entry-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--app-border);
    text-decoration: none;
    color: inherit;
}

.home-entry-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.home-entry-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 20px;
}

.home-entry-icon.orange { background: var(--app-primary-light); color: var(--app-primary); }
.home-entry-icon.blue { background: #eef7ff; color: #2196f3; }
.home-entry-icon.green { background: #eefaf3; color: #4caf50; }

.home-entry-info {
    flex: 1;
    min-width: 0;
}

.home-entry-info h4 {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 500;
}

.home-entry-info p {
    margin: 0;
    font-size: 13px;
    color: var(--app-text-secondary);
}

.home-entry-arrow {
    color: var(--app-text-secondary);
    font-size: 14px;
}

/* 发现页 */
.discover-banner {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #ff6c02 0%, #ff9a44 100%);
    padding: 24px 20px;
    color: #fff;
}

.discover-banner h2 {
    margin: 0 0 6px;
    font-size: 20px;
}

.discover-banner p {
    margin: 0;
    font-size: 13px;
    opacity: 0.9;
}

.discover-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--app-border);
    text-decoration: none;
    color: inherit;
}

.discover-list-item:last-child {
    border-bottom: none;
}

.discover-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.discover-icon.orange { background: #fff5eb; color: #ff6c02; }
.discover-icon.blue { background: #eef3ff; color: #4e73df; }
.discover-icon.green { background: #eef8ea; color: #61c032; }
.discover-icon.purple { background: #f3eeff; color: #7c5cbf; }

.discover-icon-img {
    padding: 0;
    overflow: hidden;
    background: #f5f5f5;
}

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

.discover-empty {
    padding: 24px 0;
    text-align: center;
    color: var(--app-text-secondary);
    font-size: 14px;
}

.discover-info h4 {
    margin: 0 0 2px;
    font-size: 15px;
    font-weight: 500;
}

.discover-info p {
    margin: 0;
    font-size: 12px;
    color: var(--app-text-secondary);
}

/* 我的页面 */
.mine-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 4px 20px;
}

.mine-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--app-border);
    background: var(--app-primary-light);
}

.mine-avatar-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--app-primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--app-primary);
    font-size: 28px;
}

.mine-info h3 {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 600;
}

.mine-info p {
    margin: 0;
    font-size: 13px;
    color: var(--app-text-secondary);
}

.mine-user-meta {
    font-size: 12px !important;
    line-height: 1.5;
    word-break: break-all;
}

.mine-menu-item {
    display: flex;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--app-border);
    text-decoration: none;
    color: inherit;
    font-size: 15px;
}

.mine-menu-item:last-child {
    border-bottom: none;
}

.mine-menu-item .layui-icon:first-child {
    font-size: 20px;
    color: var(--app-primary);
    margin-right: 12px;
    width: 24px;
    text-align: center;
}

.mine-menu-item .layui-icon-right {
    margin-left: auto;
    font-size: 14px;
    color: #ccc;
}

.mine-sign-btn {
    width: 100%;
    border: none;
    background: none;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
}

.mine-sign-btn.is-signed {
    cursor: default;
    opacity: 0.72;
}

.mine-sign-reward {
    margin-left: auto;
    font-style: normal;
    font-size: 13px;
    color: var(--app-primary);
    white-space: nowrap;
}

.mine-sign-btn.is-signed .mine-sign-reward {
    color: var(--app-text-secondary);
}

.mine-stats {
    display: flex;
    text-align: center;
    padding: 12px 0;
}

.mine-stat-item {
    flex: 1;
}

.mine-stat-item strong {
    display: block;
    font-size: 18px;
    color: var(--app-primary);
    margin-bottom: 2px;
}

.mine-stat-item span {
    font-size: 12px;
    color: var(--app-text-secondary);
}

.mine-login-btns {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.mine-login-btns a {
    flex: 1;
    display: block;
    text-align: center;
    padding: 10px;
    border-radius: 24px;
    font-size: 14px;
    text-decoration: none;
}

.btn-primary-app {
    background: var(--app-primary);
    color: #fff;
}

.btn-outline-app {
    border: 1px solid var(--app-primary);
    color: var(--app-primary);
}

/* 空状态 */
.app-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--app-text-secondary);
}

.app-empty .layui-icon {
    font-size: 48px;
    color: #ddd;
    display: block;
    margin-bottom: 12px;
}

/* 平板 */
@media (min-width: 768px) {
    :root {
        --app-tabbar-height: 60px;
        --app-header-height: 52px;
    }

    .app-main {
        padding: 16px 20px calc(var(--app-tabbar-height) + 16px);
    }

    .app-tabbar-item {
        font-size: 12px;
    }

    .app-tabbar-item .layui-icon {
        font-size: 24px;
    }
}

/* 电脑端 */
@media (min-width: 1024px) {
    :root {
        --app-max-width: 960px;
    }

    body {
        background: #e8eaed;
    }

    .app-wrapper {
        min-height: calc(100vh - 40px);
        min-height: calc(100dvh - 40px);
        margin-top: 20px;
        margin-bottom: 20px;
        border-radius: 16px;
        overflow: hidden;
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    }

    .app-tabbar {
        border-radius: 0 0 16px 16px;
    }

    .app-main {
        padding: 20px 24px calc(var(--app-tabbar-height) + 20px);
    }
}

/* 未登录提示 */
.app-login-prompt {
    text-align: center;
    padding: 60px 24px 40px;
    background: var(--app-card);
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.app-login-prompt-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--app-primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-login-prompt-icon .layui-icon {
    font-size: 36px;
    color: var(--app-primary);
}

.app-login-prompt h3 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 600;
}

.app-login-prompt p {
    margin: 0 0 24px;
    font-size: 14px;
    color: var(--app-text-secondary);
}

.app-login-prompt-btns {
    display: flex;
    gap: 12px;
    max-width: 320px;
    margin: 0 auto;
}

.app-login-prompt-btns a {
    flex: 1;
    display: block;
    text-align: center;
    padding: 11px 16px;
    border-radius: 24px;
    font-size: 15px;
    text-decoration: none;
}

/* 登录/注册页 */
.app-auth-page .app-header {
    position: relative;
}

.app-header-back {
    position: absolute;
    left: 12px;
    top: 0;
    height: var(--app-header-height);
    line-height: var(--app-header-height);
    color: var(--app-text);
    text-decoration: none;
    font-size: 20px;
    padding: 0 8px;
}

.app-main-auth {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.app-auth-sticky-footer {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    margin-bottom: 0;
}

.app-reg-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.app-reg-form-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.app-profile-avatar-row {
    text-align: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--app-border);
}

.app-profile-avatar-row .app-avatar-box {
    margin: 0 auto 6px;
}

.app-profile-avatar-row .app-avatar-tip {
    margin: 0;
}

.app-reg-form-footer {
    flex-shrink: 0;
    margin-top: auto;
    padding-top: 20px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
    background: var(--app-card);
}

.app-auth-page .app-wrapper {
    min-height: 100vh;
    min-height: 100dvh;
}

.app-auth-page .app-main-auth {
    padding-bottom: 12px;
}

.app-auth-card {
    background: var(--app-card);
    border-radius: 12px;
    padding: 24px 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.app-form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--app-text);
}

.app-input {
    height: 44px !important;
    line-height: 44px !important;
    border-radius: 10px !important;
    border: 1px solid var(--app-border) !important;
    font-size: 15px !important;
}

.app-input:focus {
    border-color: var(--app-primary) !important;
}

.app-captcha-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.app-captcha-row .app-input {
    flex: 1;
}

.app-captcha-img {
    height: 44px;
    border-radius: 10px;
    border: 1px solid var(--app-border);
    cursor: pointer;
    flex-shrink: 0;
}

.app-btn-sms {
    height: 44px;
    padding: 0 12px;
    border: 1px solid var(--app-primary);
    background: #fff;
    color: var(--app-primary);
    border-radius: 10px;
    font-size: 13px;
    white-space: nowrap;
    cursor: pointer;
    flex-shrink: 0;
}

.app-form-extra {
    margin: 4px 0 20px;
}

.app-btn-submit {
    width: 100%;
    height: 46px;
    border: none;
    border-radius: 23px;
    background: var(--app-primary);
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
}

.app-btn-submit:active {
    opacity: 0.85;
}

.app-auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--app-text-secondary);
}

.app-auth-footer a {
    color: var(--app-primary);
    text-decoration: none;
    font-weight: 500;
}

/* 注册头像 */
.app-avatar-upload {
    text-align: center;
    margin-bottom: 20px;
}

.app-avatar-box {
    width: 88px;
    height: 88px;
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden;
    background: var(--app-primary-light);
    cursor: pointer;
    position: relative;
}

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

.app-avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--app-primary);
    font-size: 12px;
    gap: 4px;
}

.app-avatar-placeholder .layui-icon {
    font-size: 28px;
}

.app-avatar-tip {
    margin: 8px 0 0;
    font-size: 12px;
    color: var(--app-text-secondary);
}

.app-label-optional {
    font-size: 12px;
    font-weight: normal;
    color: var(--app-text-secondary);
}

.app-gender-group {
    display: flex;
    gap: 16px;
    padding: 4px 0;
}

.app-gender-group .layui-form-radio {
    margin: 0;
    padding-right: 0;
}

/* 注册页紧凑布局 */
.app-auth-compact {
    padding: 16px 16px 14px;
}

.app-auth-compact .layui-form-item {
    margin-bottom: 10px;
}

.app-form-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.app-form-inline .app-form-label {
    flex-shrink: 0;
    width: 42px;
    margin-bottom: 0;
    font-size: 14px;
    text-align: right;
}

.app-form-inline .layui-input,
.app-form-inline .app-gender-group {
    flex: 1;
    min-width: 0;
}

.app-form-inline-last {
    margin-bottom: 0 !important;
}

.app-input-sm {
    height: 38px !important;
    line-height: 38px !important;
    font-size: 14px !important;
    border-radius: 8px !important;
}

.app-input-readonly {
    background: var(--app-bg) !important;
    color: var(--app-text-secondary) !important;
    border-color: var(--app-border) !important;
    cursor: default;
}

.app-reg-top {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--app-border);
}

.app-auth-compact .app-avatar-box {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    margin: 0;
}

.app-auth-compact .app-avatar-placeholder .layui-icon {
    font-size: 24px;
}

.app-auth-compact .app-avatar-placeholder span {
    display: none;
}

.app-reg-top-fields {
    flex: 1;
    min-width: 0;
}

.app-reg-top-fields .layui-form-item {
    margin-bottom: 8px;
}

.app-input-eye-wrap {
    flex: 1;
    min-width: 0;
}

.app-input-eye-wrap .layui-input {
    padding-right: 36px !important;
}

.app-input-eye-wrap .layui-input-affix {
    line-height: 38px;
    color: #999;
    cursor: pointer;
}

.app-input-eye-wrap .layui-input-affix:hover {
    color: var(--app-primary);
}

.app-reg-row2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.app-reg-row2 .app-form-inline .app-form-label {
    width: 36px;
}

.app-btn-submit-sm {
    height: 42px;
    margin-top: 4px;
    font-size: 15px;
}

.app-auth-footer-sm {
    margin-top: 12px;
    font-size: 13px;
}

.layui-form-item {
    margin-bottom: 16px;
}

/* 操作登录弹窗 */
.app-login-dialog {
    padding: 8px 20px 24px;
    text-align: center;
}

.app-login-dialog-tip {
    margin: 0 0 20px;
    font-size: 15px;
    color: var(--app-text);
    line-height: 1.6;
}

.app-login-dialog-btns {
    display: flex;
    gap: 12px;
}

.app-login-dialog-btns a {
    flex: 1;
    display: block;
    padding: 11px 12px;
    border-radius: 24px;
    font-size: 15px;
    text-decoration: none;
    text-align: center;
}
