/* ================= 1. 全局变量与 CSS Reset ================= */
:root {
    --primary: #13c2c2;
    --primary-hover: #08979c;
    --bg-body: #f4f6f8;
    --text-main: #333;
    --text-sub: #999;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Microsoft YaHei", sans-serif;
    background: var(--bg-body);
    margin: 0; padding: 0; color: var(--text-main);
    -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
a { text-decoration: none; color: inherit; transition: 0.2s; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }
button { outline: none; font-family: inherit; }

/* 基础版心容器 */
.container { width: 1200px; margin: 0 auto; }

/* ================= 2. 顶部导航 (Site Header) ================= */
.site-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    height: 68px;
    position: sticky; top: 0; z-index: 1000;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }

.logo-area { display: flex; align-items: center; gap: 8px; font-size: 24px; font-weight: 800; color: var(--primary); text-shadow: 0 2px 4px rgba(19, 194, 194, 0.1); }
.nav-links { display: flex; gap: 30px; font-size: 16px; font-weight: 500; color: #555; }
.nav-links a:hover, .nav-links a.active { color: var(--primary); font-weight: bold; transform: translateY(-1px); }

.search-box { position: relative; width: 340px; }
.search-input {
    width: 100%; height: 38px; background: #f0f2f5;
    border: 1px solid transparent; border-radius: 20px;
    padding: 0 40px 0 20px; font-size: 13px; outline: none; transition: 0.3s;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.03);
}
.search-input:focus { background: #fff; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(19, 194, 194, 0.15); }
.search-icon { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; fill: #999; }

.user-actions { display: flex; align-items: center; gap: 20px; font-size: 14px; }
.btn-creator { padding: 6px 14px; border: 1px solid #ddd; border-radius: 4px; color: #666; font-size: 13px; background: #fff; transition: 0.2s;}
.btn-creator:hover { border-color: var(--primary); color: var(--primary); }

.auth-box { display: flex; align-items: center; gap: 20px; }
.link-login { color: #666; cursor: pointer; transition: 0.2s;}
.link-login:hover { color: var(--primary); }

.user-logged-in { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.user-nickname { font-weight: bold; color: #333; max-width: 100px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.link-logout { font-size: 12px; color: #999; margin-left: 5px; transition: 0.2s;}
.link-logout:hover { color: #ff4d4f; }

/* ================= 3. 全局弹窗 (Common Dialog) ================= */
dialog.commonDialog {
    padding: 0; border: none; border-radius: 12px; background: #fff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2); color: #333;
    font-family: -apple-system, BlinkMacSystemFont, "Microsoft YaHei", sans-serif;
    width: 500px; max-width: 95vw;
}
dialog.commonDialog::backdrop { background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(2px); }
.commonDialog .dialog-header { padding: 20px 30px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #f5f5f5; }
.commonDialog .dialog-title { font-size: 18px; font-weight: 800; color: #1f1f1f; }
.commonDialog .quitDialog { font-size: 16px; color: #222; text-decoration: none; cursor: pointer; transition: color 0.2s; }
.commonDialog .quitDialog:hover { color: #999; }
.commonDialog .dialog-body { padding: 30px 30px 10px 30px; font-size: 14px; }
.commonDialog .form-row { display: flex; margin-bottom: 18px; align-items: flex-start; }
.commonDialog .form-label { width: 70px; text-align: right; color: #888; margin-right: 20px; flex-shrink: 0; padding-top: 2px; }
.commonDialog .form-content { flex: 1; color: #333; font-weight: 500; line-height: 1.5; }
.commonDialog .text-price { color: #ff4d4f; font-size: 20px; font-weight: 800; font-family: Arial, sans-serif; margin-right: 4px; }
.commonDialog .tips-box { margin-top: 6px; background: #f9f9f9; padding: 10px; border-radius: 6px; font-size: 12px; color: #999; line-height: 1.6; }
.commonDialog .color_link { color: var(--primary); text-decoration: none; font-weight: bold; }
.commonDialog .color_link:hover { text-decoration: underline; }
.commonDialog .dialog-divider { border-top: 1px dashed #eee; margin: 10px 0 20px 0; }
.commonDialog .dialog-footer { padding: 0 30px 30px; display: flex; justify-content: center; }
.commonDialog .yesButton {
    background: linear-gradient(135deg, #4DE3E0 0%, #13c2c2 100%); border: none; color: #fff; font-size: 16px; font-weight: bold;
    padding: 10px 60px; border-radius: 30px; cursor: pointer; box-shadow: 0 4px 12px rgba(19, 194, 194, 0.3); transition: all 0.2s;
}
.commonDialog .yesButton:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(19, 194, 194, 0.4); }

/* ================= 4. 全局工具类 (Utilities) ================= */
.line-clamp {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-2 { -webkit-line-clamp: 2; }
.line-clamp-3 { -webkit-line-clamp: 3; }