@font-face {
    font-family: N;
    font-style: normal;
    font-weight: 400;
    src: url(https://cdn.teyes.cn/cc4/no.TTF) format("opentype");
}

@font-face {
    font-family: T;
    font-style: normal;
    font-weight: 400;
    src: url(https://cdn.teyes.cn/cc4/ys.otf) format("opentype");
}

:root {
    --log-bg: #0a0e14;
    --log-bg-deep: #060810;
    --log-card: #1e252b;
    --log-card-border: rgba(255, 255, 255, 0.06);
    --log-text: #eef7ff;
    --log-muted: #9aa8b5;
    --log-accent-a: #72AFFF;
    --log-accent-b: #7FFFE5;
    --log-teal: #00f2ff;
    --log-radius: 16px;
    --log-shell: min(1024px, 100%);
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    background: var(--log-bg-deep);
    color: var(--log-text);
    font-family: N, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

.ru, .ua {
    font-family: T, N, sans-serif;
}

* {
    box-sizing: border-box;
}

button {
    font: inherit;
}

#app {
    height: 100%;
}

.log-page {
    position: relative;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background:
        radial-gradient(ellipse 75% 55% at 88% -8%, rgba(0, 242, 255, 0.18), transparent 52%),
        radial-gradient(ellipse 45% 35% at 72% 8%, rgba(114, 175, 255, 0.08), transparent 48%),
        linear-gradient(180deg, #101820 0%, #0a0e14 45%, #060810 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.log-shell {
    position: relative;
    z-index: 1;
    width: var(--log-shell);
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* —— Header —— */
.log-header {
    flex: 0 0 auto;
    z-index: 20;
    padding: max(20px, env(safe-area-inset-top)) 20px 0;
}

.log-header-inner {
    position: relative;
    padding: 0 0 20px;
}

.log-title-row {
    position: relative;
    margin-bottom: 20px;
    min-height: 34px;
}

.log-title {
    margin: 0;
    padding: 0 84px;
    font-size: clamp(22px, 4.8vw, 28px);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.01em;
    text-align: center;
    color: #fff;
}

.log-lang-dropdown {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    z-index: 30;
}

.log-lang-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 74px;
    max-width: 92px;
    padding: 7px 10px 7px 11px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.88);
    font: inherit;
    font-size: 12px;
    line-height: 1.2;
    cursor: pointer;
    transition: border-color 0.18s, background-color 0.18s;
}

.log-lang-trigger:hover {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
}

.log-lang-trigger.is-open {
    border-color: rgba(127, 255, 229, 0.28);
    background: rgba(255, 255, 255, 0.06);
}

.log-lang-current {
    flex: 1;
    min-width: 0;
    text-align: left;
    white-space: nowrap;
}

.log-lang-chevron {
    flex: 0 0 auto;
    width: 10px;
    height: 6px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%239aa8b5' d='M1 1l4 4 4-4'/%3E%3C/svg%3E") center / contain no-repeat;
    transition: transform 0.2s ease;
}

.log-lang-trigger.is-open .log-lang-chevron {
    transform: rotate(180deg);
}

.log-lang-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 100%;
    padding: 4px;
    border-radius: 12px;
    background: #1e252b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.log-lang-option {
    display: block;
    width: 100%;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.72);
    text-align: left;
    padding: 9px 12px;
    border-radius: 8px;
    font: inherit;
    font-size: 12px;
    line-height: 1.2;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}

.log-lang-option:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.log-lang-option.active {
    color: #fff;
    background: rgba(127, 255, 229, 0.1);
}

.log-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Model tabs — 对齐 faq/canbus */
.log-models {
    display: flex;
    text-align: center;
    border-bottom: 2px solid rgba(215, 238, 255, 0.2);
    margin: 0 0 20px;
}

.log-model {
    flex: 1;
    border: none;
    background: transparent;
    color: rgba(215, 238, 255, 0.5);
    border-radius: 0;
    padding: 20px 8px;
    font-size: 16px;
    line-height: 1.2;
    cursor: pointer;
    position: relative;
    transition: color 0.18s;
}

.log-model:hover {
    color: rgba(233, 246, 255, 0.82);
}

.log-model.active {
    background-position: center bottom;
    background-repeat: no-repeat;
    color: rgba(233, 246, 255, 1);
    background-image: url('https://cdn.teyes.cn/cc4/Dcam/image/active.png');
    background-size: auto 100%;
}

.log-model.active::before {
    content: '';
    position: absolute;
    height: 2px;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, #72AFFF, #7FFFE5);
}

/* Release / Beta segmented control */
.log-tabs {
    display: flex;
    position: relative;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 999px;
    padding: 4px;
    max-width: 260px;
    margin: 0 auto;
}

.log-tab {
    flex: 1;
    position: relative;
    z-index: 2;
    text-align: center;
    line-height: 40px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.38);
    cursor: pointer;
    user-select: none;
    transition: color 0.2s;
}

.log-tab.active {
    color: #fff;
}

.log-tabs-indicator {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    border-radius: 999px;
    border: 2px solid transparent;
    background:
        linear-gradient(rgba(30, 37, 43, 0.96), rgba(30, 37, 43, 0.96)) padding-box,
        linear-gradient(90deg, var(--log-accent-a), var(--log-accent-b)) border-box;
    box-shadow: 0 0 18px rgba(127, 255, 229, 0.12);
    transition: left 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.log-tabs-indicator.t1 {
    left: calc(50%);
}

/* —— Compact head（滚动后） —— */
.log-compact-head {
    flex: 0 0 auto;
    z-index: 24;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: max(10px, env(safe-area-inset-top)) 16px 12px;
    background: rgba(10, 14, 20, 0.92);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.log-mini-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.log-mini-title {
    display: block;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.2;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.log-mini-meta {
    display: block;
    font-size: 12px;
    line-height: 1.3;
    color: var(--log-muted);
    letter-spacing: 0.01em;
}

.log-mini-top {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(233, 246, 255, 0.92);
    font-size: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    justify-content:center;
    line-height: 1;
    cursor: pointer;
    transition: background 0.18s, transform 0.15s;
}

.log-mini-top:hover {
    background: rgba(255, 255, 255, 0.08);
}

.log-mini-top:active {
    transform: scale(0.94);
}

/* —— Content —— */
.log-scroll {
    flex: 1;
    min-height: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    padding: 20px 20px 120px;
    scrollbar-width: thin;
    scrollbar-color: rgba(127, 255, 229, 0.25) transparent;
}

.log-shell.is-compact .log-scroll {
    padding-top: 16px;
}

.log-scroll::-webkit-scrollbar {
    width: 5px;
}

.log-scroll::-webkit-scrollbar-thumb {
    background: rgba(127, 255, 229, 0.25);
    border-radius: 999px;
}

.log-group {
    padding-bottom: 24px;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.log-group:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.log-group-date {
    font-size: 18px;
    font-weight: 500;
    color: #fff;
    line-height: 22px;
    margin: 24px 0 10px;
}

.log-group:first-child .log-group-date {
    margin-top: 0;
}

/* Entries */
.log-entry {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.log-group .log-entry:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.log-entry-in {
    opacity: 0;
    animation: log-fade-in 0.45s ease forwards;
}

@keyframes log-fade-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.log-line {
    margin: 0 0 10px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 15px;
    line-height: 1.5;
    word-break: break-word;
}

.log-line-label {
    color: #fff;
}

.log-body {
    color: rgba(255, 255, 255, 0.5);
    font-size: 15px;
    line-height: 1.55;
    word-break: normal;
    overflow-wrap: break-word;
}

.log-body .log-ol {
    margin: 0;
    padding: 0;
}

.log-body .log-ol-item {
    margin-bottom: 0.35em;
}

.log-body .log-ol-item:last-child {
    margin-bottom: 0;
}

.log-body .log-ol-item .log-num-line {
    margin-top: 0.5em;
}

.log-body .log-ol-item:first-child .log-num-line {
    margin-top: 0;
}

.log-body .log-ol-item .log-bullet-line {
    display: block;
}

.log-body ol,
.log-body ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.log-body ol > li,
.log-body ul > li {
    margin: 0;
    padding: 0;
    list-style: none;
}

.log-body div {
    display: block;
    margin-bottom: 0.25em;
}

.log-body .log-bullet-line {
    display: block;
    margin-left: 10px;
    padding-left: 0.85em;
    text-indent: -0.85em;
}

.log-body .log-bullet-nest {
    margin-left: 24px;
}

.log-body .log-num-line {
    display: block;
    margin-top: 0.5em;
    margin-bottom: 0.15em;
    text-indent: 0;
}

.log-body .log-num-mark {
    display: inline-block;
    margin-right: 0.2em;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.72);
    text-indent: 0;
}

.log-body .log-num-text {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.72);
    text-indent: 0;
}

.log-body b.log-num-line,
.log-body b.log-num-line .log-num-mark,
.log-body b.log-num-line .log-num-text {
    color: rgba(255, 255, 255, 0.72);
    font-weight: 600;
}

.log-body p {
    display: block;
    margin: auto 0;
}

.log-body p.log-gap,
.log-body div.log-gap,
.log-body p:has(> br:only-child),
.log-body div:has(> br:only-child) {
    height: 8px;
    margin: 0;
    padding: 0;
    line-height: 0;
    font-size: 0;
    overflow: hidden;
}

.log-body p.log-gap br,
.log-body div.log-gap br,
.log-body p:has(> br:only-child) br,
.log-body div:has(> br:only-child) br {
    display: none;
}

.log-body br {
    display: block;
    line-height: 0.85;
    margin: 0;
}

.log-body span {
    display: inline;
}

.log-body b,
.log-body strong {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
}

.log-body img,
.log-body video {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 12px;
    margin: 8px 0;
}

/* —— Skeleton —— */
.log-skeleton {
    padding-top: 0;
}

.log-skeleton-group {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.log-skeleton-group:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.log-skeleton-line {
    height: 12px;
    margin-bottom: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.04) 100%);
    background-size: 200% 100%;
    animation: log-shimmer 1.2s ease-in-out infinite;
}

.log-skeleton-date {
    height: 18px;
    margin-bottom: 12px;
}

.log-skeleton-line.w20 { width: 20%; }
.log-skeleton-line.w30 { width: 30%; }
.log-skeleton-line.w40 { width: 40%; }
.log-skeleton-line.w55 { width: 55%; }
.log-skeleton-line.w60 { width: 60%; }
.log-skeleton-line.w70 { width: 70%; }
.log-skeleton-line.w80 { width: 80%; }
.log-skeleton-line.w85 { width: 85%; }

@keyframes log-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* —— States —— */
.log-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-right: 10px;
    vertical-align: -3px;
    border: 2px solid rgba(127, 255, 229, 0.15);
    border-top-color: var(--log-accent-b);
    border-radius: 50%;
    animation: log-spin 0.75s linear infinite;
}

@keyframes log-spin {
    to { transform: rotate(360deg); }
}

.log-empty,
.log-loading,
.log-end {
    text-align: center;
    color: var(--log-muted);
    padding: 56px 20px;
    line-height: 1.65;
    font-size: 15px;
}

.log-empty {
    max-width: 520px;
    margin: 0 auto;
    padding: 48px 20px;
}

.log-empty p {
    margin: 0;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.7;
}

.log-end span {
    display: inline-block;
    padding: 0 12px;
    opacity: 0.35;
}

.log-end-hint {
    font-size: 13px;
    opacity: 0.65;
    padding-top: 24px;
    padding-bottom: 24px;
}

/* —— Footer —— */
.log-footer {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    z-index: 30;
    width: var(--log-shell);
    padding: 0 20px calc(14px + env(safe-area-inset-bottom));
    pointer-events: none;
    transition: transform 0.28s ease, opacity 0.28s ease;
}

.log-footer.is-hidden {
    transform: translate(-50%, 110%);
    opacity: 0;
}

.log-footer-inner {
    pointer-events: auto;
    padding: 18px 0 0;
    background: linear-gradient(180deg, rgba(6, 8, 16, 0), rgba(6, 8, 16, 0.72) 36%, rgba(6, 8, 16, 0.94) 100%);
}

.log-btn {
    display: block;
    width: 100%;
    border: none;
    border-radius: 14px;
    line-height: 50px;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: #fff;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}

.log-btn:active {
    transform: scale(0.985);
}

.log-btn + .log-btn {
    margin-top: 10px;
}

.log-btn.primary {
    background: linear-gradient(90deg, #4170eb 0%, #3d8bfd 100%);
    box-shadow: 0 10px 28px rgba(65, 112, 235, 0.32);
}

.log-btn.primary:hover {
    box-shadow: 0 12px 32px rgba(65, 112, 235, 0.42);
}

.log-btn.secondary {
    background: #4b536b;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}

/* —— Compact dock —— */
.log-compact-dock {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    z-index: 31;
    width: var(--log-shell);
    display: flex;
    gap: 10px;
    padding: 10px 20px calc(12px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(6, 8, 16, 0), rgba(6, 8, 16, 0.78) 28%, rgba(6, 8, 16, 0.94) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: log-dock-in 0.24s ease;
}

@keyframes log-dock-in {
    from {
        opacity: 0;
        transform: translate(-50%, 12px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.log-compact-btn {
    flex: 1;
    min-width: 0;
    border-radius: 12px;
    line-height: 44px;
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: linear-gradient(90deg, #4170eb 0%, #3d8bfd 100%);
    box-shadow: 0 8px 22px rgba(65, 112, 235, 0.28);
    transition: transform 0.15s, opacity 0.15s;
}

.log-compact-btn.is-secondary {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: none;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.log-compact-btn:active {
    transform: scale(0.98);
}

@media (prefers-reduced-motion: reduce) {
    .log-entry-in,
    .log-compact-dock,
    .log-header,
    .log-footer {
        animation: none;
        transition: none;
    }
}

/* —— Responsive —— */
@media screen and (min-width: 900px) {
    .log-header {
        padding-left: 24px;
        padding-right: 24px;
    }

    .log-scroll {
        padding: 24px 24px 120px;
    }

    .log-footer {
        padding-left: 24px;
        padding-right: 24px;
    }

    .log-body {
        font-size: 15px;
    }
}

@media screen and (max-width: 480px) {
    .log-header {
        padding-left: 16px;
        padding-right: 16px;
    }

    .log-title {
        padding: 0 72px 0 0;
        font-size: clamp(20px, 5.2vw, 24px);
    }

    .log-lang-trigger {
        min-width: 68px;
        max-width: 80px;
        font-size: 11px;
    }

    .log-scroll {
        padding-left: 16px;
        padding-right: 16px;
    }

    .log-model {
        font-size: 14px;
        padding: 16px 4px;
    }

    .log-tab {
        font-size: 13px;
        line-height: 36px;
    }

    .log-line,
    .log-body {
        font-size: 14px;
    }

    .log-group-date {
        font-size: 17px;
    }

    .log-mini-top {
        width: 32px;
        height: 32px;
    }

    .log-compact-head {
        padding-left: 12px;
        padding-right: 12px;
    }

    .log-compact-dock {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* updata.html — 整页滚动，覆盖 logs 页的 overflow:hidden */
html.is-up-page,
html.is-up-page body {
    height: auto;
    min-height: 100%;
    overflow: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

html.is-up-page #app {
    height: auto;
    min-height: 100%;
}

/* updata.html shared helpers */
.up-page {
    min-height: 100vh;
    background:
        radial-gradient(ellipse 75% 55% at 88% -8%, rgba(0, 242, 255, 0.18), transparent 52%),
        linear-gradient(180deg, #101820 0%, #0a0e14 45%, #060810 100%);
    color: var(--log-text);
    padding: max(24px, env(safe-area-inset-top)) 20px 40px;
}

.up-shell {
    max-width: 1024px;
    margin: 0 auto;
}

.up-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    color: var(--log-accent-a);
    text-decoration: none;
    font-size: 14px;
}

.up-title-row {
    margin-bottom: 10px;
}

.up-title-row .up-title {
    margin: 0;
    padding-right: 84px;
}

.up-card {
    padding: 28px 22px;
    border-radius: var(--log-radius);
    background: var(--log-card);
    border: 1px solid var(--log-card-border);
}

.up-title {
    font-size: clamp(24px, 5vw, 30px);
    margin: 0 0 10px;
    letter-spacing: -0.02em;
}

.up-lead {
    color: var(--log-muted);
    margin-bottom: 24px;
    line-height: 1.65;
}

.up-step {
    margin-bottom: 22px;
}

.up-step-head {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.up-step-img {
    max-width: 350px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.2);
}

.up-step-img img {
    display: block;
    width: 100%;
    height: auto;
}

.up-num {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--log-accent-a), var(--log-accent-b));
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 30px;
    font-size: 13px;
    font-weight: 700;
    color: #060b0b;
}

.up-text {
    line-height: 1.65;
    padding-top: 4px;
    color: rgba(233, 246, 255, 0.92);
    flex: 1;
    min-width: 0;
}
