@font-face {
    font-family: T;
    font-style: normal;
    font-weight: 400;
    src: url(https://cdn.teyes.cn/cc4/ys.otf) format("opentype");
}
@font-face {
    font-family: N;
    font-style: normal;
    font-weight: 400;
    src: url(https://cdn.teyes.cn/cc4/no.TTF) format("opentype");
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html {
    -webkit-tap-highlight-color: transparent;
    -webkit-text-size-adjust: 100%;
}
html, body {
    min-height: 100%;
    min-height: 100dvh;
    background: #fff;
    color: #1a1a1a;
    font-family: N, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    overflow-x: hidden;
}
.lang-ru * { font-family: T, N, sans-serif; }

.page {
    position: relative;
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    padding: 48px 24px 56px;
    padding-left: max(24px, env(safe-area-inset-left));
    padding-right: max(24px, env(safe-area-inset-right));
    padding-bottom: max(56px, env(safe-area-inset-bottom));
}

.bg-wrap {
    display: none;
}

/* 头部：入场 */
.header {
    position: relative;
    z-index: 1;
    padding: 0 0 40px;
    text-align: center;
    animation: headerIn 0.5s ease-out;
}
@keyframes headerIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
.header-inner { position: relative; }
.logo-title {
    font-size: clamp(22px, 5vw, 26px);
    font-weight: 600;
    color: #1a1a1a;
    letter-spacing: 0.02em;
    margin-bottom: 8px;
}
.logo-360 {
    color: #1a1a1a;
    font-weight: 600;
}
.header-sub {
    font-size: clamp(13px, 2.5vw, 14px);
    color: #666;
    margin-bottom: 24px;
    line-height: 1.5;
    padding: 0 8px;
}
.lang-switch {
    display: inline-flex;
    gap: 0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}
.btn-lang {
    padding: 10px 20px;
    min-height: 44px;
    min-width: 44px;
    border: none;
    border-right: 1px solid #e0e0e0;
    background: #fff;
    color: #666;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.btn-lang:last-child { border-right: none; }
.btn-lang:hover { background: #f5f5f5; color: #1a1a1a; }
.btn-lang.active {
    background: #1a1a1a;
    color: #fff;
}

/* 主内容 */
.main { position: relative; z-index: 1; flex: 1; min-width: 0; }

.tabs {
    display: flex;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 32px;
}
.tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 12px;
    min-height: 48px;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    background: transparent;
    color: #666;
    font-size: clamp(14px, 2.5vw, 15px);
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}
.tab:hover { color: #1a1a1a; }
.tab.active {
    color: #1a1a1a;
    border-bottom-color: #1a1a1a;
}
.tab-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.7;
}
.tab-icon-query {
    border: 2px solid currentColor;
    border-radius: 50%;
    background: transparent;
    position: relative;
}
.tab-icon-query::after {
    content: '';
    position: absolute;
    right: -3px;
    bottom: -3px;
    width: 8px;
    height: 2px;
    background: currentColor;
    transform: rotate(45deg);
}
.tab-icon-apply {
    background: transparent;
    position: relative;
}
.tab-icon-apply::before,
.tab-icon-apply::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 10px;
    height: 2px;
    background: currentColor;
    transform: translate(-50%, -50%);
}
.tab-icon-apply::after { transform: translate(-50%, -50%) rotate(90deg); }

/* 卡片：入场 */
.card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 32px 24px;
    min-width: 0;
    animation: cardIn 0.4s ease-out;
}
@keyframes cardIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.panel { padding: 0; }
.query-mode {
    display: flex;
    gap: 0;
    margin-bottom: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}
.mode-btn {
    flex: 1;
    padding: 10px 14px;
    border: none;
    border-right: 1px solid #e0e0e0;
    background: #fff;
    color: #666;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.mode-btn:last-child { border-right: none; }
.mode-btn:hover { background: #f5f5f5; color: #1a1a1a; }
.mode-btn.active {
    background: #1a1a1a;
    color: #fff;
}
.label {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
    font-weight: 500;
}
.input-wrap { margin-bottom: 20px; }
.input {
    width: 100%;
    padding: 14px 16px;
    min-height: 48px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    color: #1a1a1a;
    font-size: 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}
.input::placeholder { color: #999; }
.input:focus {
    outline: none;
    border-color: #1a1a1a;
}

.btn {
    width: 100%;
    padding: 16px;
    min-height: 48px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.btn-primary {
    background: #1a1a1a;
    color: #fff;
}
.btn-primary:hover:not(:disabled) { opacity: 0.88; }
.btn-primary:active:not(:disabled) { opacity: 0.8; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-spin {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 结果：左侧色条 + 白底 + 入场动画 */
.result {
    margin-top: 24px;
    display: flex;
    align-items: stretch;
    gap: 0;
    min-height: 0;
    border-radius: 10px;
    border: 1px solid #e8e8e8;
    background: #fafafa;
    overflow: hidden;
    word-break: break-word;
    animation: resultIn 0.35s ease-out;
}
@keyframes resultIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
.result-dot {
    flex-shrink: 0;
    width: 4px;
    align-self: stretch;
    border-radius: 4px 0 0 4px;
}
.result-body {
    flex: 1;
    min-width: 0;
    padding: 18px 20px;
}
.result-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.45;
}
.result-code,
.result-imei {
    margin: 6px 0 0;
    font-size: 13px;
    font-weight: 400;
    color: #666;
    line-height: 1.4;
    word-break: break-all;
}
.result-imei { margin-top: 4px; }
.result-result-1 .result-dot { background: #dc2626; }
.result-result-0 .result-dot { background: #16a34a; }
.result-result--1 .result-dot { background: #d97706; }

.msg {
    margin-top: 16px;
    padding: 14px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
    animation: msgIn 0.3s ease-out;
}
@keyframes msgIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
.msg.error {
    background: #fef2f2;
    color: #991b1b;
}
.msg.success {
    background: #f0fdf4;
    color: #166534;
}
.msg.success .apply-code {
    margin: 10px 0 0;
    font-size: 15px;
}
.msg.success .apply-code strong {
    letter-spacing: 0.08em;
}

.footer {
    margin-top: auto;
    padding-top: 40px;
    padding-bottom: env(safe-area-inset-bottom);
    text-align: center;
    font-size: 12px;
    color: #999;
}

/* 手机端 */
@media (max-width: 480px) {
    .page {
        padding: 32px 20px 48px;
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
        padding-bottom: max(48px, env(safe-area-inset-bottom));
    }
    .header { padding-bottom: 32px; }
    .logo-title { font-size: 24px; }
    .header-sub { margin-bottom: 20px; }
    .card { padding: 24px 20px; }
    .tabs { margin-bottom: 24px; }
    .tab { padding: 14px 8px; }
}

/* PC 端：大屏时给页面背景，内容区更明显 */
@media (min-width: 768px) {
    body {
        background: #f5f5f5;
    }
    .page {
        padding: 56px 24px 64px;
        box-shadow: 0 0 0 1px rgba(0,0,0,0.04);
        background: #fff;
    }
    .card {
        box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    }
}

@media (min-width: 1024px) {
    .page {
        padding: 64px 32px 80px;
    }
    .card {
        padding: 36px 28px;
    }
}
