:root {
    --violet: #6264a7;
    --violet2: #464775;
    --violet3: #7b83c9;
    --violet-lt: #eef0fa;
    --violet-mid: #d8dbf5;
    --bg: #f3f4fb;
    --bg2: #eceef8;
    --bg3: #e4e7f5;
    --surface: #ffffff;
    --border: #dde0f0;
    --border2: #c8ccec;
    --text: #242424;
    --text2: #424242;
    --text3: #8a8a8a;
    --shadow-xs: 0 1px 4px rgba(98,100,167,0.08);
    --shadow-sm: 0 2px 10px rgba(98,100,167,0.10);
    --shadow-md: 0 6px 24px rgba(98,100,167,0.16);
    --r-sm: 6px;
    --r-md: 10px;
    --r-lg: 16px;
    --r-xl: 24px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'PingFang SC', 'Helvetica Neue', 'Microsoft YaHei', 'Segoe UI', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

a { color: var(--violet); text-decoration: none; }
a:hover { color: var(--violet2); }
img { max-width: 100%; display: block; }
.clearfix::after { content: ''; display: table; clear: both; }

/* ===== LAYOUT ===== */
.tm-wrap {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}
.tm-inner { width: 100%; }
.tm-gap { margin-bottom: 6px; }

/* ===== HEADER ===== */
.tm-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0;
    box-shadow: var(--shadow-xs);
}

.tm-header .tm-wrap {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    min-height: 50px;
    padding-top: 8px;
    padding-bottom: 8px;
}

.tm-brand-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.tm-brand-name {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.2px;
    font-style: normal;
    text-decoration: none;
    border-bottom: none;
}

.tm-domain-row {
    display: flex;
    align-items: center;
    gap: 9px;
    background: var(--violet-lt);
    border: 1px solid var(--violet-mid);
    border-radius: var(--r-xl);
    padding: 4px 16px;
}

.tm-domain-lbl {
    font-size: 11px;
    color: var(--violet3);
    font-weight: 500;
    white-space: nowrap;
}

.tm-domain-val {
    font-size: 17px;
    font-weight: 700;
    color: var(--violet);
    letter-spacing: 0.2px;
}

/* ===== PROMO ===== */
.tm-promo {
    width: 100%;
    overflow: hidden;
    border-radius: var(--r-md);
    margin-bottom: 6px;
}
.tm-promo a { display: block; }
.tm-promo img { width: 100%; display: block; }

/* ===== NAV ===== */
.tm-nav-card {
    background: var(--surface);
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
    margin-bottom: 6px;
}

.tm-nav-row {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--border);
}

.tm-nav-row:last-child { border-bottom: none; }

.tm-nav-zone {
    width: 15%;
    min-width: 42px;
    max-width: 80px;
    background: var(--violet);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6px 2px;
    line-height: 1.3;
    flex-shrink: 0;
    word-break: break-all;
    letter-spacing: 0.3px;
}

.tm-nav-links {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    padding: 5px 6px;
    gap: 4px;
    background: var(--bg2);
}

.tm-nav-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 6px;
    border-radius: var(--r-sm);
    background: var(--surface);
    color: var(--text2);
    font-size: 12px;
    font-weight: 400;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
    text-decoration: none;
    flex: 1 0 calc(25% - 4px);
    max-width: calc(25% - 4px);
    text-align: center;
    border: 1px solid var(--border);
}

.tm-nav-links a:hover,
.tm-nav-links a.active {
    background: var(--violet);
    color: #fff;
    border-color: var(--violet);
    box-shadow: 0 2px 8px rgba(98,100,167,0.20);
    font-weight: 600;
    text-decoration: none;
}

/* ===== SEARCH ===== */
.tm-search-card {
    background: var(--surface);
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
    padding: 10px 14px;
    margin-bottom: 6px;
    box-shadow: var(--shadow-xs);
}

.tm-sform {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.tm-sform input[type="text"] {
    flex: 1;
    min-width: 140px;
    height: 38px;
    padding: 0 16px;
    border: 1.5px solid var(--border2);
    border-radius: var(--r-xl);
    font-size: 14px;
    color: var(--text);
    background: var(--bg);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.tm-sform input[type="text"]:focus {
    border-color: var(--violet);
    box-shadow: 0 0 0 3px rgba(98,100,167,0.12);
    background: #fff;
}

.tm-sform button {
    height: 38px;
    padding: 0 20px;
    border: none;
    border-radius: var(--r-xl);
    background: var(--violet);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, transform 0.12s;
    white-space: nowrap;
}

.tm-sform button:hover {
    background: var(--violet2);
    transform: scale(1.02);
}

/* ===== HOT TAGS ===== */
.tm-tags-card {
    background: var(--surface);
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
    padding: 10px 14px;
    margin-bottom: 6px;
    box-shadow: var(--shadow-xs);
}

.tm-tags-card h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 7px;
}

.tm-tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.tm-tag-row a {
    display: inline-block;
    padding: 3px 13px;
    background: var(--bg2);
    color: var(--text2);
    border-radius: var(--r-xl);
    font-size: 12px;
    border: 1px solid var(--border);
    transition: all 0.15s;
    text-decoration: none;
}

.tm-tag-row a:hover {
    background: var(--violet-lt);
    color: var(--violet);
    border-color: var(--violet-mid);
}

/* ===== SECTION ===== */
.tm-section { margin-bottom: 6px; }
.tm-section-inner { width: 100%; }

.tm-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    padding-bottom: 7px;
    border-bottom: 1.5px solid var(--border);
}

.tm-section-head h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.tm-section-head h3::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 16px;
    background: var(--violet);
    border-radius: 2px;
    flex-shrink: 0;
}

.tm-section-head h3 a { color: var(--text); text-decoration: none; }
.tm-section-head h3 a:hover { color: var(--violet); }

/* ===== MEDIA GRID ===== */
.tm-media-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.tm-media-grid li {
    background: var(--surface);
    border-radius: var(--r-md);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
    border: 1px solid var(--border);
    transition: box-shadow 0.18s, transform 0.18s;
}

.tm-media-grid li:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.tm-thumb {
    display: block;
    position: relative;
    overflow: hidden;
    aspect-ratio: 600 / 350;
    background: var(--bg3);
}

.tm-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.tm-thumb:hover img { transform: scale(1.04); }

.tm-caption {
    padding: 7px 9px 9px;
}

.tm-caption h5 {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.45;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: var(--text);
}

.tm-caption h5 a { color: var(--text); text-decoration: none; }
.tm-caption h5 a:hover { color: var(--violet); }

/* ===== PAGINATION ===== */
.tm-pager {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
    padding: 12px 0;
}

.tm-pager a,
.tm-pager .a_page_info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: var(--r-sm);
    background: var(--surface);
    border: 1px solid var(--border2);
    color: var(--text2);
    font-size: 13px;
    transition: all 0.15s;
    text-decoration: none;
}

.tm-pager a:hover,
.tm-pager .a_page_info:hover {
    background: var(--violet);
    color: #fff;
    border-color: var(--violet);
    box-shadow: 0 2px 8px rgba(98,100,167,0.20);
    text-decoration: none;
}

.tm-pager .page_info_focus {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    background: var(--violet);
    color: #fff;
    border-radius: var(--r-sm);
    font-size: 13px;
    font-weight: 700;
    cursor: default;
    box-shadow: 0 2px 8px rgba(98,100,167,0.22);
}

/* ===== DETAIL PAGES ===== */
.tm-detail-title {
    text-align: center;
    padding: 14px 16px;
    font-size: 16px;
    line-height: 1.7;
    word-break: break-all;
    background: var(--violet-lt);
    border-radius: var(--r-md);
    border: 1px solid var(--violet-mid);
    margin-bottom: 6px;
    box-shadow: var(--shadow-xs);
}

.tm-detail-title a {
    color: var(--violet);
    font-weight: 700;
    margin-right: 6px;
    text-decoration: none;
}

.tm-detail-panel {
    font-size: 14px;
    line-height: 1.9;
    padding: 16px 18px;
    background: var(--surface);
    border-radius: var(--r-md);
    border: 1px solid var(--border);
    margin-bottom: 6px;
    box-shadow: var(--shadow-xs);
}

.tm-capture-box {
    width: 100%;
    margin-top: 10px;
}

.tm-capture-box picture,
.tm-capture-box img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--r-sm);
}

.tm-action-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 12px 0;
}

.tm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 28px;
    border-radius: var(--r-xl);
    background: var(--violet);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background 0.15s, transform 0.12s, box-shadow 0.15s;
    text-decoration: none;
}

.tm-btn:hover {
    background: var(--violet2);
    transform: translateY(-1px);
    color: #fff;
    box-shadow: 0 4px 16px rgba(98,100,167,0.28);
    text-decoration: none;
}

.tm-client-hint {
    text-align: center;
    padding: 8px 0;
    font-size: 13px;
}

.tm-client-hint a { color: var(--violet); font-weight: 500; }

/* ===== SHARE ===== */
.tm-share-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 10px 14px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    box-shadow: var(--shadow-xs);
}

.tm-share-url-part {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 160px;
    overflow: hidden;
}

.tm-share-lbl {
    font-size: 11px;
    color: var(--text3);
    white-space: nowrap;
    background: var(--bg2);
    padding: 2px 10px;
    border-radius: var(--r-xl);
    border: 1px solid var(--border);
}

.tm-share-url-text {
    font-size: 12px;
    color: var(--violet);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.tm-share-btn {
    background: var(--violet);
    color: #fff;
    border: none;
    border-radius: var(--r-xl);
    padding: 7px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
}

.tm-share-btn:hover { background: var(--violet2); }

/* ===== FRIEND LINKS ===== */
.tm-fl-card {
    background: var(--surface);
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
    padding: 10px 14px;
    margin-bottom: 6px;
    box-shadow: var(--shadow-xs);
}

.tm-fl-card h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text2);
    margin-bottom: 7px;
}

.tm-fl-card dl { margin: 0; padding: 0; }
.tm-fl-card dd { display: inline-block; margin: 3px 4px; }

.tm-fl-card dd a {
    color: var(--text2);
    font-size: 12px;
    padding: 2px 11px;
    background: var(--bg2);
    border-radius: var(--r-xl);
    border: 1px solid var(--border);
    transition: all 0.15s;
    display: inline-block;
    text-decoration: none;
}

.tm-fl-card dd a:hover {
    background: var(--violet-lt);
    color: var(--violet);
    border-color: var(--violet-mid);
}

/* ===== FOOTER ===== */
.tm-footer {
    background: var(--bg2);
    border-top: 1px solid var(--border);
    text-align: center;
    padding: 14px 0;
    font-size: 12px;
    color: var(--text3);
    margin-top: 8px;
}

.tm-footer a { color: var(--text3); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .tm-brand-name { font-size: 17px; }
    .tm-domain-val { font-size: 14px; }

    .tm-nav-zone {
        width: 15%;
        min-width: 40px;
        max-width: 52px;
        font-size: 10px;
    }

    .tm-nav-links { width: 85%; }

    .tm-nav-links a {
        font-size: 12px;
        flex: 1 0 calc(25% - 4px);
        max-width: calc(25% - 4px);
        padding: 4px 2px;
    }

    .tm-media-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .tm-action-row { gap: 8px; }
    .tm-btn { padding: 9px 20px; font-size: 13px; }
    .tm-share-box { flex-direction: column; align-items: flex-start; }
}

@media (min-width: 480px) and (max-width: 768px) {
    .tm-nav-links a { font-size: 14px; }
}

@media (min-width: 769px) {
    .tm-nav-zone {
        font-size: 13px;
        width: auto;
        min-width: 68px;
        max-width: 90px;
    }
    .tm-nav-links a {
        font-size: 14px;
        flex: 1 0 calc(12.5% - 4px);
        max-width: calc(12.5% - 4px);
    }
    .tm-media-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 768px) { .hide_mobile { display: none !important; } }
@media (min-width: 769px) { .hide_pc { display: none !important; } }
