﻿:root {
    /* 主题色由 lib/_themes.php 注入 --accent 等；此处映射到 bbs 变量名 */
    --brand: var(--accent, #6528f7);
    --brand-deep: var(--accent-deep, #4f46e5);
    --text: #333;
    --text-muted: #666;
    --max-w: 768px;
    --radius: 16px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* support-card 色板 — 与 bbs.php $support_classes 一一对应，不跟随主题 */
.support-card.card-blue { background-color: #2196F3; }
.support-card.card-teal { background-color: #0B6138; }
.support-card.card-purple { background-color: #7E57C2; }
.support-card.card-green { background-color: #31B404; }
.support-card.card-cyan { background-color: #00BCD4; }
.support-card.card-orange { background-color: #FF7043; }
.support-card.card-darkblue { background-color: #1a237e; }
.support-card.card-purple-light { background-color: #7E57C2; }
.support-card.card-teal-dark { background-color: #00695c; }
.support-card.card-blue2 { background-color: #2d6cfc; }
.support-card.card-lightpurple { background-color: #d99dfc; }
.support-card.card-blue3 { background-color: #8080e0; }
.support-card.card-blue4 { background-color: #5353db; }
.support-card.card-darkgold { background-color: #C0A000; }
.support-card.card-amber { background-color: #FFBF00; }
.support-card.card-mustard { background-color: #D4AF37; }
.support-card.card-bronze { background-color: #CD7F32; }
.support-card.card-darkyellow { background-color: #B8860B; }
.support-card.card-forestgreen { background-color: #228B22; }
.support-card.card-seagreen { background-color: #2E8B57; }
.support-card.card-deeppurple { background-color: #6A0DAD; }
.support-card.card-violet { background-color: #8A2BE2; }
.support-card.card-royalblue { background-color: #4169E1; }
.support-card.card-deepskyblue { background-color: #00BFFF; }
.support-card.card-pink { background-color: #F7819F; }
.support-card.card-hotpink { background-color: #FE2E64; }

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

a,
a:hover,
a:focus,
a:visited,
a:active {
    text-decoration: none;
}

html {
    height: 100%;
}

html,
body {
    width: 100%;
    overflow-x: hidden;
    font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', sans-serif;
}

body {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding-top: 116px;
    background-color: #ffffff;
    color: var(--text);
}

/* Layout */
.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 10px;
    width: 100%;
}

#main {
    padding: 0 0 15px;
    background: #fff;
}

.post-body {
    padding: 0;
    overflow-x: hidden;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding-top: 16px;
    background: #fff;
    z-index: 1000;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    height: 42px;
}

.logo-text {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    color: #000;
    line-height: 24px;
}

/* Tabs */
.tab-wrapper {
    position: fixed;
    top: 58px;
    left: 0;
    width: 100%;
    background: #fff;
    z-index: 999;
    padding: 0;
}

.tab-container {
    background: #fff;
    border-radius: 50px;
    padding: 5px;
    margin: 0 auto;
    max-width: var(--max-w);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tabs {
    display: flex;
    justify-content: space-between;
    list-style: none;
    padding: 0;
    margin: 0;
}

.tab-item {
    flex: 1;
    text-align: center;
    margin: 0;
}

.tab-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 6px;
    text-decoration: none;
    color: var(--text-muted);
    border-radius: 25px;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    min-height: 42px;
}

.tab-link:hover {
    text-decoration: none;
    color: var(--text-muted);
}

.tab-link.active {
    background-color: var(--brand);
    color: #fff;
}

/* Ads */
.ad-container {
    width: 100%;
    max-width: var(--max-w);
    margin: 15px auto;
}

.adsbygoogle {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 auto !important;
}

/* Home: content card */
.content-card {
    background: #EEF1FF;
    border-radius: var(--radius);
    padding: 25px;
    margin: 20px 0;
    position: relative;
    overflow: hidden;
}

.card-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.card-text {
    color: #666;
    line-height: 1.6;
}

.card-icon {
    position: absolute;
    bottom: 16px;
    right: 16px;
    font-size: 2.2rem;
    opacity: 0.8;
    display: block;
    line-height: 1;
}

.section-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin: 30px 0 15px;
    color: #333;
}

/* Home: support grid */
.support-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.support-card {
    display: block;
    text-decoration: none;
    border-radius: 20px;
    padding: 25px;
    position: relative;
    cursor: pointer;
    box-shadow: var(--shadow);
    min-height: 120px;
    border: none;
}

.support-card:hover {
    text-decoration: none;
}

.support-title {
    color: #fff;
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.support-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

.support-icon {
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 2rem;
}

/* Footer — 跟随 lib/_themes.php 主题色 */
.footer {
    flex-shrink: 0;
    background: var(--accent-soft, #E3F2FD);
    color: var(--text);
    padding: 20px 0;
    margin-top: auto;
    width: 100%;
    border-top: 1px solid var(--tag-border, var(--line, transparent));
}

.footer-content {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.footer-left {
    flex: 1;
}

.footer-right {
    text-align: right;
}

.footer-right a {
    color: var(--accent, #1976D2);
    text-decoration: none;
}

.footer-right a:hover {
    color: var(--accent-deep, var(--accent, #1976D2));
    text-decoration: none;
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 10px;
}

.footer-brand {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--accent-deep, var(--accent, #1976D2));
}

.footer-info {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-info li {
    margin-bottom: 2px;
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Responsive */
@media screen and (max-width: 768px) {
    body {
        font-size: 18px;
    }

    .container {
        padding: 10px;
    }

    .tab-link {
        padding: 10px 4px;
        font-size: 13px;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
    }

    .footer-left,
    .footer-right {
        text-align: center;
        width: 100%;
    }

    .footer-info li {
        justify-content: center;
        margin-bottom: 8px;
    }
}

@media screen and (max-width: 480px) {
    .tab-container {
        width: 92%;
    }

    .tab-link {
        font-size: 12px;
        padding: 10px 2px;
    }

    .support-grid {
        gap: 10px;
    }

    .support-card {
        padding: 15px;
        min-height: 120px;
    }

    .support-title,
    .support-subtitle {
        font-size: 16px;
    }

    .support-icon {
        font-size: 1.5rem;
        bottom: 15px;
        right: 15px;
    }

    .content-card .card-icon {
        display: none;
    }

    .footer {
        padding: 20px 15px;
    }

    .footer-content {
        padding: 0 10px;
    }
}
