/* brand.css — 仅包含 brand 页特有样式
   表格视觉样式（字体、颜色、hover、边框等）严格继承父级 powercer.css + ttTable.js 动态设置 */

/* ========================================
   CSS 变量
   ======================================== */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a24;
    --bg-card-hover: #22222e;
    --border: rgba(255, 255, 255, 0.08);
    --border-accent: rgba(0, 212, 255, 0.3);
    --text-primary: #ffffff;
    --text-secondary: #8a8a9a;
    --text-muted: #5a5a6a;
    --accent-cyan: #00d4ff;
    --accent-blue: #0066ff;
    --accent-green: #00ff88;
    --accent-orange: #ff6b35;
    --accent-purple: #a855f7;
}

/* ========================================
   全局
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}

/* ===== 加载遮罩 ===== */
.loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease-out;
}

.loading-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent-cyan);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

footer {
    margin-top: auto;
}

star {
    opacity: 0.95;
    font-size: 75%;
    margin: 0 -8px;
}

/* ========================================
   品牌Hero区域
   ======================================== */
.brand-hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    background: radial-gradient(ellipse at 50% 25%, rgba(0, 212, 255, 0.08) 0%, transparent 50%);
    padding: 0 24px;
}

.ratings {
    max-width: 1300px;
    margin: 0 auto;
    padding: 50px 24px 6px;
    width: 100%;
    text-align: center;
}

.brand-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    padding-top: clamp(20px, 5vh, 90px);
}

.brand-logo {
    position: relative;
    margin-bottom: 2vh;
    max-width: 500px;
    max-height: 300px;
    text-align: center;
    min-height: 10vh;
}

.brand-logo svg {
    width: clamp(200px, 30vw, 300px);
    filter: drop-shadow(0 0 30px rgba(0, 212, 255, 0.5));
}

.brand-logo img {
    /* width: clamp(100px, 30vw, 350px); */
    filter: drop-shadow(0 0 30px rgba(0, 212, 255, 0.5));
    /* margin-top: 2vh; */
    width: clamp(300px, 40vh, 480px);
    max-height: 20vh;
    object-fit: contain;
    /* 锁死正方形 */
}

.brand-name {
    font-size: clamp(3rem, 12vw, 8vh);
    font-weight: 700;
    letter-spacing: 0.25em;
    background: linear-gradient(135deg, #ffffff 0%, #00d4ff 50%, #ffffff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    animation: shimmer 4s ease-in-out infinite;
    margin-top: 3vh;
}

.brand-tagline {
    font-size: 1.6rem;
    color: var(--text-secondary);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-top: 1vh;
    background: linear-gradient(135deg, #ffffff 0%, #66b8c8 50%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s ease-in-out infinite;
}

h1#productName {
    margin-bottom: 1rem;
}

@keyframes shimmer {

    0%,
    100% {
        background-position: 0% center;
    }

    50% {
        background-position: 200% center;
    }
}

/* 向下滚动提示 */
.scroll-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 1.4rem;
    letter-spacing: 0.15em;
    animation: bounce 2s ease-in-out infinite;
    padding-bottom: 4vh;
    margin-top: clamp(2vh, 5vh, 8vh);
    flex-shrink: 0;
}

.scroll-hint svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-muted);
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(8px);
    }
}

/* ========================================
   左上角Logo + 语言切换
   ======================================== */
.corner-logo {
    position: absolute;
    top: 30px;
    left: 30px;
    width: 140px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.corner-logo .site-logo img {
    width: 100%;
    height: auto;
    display: block;
}

.corner-logo img {
    width: 100%;
    height: auto;
}

headerll {
    margin: 0 0px 0 2px;
}

.lang-toggle {
    position: absolute;
    top: 30px;
    right: 30px;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 1.2rem;
    padding: 4px 12px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.lang-toggle:hover {
    background: rgba(0, 212, 255, 0.15);
    border-color: var(--border-accent);
    color: var(--accent-cyan);
}

.back-to-top {
    position: fixed;
    right: 30px;
    bottom: 160px;
    z-index: 9999;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 1.3rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    pointer-events: none;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.back-to-top:hover {
    background: rgba(0, 212, 255, 0.15);
    border-color: var(--border-accent);
    color: var(--accent-cyan);
}

.back-to-top svg {
    width: 18px;
    height: 18px;
}

/* ========================================
   统计卡片（左右布局）
   ======================================== */
.stats-grid {
    display: grid;
    gap: 24px;
    width: 100%;
    max-width: 1300px;
    padding: 0 40px;
    margin: auto auto 0;
    margin-top: clamp(8vh, 12vh, 16vh);
    flex-shrink: 0;
    align-self: center;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 20px 20px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    min-height: 160px;
    display: flex;
    align-items: stretch;
    gap: 0;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.stat-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-accent);
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 212, 255, 0.15);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue));
}

.stat-card.green::before {
    background: linear-gradient(90deg, var(--accent-green), #00d4ff);
}

.stat-card.orange::before {
    background: linear-gradient(90deg, var(--accent-orange), #ff8c5a);
}

.stat-card.purple::before {
    background: linear-gradient(90deg, var(--accent-purple), #c084fc);
}

.stat-card.blue::before {
    background: linear-gradient(90deg, var(--accent-blue), #00d4ff);
}

.card-left {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    justify-content: top;
    padding-right: 20px;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
}

.stat-value {
    font-size: 6rem;
    font-weight: 800;
    font-family: 'JetBrains Mono';
    color: var(--text-primary);
    line-height: 1;
    letter-spacing: -0.02em;
}

.stat-change {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 1.2rem;
    margin-top: 8px;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.card-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    /* justify-content: center; */
    align-items: flex-end;
    text-align: right;
    border-left: 1px solid var(--border);
    padding-left: 20px;
}

.card-right-title {
    font-size: 1.2rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 10px;
}

.card-star-summary {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.single-card .card-right {
    align-items: flex-start;
    text-align: left;
}

.single-card .card-star-summary {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px 32px;
}

.single-card .card-star-summary i {
    font-size: 1.6rem;
}

.single-card .card-star-summary span {
    font-size: 1.4rem;
}

.single-card .card-change {
    font-size: 1.4rem;
}

.single-card .card-right-title {
    font-size: 1.4rem;
}

.card-star-summary span {
    white-space: nowrap;
    display: grid;
    grid-template-columns: auto 2ch;
    column-gap: 2px;
    align-items: center;
    justify-content: end;
}

.card-star-summary i {
    font-style: normal;
    padding: 1px 8px;
    border-radius: 4px;
    font-size: 1rem;
    display: inline-block;
    text-align: center;
    box-sizing: border-box;
}

.latest-only-card .latest-only-wrap {
    width: 100%;
}

.latest-only-card .latest-only-title {
    color: var(--text-secondary);
    font-size: 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
}

.latest-only-card .card-right-title {
    text-align: left;
    margin-bottom: 14px;
}

.latest-only-card .card-star-summary {
    gap: 1px;
}

.latest-only-card .latest-model-item {
    display: block;
    text-align: left;
    cursor: pointer;
    color: var(--text-primary);
    /* border: 1px solid var(--border); */
    border-radius: 8px;
    padding: 4px 10px;
    transition: all 0.2s ease;
}

.latest-only-card .latest-model-item::before {
    content: "▸";
    color: var(--text-secondary);
    margin-right: 4px;
    font-size: 1.2em;
}

.latest-only-card .latest-model-item:hover {
    border-color: var(--border-accent);
    color: var(--accent-cyan);
    background: rgba(0, 212, 255, 0.08);
}

.latest-only-card .star-product-line {
    display: block;
    text-align: left;
    cursor: pointer;
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 10px 12px;
    transition: all 0.2s ease;
}

.latest-only-card .star-product-line:hover {
    border-color: var(--border-accent);
    color: var(--accent-cyan);
    background: rgba(0, 212, 255, 0.08);
}

.latest-only-card .star-product-name {
    display: block;
}

.latest-only-card .star-product-level {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    text-align: left;
    margin-top: 6px;
}

.latest-only-card .star-level-chip sup {
    font-size: 0.76em;
    margin-left: 2px;
    color: #444456;
    line-height: 1;
    position: relative;
    top: -0.45em;
}

.latest-only-card .star-product-level .star-level-chip {
    display: inline-flex !important;
    justify-content: center;
    align-items: center;
    font-style: normal;
    border-radius: 4px;
    padding: 1px 8px;
    font-size: 1rem;
    text-align: center;
    box-sizing: border-box;
}

.latest-only-card .star-product-level .star-level-chip.psu-chip {
    width: 84px;
}

.latest-only-card .star-product-level .star-level-chip.cf-chip {
    width: 36px;
}

.product-row-highlight td {
    animation: rowFlash 9s ease-out;
}

@keyframes rowFlash {
    0% {
        box-shadow: inset 0 0 0 9999px rgba(0, 212, 255, 0.35);
    }

    100% {
        box-shadow: inset 0 0 0 9999px rgba(0, 212, 255, 0);
    }
}

.card-star-summary .star-super {
    color: #000;
    background: #81a1c0;
    width: 80px;
}

.card-star-summary .star-titanium {
    color: #000;
    background: #617f90;
    width: 76px;
}

.card-star-summary .star-platinum {
    color: #000;
    background: #b3b3b3;
    width: 76px;
}

.card-star-summary .star-gold {
    color: #000;
    background: #dbac6d;
    width: 76px;
}

.card-star-summary .star-silver {
    color: #000;
    background: #8e8e8e;
    width: 76px;
}

.card-star-summary .star-bronze {
    color: #000;
    background: #94785b;
    width: 76px;
}

.card-star-summary .star-standard {
    color: #000;
    background: #eeeeee;
    width: 76px;
}

.card-star-summary .star-s {
    color: #000;
    background: #4caf50;
    width: 36px;
}

.card-star-summary i {
    margin-right: 5px;
}

.card-star-summary .star-a-plus {
    color: #000;
    background: #8bc34a;
    width: 36px;
}

.card-star-summary .star-a {
    color: #000;
    background: #cddc39;
    width: 36px;
}

.card-star-summary .star-b-plus {
    color: #000;
    background: #f4fba8;
    width: 36px;
}

.card-star-summary .star-b {
    color: #000;
    background: #ffeb3b;
    width: 36px;
}

.card-star-summary .star-c {
    color: #000;
    background: #ffcc07;
    width: 36px;
}

/* ========================================
   产品区域 + 表格布局适配
   表格视觉样式（th颜色/td字体/hover等）由 powercer.css + ttTable.js 控制
   ======================================== */
#brand-content {
    padding-bottom: 10em;
}

.product-section {
    width: 100%;
    max-width: 1300px;
    margin: 40px auto 80px auto;
    padding: 0 20px;
    overflow: visible;
    box-sizing: border-box;
}

/* 将父级的 overlay 绝对定位改为文档流 */
.product-section .fixedtable {
    width: 100%;
    max-width: 1300px;
    position: static;
    height: auto;
    min-height: 0;
    margin: 0 auto;
    overflow-x: auto;
    overflow-y: hidden;
    text-align: center;
    -webkit-overflow-scrolling: touch;
    border-radius: 16px 16px 0 0;
    overflow: hidden;
}

/* 覆盖 ttTable.js 的 table { position:absolute } */
.product-section .fixedtable table {
    margin: 0 auto;
    max-width: 1300px;
    width: 100%;
}

/* 数据表表头顶色条 —— 对应各产品卡片的渐变色 */
#psu-section .fixedtable::before {
    content: '';
    display: block;
    height: 0px;
    background: linear-gradient(90deg, #00ff88, #00d4ff);
}

#case-section .fixedtable::before {
    content: '';
    display: block;
    height: 0px;
    background: linear-gradient(90deg, #ff6b35, #ff8c5a);
}

#fan-section .fixedtable::before {
    content: '';
    display: block;
    height: 0px;
    background: linear-gradient(90deg, #a855f7, #c084fc);
}

/* 可点击 li 的手型光标和 hover 效果（父级通过 #fixedlist li:hover 实现，brand 页无 #fixedlist） */
.fixedtable td li[onclick] {
    cursor: pointer;
}

.fixedtable td li[onclick]:hover {
    background: #f5b560;
    color: #fff !important;
}

/* 可排序列表头手型光标 */
.fixedtable th:has(li) {
    cursor: pointer;
}

/* Edge mobile 兼容：父级 powercer.css 把排序箭头设为 absolute，会在横向滚动时漂移 */
.fixedtable th li {
    position: relative;
}

.fixedtable th li::after {
    position: static;
    display: inline-block;
    margin-left: 2px;
    transform: none;
}

/* ========================================
   星级透明度修复（父级 powercer.css opacity:0）
   ======================================== */
.levelbgcolor {
    opacity: 1 !important;
}

.psulevelbgcolor {
    opacity: 1 !important;
}

/* ========================================
   标题栏
   ======================================== */
.section-title-bar {
    /* position: static; */
    top: 0;
    z-index: 10;
    background: var(--bg-primary);
    padding: 20px 0 10px 0;
    margin-bottom: 10px;
    /* border-bottom: 1px solid var(--border); */
}

.section-title-bar h2 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: 2px;
}

.section-title-bar h2::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 1.2em;
    background: var(--accent-cyan);
    border-radius: 2px;
}

/* ========================================
   页脚
   ======================================== */
.footer {
    text-align: center;
    padding: 16px 0;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-brand {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.footer-brand svg {
    width: 40px;
    height: 40px;
    opacity: 0.6;
}

/* ========================================
   移动端适配
   ======================================== */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .brand-name {
        font-size: 2.5rem !important;
        letter-spacing: 0.15em !important;
    }

    .brand-header {
        padding-top: clamp(8vh, 10vh, 13vh);
    }

    .brand-hero {
        padding: 0 16px;
    }

    .brand-tagline {
        font-size: 1rem !important;
        letter-spacing: 0.2em !important;
    }

    .brand-logo img {
        width: 96% !important;
        max-height: 120px;
        max-width: 400px;
    }

    .stats-grid {
        display: grid;
        width: 96%;
        gap: 8px;
        padding: 0;
        margin-left: auto;
        margin-right: auto;
        margin-top: 8vh;
    }

    .stat-card {
        padding: 12px 6px;
        min-height: 100px;
        border-radius: 12px;
        flex-direction: column;
        gap: 12px;
    }

    .card-star-summary i {
        font-style: normal;
        padding: 1px 3px;
        border-radius: 4px;
        font-size: 0.8rem;
    }

    .card-star-summary .star-super,
    .card-star-summary .star-titanium,
    .card-star-summary .star-platinum,
    .card-star-summary .star-gold,
    .card-star-summary .star-silver,
    .card-star-summary .star-bronze,
    .card-star-summary .star-standard {
        width: 46px;
    }

    .card-star-summary .star-s,
    .card-star-summary .star-a-plus,
    .card-star-summary .star-a,
    .card-star-summary .star-b-plus,
    .card-star-summary .star-b,
    .card-star-summary .star-c {
        width: 30px;
    }

    .card-star-summary {
        display: flex;
        flex-direction: column;
        gap: 1px;
        font-size: 0.8rem;
        color: var(--text-secondary);
    }

    .card-right {
        border-left: none;
        border-top: 1px solid var(--border);
        padding-left: 0;
        padding-top: 12px;
        align-items: flex-start;
        text-align: left;
    }

    .stat-value {
        font-size: 2rem;
        width: 60px;
    }

    .psulevelbgcolor {
        width: 92%;
        padding: 5px 4px;
        margin: auto 3px auto 3px;
    }

    .stat-label {
        font-size: 1rem;
        letter-spacing: 0.03em;
        width: 99px;
    }

    .product-section {
        padding: 0 12px;
        margin: 24px 0 60px 0;
    }

    .product-section .fixedtable {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        min-width: 0;
    }

    .product-section .fixedtable table {
        display: table !important;
        table-layout: auto !important;
        width: auto !important;
        position: static !important;
    }

    .product-section .fixedtable td,
    .product-section .fixedtable th {
        white-space: nowrap !important;
        width: auto !important;
        min-width: 65px !important;
        padding-left: 4px !important;
        padding-right: 4px !important;
    }

    .section-title-bar h2 {
        font-size: 1.6rem;
    }

    .card-star-summary span {
        column-gap: 1px;
    }

    .card-right-title {
        font-size: 1rem;
        letter-spacing: 0em;
        margin-bottom: 10px;
    }

    .card-star-summary {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 4px 8px;
    }

    .latest-only-card .latest-only-title {
        font-size: 1.15rem;
        margin-bottom: 6px;
    }

    .latest-only-card .latest-model-item {
        padding: 6px 8px;
        border-radius: 6px;
        font-size: 0.92rem;
        line-height: 1.35;
    }

    .latest-only-card .latest-model-item::before {
        margin-right: 3px;
        font-size: 1em;
    }

    .corner-logo {
        width: 100px;
        top: 20px;
        left: 20px;
    }

    .lang-toggle {
        top: 20px;
        right: 20px;
        font-size: 0.8rem;
    }

    .back-to-top {
        right: 20px;
        bottom: 20px;
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }
}
