* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; font-family: "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif; background: linear-gradient(180deg, #eef2ff 0%, #f7fbff 100%); color: #222; }
body { line-height: 1.6; }
a { color: #1f5fe4; text-decoration: none; }
a:hover { text-decoration: underline; }
.container { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.site-header { background: rgba(255,255,255,0.95); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(31, 95, 228, 0.12); position: sticky; top: 0; z-index: 20; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; }
.site-branding a { display: inline-flex; align-items: center; text-decoration: none; }
.site-branding .site-logo { width: 144px; height: auto; display: block; }
.site-nav { display: flex; flex-wrap: wrap; gap: 12px; }
.site-nav a { color: #4b5d78; font-size: 14px; padding: 8px 10px; border-radius: 10px; transition: background .25s ease; }
.site-nav a:hover { background: rgba(31, 95, 228, 0.08); }
.site-nav .notifications-link { position: relative; }
.site-nav .nav-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; font-size: 11px; line-height: 1; padding: 0 6px; border-radius: 999px; background: #ff4d4f; color: #fff; margin-left: 6px; }
.user-panel { display: flex; align-items: center; gap: 12px; }
.site-header .user-panel .button { padding: 12px 18px; border-radius: 999px; font-weight: 600; }
.user-profile { display: flex; align-items: center; gap: 10px; }
.avatar-small { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(31, 95, 228, 0.12); }
.user-name { font-size: 14px; font-weight: 600; color: #1f2d3d; }
.user-extra { font-size: 12px; color: #6f7b8d; display: flex; gap: 8px; flex-wrap: wrap; }
.role-badge { background: #eef3ff; color: #2f5dd6; padding: 2px 8px; border-radius: 999px; font-size: 12px; }
.button { display: inline-flex; align-items: center; justify-content: center; background: #1f5fe4; color: #fff; border: none; padding: 12px 18px; border-radius: 999px; cursor: pointer; transition: transform .15s ease, background .2s ease; font-weight: 600; }
.button:hover { background: #1647b8; transform: translateY(-1px); }
.button-secondary { background: #f0f5ff; color: #1f5fe4; border: 1px solid #d9e4ff; }
.button-danger { background: #e04242; }
.site-badge { padding: 18px 0; }
.notification-list { display: grid; gap: 14px; }
.notification-item { display: grid; grid-template-columns: auto 1fr; gap: 14px; padding: 18px; border: 1px solid #e7ebf5; border-radius: 18px; background: #fff; }
.notification-item.unread { border-color: #1f5fe4; box-shadow: 0 12px 28px rgba(31, 95, 228, 0.08); }
.notification-avatar img { display: block; width: 48px; height: 48px; object-fit: contain; }
.notification-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.notification-title strong { font-size: 15px; color: #1f2d3d; }
.notification-time { color: #6f7b8d; font-size: 13px; }
.notification-body { margin-top: 10px; color: #3e4961; line-height: 1.8; white-space: pre-wrap; }
.notification-actions { margin-top: 10px; }
.notification-actions .small-link { color: #1f5fe4; }
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; color: #3a4a65; }
.stats-row div { background: rgba(255,255,255,0.8); padding: 14px 16px; border-radius: 14px; box-shadow: 0 14px 50px rgba(31, 95, 228, 0.06); }
.page-title { margin: 28px 0 16px; }
.page-title h1 { margin: 0 0 8px; font-size: clamp(30px, 3vw, 42px); color: #1f2d3d; }
.page-title p { margin: 0; color: #5f6e86; font-size: 15px; }
.sort-links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 12px; font-size: 14px; }
.sort-links a { color: #61718c; padding: 8px 12px; border-radius: 999px; background: #f6f8ff; }
.sort-links a.active { color: #1f5fe4; background: #dbe3ff; font-weight: 600; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.card-item, .action-card, .auth-card, .comment-item, .chat-box, .post-detail { background: #ffffff; border: 1px solid #e7ebf5; border-radius: 18px; padding: 20px; box-shadow: 0 18px 50px rgba(31, 95, 228, 0.06); }
.card-item h3, .action-card h2 { margin-top: 0; color: #1f2d3d; }
.card-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 13px; color: #6f7b8d; margin-top: 14px; }
.community-overview-grid { display: grid; grid-template-columns: 1fr; gap: 18px; margin-bottom: 20px; }
.community-current-user { display: flex; flex-direction: column; gap: 12px; }
.community-current-header { display: flex; align-items: center; gap: 12px; }
.community-current-header h2 { margin: 0; font-size: 22px; }
.community-account { margin: 6px 0 0; color: #607089; font-size: 13px; }
.community-user-badges { display: flex; flex-wrap: wrap; gap: 10px; }
.community-level-badge { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; padding: 4px 10px; font-size: 11px; font-weight: 700; border: 1px solid transparent; }
.community-level-badge.normal { background: #f1e6ff; color: #6b31bb; border-color: #dcc7f7; }
.community-level-badge.vip { background: #fff4b5; color: #9e7000; border-color: #f1d978; }
.community-chat-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.9fr); gap: 18px; margin-bottom: 20px; }
.community-chat-panel { display: flex; flex-direction: column; min-height: 620px; overflow: hidden; }
.private-chat-panel { min-height: 640px; }
.private-chat-inner-grid { display: grid; grid-template-columns: minmax(170px, 230px) minmax(0, 1fr); gap: 16px; flex: 1; min-height: 0; }
.private-member-sidebar { display: flex; flex-direction: column; gap: 12px; border-right: 1px solid #e7ebf5; padding-right: 12px; min-height: 0; }
.private-member-sidebar-header h3 { margin: 0; font-size: 16px; color: #1f2d3d; }
.private-member-sidebar-header p { margin: 6px 0 0; color: #607089; font-size: 12px; }
.private-member-list { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; padding-right: 4px; }
.member-list-item { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; border-radius: 16px; border: 1px solid #e6e9f4; background: #fff; padding: 12px; cursor: pointer; text-align: left; }
.member-list-item.is-active { border-color: #1f5fe4; box-shadow: 0 8px 24px rgba(31, 95, 228, 0.12); }
.member-list-notice { position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 6px; border-radius: 999px; background: #e63946; color: #fff; font-size: 11px; font-weight: 700; box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.12); }
.member-list-copy { display:flex; flex-direction:column; gap:8px; flex:1; min-width:0; }
.member-list-top { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.member-list-top strong { display:block; font-size: 13px; color:#1f2d3d; }
.member-list-meta { display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
.member-account { font-size: 11px; color: #607089; }
.private-chat-body { display:flex; flex-direction:column; min-height:0; }
.chat-panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.chat-panel-header h2 { margin: 0; font-size: 20px; }
.chat-panel-header p { margin: 6px 0 0; color: #607089; font-size: 13px; }
.community-chat-panel .chat-box { flex: 0 0 auto; width: min(520px, 100%); max-width: 520px; height: 520px; min-height: 520px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; overflow-x: hidden; -ms-overflow-style: none; }
.community-chat-panel .chat-box::-webkit-scrollbar { display: none; }
.chat-message { display: flex; flex-direction: column; gap: 8px; max-width: min(92%, 640px); overflow-wrap: anywhere; word-break: break-word; white-space: pre-wrap; }
.chat-message.mine { align-self: flex-end; margin-left: auto; align-items: flex-end; }
.chat-message.mine .chat-message-header { justify-content: flex-end; }
.chat-message.mine .chat-message-author { flex-direction: row-reverse; margin-left: auto; }
.chat-message.mine .chat-message-content { align-self: flex-end; }
#groupMessages .chat-message { flex-direction: column; max-width: min(100%, 680px); }
#groupMessages .chat-message-header { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 0; }
#groupMessages .chat-message-author { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
#groupMessages .chat-message-author-name { font-size: 13px; color: #1f2d3d; }
#groupMessages .chat-message-content,
#privateMessages .chat-message-content {
    flex: 1;
    padding: 12px 14px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.13);
    font-size: 14px;
}

.chat-message-time {
    font-size: 12px;
    color: #63718a;
    text-align: right;
    margin: 0 6px 6px 0;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity .16s ease, transform .16s ease;
    pointer-events: none;
}
.chat-message-body:hover .chat-message-time,
.chat-message-body:focus-within .chat-message-time {
    opacity: 1;
    transform: translateY(0);
}

.chat-message.mine .chat-message-content {
    font-size: 13px;
}

#privateMessages .chat-message { flex-direction: row; align-items: center; max-width: 100%; gap: 6px; }
#privateMessages .chat-message.mine { flex-direction: row-reverse; align-self: flex-end; margin-left: auto; }
#privateMessages .chat-message-header { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-bottom: 0; min-width: 40px; }
#privateMessages .chat-message-author { display:flex; flex-direction: column; align-items: center; gap: 2px; }
.chat-message-header { display: flex; align-items: center; gap: 12px; margin-bottom: 0; background: transparent; }
.chat-message-author { display:flex; align-items:center; gap:8px; flex-wrap:wrap; background: transparent; }
.chat-message-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: transparent; }
.chat-message-author-name { font-size: 13px; color: #1f2d3d; background: transparent; }
.chat-message-content { color: #303b4b; line-height: 1.6; }
#groupMessages .chat-message-header,
#groupMessages .chat-message-content { background: transparent; }
#privateMessages .chat-message-header,
#privateMessages .chat-message-content { background: transparent; }
.chat-form { margin-top: auto; padding-top: 12px; position: sticky; bottom: 0; background: #fff; z-index: 2; }
.empty-state { padding: 16px; border-radius: 14px; background: #f5f7fd; color: #607089; font-size: 13px; }
.user-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.user-card-header h3 { margin: 0; font-size: 18px; }
.user-card-copy { display:flex; flex-direction:column; gap:4px; }
.user-account { margin: 0; color: #607089; font-size: 13px; }
.user-badges { display:flex; flex-wrap:wrap; gap: 8px; margin-bottom: 10px; }
.user-card-current { border-color: #1f5fe4; box-shadow: 0 18px 60px rgba(31, 95, 228, 0.16); }
.user-chat-trigger { width: 100%; }
.user-chat-trigger.is-active { background: #1647b8; }
.tag { display: inline-flex; align-items: center; justify-content: center; padding: 6px 12px; border-radius: 999px; background: #f4f7ff; color: #4567b2; font-size: 12px; }
@media (max-width: 900px) {
    .community-overview-grid,
    .community-chat-layout { grid-template-columns: 1fr; }
    .private-chat-inner-grid { grid-template-columns: 1fr; }
    .private-member-sidebar { border-right: 0; padding-right: 0; border-bottom: 1px solid #e7ebf5; padding-bottom: 12px; }
}
.notice { background: #fff7e8; border: 1px solid #ffe0af; padding: 14px 16px; border-radius: 14px; margin: 16px 0; color: #7a5c0f; }
.auth-page { display: flex; justify-content: center; padding: 50px 0 60px; }
.auth-card { width: 100%; max-width: 520px; }
/* Login card background image */
.auth-card {
    background-image: url('/assets/images/denglu.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* keep subtle white/blur overlay for readability */
    position: relative;
    overflow: hidden;
}
.auth-card::before {
    content: '';
    position: absolute;
    inset: 0;
    /* reduce overlay opacity so background image appears clearer */
    background: rgba(255,255,255,0.55);
    mix-blend-mode: normal;
    pointer-events: none;
}
/* ensure content sits above overlay */
.auth-card > * { position: relative; z-index: 1; }
/* make inputs slightly translucent to stand out on background */
.auth-card input, .auth-card textarea, .small-input { background: rgba(255,255,255,0.92); }


/* social login icons */
.social-login-link{display:inline-block}
.social-login-icon{width:48px;height:48px;object-fit:contain;display:block;border-radius:10px;background:#ffffff;padding:8px;border:1px solid rgba(0,0,0,0.04);box-shadow:0 22px 44px rgba(31,95,228,0.14);transform:translateY(-6px) scale(1.03);transition:transform .18s cubic-bezier(.2,.9,.2,1),box-shadow .18s cubic-bezier(.2,.9,.2,1),filter .18s ease}
.social-login-link:hover .social-login-icon,.social-login-icon:focus{transform:translateY(-12px) scale(1.08);box-shadow:0 32px 72px rgba(31,95,228,0.24);filter:brightness(1.04)}
.social-login-icon:active{transform:translateY(-3px) scale(1.05)}
.auth-card h1 { margin-bottom: 18px; font-size: 32px; letter-spacing: 0.8px; color: #1f2d3d; }
.auth-card .notice { margin-bottom: 20px; padding: 16px 18px; border-radius: 16px; background: #f4f7ff; border: 1px solid #d8e4ff; color: #1f3f72; line-height: 1.7; }
.auth-card label { display: block; margin: 16px 0 8px; font-weight: 600; color: #34415a; }
/* Smaller unified label/input/link styles for compact login forms */
.small-label { display: block; margin: 8px 0 6px; font-weight: 600; color: #34415a; font-size: 13px; }
.small-input { width: 100%; padding: 10px 12px; border: 1px solid #d8dee9; border-radius: 12px; font-size: 13px; }
.small-link { font-size: 13px; color: #1f5fe4; text-decoration: none; }
.small-link:hover { text-decoration: underline; }
.auth-card .checkbox { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; color: #4e5f7a; white-space:nowrap; }

/* login actions: checkbox + submit */
.login-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:nowrap;margin-top:12px}
@media (max-width:480px){
    .login-actions{flex-direction:column;align-items:flex-start}
    .login-actions .button{width:100%}
}

/* header buttons match auth buttons */
.site-header .user-panel .button{padding:12px 18px;border-radius:999px;font-weight:600;font-size:14px;line-height:1; height:auto; min-height:40px}
.site-header .user-panel .button.button-secondary{background:#f0f5ff;color:#1f5fe4;border:1px solid #d9e4ff}
.auth-card input, .auth-card textarea { width: 100%; padding: 14px 16px; border: 1px solid #d8dee9; border-radius: 16px; font-size: 14px; }
.checkbox { margin: 16px 0; display: flex; align-items: center; gap: 8px; font-size: 14px; color: #4e5f7a; }
.text-center { text-align: center; }
.code-row { display: flex; gap: 10px; }
.code-row input { flex: 1; }
.chat-box { max-height: 520px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.chat-message { padding: 0; border-radius: 0; background: transparent; position: relative; }
.chat-message.mine { background: transparent; align-self: flex-end; }
.chat-time { font-size: 12px; color: #63718a; margin-top: 10px; }
.chat-form textarea,
#privateChatForm textarea,
#groupChatForm textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d8dee9;
    border-radius: 12px;
    margin-bottom: 14px;
    resize: none;
    box-sizing: border-box;
    min-height: 38px !important;
    max-height: 38px !important;
    height: 38px !important;
    line-height: 1.5;
    overflow: hidden; /* hide native scroll arrows */
    -webkit-appearance: none;
    appearance: none;
}
.chat-editor-wrapper {
    position: relative;
    margin-bottom: 14px;
}
.chat-editor {
    width: 100%;
    min-height: 72px;
    padding: 10px 12px;
    border: 1px solid #d8dee9;
    border-radius: 12px;
    box-sizing: border-box;
    line-height: 1.6;
    color: #2b374e;
    background: #fff;
    white-space: pre-wrap;
    word-break: break-word;
    outline: none;
}
.chat-editor:empty:before {
    content: attr(data-placeholder);
    color: #97a3b8;
}
.chat-editor img.chat-emoji-inline {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin: 0 2px;
}

/* Hide WebKit scrollbars for the chat textarea */
.chat-form textarea::-webkit-scrollbar,
.chat-form textarea::-webkit-scrollbar-thumb,
.chat-form textarea::-webkit-scrollbar-track {
    display: none;
    width: 0;
    height: 0;
}
.chat-form textarea { -ms-overflow-style: none; }

.chat-input-row {
    position: relative;
    margin-bottom: 8px;
}
.chat-emoji-picker {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    cursor: pointer;
}
.chat-emoji-picker .chat-emoji-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.chat-emoji-panel {
    display: none;
    position: absolute;
    bottom: 110%;
    left: 0;
    width: 320px;
    max-height: 220px;
    padding: 10px;
    background: #fff;
    border: 1px solid #d8dee9;
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    overflow: auto;
    z-index: 50;
    flex-wrap: wrap;
    gap: 6px;
}
.chat-emoji-picker:hover .chat-emoji-panel,
.chat-emoji-picker:focus-within .chat-emoji-panel {
    display: flex;
}
.chat-emoji-item {
    width: 34px;
    height: 34px;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.chat-emoji-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.chat-emoji-item:hover {
    background: #f0f5ff;
}
.chat-emoji-inline {
    display: inline-block;
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin: 0 2px;
}

/* In case any inputs of type=number exist nearby, remove their spinner controls */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.editor-form label { display: block; margin: 14px 0 8px; }
.editor-form input, .editor-form textarea { width: 100%; border: 1px solid #d7dbe6; border-radius: 14px; padding: 14px; }
.comment-section { margin-top: 28px; }
.comment-item { margin-bottom: 16px; }
.comment-header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: 13px; color: #64718a; }
.comment-delete { color: #d43c3c; }
.comment-form textarea { width: 100%; border: 1px solid #d7dbe6; border-radius: 16px; padding: 16px; margin-top: 14px; resize: vertical; }
.post-detail .post-content { padding: 18px 0; line-height: 1.85; color: #384157; }
.post-actions { margin-top: 20px; display: flex; gap: 12px; flex-wrap: wrap; }
/* profile styles */
.profile-row { display:flex; gap:16px; align-items:center; }
.avatar-large { width:96px; height:96px; border-radius:12px; object-fit:cover; border: 3px solid #fff; box-shadow: 0 6px 20px rgba(31,95,228,0.08); }
.profile-card-grid { display:grid; grid-template-columns: minmax(300px, 380px) minmax(300px, 1fr); gap: 18px; }
.profile-details { display:flex; flex-direction:column; gap: 6px; }
.profile-name { margin:0; font-size: 22px; font-weight: 700; color: #1f2d3d; }
.level-badge-row { display:flex; align-items:center; gap:10px; margin-top: 4px; padding: 8px 10px; border-radius: 999px; background:#f6f8ff; border:1px solid #e2e8f5; width: fit-content; }
.level-badge-image { width: 32px; height: 32px; object-fit:contain; }
.level-badge-copy { display:flex; flex-direction:column; gap: 2px; }
.level-badge-label { margin:0; font-size: 13px; font-weight: 700; color:#1f2d3d; }
.level-badge-text { margin:0; font-size: 11px; color:#607089; }
.profile-avatar-actions { display:flex; align-items:center; gap: 10px; margin-top: 4px; }
.avatar-upload-input { display:none; }
.avatar-upload-label { margin:0; cursor:pointer; padding: 8px 12px; font-size: 12px; }
.avatar-preview-hint { margin: 0; color: #607089; font-size: 12px; }
.profile-sub { margin: 0; color: #55637a; font-size: 14px; }
.profile-stats { margin-top: 18px; display:grid; gap: 12px; }
.stat-line { display:flex; justify-content:space-between; align-items:center; padding: 12px 14px; border-radius: 14px; background: #f7f9ff; border: 1px solid #e8ecf7; color: #34415c; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 8px; color: #34415c; font-weight: 600; }
.card-item form input[type="text"], .card-item form input[type="url"], .card-item form textarea, .card-item form select { width: 100%; padding: 12px 14px; border: 1px solid #d8dee9; border-radius: 14px; background: #fff; color: #2b374e; font-size: 14px; }
.card-item form textarea { min-height: 120px; resize: vertical; }
.checkbox-group { display:flex; flex-wrap:wrap; gap: 12px; padding: 14px 16px; border-radius: 16px; border: 1px solid #e9effb; background: #f6f8ff; margin-bottom: 18px; }
.checkbox-group legend { font-size: 14px; font-weight: 700; color: #1f2d3d; width: 100%; }
.checkbox-group label { display:flex; align-items:center; gap: 8px; color: #475569; font-weight: 500; }
.note-link { margin: 10px 0 0; font-size: 13px; color: #4b5d78; }
.card-item form input[type="file"] { width: 100%; padding: 6px 0; }
.card-item .button { width: auto; }
.card-meta { margin-top: 12px; font-size: 13px; color: #5f6e86; }
.social-grid { display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.notification-preference-list { display:flex; flex-direction:column; gap: 12px; margin: 18px 0; }
.toggle-item { display:flex; align-items:center; justify-content:space-between; gap: 16px; padding: 16px 18px; border-radius: 18px; background: linear-gradient(180deg, #fff, #f8faff); border: 1px solid #e1e8f6; box-shadow: inset 0 1px 0 rgba(255,255,255,0.65); }
.toggle-copy { display:flex; flex-direction:column; gap: 4px; }
.toggle-copy strong { color: #1f2d3d; font-size: 16px; }
.toggle-copy span { color: #657589; font-size: 13px; }
.switch-toggle { appearance:none; width: 52px; height: 30px; border-radius: 999px; background: #cbd5e1; position: relative; cursor:pointer; transition: background 0.22s ease; border: 1px solid #b8c5da; }
.switch-toggle::before { content:""; position:absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background:#fff; box-shadow: 0 2px 6px rgba(15,23,42,0.24); transition: transform 0.22s ease; }
.switch-toggle:checked { background: linear-gradient(180deg, #1f5fe4, #3d7cff); border-color: #2a63dd; }
.switch-toggle:checked::before { transform: translateX(22px); }
.notification-card { background: linear-gradient(180deg, #fffdfd, #f5f8ff); border-color: #dfe6fb; }
.payment-card { background: linear-gradient(180deg, #fffdf7, #fffaf1); border-color: #f6ddbe; }
.security-card { background: linear-gradient(180deg, #f9fcff, #f1f7ff); border-color: #cfe1ff; }
.payment-upload-preview { display:flex; flex-direction:column; gap: 12px; }
.payment-preview-box { display:flex; align-items:center; justify-content:center; min-height: 160px; border-radius: 18px; border: 1px dashed #f4b36b; background: rgba(255,248,236,0.8); padding: 12px; }
.payment-preview { max-width: 220px; max-height: 220px; border-radius: 16px; object-fit: contain; }
@media (max-width: 900px) {
    .profile-card-grid { grid-template-columns: 1fr; }
}
/* Homepage two-column layout (left 850px, right 320px) */
.home-main { display:flex; gap:24px; align-items:flex-start; justify-content:center; padding:20px 0; }
.home-left { width:850px; max-width:calc(100% - 360px); }
.home-right { width:320px; flex:0 0 320px; }
@media (max-width: 1200px) {
    .home-left { width: calc(100% - 340px); }
}
@media (max-width: 980px) {
    .home-main { flex-direction:column; padding:12px; }
    .home-left, .home-right { width:100%; max-width:100%; }
}

/* Slider sizing: ensure Swiper container matches 850x300 target and keeps aspect on small screens */
.zib-slider .new-swiper { width:100%; height:300px; max-width:850px; }
.zib-slider .new-swiper .swiper-slide img { width:100%; height:100%; object-fit:cover; display:block; }

/* Graphic containers must hide overflow so badges don't escape into page flow */
.graphic, .hot-cover-large .graphic, .graphic .fit-cover { position:relative; overflow:hidden; }

/* TOP 徽章定位（靠卡片左侧边放置），半透明并禁止交互，大小区分 */
.top-badge { position:absolute; left:-12px; top:12px; z-index:5; pointer-events:none; opacity:0.92; mix-blend-mode:normal; }
.top-badge-large { width:92px; height:auto; transform:translateX(0); }
.top-badge-small { width:40px; height:auto; transform:translateX(0); }

/* Ensure small hot items layout aligns badges and thumb images */
.hot-item { display:flex; gap:10px; align-items:flex-start; padding:8px 6px; border-radius:10px; }
.hot-item .graphic { width:80px; height:60px; flex:0 0 80px; }
.hot-item .term-title { display:block; }

/* prevent badges from being displayed outside the card when scrolling */
.hot-card, .hot-cover-large, .card { position:relative; }
.hot-card { overflow: visible !important; }
/* hide scrollbars while keeping content visible */
.hot-card, .comments-card { -ms-overflow-style: none; }
.hot-card::-webkit-scrollbar, .comments-card::-webkit-scrollbar { display: none; }

/* Ensure small badges sit inside the thumbnail and don't push layout */
.hot-item .top-badge-small { left: -8px; top: 6px; width:40px; }
.hot-cover-large .top-badge-large { left:-10px; top:10px; width:96px; }

/* Hot title above the card */
.hot-wrapper { margin: 18px 0 18px; }
.hot-title { font-size:15px; font-weight:700; color:#111; }

/* TOP pill styles */
.top-pill { position:absolute; left:12px; top:12px; background:#ff4b7a; color:#fff; padding:6px 14px; border-radius:18px; font-weight:800; box-shadow:0 4px 10px rgba(12,23,46,0.08); z-index:30; font-size:13px; }
.read-count-pill { position:absolute; left:12px; bottom:56px; background:#ff3b30; color:#fff; padding:6px 10px; border-radius:8px; font-weight:700; z-index:25; font-size:12px; }
.top-pill-small { position:absolute; left:8px; top:8px; background:linear-gradient(180deg,#ff7a59,#ff6a3d); color:#fff; padding:6px 9px; border-radius:10px; font-weight:700; z-index:20; font-size:12px; box-shadow:0 4px 10px rgba(12,23,46,0.06); }

/* color variants for small pills (2..7) */
.tp-2{background:linear-gradient(180deg,#ff7a59,#ff6a3d)}
.tp-3{background:linear-gradient(180deg,#ffb84d,#ff9b2a)}
.tp-4,.tp-5,.tp-6,.tp-7{background:linear-gradient(180deg,#b0b0b0,#8c8c8c)}

/* Ensure hot cover's rounded corners clip pills that would overflow */
.hot-cover-large .graphic { overflow: hidden; border-radius:12px; }
.hot-cover-large .graphic img { display:block; width:100%; height:100%; object-fit:cover; box-shadow:none; transform:none; }

/* small helpers used by ip31-like styles */
.text-ellipsis-2{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-clamp:2}
.muted-3-color{color:#6f7b8d}

/* --- additional components to mimic ip31 layout --- */
.zib-slider { width: 100%; }
.relative { position: relative; }
.new-swiper { position: relative; }
.swiper-wrapper { display: flex; width: 100%; height: 100%; }
.swiper-slide { flex: 0 0 100%; display: flex; align-items: center; justify-content: center; }
.swiper-slide img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 8px; }
.swiper-button-prev, .swiper-button-next { position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 50%; background: rgba(0,0,0,0.35); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 10; }
.swiper-button-prev { left: 8px; }
.swiper-button-next { right: 8px; }

/* customize swiper arrows to look like ip31: circular with chevron */
.swiper-button-prev::after, .swiper-button-next::after { font-family: inherit; font-size: 18px; color: #fff; }
.swiper-button-prev::after { content: '\2039'; }
.swiper-button-next::after { content: '\203A'; }

/* pagination bullets */
.swiper-pagination { position: absolute; left: 50%; transform: translateX(-50%); bottom: 10px; z-index: 12; }
.swiper-pagination-bullet { width: 10px; height: 10px; background: rgba(255,255,255,0.45); opacity: 1; margin: 0 6px; border-radius: 999px; border: 2px solid rgba(0,0,0,0.08); transition: all .28s cubic-bezier(.2,.9,.2,1); }
.swiper-pagination-bullet-active { background: #1f5fe4; width: 14px; height: 14px; box-shadow: 0 6px 18px rgba(31,95,228,0.12); border-color: rgba(255,255,255,0.9); }

/* top badge SVGs */
.top-badge { position: absolute; right: 8px; top: 8px; z-index: 30; width: 56px; height: 56px; display: block; }
.top-badge.top-badge-large { right: 10px; top: 10px; width: 88px; height: 88px; }
.top-badge.top-badge-small { right: 6px; top: 6px; width: 32px; height: 32px; }
.top-badge.top1 { right: 12px; top: 8px; width: 104px; height: 104px; }
.hot-cover-large, .hot-cover-large .relative, .hot-cover-large .flex.relative { overflow: hidden; }
.hot-card { /* ensure scroll container doesn't let badges float into footer */ overflow: auto; }
.hot-card .card { overflow: visible; }
.hot-compact-item { padding-left: 18px; overflow: hidden; }

/* layout for hot list items: thumbnail left, text right */
.hot-item { display: flex; align-items: center; gap: 10px; padding: 8px 4px; }
.hot-item .graphic { flex: 0 0 80px; }
.hot-item .term-title { flex: 1; }
.hot-item img.fit-cover { width: 80px; height: 64px; object-fit: cover; display: block; }
.hot-compact-item { padding-left: 18px; }


.graphic { position: relative; overflow: hidden; display: block; }
.graphic img.fit-cover { width: 100%; height: 100%; object-fit: cover; display:block; }
.graphic .absolute.linear-mask { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0.08), rgba(0,0,0,0.22)); }
.abs-center.left-bottom { position: absolute; left: 12px; bottom: 12px; color: #fff; z-index: 6; text-shadow: 0 2px 12px rgba(0,0,0,0.45); }

.badg { display: inline-block; padding: 6px 8px; border-radius: 6px; font-size: 12px; color: #fff; background: rgba(0,0,0,0.6); }
.b-theme { background: var(--theme-color, #ff1856); }
.badg-sm { padding: 4px 6px; font-size: 11px; }

/* img-badge styles — placed outside left edge */
badge.img-badge.left { position: absolute; left: -12px; top: 12px; z-index: 20; display: inline-flex; align-items: center; justify-content: center; padding: 6px 10px; border-radius: 4px; color: #fff; font-weight: 700; box-shadow: none; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
badge.img-badge.left.hot { background: rgba(0,0,0,0.65); }
badge.img-badge.left.hot.jb-red { background: linear-gradient(90deg,#ff3b5c,#ff1856); }
badge.img-badge.left.hot.jb-yellow { background: linear-gradient(90deg,#ffbb50,#ffb200); color:#222; }
badge.img-badge.left.hot.b-gray { background: rgba(100,100,100,0.85); }
badge.img-badge.left.hot.em12 { font-size: 12px; padding: 6px 8px; }

.hot-cover-large { background: transparent; border: none; box-shadow: none; }
.hot-list-compact { display:flex; flex-direction:column; gap:8px; }
.hot-compact-item { display:flex; gap:8px; align-items:center; }
.compact-thumb { width:80px; height:56px; background-size:cover; background-position:center; border-radius:6px; flex:0 0 80px; }
.term-title a { color: #213248; font-weight:600; }

/* small helpers for posts list spacing */
.posts-list .post-preview { margin-bottom: 12px; padding: 14px; }

/* 首页两栏布局 */
.home-main { display:flex; gap:18px; align-items:flex-start; margin: 20px 0; }
.home-left { flex: 0 0 850px; max-width:850px; }
.home-right { flex: 0 0 320px; max-width:320px; }
.home-carousel { border-radius: 12px; overflow: hidden; background:#fff; border:1px solid #e7ebf5; box-shadow: 0 18px 50px rgba(31,95,228,0.04); }
.home-carousel { border-radius: 12px; overflow: hidden; background:#fff; border:1px solid #e7ebf5; box-shadow: 0 18px 50px rgba(31,95,228,0.04); position:relative; }
.home-carousel .carousel-slides { position:relative; width:100%; height:100%; }
.home-carousel .carousel-slide { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; opacity:0; transition:opacity .6s ease; }
.home-carousel .carousel-slide.active { opacity:1; z-index:2; }
.home-carousel .carousel-slide img { width:100%; height:100%; object-fit:cover; display:block; }

/* arrows */
.carousel-arrow { position:absolute; top:50%; transform:translateY(-50%); width:40px; height:64px; border-radius:8px; background:rgba(255,255,255,0.85); border:1px solid rgba(31,95,228,0.08); box-shadow:0 6px 18px rgba(31,95,228,0.06); display:flex; align-items:center; justify-content:center; font-size:28px; color:#1f2d3d; cursor:pointer; z-index:5; }
.carousel-prev { left:12px; }
.carousel-next { right:12px; }
.carousel-arrow:hover { transform:translateY(-50%) scale(1.03); }

/* indicators */
.carousel-indicators { position:absolute; left:50%; transform:translateX(-50%); bottom:10px; display:flex; gap:8px; z-index:6; }
.carousel-indicators button { width:10px;height:10px;border-radius:999px;border:none;background:rgba(255,255,255,0.7); box-shadow:0 4px 12px rgba(31,95,228,0.06); cursor:pointer; }
.carousel-indicators button.active { background:#1f5fe4; }
.posts-list { display:flex; flex-direction:column; gap:12px; margin-top:14px; }
.post-preview { display:block; }
.post-preview .post-card-header { display:flex; gap:12px; align-items:center; }
.post-preview h3 { margin:0 0 6px; }
.login-panel { display:flex; flex-direction:column; align-items:stretch; justify-content:flex-start; }
.login-panel .login-image { background:#fff; }
.hot-card h3, .comments-card h3 { margin:0 0 8px; font-size:16px; color:#1f2d3d; }

/* Carousel autoplay indicator (simple) */
/* (old indicator fallback removed) */

@media (max-width: 1024px) {
    .home-main { flex-direction:column; }
    .home-left, .home-right { max-width:100%; flex:1 1 auto; }
    .home-carousel { width:100% !important; height:200px !important; }
    .post-preview { width:100% !important; }
}

/* Ensure special right-column cards use same base card styling */
.login-panel, .hot-card, .comments-card { background: #ffffff; border: 1px solid #e7ebf5; box-shadow: 0 18px 50px rgba(31,95,228,0.04); border-radius: 18px; }
.login-panel .login-image { background: transparent; }

/* Gradient titles above cards */
.card-title { font-size:16px; font-weight:800; margin-bottom:6px; color: #1f2d3d; display:inline-block; }
.card-title-hot, .card-title-comments { color: #1f2d3d; background: none; }

/* Hot badges for TOP labels */
.hot-list { display:flex; flex-direction:column; gap:18px; padding:10px 12px; }
.hot-item { display:flex; gap:12px; align-items:flex-start; position:relative; padding-left:18px; }
.hot-badge { position:absolute; left:-12px; top:6px; display:inline-flex; align-items:center; justify-content:center; padding:6px 10px; border-radius:8px; color:#fff; font-weight:800; font-size:12px; min-width:56px; }
.hot-badge.rank-1 { background: linear-gradient(90deg,#ff5370,#ff3b3b); }
.hot-badge.rank-2 { background: linear-gradient(90deg,#ff8a3d,#ff6b2a); }
.hot-badge.rank-3 { background: linear-gradient(90deg,#ffd54b,#ffbf47); color:#2b2b2b; }
.hot-badge.rank-4, .hot-badge.rank-5, .hot-badge.rank-6, .hot-badge.rank-7 { background: linear-gradient(90deg,#e6e9ef,#cfd6e6); color:#6b7280; }
.hot-item .hot-title { flex:1; font-size:14px; color:#1f2d3d; margin-left:8px; }
.hot-item .hot-meta { font-size:12px; color:#6f7b8d; margin-top:6px; margin-left:8px; }

/* ensure badges don't push layout when overlapping */
.hot-card { overflow: auto; }

/* TOP1 cover styles */
.hot-cover { padding:0; border-radius:12px; }
.hot-cover .cover-image { position:absolute; inset:0; background-size:cover; background-position:center; filter:brightness(0.9); }
.hot-cover .cover-overlay { position:absolute; left:0; right:0; bottom:0; padding:12px; color:#fff; text-decoration:none; background:linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.45) 60%, rgba(0,0,0,0.6) 100%); }
.hot-cover .cover-title { font-size:16px; font-weight:800; color:#fff; }
.hot-cover .cover-top-left { position:absolute; left:8px; top:8px; display:flex; gap:8px; align-items:center; z-index:4; }
.hot-cover .hot-badge { position: absolute; left:-12px; top:12px; margin:0; }
.hot-cover .read-count { background:rgba(255,255,255,0.9); color:#1f2d3d; padding:6px 8px; border-radius:8px; font-size:12px; font-weight:700; }

/* Large cover with left image and right compact list */
.hot-cover-large-inner { display:flex; gap:10px; align-items:flex-start; }
.cover-thumb { width:120px; height:120px; border-radius:10px; background-size:cover; background-position:center; flex:0 0 120px; position:relative; }
.hot-list-right { flex:1; display:flex; flex-direction:column; gap:8px; }
.hot-cover-title a { font-weight:800; color:#1f2d3d; font-size:15px; text-decoration:none; }
.hot-cover-meta { font-size:12px; color:#6f7b8d; margin-top:6px; }
.hot-list-compact { display:flex; flex-direction:column; gap:10px; margin-top:8px; }
.hot-compact-item { display:flex; gap:8px; align-items:center; position:relative; padding-left:10px; }
.compact-thumb { width:64px; height:46px; border-radius:8px; background-size:cover; background-position:center; flex:0 0 64px; background-color:#f6f8ff; }
.compact-body { flex:1; }
.hot-compact-item .hot-title a { color:#1f2d3d; font-size:13px; text-decoration:none; }
.hot-compact-item .hot-meta { font-size:12px; color:#6f7b8d; margin-top:4px; }

/* Semi-transparent badge overlay on thumbnails */
.hot-badge.rank-1 { background: linear-gradient(90deg, rgba(255,83,112,0.92), rgba(255,59,59,0.92)); }
.hot-badge.rank-2 { background: linear-gradient(90deg, rgba(255,138,61,0.92), rgba(255,107,42,0.92)); }
.hot-badge.rank-3 { background: linear-gradient(90deg, rgba(255,213,75,0.95), rgba(255,191,71,0.95)); color:#2b2b2b; }
.hot-badge.rank-4, .hot-badge.rank-5, .hot-badge.rank-6, .hot-badge.rank-7 { background: rgba(230,233,239,0.95); color:#6b7280; }

/* Footer stats and circular clock styles */
.footer-stats .date-card img { display: block; }
.footer-stats .stats-row > div { background: rgba(255,255,255,0.92); padding: 12px 14px; border-radius: 12px; }
.circular-clock { width: 120px; height: 120px; display: inline-block; position: relative; }
.circular-clock svg { width: 100%; height: 100%; display: block; }
.circular-clock .clock-center { position: absolute; left: 0; right: 0; top: 0; bottom: 0; display:flex;align-items:center;justify-content:center;flex-direction:column; }
.circular-clock .time { font-weight:700; font-size:18px; color:#1f2d3d; }
.circular-clock .seconds { font-weight:600; font-size:12px; color:#7b7f8f; margin-left:6px; }

@media (max-width:720px){
    .footer-stats .stats-row { grid-template-columns: repeat(auto-fit,minmax(140px,1fr)); gap:10px; }
}

/* Homepage stats layout */
.home-stats .card { background: #fff; border-radius: 12px; box-shadow: 0 12px 36px rgba(16,24,40,0.06); border: 1px solid rgba(231,235,245,0.9); padding:0; }
.home-stats .card > div, .home-stats .card > img { display:block }
.home-stats .card img { width:100%;height:100%;object-fit:cover }
.home-stats .card[style] { padding:0 }
.home-stats .card { overflow: hidden }
.home-stats .card .stat-value { font-weight:800;font-size:22px;color:#0f1724 }
.home-stats .card .stat-label { font-size:12px;color:#6b7280;margin-top:6px }

@media (max-width:900px){
    .home-stats .container { grid-template-columns:1fr !important; }
    .home-stats .container > div { justify-content:center }
}

/* Bottom home stats cards prominence */
.home-stats-bottom .card { background: #fff; padding: 18px; border-radius: 12px; box-shadow: 0 18px 40px rgba(14,30,60,0.06); border: 1px solid rgba(230,235,245,0.9); }
.home-stats-bottom .card .stat-value { font-size:24px; font-weight:900; color:#0b1220; }
.home-stats-bottom .card .stat-label { font-size:13px; color:#6b7280; margin-top:8px }
.home-stats-bottom .card img { border-radius:8px }
.home-stats-bottom .container > div > .card { min-height:0 }

/* Make home stats columns stretch so left(today) and right(clock) match heights */
.home-stats-bottom .container { align-items: stretch; }
.home-stats-bottom .container > div { display:flex; flex-direction:column; }
.home-stats-bottom .card { display:flex; flex-direction:column; justify-content:space-between; height:100%; }

/* Shift "今天是" card slightly left and clock slightly right visually by adding internal padding adjustments */
.home-stats-bottom .container > div:first-child { padding-right: 6px; flex: 0 0 320px; }
.home-stats-bottom .container > div:nth-child(2) { flex: 1 1 520px; min-width: 260px; }
.home-stats-bottom .container > div:nth-child(3) { padding-left: 6px; flex: 0 0 280px; }

/* Make today card slightly more spacious but keep height consistent with middle cards */
.home-stats-bottom .container > div:first-child .card { padding:20px; min-height:120px; }

/* Make middle small cards a bit larger/wider and reduce gaps between columns */
.home-stats-bottom .container > div:nth-child(2) .card { padding:18px; min-height:120px; }
.home-stats-bottom .container > div:nth-child(2) .card .stat-value { font-size:24px }

/* Slightly reduce spacing inside middle column cards to use freed gap space */
.home-stats-bottom .container > div:nth-child(2) { gap:8px; }

/* Keep clock card height consistent with middle cards */
.home-stats-bottom .container > div:nth-child(3) .card { min-height:120px; display:flex; align-items:center; justify-content:center; padding:24px; }

.circular-clock .clock-center { position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); pointer-events:none; display:flex;flex-direction:column;align-items:center;justify-content:center; }
.circular-clock .weekday-label { font-size:12px; color:#6b7280; }
.circular-clock .date-label { font-size:13px; color:#6b7280; font-weight:600; }
.circular-clock .time-full { font-weight:700; font-size:18px; color:#101828; margin-top:6px }
@media (max-width: 680px) {
    .social-grid { grid-template-columns: 1fr; }
    .toggle-item { align-items: flex-start; }
}
/* Added home-stats-bottom maintenance styles (moved from index.php inline styles) */
.home-stats-bottom { margin:18px 0; padding-bottom:6px; }
.home-stats-bottom .container { display: flex; gap: 12px; align-items: flex-start; flex-wrap: nowrap; justify-content: space-between; }
.home-stats-bottom .container > div:first-child { padding-right: 6px; }
.home-stats-bottom .container > div:nth-child(3) { padding-left: 6px; }
.home-stats-bottom .today-card { padding: 20px; border-radius: 12px; min-height: 120px; }
.home-stats-bottom .today-card .today-title { font-size:22px; font-weight:800; color:#0f1724; margin-bottom:6px; }
.home-stats-bottom .today-card .today-date { font-size:15px; font-weight:700; color:#39404a; margin-bottom:12px; }
.home-stats-bottom .today-card .weekday-image { width:100%; height:120px; border-radius:10px; overflow:hidden; margin-bottom:12px; background:#eef6ff; display:flex; align-items:center; justify-content:center; }
.home-stats-bottom .today-card .weekday-image img { width:100%; height:100%; object-fit:cover; display:block; }
.home-stats-bottom .today-card .today-hint { font-size:15px; font-weight:700; color:#39404a; margin-top:0; }
.home-stats-bottom .top-stats-row { display:flex; gap:12px; margin-bottom:12px; align-items:stretch; }
.home-stats-bottom .stat-card {
    /* per-card sizing variables:
       --card-flex: controls flex grow/shrink/basis shorthand (default uses existing layout)
       --card-basis: used as flex-basis if you prefer fixed basis
       --card-width: explicit width (overrides flex-basis when set)
       --card-height: explicit min-height for the card
    */
    padding:16px;
    text-align:center;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    flex: var(--card-flex, 1);
    flex-basis: var(--card-basis, auto);
    width: var(--card-width, auto);
    min-height: var(--card-height, 0);
}
.home-stats-bottom .stat-card .stat-icon { width:40px; height:40px; margin-bottom:8px; }
.home-stats-bottom .stat-card .stat-value { font-weight:900; font-size:22px; color:#0f1724; }
.home-stats-bottom .stat-card .stat-label { font-size:12px; color:#6b7280; margin-top:6px; }
.home-stats-bottom .post-card { flex: 1; }
.home-stats-bottom .ip-card { flex: 2; }
.home-stats-bottom .bottom-stats-row { display:flex; gap:12px; }
.home-stats-bottom .bottom-stats-row .stat-card { flex:1; }
.home-stats-bottom .container > div:nth-child(3) .card { min-height:120px; display:flex; align-items:center; justify-content:center; padding:24px; }
/* sidebar/content layout for profile */
.profile-layout { display: grid; grid-template-columns: 260px 1fr; gap: 18px; align-items: start; }
.profile-sidebar { padding: 18px; }
.profile-menu ul { list-style: none; padding: 0; margin: 0; display:flex; flex-direction: column; gap: 8px; }
.profile-menu a { display: block; padding: 10px 12px; border-radius: 10px; color: #34415c; border: 1px solid transparent; }
.profile-menu a.active { background: #eef3ff; border-color: #dbe6ff; color: #1f5fe4; font-weight: 700; }
.profile-content .card-item { min-height: 320px; }

@media (max-width: 900px) {
    .profile-layout { grid-template-columns: 1fr; }
    .profile-sidebar { order: 2; }
    .profile-content { order: 1; }
}
@media (max-width: 1180px) {
    /* Switch to stacked layout at narrower widths so items don't overflow */
    .home-stats-bottom .container { flex-direction: column; gap:12px; }
    .home-stats-bottom .container > div { flex: 1 1 auto; min-width: 0; padding: 0; }
    .home-stats-bottom .container > div:first-child, .home-stats-bottom .container > div:nth-child(3) { padding: 0; }
}
footer.site-footer { background: transparent; padding: 24px 0; color: #5f6e86; }
footer.site-footer p { margin: 0; }
footer.site-footer .container { display:flex; flex-direction:column; gap: 10px; align-items:flex-start; }
footer.site-footer .ico-ico, footer.site-footer .beian-ico { display:inline-flex; align-items:center; gap: 8px; color: #5f6e86; font-size: 13px; line-height: 1.4; }
footer.site-footer .ico-ico img, footer.site-footer .beian-ico img { height: 20px; width: auto; }
@media (max-width: 900px) {
    .site-header .container, .site-badge .container { flex-direction: column; align-items: stretch; }
    .site-nav { justify-content: center; }
    .user-panel { justify-content: center; }
}

/* level progress styles */
.level-progress { margin-top:12px; }
.level-progress-bar { width:100%; height:12px; background:#eef3ff; border-radius:999px; overflow:hidden; border:1px solid #e2e8f5; }
.level-progress-fill { height:100%; background: linear-gradient(90deg,#ffd26b,#ff8a5b); width:0%; transition: width .6s ease; }
.level-overview .level-card-header { display:flex; gap:12px; align-items:center; }
.transactions-list { background: #fff; }

@media (max-width: 680px) {
    .page-title h1 { font-size: 28px; }
    .card-grid { grid-template-columns: 1fr; }
    .auth-page { padding: 30px 0; }
    .site-nav a { padding: 10px 12px; }
}
