/* ============================================
   茄搜家园 - 腾讯QQ家园 1:1 复刻
   经典天蓝主题 · 复古紧凑 · 左侧资料卡
   ============================================ */

/* ===== QQ家园经典色彩 ===== */
:root {
    --qq-blue: #4F9D9D;        /* QQ家园主蓝(青蓝) */
    --qq-blue-light: #6BB6B6;  /* 浅蓝 */
    --qq-blue-dark: #3A8585;   /* 深蓝 */
    --qq-blue-bg: #E8F4F4;     /* 蓝色背景 */
    --qq-cyan: #5FB0E0;        /* 天蓝 */
    --qq-orange: #FF9900;      /* 橙色强调 */
    --qq-orange-dark: #E68A00; /* 深橙 */
    --qq-yellow: #FFCC00;      /* 黄色(等级) */
    --qq-red: #E84545;         /* 红色(提示) */
    --qq-green: #66B334;       /* 绿色(在线) */
    --bg-page: #F5F5F5;        /* 页面背景 */
    --bg-card: #FFFFFF;        /* 卡片背景 */
    --bg-soft: #F8FBFB;        /* 次背景 */
    --text-main: #333333;      /* 主文字 */
    --text-sub: #666666;       /* 次文字 */
    --text-mute: #999999;      /* 弱文字 */
    --text-link: #336699;      /* 链接蓝 */
    --border-line: #DCE3E3;    /* 边框 */
    --border-light: #ECECEC;   /* 浅边框 */
    --header-h: 56px;
    --side-w: 210px;
    --wrap-w: 1000px;
}

/* ===== Reset ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    -webkit-text-size-adjust: 100%;
    touch-action: manipulation;
}

body {
    font-family: "Microsoft YaHei", "微软雅黑", "PingFang SC", "Hiragino Sans GB", Tahoma, Arial, sans-serif;
    background: var(--bg-page);
    background-image:
        linear-gradient(180deg, #E8F4F4 0px, #E8F4F4 220px, var(--bg-page) 220px, var(--bg-page) 100%);
    color: var(--text-main);
    font-size: 12px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: var(--text-link);
    text-decoration: none;
}

a:hover {
    color: var(--qq-orange-dark);
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, li { list-style: none; }

/* ===== 顶部导航 - QQ家园经典蓝条 ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-h);
    background: linear-gradient(to bottom, #5FB0B0 0%, #4F9D9D 50%, #3A8585 100%);
    border-bottom: 1px solid #2E6B6B;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
    z-index: 1000;
}

.header-inner {
    max-width: var(--wrap-w);
    height: 100%;
    margin: 0 auto;
    padding: 0 12px;
    display: flex;
    align-items: center;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    letter-spacing: 1px;
}

.header-logo:hover {
    color: #fff;
    text-decoration: none;
}

.header-logo .logo-icon {
    width: 30px;
    height: 30px;
    background: #fff;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--qq-blue);
    font-size: 16px;
    font-weight: bold;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.header-nav {
    display: flex;
    align-items: center;
    margin-left: 28px;
    height: 100%;
}

.header-nav a {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 16px;
    color: #fff;
    font-size: 13px;
    text-decoration: none;
    position: relative;
    transition: background 0.2s;
}

.header-nav a:hover {
    background: rgba(255,255,255,0.15);
    text-decoration: none;
    color: #fff;
}

.header-nav a.active {
    background: rgba(255,255,255,0.2);
    color: #fff;
    font-weight: bold;
}

.header-nav a.active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: var(--qq-orange);
}

.header-user {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 3px;
    border: 2px solid rgba(255,255,255,0.8);
    object-fit: cover;
}

.header-user-name {
    color: #fff;
    font-size: 12px;
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-logout {
    color: #fff;
    font-size: 12px;
    padding: 4px 10px;
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 3px;
    background: rgba(0,0,0,0.1);
    text-decoration: none;
}

.header-logout:hover {
    background: rgba(0,0,0,0.25);
    color: #fff;
    text-decoration: none;
}

/* ===== 布局容器 ===== */
.container {
    max-width: var(--wrap-w);
    margin: 0 auto;
    padding: calc(var(--header-h) + 14px) 12px 30px;
}

/* ===== 双栏布局 ===== */
.main-layout {
    display: grid;
    grid-template-columns: var(--side-w) 1fr;
    gap: 14px;
    align-items: start;
}

/* ===== 左侧个人资料卡 ===== */
.sidebar {
    position: sticky;
    top: calc(var(--header-h) + 14px);
}

.profile-card {
    background: var(--bg-card);
    border: 1px solid var(--border-line);
    border-radius: 4px;
    margin-bottom: 10px;
    position: relative;
}

.profile-card-top {
    height: 50px;
    background: linear-gradient(135deg, #5FB0B0 0%, #4F9D9D 100%);
    border-radius: 3px 3px 0 0;
}

.profile-card-avatar-wrap {
    position: absolute;
    left: 50%;
    top: 16px;
    transform: translateX(-50%);
    width: 68px;
    height: 68px;
    padding: 3px;
    background: #fff;
    border: 1px solid var(--border-line);
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
    z-index: 2;
}

.profile-card-avatar {
    width: 100%;
    height: 100%;
    border-radius: 2px;
    object-fit: cover;
    background: #eee;
}

.profile-card-body {
    padding: 52px 12px 12px;
    text-align: center;
}

.profile-card-name {
    font-size: 14px;
    font-weight: bold;
    color: var(--text-main);
    margin-bottom: 4px;
}

.profile-card-level {
    display: inline-block;
    background: linear-gradient(to bottom, #FFCC00, #FF9900);
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    padding: 1px 6px;
    border-radius: 2px;
    margin-left: 4px;
    vertical-align: middle;
    text-shadow: 0 1px 1px rgba(0,0,0,0.2);
}

.profile-card-sign {
    font-size: 11px;
    color: var(--text-mute);
    margin-top: 4px;
    line-height: 1.5;
    word-break: break-all;
}

.profile-card-stats {
    display: flex;
    border-top: 1px solid var(--border-light);
    margin-top: 10px;
}

.profile-card-stats .stat {
    flex: 1;
    padding: 8px 0;
    text-align: center;
    border-right: 1px solid var(--border-light);
}

.profile-card-stats .stat:last-child {
    border-right: none;
}

.profile-card-stats .stat-num {
    font-size: 14px;
    font-weight: bold;
    color: var(--qq-blue);
}

.profile-card-stats .stat-label {
    font-size: 11px;
    color: var(--text-mute);
}

/* ===== 侧栏菜单 - QQ家园经典菜单 ===== */
.side-menu {
    background: var(--bg-card);
    border: 1px solid var(--border-line);
    border-radius: 4px;
    overflow: hidden;
}

.side-menu-title {
    background: linear-gradient(to bottom, #F8FBFB, #E8F4F4);
    padding: 8px 12px;
    font-size: 12px;
    font-weight: bold;
    color: var(--qq-blue-dark);
    border-bottom: 1px solid var(--border-line);
}

.side-menu ul li {
    border-bottom: 1px solid var(--border-light);
}

.side-menu ul li:last-child {
    border-bottom: none;
}

.side-menu ul a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    color: var(--text-sub);
    font-size: 12px;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.15s;
}

.side-menu ul a:hover {
    background: var(--qq-blue-bg);
    color: var(--qq-blue-dark);
    text-decoration: none;
}

.side-menu ul a.active {
    background: var(--qq-blue-bg);
    color: var(--qq-blue-dark);
    font-weight: bold;
    border-left-color: var(--qq-orange);
}

.side-menu ul a .menu-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--qq-blue);
}

/* ===== 卡片通用 ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-line);
    border-radius: 4px;
    margin-bottom: 10px;
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: linear-gradient(to bottom, #F8FBFB, #EEF6F6);
    border-bottom: 1px solid var(--border-line);
}

.card-header h3 {
    font-size: 13px;
    font-weight: bold;
    color: var(--qq-blue-dark);
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-header h3::before {
    content: '';
    width: 3px;
    height: 13px;
    background: var(--qq-orange);
    display: inline-block;
    border-radius: 2px;
}

.card-header .more {
    font-size: 11px;
    color: var(--text-mute);
}

.card-body {
    padding: 12px;
}

.card-footer {
    padding: 8px 12px;
    border-top: 1px solid var(--border-light);
    background: var(--bg-soft);
    font-size: 11px;
    color: var(--text-mute);
}

/* ===== 空间横幅 ===== */
.space-banner {
    height: 180px;
    background: linear-gradient(135deg, #5FB0B0 0%, #4F9D9D 60%, #3A8585 100%);
    position: relative;
    overflow: hidden;
    border-bottom: 3px solid var(--qq-orange);
}

.space-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(255,255,255,0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255,255,255,0.1) 0%, transparent 50%);
}

.space-banner-inner {
    position: relative;
    height: 100%;
    display: flex;
    align-items: flex-end;
    padding: 0 20px 16px;
    gap: 16px;
}

.space-avatar {
    width: 100px;
    height: 100px;
    border: 4px solid #fff;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    object-fit: cover;
    background: #eee;
    flex-shrink: 0;
}

.space-info {
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
    flex: 1;
    padding-bottom: 4px;
}

.space-info h2 {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.space-info .space-sign {
    font-size: 12px;
    opacity: 0.95;
    margin-bottom: 8px;
}

.space-info .space-meta {
    font-size: 11px;
    opacity: 0.85;
}

.space-stats-bar {
    display: flex;
    gap: 16px;
    margin-top: 8px;
}

.space-stats-bar .stat {
    color: #fff;
}

.space-stats-bar .stat-num {
    font-size: 15px;
    font-weight: bold;
}

.space-stats-bar .stat-label {
    font-size: 11px;
    opacity: 0.85;
}

.space-actions {
    position: absolute;
    top: 14px;
    right: 16px;
    display: flex;
    gap: 8px;
}

/* ===== 按钮 - QQ家园风格 ===== */
.btn-primary {
    display: inline-block;
    padding: 7px 18px;
    background: linear-gradient(to bottom, #5FB0B0, #4F9D9D);
    color: #fff !important;
    border: 1px solid #3A8585;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    text-decoration: none;
    text-shadow: 0 1px 1px rgba(0,0,0,0.2);
    transition: all 0.15s;
    -webkit-appearance: none;
    appearance: none;
    touch-action: manipulation;
    line-height: 1.4;
}

.btn-primary:hover {
    background: linear-gradient(to bottom, #6BB6B6, #4F9D9D);
    text-decoration: none;
}

.btn-primary:active {
    background: linear-gradient(to bottom, #4F9D9D, #3A8585);
}

.btn-orange {
    background: linear-gradient(to bottom, #FFAA00, #FF9900);
    border-color: var(--qq-orange-dark);
}

.btn-orange:hover {
    background: linear-gradient(to bottom, #FFB322, #FF9900);
}

.btn-secondary {
    display: inline-block;
    padding: 7px 18px;
    background: linear-gradient(to bottom, #FFFFFF, #F0F0F0);
    color: var(--text-sub) !important;
    border: 1px solid #C8C8C8;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    text-decoration: none;
    transition: all 0.15s;
    -webkit-appearance: none;
    appearance: none;
    line-height: 1.4;
}

.btn-secondary:hover {
    background: linear-gradient(to bottom, #FFFFFF, #E8E8E8);
    text-decoration: none;
}

.btn-small {
    padding: 4px 10px;
    font-size: 11px;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* ===== Tab导航 - QQ家园经典Tab ===== */
.tab-nav {
    display: flex;
    background: var(--bg-card);
    border: 1px solid var(--border-line);
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    overflow-x: auto;
    scrollbar-width: none;
    margin-bottom: 0;
}

.tab-nav::-webkit-scrollbar { display: none; }

.tab-nav a {
    padding: 10px 20px;
    color: var(--text-sub);
    font-size: 13px;
    text-decoration: none;
    border-right: 1px solid var(--border-light);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.15s;
}

.tab-nav a:last-child {
    border-right: none;
}

.tab-nav a:hover {
    background: var(--qq-blue-bg);
    color: var(--qq-blue-dark);
    text-decoration: none;
}

.tab-nav a.active {
    color: var(--qq-blue-dark);
    font-weight: bold;
    border-bottom-color: var(--qq-orange);
    background: var(--bg-card);
}

/* ===== 发布动态框 ===== */
.post-creator {
    padding: 12px;
}

.post-creator textarea {
    width: 100%;
    min-height: 66px;
    border: 1px solid var(--border-line);
    border-radius: 3px;
    padding: 8px 10px;
    font-size: 12px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s;
    background: #FAFCFC;
}

.post-creator textarea:focus {
    outline: none;
    border-color: var(--qq-blue);
    background: #fff;
}

.post-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}

.post-action-btns {
    display: flex;
    gap: 6px;
}

.post-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    border: 1px solid var(--border-line);
    background: linear-gradient(to bottom, #fff, #f5f5f5);
    color: var(--text-sub);
    cursor: pointer;
    border-radius: 3px;
    font-size: 11px;
    transition: all 0.15s;
}

.post-btn:hover {
    border-color: var(--qq-blue);
    color: var(--qq-blue);
}

.post-btn:active {
    background: var(--qq-blue-bg);
}

/* ===== 动态/日志列表 ===== */
.post-item {
    padding: 12px;
    border-bottom: 1px solid var(--border-light);
}

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

.post-header {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
}

.post-avatar {
    width: 38px;
    height: 38px;
    border-radius: 3px;
    border: 1px solid var(--border-light);
    object-fit: cover;
    flex-shrink: 0;
}

.post-user-info {
    flex: 1;
}

.post-username {
    font-weight: bold;
    font-size: 13px;
    color: var(--qq-blue-dark);
}

.post-time {
    font-size: 11px;
    color: var(--text-mute);
    margin-top: 1px;
}

.post-content {
    margin-bottom: 8px;
    line-height: 1.8;
    word-break: break-word;
    font-size: 13px;
    color: var(--text-main);
    padding-left: 46px;
}

.post-images {
    display: grid;
    gap: 3px;
    margin: 8px 0 8px 46px;
}

.post-images.single {
    grid-template-columns: 1fr;
    max-width: 280px;
}

.post-images.double {
    grid-template-columns: 1fr 1fr;
    max-width: 360px;
}

.post-images.triple,
.post-images.multi {
    grid-template-columns: repeat(3, 1fr);
    max-width: 300px;
}

.post-images img {
    width: 100%;
    height: 90px;
    object-fit: cover;
    border-radius: 2px;
    border: 1px solid var(--border-light);
    cursor: pointer;
}

.post-footer {
    display: flex;
    align-items: center;
    gap: 4px;
    padding-top: 8px;
    border-top: 1px dashed var(--border-light);
    margin-left: 46px;
}

.post-action {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border: none;
    background: transparent;
    color: var(--text-sub);
    cursor: pointer;
    border-radius: 3px;
    font-size: 11px;
    transition: all 0.15s;
    touch-action: manipulation;
}

.post-action:hover {
    background: var(--qq-blue-bg);
    color: var(--qq-blue-dark);
}

.post-action:active {
    transform: scale(0.96);
}

.post-action.liked {
    color: var(--qq-orange-dark);
}

/* ===== 评论区 ===== */
.comment-section {
    padding: 8px 0 4px;
    margin-left: 46px;
    margin-top: 6px;
    border-top: 1px dashed var(--border-light);
}

.comment-list {
    max-height: 200px;
    overflow-y: auto;
}

.comment-item {
    display: flex;
    gap: 6px;
    margin-bottom: 6px;
    padding: 4px 6px;
    background: var(--bg-soft);
    border-radius: 3px;
    font-size: 12px;
}

.comment-avatar {
    width: 24px;
    height: 24px;
    border-radius: 2px;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
    line-height: 1.5;
}

.comment-content .comment-user {
    font-weight: bold;
    color: var(--qq-blue-dark);
    margin-right: 4px;
}

.comment-content .comment-text {
    color: var(--text-sub);
}

.comment-input {
    display: flex;
    gap: 6px;
    margin-top: 6px;
}

.comment-input input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid var(--border-line);
    border-radius: 3px;
    font-size: 12px;
    font-family: inherit;
    background: #FAFCFC;
}

.comment-input input:focus {
    outline: none;
    border-color: var(--qq-blue);
    background: #fff;
}

.comment-input .btn-primary {
    padding: 6px 14px;
    font-size: 11px;
    white-space: nowrap;
}

/* ===== 留言板 ===== */
.guestbook-item {
    padding: 10px 0;
    border-bottom: 1px dashed var(--border-light);
}

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

.guestbook-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.guestbook-avatar {
    width: 32px;
    height: 32px;
    border-radius: 3px;
    border: 1px solid var(--border-light);
}

.guestbook-user {
    font-weight: bold;
    font-size: 12px;
    color: var(--qq-blue-dark);
}

.guestbook-time {
    font-size: 11px;
    color: var(--text-mute);
    margin-left: auto;
}

.guestbook-content {
    padding-left: 40px;
    font-size: 12px;
}

.guestbook-text {
    line-height: 1.7;
    color: var(--text-main);
}

.guestbook-reply {
    margin-top: 6px;
    padding: 6px 8px;
    background: var(--qq-blue-bg);
    border-left: 3px solid var(--qq-blue);
    border-radius: 2px;
    font-size: 11px;
    color: var(--text-sub);
}

.guestbook-form textarea {
    width: 100%;
    min-height: 66px;
    border: 1px solid var(--border-line);
    border-radius: 3px;
    padding: 8px 10px;
    font-family: inherit;
    font-size: 12px;
    resize: vertical;
    background: #FAFCFC;
}

.guestbook-form textarea:focus {
    outline: none;
    border-color: var(--qq-blue);
    background: #fff;
}

/* ===== 好友列表 ===== */
.friends-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
    gap: 10px;
}

.friend-card {
    text-align: center;
    padding: 10px 6px;
    border: 1px solid var(--border-light);
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.15s;
    background: #fff;
}

.friend-card:hover {
    border-color: var(--qq-blue);
    background: var(--qq-blue-bg);
}

.friend-card .friend-avatar {
    width: 52px;
    height: 52px;
    border-radius: 3px;
    margin: 0 auto 5px;
    object-fit: cover;
    border: 1px solid var(--border-light);
}

.friend-card .friend-name {
    font-size: 12px;
    color: var(--text-main);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.friend-card .friend-status {
    font-size: 10px;
    color: var(--qq-green);
    margin-top: 2px;
}

/* ===== 搜索结果 ===== */
.search-result {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--bg-soft);
    border: 1px solid var(--border-light);
    border-radius: 3px;
    margin-top: 8px;
}

.search-result img {
    width: 42px;
    height: 42px;
    border-radius: 3px;
    border: 1px solid var(--border-light);
}

.search-result .result-info {
    flex: 1;
}

.search-result .result-name {
    font-weight: bold;
    font-size: 13px;
}

.search-result .result-username {
    font-size: 11px;
    color: var(--text-mute);
}

/* ===== 相册 ===== */
.albums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.album-card {
    border: 1px solid var(--border-line);
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.15s;
    background: #fff;
}

.album-card:hover {
    border-color: var(--qq-blue);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.album-cover {
    width: 100%;
    height: 110px;
    object-fit: cover;
    background: linear-gradient(135deg, #5FB0B0, #4F9D9D);
    border-bottom: 1px solid var(--border-light);
}

.album-info {
    padding: 8px 10px;
}

.album-name {
    font-size: 12px;
    font-weight: bold;
    color: var(--text-main);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.album-count {
    font-size: 11px;
    color: var(--text-mute);
    margin-top: 2px;
}

/* ===== 照片网格 ===== */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.photo-item {
    aspect-ratio: 1;
    border-radius: 2px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--border-light);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
}

.photo-item:hover img {
    transform: scale(1.05);
}

/* ===== 表单 ===== */
.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    color: var(--text-main);
    font-weight: bold;
}

.form-control {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border-line);
    border-radius: 3px;
    font-size: 12px;
    font-family: inherit;
    background: #FAFCFC;
    transition: border-color 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.form-control:focus {
    outline: none;
    border-color: var(--qq-blue);
    background: #fff;
}

textarea.form-control {
    min-height: 70px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* ===== 登录注册 ===== */
.auth-container {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(135deg, rgba(79,157,157,0.92) 0%, rgba(58,133,133,0.92) 100%),
        repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(255,255,255,0.03) 35px, rgba(255,255,255,0.03) 70px);
    padding: 20px;
}

.auth-box {
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    padding: 0;
    width: 100%;
    max-width: 380px;
    overflow: hidden;
    border: 1px solid #2E6B6B;
}

.auth-box-header {
    background: linear-gradient(to bottom, #5FB0B0, #4F9D9D);
    color: #fff;
    padding: 16px 24px;
    text-align: center;
    border-bottom: 2px solid var(--qq-orange);
}

.auth-box-header h2 {
    font-size: 18px;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.auth-box-header .subtitle {
    font-size: 11px;
    opacity: 0.9;
    margin-top: 2px;
}

.auth-box-body {
    padding: 24px;
}

.auth-box .btn-primary {
    width: 100%;
    padding: 11px;
    font-size: 14px;
    margin-top: 6px;
}

.auth-divider {
    text-align: center;
    margin: 16px 0;
    color: var(--text-mute);
    font-size: 11px;
    position: relative;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 35%;
    height: 1px;
    background: var(--border-line);
}

.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }

.auth-switch {
    text-align: center;
    margin-top: 16px;
    font-size: 12px;
    color: var(--text-sub);
}

.oauth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px;
    background: linear-gradient(to bottom, #FFFFFF, #F0F0F0);
    color: var(--text-main);
    border: 1px solid #C8C8C8;
    border-radius: 3px;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.15s;
}

.oauth-btn:hover {
    background: linear-gradient(to bottom, #FFFFFF, #E8F4F4);
    border-color: var(--qq-blue);
    text-decoration: none;
}

.oauth-btn .oauth-icon {
    width: 18px;
    height: 18px;
    background: var(--qq-blue);
    color: #fff;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
}

/* ===== 消息提示 ===== */
.message {
    padding: 8px 12px;
    border-radius: 3px;
    margin-bottom: 10px;
    font-size: 12px;
    border: 1px solid;
}

.message-success {
    background: #F0F9EB;
    color: #529B2E;
    border-color: #C2E2B5;
}

.message-error {
    background: #FEF0F0;
    color: #C45656;
    border-color: #FBC4C4;
}

/* ===== 分页 ===== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin: 14px 0 4px;
}

.pagination a,
.pagination span {
    padding: 5px 10px;
    border: 1px solid var(--border-line);
    border-radius: 3px;
    font-size: 12px;
    color: var(--text-sub);
    background: #fff;
    transition: all 0.15s;
    text-decoration: none;
}

.pagination a:hover {
    border-color: var(--qq-blue);
    color: var(--qq-blue);
    text-decoration: none;
}

.pagination .active {
    background: linear-gradient(to bottom, #5FB0B0, #4F9D9D);
    color: #fff;
    border-color: #3A8585;
    font-weight: bold;
}

/* ===== 空状态 ===== */
.empty-state {
    text-align: center;
    padding: 36px 16px;
    color: var(--text-mute);
}

.empty-state .empty-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 10px;
    opacity: 0.4;
}

.empty-state p {
    font-size: 12px;
    margin-bottom: 6px;
}

/* ===== 徽章 ===== */
.badge {
    display: inline-block;
    padding: 1px 6px;
    font-size: 10px;
    font-weight: bold;
    color: #fff;
    background: var(--qq-green);
    border-radius: 2px;
    margin-left: 4px;
    vertical-align: middle;
}

.badge-orange {
    background: var(--qq-orange);
}

/* ===== 账户绑定区 ===== */
.bind-box {
    padding: 14px;
    background: var(--bg-soft);
    border: 1px solid var(--border-light);
    border-radius: 3px;
}

.bind-title {
    font-weight: bold;
    color: var(--text-main);
    margin-bottom: 4px;
}

.bind-desc {
    font-size: 11px;
    color: var(--text-mute);
}

/* ===== 工具类 ===== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 6px; }
.mt-2 { margin-top: 12px; }
.mt-3 { margin-top: 18px; }
.mb-1 { margin-bottom: 6px; }
.mb-2 { margin-bottom: 10px; }
.mb-3 { margin-bottom: 14px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-1 { gap: 6px; }
.gap-2 { gap: 12px; }
.hidden { display: none !important; }
.loading-text {
    text-align: center;
    padding: 14px;
    color: var(--text-mute);
    font-size: 12px;
}

/* ===== 底部移动导航 ===== */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(50px + var(--safe-area-bottom, 0px));
    background: #fff;
    border-top: 1px solid var(--border-line);
    box-shadow: 0 -1px 6px rgba(0,0,0,0.06);
    z-index: 1000;
    align-items: stretch;
    padding-bottom: var(--safe-area-bottom, 0px);
}

.mobile-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    flex: 1;
    color: var(--text-mute);
    font-size: 10px;
    text-decoration: none;
    transition: color 0.15s;
}

.mobile-nav a.active {
    color: var(--qq-blue);
}

.mobile-nav a:active {
    background: var(--qq-blue-bg);
}

.mobile-nav svg {
    width: 22px;
    height: 22px;
}

/* ===== 页脚 ===== */
.site-footer {
    text-align: center;
    padding: 20px 12px 10px;
    color: var(--text-mute);
    font-size: 11px;
    line-height: 1.8;
}

.site-footer a {
    color: var(--text-mute);
    margin: 0 4px;
}

/* ============================================
   响应式 - 平板
   ============================================ */
@media (max-width: 768px) {
    :root {
        --header-h: 50px;
        --side-w: 100%;
    }

    .header-nav {
        display: none;
    }

    .header-logo {
        font-size: 16px;
    }

    .header-logo .logo-icon {
        width: 26px;
        height: 26px;
        font-size: 14px;
    }

    .container {
        padding: calc(var(--header-h) + 10px) 10px 60px;
    }

    /* 单栏布局 */
    .main-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

    .profile-card-top {
        height: 60px;
    }

    .profile-card-avatar-wrap {
        width: 64px;
        height: 64px;
        bottom: -24px;
    }

    .profile-card-body {
        padding: 30px 10px 10px;
    }

    /* 侧栏菜单变横向滚动 */
    .side-menu ul {
        display: flex;
        overflow-x: auto;
        scrollbar-width: none;
        gap: 2px;
    }

    .side-menu ul::-webkit-scrollbar { display: none; }

    .side-menu ul li {
        border-bottom: none;
        border-right: 1px solid var(--border-light);
        flex-shrink: 0;
    }

    .side-menu ul a {
        padding: 8px 12px;
        white-space: nowrap;
        border-left: none;
        border-bottom: 2px solid transparent;
    }

    .side-menu ul a.active {
        border-left-color: transparent;
        border-bottom-color: var(--qq-orange);
    }

    /* 空间横幅 */
    .space-banner {
        height: 140px;
    }

    .space-banner-inner {
        padding: 0 12px 12px;
        gap: 12px;
    }

    .space-avatar {
        width: 76px;
        height: 76px;
        border-width: 3px;
    }

    .space-info h2 {
        font-size: 16px;
    }

    .space-actions {
        top: 10px;
        right: 10px;
    }

    /* 动态 */
    .post-content,
    .post-images,
    .post-footer {
        margin-left: 0;
        padding-left: 0;
    }

    .post-images img {
        height: 80px;
    }

    /* 好友 */
    .friends-grid {
        grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
        gap: 8px;
    }

    .friend-card .friend-avatar {
        width: 46px;
        height: 46px;
    }

    /* 相册 */
    .albums-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 8px;
    }

    .album-cover {
        height: 90px;
    }

    .photo-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* 表单 */
    .form-control {
        padding: 9px 11px;
        font-size: 13px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    /* 留言 */
    .guestbook-content {
        padding-left: 0;
    }

    .comment-input input {
        font-size: 13px;
    }

    /* 显示底部导航 */
    .mobile-nav {
        display: flex;
    }

    /* tab */
    .tab-nav a {
        padding: 9px 14px;
        font-size: 12px;
    }
}

/* ============================================
   小屏手机
   ============================================ */
@media (max-width: 480px) {
    .header-user-name {
        display: none;
    }

    .header-logo {
        font-size: 15px;
    }

    .post-action span {
        display: none;
    }

    .post-action {
        padding: 4px 10px;
    }

    .friend-card .friend-name {
        font-size: 11px;
    }

    .space-stats-bar {
        gap: 12px;
    }

    .space-stats-bar .stat-num {
        font-size: 13px;
    }

    .mobile-nav a {
        font-size: 9px;
    }

    .mobile-nav svg {
        width: 20px;
        height: 20px;
    }

    .auth-box-body {
        padding: 18px;
    }
}

/* ============================================
   横屏适配
   ============================================ */
@media (max-height: 500px) and (orientation: landscape) {
    .header {
        height: 40px;
    }

    .mobile-nav {
        height: 40px;
    }

    .container {
        padding-top: calc(40px + 8px);
        padding-bottom: calc(40px + var(--safe-area-bottom, 0px) + 8px);
    }

    .space-banner {
        height: 100px;
    }

    .space-avatar {
        width: 64px;
        height: 64px;
    }
}
