/* ============================================================
   整合主页补充样式（在站点2 style.css 之后加载）
   布局：上（顶栏+导航） / 中（内容） / 下（页脚）
   ============================================================ */

/* ---------------- 上中下骨架 ---------------- */
html, body {
    height: 100%;
}
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.content-container {
    flex: 1 0 auto;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
}

/* ---------------- 首页 Hero ---------------- */
.home-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    padding: 22px 24px;
    margin-bottom: 26px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f2f9ff 0%, #e6f4ff 100%);
    border: 1px solid var(--tech-border, #c5e1f4);
}
.hero-welcome {
    display: flex;
    align-items: center;
    gap: 14px;
}
.hero-avatar {
    font-size: 2.4em;
    line-height: 1;
}
.hero-welcome .hello {
    font-size: 1.15em;
    font-weight: 700;
    color: var(--tech-dark, #0a1a2d);
}
.hero-welcome .hello-sub {
    margin-top: 4px;
    font-size: 0.88em;
    color: #6b7d90;
}
.hero-btn {
    padding: 11px 22px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--tech-dark, #0a1a2d), #1c3658);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95em;
    white-space: nowrap;
    transition: opacity .2s, transform .2s;
}
.hero-btn:hover {
    opacity: .92;
    transform: translateY(-1px);
}

/* ---------------- 分区标题 ---------------- */
.home-h3 {
    margin: 26px 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--tech-border, #c5e1f4);
    color: var(--tech-dark, #0a1a2d);
    font-size: 1.15em;
}

/* ---------------- 工具卡片网格 ---------------- */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
}
.tool-card {
    background: #fff;
    border: 1px solid var(--tech-border, #c5e1f4);
    border-radius: 10px;
    padding: 18px;
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
.tool-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(10, 26, 45, .12);
    border-color: var(--tech-accent, #00c6ff);
}
.tool-card.locked {
    background: #fbfdff;
}
.tool-card.owned {
    border-left: 3px solid #22c55e;
}
.tool-icon {
    font-size: 1.8em;
    margin-bottom: 8px;
}
.tool-title {
    font-weight: 700;
    color: var(--tech-dark, #0a1a2d);
    font-size: 1.02em;
    margin-bottom: 6px;
}
.tool-desc {
    font-size: 0.86em;
    color: #6b7d90;
    line-height: 1.55;
    min-height: 2.6em;
}
.tool-foot {
    margin-top: 12px;
}
.tag-ok {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.8em;
    background: #e8f8ee;
    color: #16803c;
}
.tag-buy {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    background: rgba(0, 198, 255, .12);
    color: var(--tech-blue, #1a6bb3);
    text-decoration: none;
}
.tag-buy:hover {
    background: rgba(0, 198, 255, .22);
}

/* ---------------- 提示框 / 表格 ---------------- */
.notice-box {
    padding: 14px 18px;
    border-radius: 10px;
    background: #f2f9ff;
    border: 1px solid var(--tech-border, #c5e1f4);
    color: #40566b;
    font-size: 0.92em;
    margin-bottom: 16px;
}
.notice-box a {
    color: var(--tech-blue, #1a6bb3);
    text-decoration: none;
    font-weight: 600;
}
.notice-box a:hover {
    text-decoration: underline;
}
.grid-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92em;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
}
.grid-table th {
    background: #f2f9ff;
    color: var(--tech-dark, #0a1a2d);
    text-align: left;
    padding: 11px 14px;
    font-weight: 600;
}
.grid-table td {
    padding: 11px 14px;
    border-top: 1px solid #eef4fa;
    color: #40566b;
}

/* ---------------- 页脚（下） ---------------- */
.site-footer {
    flex-shrink: 0;
    margin-top: 30px;
    background: linear-gradient(90deg, var(--tech-dark, #0a1a2d) 0%, #1c3658 100%);
    color: rgba(255, 255, 255, .78);
}
.footer-inner {
    max-width: 1600px;
    margin: 0 auto;
    padding: 30px 20px 18px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
}
.footer-title {
    color: #fff;
    font-weight: 700;
    font-size: 0.98em;
    margin-bottom: 10px;
}
.footer-text {
    font-size: 0.86em;
    line-height: 1.7;
}
.footer-col a {
    display: block;
    color: rgba(255, 255, 255, .72);
    text-decoration: none;
    font-size: 0.86em;
    padding: 3px 0;
    transition: color .2s;
}
.footer-col a:hover {
    color: var(--tech-accent, #00c6ff);
}
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .12);
    text-align: center;
    padding: 14px 20px;
    font-size: 0.82em;
    color: rgba(255, 255, 255, .55);
}

/* ---------------- 后台左右布局（admin） ---------------- */
.admin-layout {
    display: flex;
    min-height: calc(100vh - var(--top-bar-height, 45px) - var(--nav-height, 50px));
}
.admin-sidebar {
    width: 220px;
    flex-shrink: 0;
    background: #f8fbff;
    border-right: 1px solid var(--tech-border, #c5e1f4);
    padding: 18px 0;
}
.admin-sidebar .side-title {
    padding: 0 18px 12px;
    font-size: 0.82em;
    color: #7a8ca5;
    letter-spacing: 1px;
}
.admin-sidebar nav a {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px 18px;
    color: #5a6c7d;
    text-decoration: none;
    font-size: 0.92em;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: all .3s;
}
.admin-sidebar nav a:hover {
    background: rgba(0, 198, 255, .06);
    color: var(--tech-blue, #1a6bb3);
}
.admin-sidebar nav a.on {
    background: rgba(0, 198, 255, .12);
    border-left-color: var(--tech-accent, #00c6ff);
    color: var(--tech-blue, #1a6bb3);
    font-weight: 700;
}
.admin-main {
    flex: 1;
    padding: 22px;
    min-width: 0;
    overflow-x: auto;
}

@media (max-width: 768px) {
    .admin-layout { flex-direction: column; }
    .admin-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--tech-border, #c5e1f4); }
    .admin-sidebar nav { display: flex; overflow-x: auto; }
    .admin-sidebar nav a { border-left: none; border-bottom: 3px solid transparent; white-space: nowrap; }
    .admin-sidebar nav a.on { border-left: none; border-bottom-color: var(--tech-accent, #00c6ff); }
    .home-hero { flex-direction: column; align-items: flex-start; }
}
