:root {
    --brand-blue: #66b2ff;
    --brand-cyan: #4ee2ff;
    --accent-glow: #38bdf8;
    --bg-deep: #020a1a;
    --bg-mid: #071430;
    --bg-card: rgba(8, 22, 58, 0.72);
    --text: #e4efff;
    --text-muted: #94b4d8;
    --border: rgba(100, 170, 255, 0.22);
    --glass: rgba(12, 32, 72, 0.55);
    --glass-border: rgba(100, 180, 255, 0.18);
}

/* ============================================================
   基础页面
   ============================================================ */
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
    color: var(--text);
    background:
        radial-gradient(ellipse 120% 80% at 8% 92%, rgba(20, 80, 180, 0.16), transparent 55%),
        radial-gradient(ellipse 100% 70% at 80% 15%, rgba(0, 180, 220, 0.07), transparent 50%),
        linear-gradient(175deg, var(--bg-deep) 0%, var(--bg-mid) 45%, #0a1e48 75%, #051028 100%);
    background-attachment: fixed;
    overflow-x: hidden;
}

/* ============================================================
   全屏光束 Canvas — 固定在页面底层
   ============================================================ */
/* beamCanvas 由 JS 动态创建并内联设置样式 */

/* ============================================================
   页面容器
   ============================================================ */
.page-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 24px 20px 48px;
    box-sizing: border-box;
}

/* ============================================================
   通用表格（标题栏 / 区域标题）— 玻璃拟态
   ============================================================ */
.fixed-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    border-radius: 16px;
    overflow: hidden;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    margin-top: 20px;
}

.page-container > .fixed-table:first-of-type {
    margin-top: 0;
}

.fixed-table td {
    padding: 14px 16px;
    text-align: center;
}

/* 顶部标题栏 */
.page-container > .fixed-table:first-of-type {
    border-radius: 20px;
    border-color: rgba(56, 189, 248, 0.18);
    background:
        linear-gradient(135deg, rgba(10, 30, 72, 0.82), rgba(7, 20, 48, 0.88));
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.4),
        0 0 1px rgba(56, 189, 248, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.page-container > .fixed-table:first-of-type td {
    padding-top: 20px;
    padding-bottom: 20px;
}

.header-cell {
    font-size: 44px;
    letter-spacing: 0.14em;
    font-weight: 900;
    line-height: 1.1;
    background: linear-gradient(180deg, #e0ecff 0%, #60a5fa 50%, #38bdf8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
    filter: drop-shadow(0 2px 8px rgba(56, 189, 248, 0.3));
}

.subtitle-cell {
    font-size: 24px;
    color: #94b8e0;
    font-weight: 700;
    text-align: left;
    letter-spacing: 0.1em;
    line-height: 1.2;
}

.section-header {
    font-size: 28px;
    color: #c4daf5;
    font-weight: 800;
    text-align: left;
    letter-spacing: 0.08em;
    line-height: 1.15;
    position: relative;
    padding-left: 18px !important;
}

.section-header::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--brand-cyan), var(--brand-blue));
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

/* ============================================================
   主图
   ============================================================ */
.image-container {
    max-width: 100%;
    overflow: hidden;
    border-radius: 18px;
    margin-top: 20px;
    border: 1px solid var(--glass-border);
    background: rgba(6, 16, 40, 0.6);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.hero-optics-canvas {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 800 / 340;
    background: transparent;
    vertical-align: middle;
}

/* ============================================================
   产品中心
   ============================================================ */
.product-center {
    margin: 24px 0 16px;
    padding: 24px;
    border-radius: 22px;
    border: 1px solid var(--glass-border);
    background: var(--glass);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.product-note {
    text-align: center;
    color: var(--text-muted);
    letter-spacing: 0.06em;
    margin-bottom: 18px;
    font-size: 14px;
    font-weight: 500;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.product-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 20px 14px 14px;
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(12, 28, 64, 0.72), rgba(8, 20, 48, 0.82));
    border: 1px solid rgba(100, 170, 255, 0.14);
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
    transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-height: 200px;
}

.product-image-wrapper {
    box-sizing: border-box;
    width: fit-content;
    height: fit-content;
    max-width: min(160px, 100%);
    max-height: 160px;
    border-radius: 14px;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(100, 170, 255, 0.25);
    transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: radial-gradient(circle at 50% 0%, rgba(56, 189, 248, 0.10), transparent 60%);
    opacity: 0;
    transition: opacity 250ms ease;
    pointer-events: none;
}

.product-card:hover {
    transform: translateY(-4px);
    border-color: rgba(56, 189, 248, 0.35);
    box-shadow:
        0 12px 36px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(56, 189, 248, 0.12);
}

.product-card:hover::before {
    opacity: 1;
}

/* ImageButton 输出为 input[type=image]，用 px 上限避免百分比基线与 overflow 裁切导致“放大/裁切”感 */
.product-card input[type="image"].product-image,
.product-image {
    display: block;
    box-sizing: border-box;
    width: auto !important;
    height: auto !important;
    max-width: 160px;
    max-height: 160px;
    object-fit: contain;
    object-position: center;
    border: none;
    margin: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
    transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1), filter 250ms cubic-bezier(0.4, 0, 0.2, 1);
    transform: none;
    image-rendering: auto;
}

.product-card input[type="image"].product-image:hover,
.product-image:hover {
    filter: brightness(1.08);
}

.product-image-wrapper:hover {
    box-shadow:
        0 12px 36px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(56, 189, 248, 0.2);
    border-color: rgba(56, 189, 248, 0.55);
}

.product-card input[type="image"].product-image:active,
.product-image:active {
    filter: brightness(0.95);
}

.product-name {
    font-size: 16px;
    color: #c4daf5;
    letter-spacing: 0.04em;
    font-weight: 600;
    text-transform: uppercase;
}

/* ============================================================
   联系方式
   ============================================================ */
.contact-details {
    display: flex;
    align-items: center;
    gap: 24px;
    margin: 24px 0 16px;
    padding: 20px 24px;
    border-radius: 20px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.contact-image {
    max-width: 120px;
    border-radius: 14px;
    border: 1px solid rgba(100, 170, 255, 0.2);
}

.contact-info {
    font-size: 15pt;
    line-height: 1.7;
    color: #c8dbf0;
}

/* ============================================================
   页脚
   ============================================================ */
.footer {
    text-align: center;
    font-size: 11pt;
    color: #7a94b8;
    padding: 28px 0 16px;
}

.footer-image {
    max-width: 200px;
    height: auto;
    opacity: 0.7;
}

.footer-text {
    margin-top: 8px;
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 768px) {
    .page-container {
        padding: 14px 12px 32px;
    }

    .header-cell {
        font-size: 30px;
        letter-spacing: 0.1em;
    }

    .subtitle-cell {
        font-size: 18px;
        letter-spacing: 0.06em;
        text-align: right;
    }

    .section-header {
        font-size: 22px;
        letter-spacing: 0.06em;
    }

    .product-center {
        padding: 16px 12px;
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .product-card {
        padding: 16px 10px 12px;
        min-height: 160px;
    }

    .product-note {
        font-size: 12px;
        margin-bottom: 12px;
    }

    .product-name {
        font-size: 14px;
    }

    .product-card input[type="image"].product-image,
    .product-image {
        max-width: 120px;
        max-height: 120px;
    }

    .product-image-wrapper {
        max-width: min(120px, 100%);
        max-height: 120px;
    }

    .contact-details {
        flex-direction: column;
        align-items: flex-start;
    }

    .contact-image {
        max-width: 140px;
    }
}

@media (max-width: 480px) {
    .header-cell {
        font-size: 24px;
        letter-spacing: 0.06em;
    }

    .subtitle-cell {
        font-size: 15px;
        letter-spacing: 0.03em;
        text-align: left;
    }

    .section-header {
        font-size: 18px;
        letter-spacing: 0.03em;
    }
}

@media (max-width: 420px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
}
