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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background:
        radial-gradient(circle at 50% -18%, rgba(99, 102, 241, 0.18), transparent 34%),
        radial-gradient(circle at 12% 16%, rgba(236, 72, 153, 0.11), transparent 28%),
        radial-gradient(circle at 90% 8%, rgba(14, 165, 233, 0.12), transparent 30%),
        linear-gradient(90deg, rgba(99, 102, 241, 0.045) 1px, transparent 1px),
        linear-gradient(180deg, rgba(99, 102, 241, 0.035) 1px, transparent 1px),
        linear-gradient(180deg, #f8fbff 0%, #f7f8ff 46%, #ffffff 100%);
    background-size: auto, auto, auto, 48px 48px, 48px 48px, auto;
    color: #172033;
    min-height: 100vh;
    overflow-x: hidden;
}

.particles-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.82;
    mix-blend-mode: multiply;
}

.top-actions {
    position: fixed;
    top: 18px;
    right: 20px;
    z-index: 20;
    display: flex;
    gap: 10px;
    align-items: center;
}

.web-login-entry,
.web-history-entry {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.84);
    color: #172033;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    border: 1px solid rgba(203, 213, 225, 0.74);
    cursor: pointer;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(16px);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.web-login-entry {
    position: relative;
}

.web-login-entry:hover,
.web-history-entry:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 34px rgba(31, 41, 55, 0.24);
}

.web-login-entry.logged {
    justify-content: flex-start;
    gap: 10px;
    max-width: 260px;
    min-width: 168px;
    padding: 5px 8px 5px 6px;
    border-color: rgba(99, 102, 241, 0.22);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(245, 247, 255, 0.9));
    color: #1f2937;
    box-shadow: 0 16px 42px rgba(79, 70, 229, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.web-login-entry.logged::after {
    content: '退出';
    flex: 0 0 auto;
    padding: 5px 8px;
    border-radius: 8px;
    background: rgba(99, 102, 241, 0.1);
    color: #4f46e5;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
}

.web-login-entry.logged:hover {
    border-color: rgba(79, 70, 229, 0.36);
    box-shadow: 0 18px 46px rgba(79, 70, 229, 0.2);
}

.web-user-avatar {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, #eef2ff, #dcfce7);
    color: #4f46e5;
    font-size: 12px;
    font-weight: 900;
    flex: 0 0 auto;
    box-shadow: 0 0 0 2px #fff, 0 8px 18px rgba(79, 70, 229, 0.16);
}

.web-user-avatar::after {
    content: '';
    position: absolute;
    right: 1px;
    bottom: 1px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid #fff;
}

.web-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.web-user-name {
    min-width: 0;
    color: #172033;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.login-modal {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.45);
}

.login-modal.show {
    display: flex;
}

.login-dialog {
    position: relative;
    width: min(360px, 100%);
    padding: 26px 24px 24px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.32);
    text-align: center;
}

.login-dialog h3 {
    margin-bottom: 8px;
    color: #1f2937;
}

.login-dialog p {
    color: #64748b;
    line-height: 1.6;
    font-size: 14px;
}

.pricing-wechat-dialog p {
    margin: 0 0 14px;
    font-weight: 750;
}

.pricing-wechat-qr {
    width: min(240px, 100%);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    margin: 0 auto;
    padding: 10px;
    border: 1px solid #dbe6f3;
    border-radius: 12px;
    background: #f8fafc;
}

.pricing-wechat-qr img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.pricing-qq-dialog {
    width: min(380px, calc(100vw - 32px));
    text-align: center;
}

.pricing-qq-box {
    display: grid;
    gap: 12px;
    justify-items: center;
    padding: 18px 16px 6px;
    border: 1px solid #dbe6f3;
    border-radius: 12px;
    background: #f8fafc;
}

.pricing-qq-box strong {
    font-size: 28px;
    line-height: 1.1;
    letter-spacing: 0;
    color: #0f172a;
}

.pricing-qq-box button {
    min-width: 120px;
    padding: 10px 16px;
    border: 0;
    border-radius: 10px;
    background: #2563eb;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.pricing-qq-box button:hover {
    background: #1d4ed8;
}

.pricing-qq-box button:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
}

.login-qr {
    width: 220px;
    height: 220px;
    margin: 18px auto;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.login-qr img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.login-close {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    border: 0;
    border-radius: 999px;
    background: #fff;
    color: #475569;
    cursor: pointer;
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.22);
}

.login-close:hover {
    background: #f8fafc;
    color: #111827;
}

.login-combined-dialog {
    width: min(390px, 100%);
}

.login-mode-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 18px;
    padding: 4px;
    border: 1px solid rgba(199, 210, 254, 0.72);
    border-radius: 999px;
    background: rgba(248, 250, 252, 0.9);
}

.login-mode-tab {
    min-height: 38px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    font-size: 13px;
    font-weight: 900;
}

.login-mode-tab.active {
    color: #fff;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.22);
}

.login-mode-panel[hidden] {
    display: none;
}

.admin-login-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin: 16px 0 0;
    padding: 4px;
    border: 1px solid rgba(203, 213, 225, 0.82);
    border-radius: 12px;
    background: #f8fafc;
}

.admin-login-tab {
    min-height: 36px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    font-size: 13px;
    font-weight: 900;
}

.admin-login-tab.active {
    color: #172033;
    background: #fff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.admin-login-form {
    display: grid;
    gap: 12px;
    margin-top: 16px;
    text-align: left;
}

.admin-login-form[hidden] {
    display: none;
}

.admin-login-field {
    display: grid;
    gap: 8px;
    color: #475569;
    font-size: 13px;
    font-weight: 900;
}

.admin-login-input {
    width: 100%;
    min-height: 46px;
    border: 1px solid #dbe4ef;
    border-radius: 12px;
    padding: 0 13px;
    background: #fff;
    color: #172033;
    font-size: 14px;
    font-weight: 750;
}

.admin-login-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

.admin-code-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 108px;
    gap: 8px;
}

.admin-code-button {
    min-height: 46px;
    border: 1px solid rgba(99, 102, 241, 0.22);
    border-radius: 12px;
    background: #eef2ff;
    color: #4f46e5;
    cursor: pointer;
    font-size: 13px;
    font-weight: 900;
}

.admin-code-button:disabled {
    cursor: not-allowed;
    opacity: 0.72;
}

.admin-login-message {
    margin: 0;
    color: #dc2626;
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
}

.admin-login-submit {
    min-height: 46px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    cursor: pointer;
    font-size: 15px;
    font-weight: 900;
    box-shadow: 0 12px 26px rgba(99, 102, 241, 0.22);
}

.admin-login-submit:disabled {
    cursor: not-allowed;
    opacity: 0.72;
}

.app-toast {
    position: fixed;
    left: 50%;
    top: 24px;
    z-index: 80;
    min-width: min(420px, calc(100vw - 32px));
    max-width: calc(100vw - 32px);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(199, 210, 254, 0.72);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
    color: #172033;
    font-size: 14px;
    font-weight: 850;
    backdrop-filter: blur(18px);
    transform: translate(-50%, -14px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
}

.app-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

.app-toast::before {
    content: '';
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #6366f1;
    box-shadow: 0 0 16px rgba(99, 102, 241, 0.7);
}

.app-toast.error {
    border-color: rgba(251, 113, 133, 0.48);
}

.app-toast.error::before {
    background: #f43f5e;
    box-shadow: 0 0 16px rgba(244, 63, 94, 0.55);
}

.image-preview-modal {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(10px);
}

.image-preview-modal.show {
    display: flex;
}

.image-preview-modal img {
    max-width: min(1100px, 96vw);
    max-height: 90vh;
    object-fit: contain;
    border-radius: 18px;
    background: #111827;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
}

.image-preview-close {
    position: fixed;
    top: 18px;
    right: 20px;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.94);
    color: #172033;
    font-size: 24px;
    font-weight: 900;
    cursor: pointer;
}

.input-inline-tip {
    position: static;
    z-index: 4;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    padding: 0 11px;
    border-radius: 999px;
    background: #fff1f2;
    color: #e11d48;
    border: 1px solid #fecdd3;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.2;
    white-space: normal;
    box-shadow: 0 10px 24px rgba(244, 63, 94, 0.12);
}

.history-dialog {
    width: min(760px, 100%);
    max-height: min(760px, calc(100vh - 48px));
    overflow: hidden;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    padding: 0;
    text-align: left;
}

.history-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 24px 16px;
    border-bottom: 1px solid #e8eef7;
}

.history-head h3 {
    margin: 0 0 6px;
    color: #111827;
    font-size: 19px;
    font-weight: 950;
}

.history-head .tool-modal-close {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: #f1f5f9;
    color: #64748b;
    font-size: 22px;
    font-weight: 800;
    cursor: pointer;
}

.history-list {
    overflow: auto;
    padding: 18px 24px 24px;
    display: grid;
    gap: 12px;
    background: #f8fbff;
}

.history-card {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid #e1e9f4;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(40, 55, 90, 0.05);
}

.history-card img,
.history-cover-empty {
    width: 82px;
    height: 82px;
    border-radius: 14px;
    object-fit: cover;
    background: linear-gradient(135deg, #eef2ff, #fdf2f8);
}

.history-cover-empty {
    display: grid;
    place-items: center;
    color: #818cf8;
    font-size: 12px;
    font-weight: 950;
}

.history-title {
    color: #111827;
    font-size: 15px;
    font-weight: 900;
    line-height: 1.45;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.history-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.history-actions {
    display: grid;
    gap: 8px;
    min-width: 92px;
}

.history-actions button {
    min-height: 34px;
    border: 0;
    border-radius: 10px;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
}

.history-actions button.primary {
    background: #4f46e5;
    color: #fff;
}

.history-empty {
    padding: 28px;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    background: #fff;
    color: #64748b;
    text-align: center;
    font-weight: 800;
}

.container {
    position: relative;
    z-index: 1;
    max-width: 1180px;
    margin: 0 auto;
    padding: 82px 20px 60px;
}

body.custom-template .container {
    max-width: none;
    width: 100%;
    padding: 0;
}

.xym-custom-template-root {
    min-height: 100vh;
}

.xym-custom-template-root .top-actions {
    position: static;
    inset: auto;
    z-index: auto;
}

.header {
    text-align: center;
    max-width: 820px;
    margin: 0 auto 28px;
    padding-top: 64px;
    position: relative;
}

.header::before {
    content: '';
    position: absolute;
    left: 50%;
    top: -96px;
    width: min(760px, 92vw);
    height: 360px;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(99, 102, 241, 0.16), rgba(236, 72, 153, 0.06) 42%, transparent 70%);
    filter: blur(24px);
    z-index: -1;
    pointer-events: none;
}

.logo-frame {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 88px;
    height: 88px;
    margin-bottom: 16px;
    border-radius: 30px;
    background:
        radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.38) 42%, rgba(226, 232, 240, 0.24) 100%);
    border: 1px solid rgba(255, 255, 255, 0.78);
    box-shadow:
        0 24px 48px rgba(79, 70, 229, 0.18),
        0 10px 24px rgba(15, 23, 42, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(14px);
}

.logo-frame::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 34px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.2), transparent 66%);
    z-index: -1;
    pointer-events: none;
}

.logo-frame::after {
    content: '';
    position: absolute;
    inset: 6px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.58);
    pointer-events: none;
}

.logo {
    display: block;
    width: 74px;
    height: 74px;
    object-fit: contain;
    border-radius: 23px;
    filter: drop-shadow(0 8px 14px rgba(15, 23, 42, 0.16));
}

.header h1 {
    color: transparent;
    font-size: clamp(34px, 5vw, 54px);
    font-weight: 950;
    line-height: 1.05;
    margin-bottom: 12px;
    text-shadow: none;
    letter-spacing: 0;
    background: linear-gradient(135deg, #1e293b 0%, #4f46e5 34%, #8b5cf6 62%, #ec4899 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.header p {
    color: #64748b;
    font-size: 17px;
    font-weight: 700;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
}

.hero-badges span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid rgba(199, 210, 254, 0.82);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    color: #4f46e5;
    font-size: 13px;
    font-weight: 900;
    box-shadow: 0 10px 24px rgba(79, 70, 229, 0.08);
    backdrop-filter: blur(12px);
}

.card {
    width: min(100%, 980px);
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(255, 255, 255, 0.84);
    border-radius: 22px;
    box-shadow: 0 30px 86px rgba(79, 70, 229, 0.12), 0 18px 44px rgba(15, 23, 42, 0.08);
    padding: 62px 30px 30px;
    backdrop-filter: blur(20px);
}

.card::before {
    content: '解析控制台';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 42px;
    display: flex;
    align-items: center;
    padding-left: 76px;
    color: #4f46e5;
    font-size: 13px;
    font-weight: 900;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.84));
    border-bottom: 1px solid rgba(199, 210, 254, 0.58);
}

.card::after {
    content: '';
    position: absolute;
    top: 15px;
    left: 20px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 16px 0 0 #f59e0b, 32px 0 0 #10b981;
}

.input-group {
    position: relative;
    margin-bottom: 0;
    display: grid;
    gap: 8px;
}

.parse-command {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px;
    gap: 14px;
    align-items: start;
}

.parse-command::before {
    content: '';
    position: absolute;
    inset: -1px;
    z-index: -1;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.32), rgba(139, 92, 246, 0.18), rgba(236, 72, 153, 0.18));
    filter: blur(16px);
    opacity: 0.18;
    transition: opacity .25s ease;
}

.parse-command:focus-within::before {
    opacity: 0.46;
}

.parse-login-required {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid #dbe6f5;
    border-radius: 12px;
    background: #f8fbff;
    color: #334155;
}

.parse-login-required[hidden] {
    display: none;
}

.parse-login-required strong,
.parse-login-required span {
    display: block;
}

.parse-login-required strong {
    color: #1e293b;
    font-size: 14px;
    font-weight: 850;
}

.parse-login-required span {
    margin-top: 3px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.5;
}

.parse-login-required button {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 0 13px;
    border: 1px solid #c7d2fe;
    border-radius: 999px;
    background: #fff;
    color: #4338ca;
    font-size: 12px;
    font-weight: 850;
    cursor: pointer;
}

.parse-login-required button:hover {
    border-color: #a5b4fc;
    background: #eef2ff;
}

.input-group::after {
    content: '自动识别平台';
    position: absolute;
    right: 14px;
    top: 14px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 12px;
    font-weight: 900;
    pointer-events: none;
}

.input-group input {
    width: 100%;
    min-height: 68px;
    padding: 20px 138px 20px 22px;
    font-size: 16px;
    font-weight: 700;
    color: #172033;
    border: 1px solid rgba(203, 213, 225, 0.9);
    border-radius: 16px;
    outline: none;
    transition: all 0.3s ease;
    background: rgba(248, 250, 252, 0.9);
}

.input-group input:focus {
    border-color: #6366f1;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12), 0 12px 30px rgba(99, 102, 241, 0.08);
}

.input-group input::placeholder {
    color: #94a3b8;
    font-weight: 650;
}

.btn {
    width: 100%;
    min-height: 68px;
    padding: 0 22px;
    font-size: 17px;
    font-weight: 900;
    color: #fff;
    background: linear-gradient(180deg, #818cf8 0%, #6366f1 48%, #4f46e5 100%);
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 18px 36px rgba(99, 102, 241, 0.24);
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.28), transparent 52%);
    opacity: 0;
    transition: opacity .25s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 44px rgba(99, 102, 241, 0.32);
}

.btn:hover::before {
    opacity: 1;
}

.btn:active {
    transform: translateY(0);
}

.btn.loading {
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.5);
    border-top-color: #fff;
    border-radius: 50%;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: translateY(-50%) rotate(360deg); }
}

.result {
    margin-top: 26px;
    display: none;
}

.result.show {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
    padding: 12px 14px;
    border: 1px solid rgba(199, 210, 254, 0.68);
    border-radius: 16px;
    background:
        radial-gradient(circle at 0% 0%, rgba(99, 102, 241, 0.1), transparent 32%),
        rgba(255, 255, 255, 0.78);
    box-shadow: 0 14px 34px rgba(79, 70, 229, 0.07);
    backdrop-filter: blur(16px);
}

.result-status-block {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1 1 auto;
}

.result-status-copy {
    min-width: 0;
}

.result-icon {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.result-icon.success {
    background: #ecfdf5;
    color: #059669;
    box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.24);
}

.result-icon.error {
    background: #fff1f2;
    color: #e11d48;
    box-shadow: inset 0 0 0 1px rgba(244, 63, 94, 0.22);
}

.result-title {
    font-size: 14px;
    font-weight: 900;
    color: #172033;
}

.result-msg {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
    font-weight: 700;
}

.result-header-meta {
    flex: 0 0 auto;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-start;
    justify-content: flex-end;
}

.result-header-chip {
    width: fit-content;
    max-width: 100%;
    min-width: 96px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(226, 232, 240, 0.95);
}

.result-header-platform {
    --result-platform-bg: #eef2ff;
    --result-platform-color: #4f46e5;
}

.result-platform-logo {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--result-platform-bg), #ffffff);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.75);
}

.result-platform-logo img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    position: relative;
    z-index: 1;
}

.result-platform-logo img[hidden] {
    display: none;
}

.result-platform-logo-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--result-platform-color);
    font-size: 15px;
    font-weight: 900;
    line-height: 1;
}

.result-platform-logo-fallback[hidden] {
    display: none !important;
}

.result-header-chip-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.result-header-chip-label {
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.result-header-chip strong {
    color: #172033;
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-header.is-error {
    border-color: rgba(251, 113, 133, 0.5);
    background:
        radial-gradient(circle at 0% 0%, rgba(244, 63, 94, 0.1), transparent 32%),
        rgba(255, 255, 255, 0.78);
}

.result-header.is-error .result-header-chip {
    background: rgba(255, 255, 255, 0.88);
}

@media (max-width: 768px) {
    .result-header {
        flex-direction: column;
    }

    .result-status-block,
    .result-header-meta {
        width: 100%;
    }

    .result-header-meta {
        justify-content: flex-start;
    }
}

.video-card {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
}

.video-cover {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 15px;
}

.video-preview {
    width: 100%;
    max-height: 460px;
    display: block;
    background: #111827;
    border-radius: 10px;
    margin-top: 12px;
}

.video-info {
    margin-bottom: 15px;
}

.info-row {
    display: flex;
    margin-bottom: 10px;
    font-size: 14px;
}

.info-label {
    width: 80px;
    color: #999;
    font-weight: 500;
}

.info-value {
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.info-value a {
    color: #667eea;
    text-decoration: none;
}

.info-value a:hover {
    text-decoration: underline;
}

.author-card {
    display: flex;
    align-items: center;
    background: #fff;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 15px;
}

.author-name {
    font-weight: 600;
    color: #333;
}

.author-id {
    font-size: 12px;
    color: #999;
}

.result-meta-card {
    background: #f8f9fa;
    border: 1px solid #edf0f5;
    border-radius: 15px;
    padding: 18px;
    margin-bottom: 18px;
}

.result-meta-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.source-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 13px;
    font-weight: 700;
}

.source-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4f46e5;
}

.result-author {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.result-author img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    background: #e9ecef;
    flex: 0 0 auto;
}

.result-author-name {
    font-weight: 700;
    color: #222;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.result-author-id {
    color: #888;
    font-size: 12px;
    margin-top: 3px;
}

a.result-author:hover .result-author-name {
    color: #4f46e5;
}

.result-main-title {
    color: #222;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
    margin-top: 14px;
    margin-bottom: 10px;
    word-break: break-word;
}

.result-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.result-fact {
    padding: 7px 10px;
    border-radius: 8px;
    background: #fff;
    color: #555;
    font-size: 13px;
    border: 1px solid #eceff3;
}

.detail-section {
    margin-top: 18px;
    padding: 18px;
    border-radius: 15px;
    background: #fff;
    border: 1px solid #edf0f5;
}

.detail-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
    color: #222;
    font-size: 15px;
    font-weight: 800;
}

.detail-count {
    color: #8b93a3;
    font-size: 12px;
    font-weight: 700;
}

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

.detail-item {
    min-width: 0;
    padding: 12px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #eef2f7;
}

.detail-label {
    margin-bottom: 6px;
    color: #8b93a3;
    font-size: 12px;
    font-weight: 700;
}

.detail-value {
    color: #253044;
    font-size: 13px;
    line-height: 1.55;
    word-break: break-all;
}

.detail-value a {
    color: #4f46e5;
    text-decoration: none;
}

.detail-value a:hover {
    text-decoration: underline;
}

.media-resource-list {
    display: grid;
    gap: 10px;
}

.resource-row {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #eef2f7;
}

.resource-type {
    color: #4f46e5;
    font-size: 12px;
    font-weight: 800;
}

.resource-url {
    color: #475569;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.resource-action {
    padding: 8px 10px;
    border: 0;
    border-radius: 8px;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.data-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.data-tag {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 8px 10px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
    word-break: break-word;
}

.gallery-section {
    margin-top: 0;
    background: #fff;
}

.image-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.image-section-title {
    display: grid;
    gap: 3px;
}

.image-section-title strong {
    color: #111827;
    font-size: 15px;
    font-weight: 950;
}

.image-section-title span {
    color: #64748b;
    font-size: 12px;
    font-weight: 750;
}

.image-head-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 18px;
}

.image-card {
    overflow: hidden;
    padding: 14px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid #e1e9f4;
    box-shadow: 0 14px 34px rgba(40, 55, 90, 0.05);
}

.image-card img {
    width: 100%;
    height: clamp(320px, 42vw, 520px);
    object-fit: contain;
    border-radius: 14px;
    display: block;
    margin-bottom: 12px;
    background: #111827;
    cursor: zoom-in;
}

.image-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: #64748b;
    font-size: 13px;
    font-weight: 900;
}

.image-card-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    justify-content: flex-end;
}

.raw-json {
    max-height: 260px;
    overflow: auto;
    padding: 12px;
    border-radius: 10px;
    background: #111827;
    color: #d1d5db;
    font-size: 12px;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}

.download-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    background: linear-gradient(135deg, #11998e, #38ef7d);
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(17, 153, 142, 0.4);
}

.download-btn.secondary {
    background: #6c757d;
}

.download-btn.secondary:hover {
    box-shadow: 0 5px 20px rgba(108, 117, 125, 0.4);
}

.platform-panel {
    position: relative;
    width: min(100%, 980px);
    margin: 26px auto 0;
    padding: 22px 0 24px;
    border: 1px solid rgba(226, 232, 240, 0.86);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.68);
    box-shadow: 0 18px 42px rgba(79, 70, 229, 0.07);
    backdrop-filter: blur(18px);
    overflow: hidden;
}

.platform-panel-head {
    display: grid;
    place-items: center;
    gap: 9px;
    margin-bottom: 8px;
    padding: 0 22px;
    text-align: center;
}

.platform-panel-head h2 {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(199, 210, 254, 0.86);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(236, 72, 153, 0.08));
    color: #4f46e5;
    font-size: 14px;
    font-weight: 900;
}

.platform-panel-head h2::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6366f1;
    box-shadow: 0 0 16px rgba(99, 102, 241, 0.62);
}

.platform-panel-head span {
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
}

.platform-marquee {
    position: relative;
    overflow: hidden;
    padding: 14px 0 8px;
}

.platform-marquee::before,
.platform-marquee::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 2;
    width: min(82px, 12vw);
    pointer-events: none;
}

.platform-marquee::before {
    left: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.96), transparent);
}

.platform-marquee::after {
    right: 0;
    background: linear-gradient(270deg, rgba(255, 255, 255, 0.96), transparent);
}

.platform-track {
    display: flex;
    width: max-content;
    gap: 16px;
    padding: 0 20px;
    animation: platformScroll 46s linear infinite;
}

.platform-marquee:hover .platform-track {
    animation-play-state: paused;
}

.platform-marquee.no-scroll .platform-track {
    animation: none;
    flex-wrap: wrap;
    transform: none;
}

@keyframes platformScroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.platform-tag {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex: 0 0 138px;
    width: 138px;
    min-height: 142px;
    padding: 18px 12px 15px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    color: #334155;
    font-size: 14px;
    font-weight: 900;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 10px 22px rgba(40, 55, 90, 0.045);
    overflow: hidden;
    transition: transform .32s cubic-bezier(.4, 0, .2, 1), border-color .32s ease, box-shadow .32s ease;
}

.platform-tag::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.07), rgba(236, 72, 153, 0.06));
    opacity: 0;
    transition: opacity .28s ease;
}

.platform-tag::after {
    content: '↗';
    position: absolute;
    top: 12px;
    right: 12px;
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
    font-size: 13px;
    opacity: 0;
    transform: scale(.82);
    transition: opacity .25s ease, transform .25s ease;
}

.platform-tag:hover {
    transform: translateY(-5px) scale(1.01);
    border-color: rgba(99, 102, 241, 0.42);
    box-shadow: 0 24px 46px rgba(99, 102, 241, 0.15), 0 0 0 1px rgba(99, 102, 241, 0.08);
}

.platform-tag:hover::before,
.platform-tag:hover::after {
    opacity: 1;
}

.platform-tag:hover::after {
    transform: scale(1);
}

.platform-logo {
    flex: 0 0 58px;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    position: relative;
    z-index: 1;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--platform-bg, #f8fafc), #ffffff);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
    transition: transform .32s ease, box-shadow .32s ease;
}

.platform-logo::after {
    content: '';
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    background: var(--platform-color, #6366f1);
    filter: blur(18px);
    opacity: 0;
    z-index: -1;
    transition: opacity .32s ease, transform .32s ease;
}

.platform-tag:hover .platform-logo {
    transform: scale(1.1);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.16);
}

.platform-tag:hover .platform-logo::after {
    opacity: .34;
    transform: scale(1.55);
}

.platform-logo img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    position: absolute;
    inset: 11px;
    border-radius: 8px;
}

.platform-logo-fallback {
    color: var(--platform-color, #334155);
    font-size: 18px;
    font-weight: 950;
    line-height: 1;
}

.platform-name {
    position: relative;
    z-index: 1;
    min-width: 0;
    text-align: center;
    line-height: 1.2;
    color: #1e293b;
    transition: color .25s ease;
}

.platform-tag:hover .platform-name {
    color: #4f46e5;
}

.platform-desc {
    display: block;
    margin-top: 6px;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.platform-hint {
    display: flex;
    justify-content: center;
    gap: 22px;
    margin-top: 14px;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 850;
}

.platform-hint span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.platform-hint span::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #818cf8;
    box-shadow: 0 0 12px rgba(129, 140, 248, .7);
}

.footer {
    text-align: center;
    margin-top: 50px;
    color: #64748b;
    font-size: 14px;
}

.footer-copyright {
    margin-top: 10px;
}

.home-content-panel {
    max-width: 980px;
    margin: 28px auto 0;
    padding: 24px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(203, 213, 225, 0.72);
    box-shadow: 0 18px 42px rgba(40, 55, 90, 0.07);
    backdrop-filter: blur(12px);
}

.home-content-panel[hidden] {
    display: none;
}

.home-content-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.home-content-head h2 {
    margin: 0 0 6px;
    color: #172033;
    font-size: 22px;
    line-height: 1.2;
}

.home-content-head span {
    color: #64748b;
    font-size: 14px;
    font-weight: 800;
}

.home-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
}

.home-content-card {
    width: 100%;
    min-height: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    gap: 14px;
    padding: 16px;
    border: 1px solid rgba(219, 229, 241, 0.92);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.86);
    color: #172033;
    text-align: left;
    cursor: pointer;
    box-shadow: none;
    transition: transform .2s ease, border-color .2s ease, background .2s ease;
    text-decoration: none;
}

.home-content-card:hover {
    transform: translateY(-1px);
    border-color: #b8c8ff;
    background: #fff;
}

.home-content-card-top {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    flex: 0 0 auto;
}

.home-content-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 14px;
    font-weight: 950;
}

.home-content-count {
    min-height: 26px;
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
}

.home-content-card strong {
    color: #111827;
    font-size: 16px;
    line-height: 1.25;
    min-width: 0;
}

.home-content-card p {
    grid-column: 2 / 4;
    margin: -4px 0 0;
    color: #52657d;
    font-size: 14px;
    line-height: 1.75;
    font-weight: 750;
}

.home-content-action {
    color: #4f46e5;
    font-size: 13px;
    font-weight: 950;
    white-space: nowrap;
}

.home-content-card.is-guide {
    grid-template-columns: auto minmax(0, 1fr) auto;
}

.home-content-card.is-guide .home-content-action {
    align-self: start;
    grid-column: 3;
    grid-row: 1;
}

.home-content-card.is-guide p {
    grid-column: 2 / 4;
}

.home-content-steps {
    grid-column: 2 / 4;
    display: grid;
    gap: 10px;
    margin-top: 4px;
}

.home-content-step {
    display: grid;
    gap: 5px;
    padding: 12px 14px;
    border-radius: 13px;
    background: #f8fbff;
    border: 1px solid #e1e9f4;
}

.home-content-step strong {
    color: #172033;
    font-size: 14px;
}

.home-content-step span {
    color: #52657d;
    font-size: 13px;
    line-height: 1.65;
    font-weight: 720;
}

.home-content-step-images {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 6px;
}

.home-content-step-images img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid #dbe5f1;
    background: #fff;
    cursor: zoom-in;
}

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

.home-content-dialog {
    width: min(820px, 100%);
    text-align: left;
}

.home-content-body {
    max-height: min(68vh, 680px);
    overflow: auto;
    display: grid;
    gap: 14px;
    padding-right: 4px;
}

.home-content-item {
    display: grid;
    gap: 10px;
    padding: 16px;
    border: 1px solid #e1e9f4;
    border-radius: 14px;
    background: #f8fafc;
}

.home-content-item h4 {
    margin: 0;
    color: #172033;
    font-size: 16px;
}

.home-content-item p,
.home-content-item li {
    color: #52657d;
    font-size: 14px;
    line-height: 1.7;
}

.home-content-item ul {
    display: grid;
    gap: 8px;
    margin-left: 18px;
}

.home-content-images {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.home-content-images img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid #e1e9f4;
    background: #fff;
}

.footer a {
    color: #4f46e5;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

.error-message {
    background: #fff3f3;
    border: 1px solid #ffcccc;
    border-radius: 10px;
    padding: 15px;
    color: #dc3545;
    font-size: 14px;
}


.result-page {
    margin-top: 24px;
    display: grid;
    gap: 18px;
}

.result-hero-summary {
    position: relative;
    overflow: hidden;
    display: grid;
    gap: 14px;
    padding: 20px;
    border: 1px solid rgba(199, 210, 254, 0.72);
    border-radius: 20px;
    background:
        radial-gradient(circle at 12% 18%, rgba(99, 102, 241, 0.16), transparent 34%),
        radial-gradient(circle at 92% 4%, rgba(236, 72, 153, 0.12), transparent 30%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.92));
    box-shadow: 0 22px 56px rgba(79, 70, 229, 0.09);
}

.result-hero-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
}

.result-platform-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 30px;
    padding: 0 11px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 12px;
    font-weight: 950;
}

.result-platform-chip::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #6366f1;
    box-shadow: 0 0 14px rgba(99, 102, 241, 0.7);
}

.result-work-title {
    margin: 12px 0 0;
    color: #111827;
    font-size: clamp(20px, 3vw, 30px);
    line-height: 1.25;
    font-weight: 950;
    letter-spacing: 0;
    word-break: break-word;
}

.result-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.result-hero-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(226, 232, 240, 0.9);
    color: #64748b;
    font-size: 12px;
    font-weight: 850;
}

.result-resource-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.result-side-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 14px;
    align-items: stretch;
}

.creator-strip {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 1px solid #e1e9f4;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 14px 34px rgba(40, 55, 90, 0.06);
}

.creator-strip img {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    object-fit: cover;
    background: #eef2f7;
}

.creator-avatar-fallback {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(180deg, #e0f2fe, #eef2ff);
    color: #2563eb;
    font-size: 22px;
    font-weight: 900;
}

.creator-name { color: #111827; font-size: 17px; font-weight: 800; }
.creator-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.creator-sub { color: #64748b; font-size: 13px; line-height: 1.45; word-break: break-all; }
.creator-like { display: inline-flex; align-items: center; gap: 5px; min-height: 24px; padding: 0 9px; border-radius: 999px; background: #fff1f2; color: #e11d48; font-size: 12px; font-weight: 900; }

.media-stage {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: #111827;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
    min-height: 520px;
    display: grid;
    place-items: center;
}

.media-stage video,
.media-stage img {
    width: 100%;
    max-height: min(72vh, 680px);
    display: block;
    object-fit: contain;
    background: #111827;
}

.media-stage-placeholder {
    min-height: 260px;
    display: grid;
    place-items: center;
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 800;
}

.media-stage-error {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    z-index: 2;
    padding: 24px;
    border: 1px solid rgba(254, 205, 211, 0.28);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.86);
    color: #fecdd3;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.7;
    text-align: center;
    backdrop-filter: blur(10px);
}

.media-stage-error button {
    margin-top: 12px;
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.ad-required-panel {
    display: grid;
    gap: 14px;
    justify-items: center;
    padding: 18px;
    border: 1px solid #e1e9f4;
    border-radius: 14px;
    background: #f8fafc;
    text-align: center;
}

.ad-required-panel img {
    width: 180px;
    height: 180px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e1e9f4;
}

.ad-required-panel p {
    margin: 0;
    color: #52657d;
    font-size: 14px;
    line-height: 1.6;
}

.play-preview-btn {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 72px;
    height: 72px;
    border: 0;
    border-radius: 50%;
    background: rgba(109, 93, 252, 0.92);
    color: #fff;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.32);
    cursor: pointer;
}

.play-preview-btn::before {
    content: "";
    display: block;
    width: 0;
    height: 0;
    margin: 0 auto;
    border-top: 14px solid transparent;
    border-bottom: 14px solid transparent;
    border-left: 22px solid #fff;
    transform: translateX(3px);
}

.action-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px;
    border: 1px solid #e1e9f4;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(40, 55, 90, 0.05);
}

.result-side-panel .backup-details {
    grid-column: 1 / -1;
}

.download-safe-note {
    padding: 11px 12px;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.45;
}

.primary-action,
.ghost-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.primary-action { background: linear-gradient(180deg, #818cf8, #4f46e5); color: #fff; box-shadow: 0 12px 26px rgba(79, 70, 229, 0.28); }
.ghost-action { background: #f8fafc; color: #334155; border-color: #dbe4ef; }

.backup-details {
    width: 100%;
}

.backup-heading {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: 12px;
    background: #eef3fa;
    color: #334155;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition: background .18s ease, border-color .18s ease;
}

.backup-heading:hover {
    background: #e7edff;
}

.backup-heading::-webkit-details-marker { display: none; }
.backup-heading::after {
    content: '⌄';
    margin-left: 10px;
    color: #64748b;
    font-size: 16px;
    line-height: 1;
    transition: transform .18s ease;
}
.backup-details[open] .backup-heading {
    border-radius: 12px 12px 0 0;
}
.backup-details[open] .backup-heading::after {
    transform: rotate(180deg);
}
.backup-status {
    margin-left: auto;
    padding: 6px 10px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #cfd8ff;
    color: #4f46e5;
    font-size: 12px;
    font-weight: 900;
    box-shadow: 0 6px 14px rgba(79, 70, 229, 0.12);
}
.backup-details[open] .backup-status {
    background: #eef2ff;
    color: #334155;
    border-color: #dbe4ef;
    box-shadow: none;
}
.backup-state-open { display: none; }
.backup-details[open] .backup-state-open { display: inline; }
.backup-details[open] .backup-state-closed { display: none; }
.backup-list { display: grid; gap: 10px; padding: 12px; border-radius: 0 0 12px 12px; background: #f8fafc; }
.backup-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px; border-radius: 10px; background: #fff; border: 1px solid #e6edf7; }
.backup-title { color: #111827; font-size: 13px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.backup-meta { margin-top: 4px; color: #64748b; font-size: 12px; }

.info-card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.info-card { min-width: 0; padding: 16px; border-radius: 14px; border: 1px solid #e1e9f4; background: linear-gradient(180deg, #ffffff, #fbf9ff); }
.info-card-label { margin-bottom: 9px; color: #7890ad; font-size: 12px; font-weight: 800; }
.info-card-value { color: #172033; font-size: 15px; font-weight: 800; line-height: 1.45; word-break: break-word; }
.info-card-value a { color: #6254e8; text-decoration: none; }
.info-link-panel { display: grid; gap: 10px; }
.info-link-desc { color: #64748b; font-size: 13px; font-weight: 700; line-height: 1.45; }
.info-link-url { display: block; color: #6254e8; font-size: 13px; font-weight: 800; line-height: 1.45; word-break: break-all; }
.info-link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: start;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 9px;
    background: #6254e8;
    color: #fff !important;
    font-size: 13px;
    font-weight: 900;
    box-shadow: 0 10px 20px rgba(98, 84, 232, 0.22);
}
.info-link-button.secondary {
    background: #0f766e;
    box-shadow: 0 10px 20px rgba(15, 118, 110, 0.18);
}
.info-link-button:hover { filter: brightness(0.96); }
.avatar-preview { display: grid; gap: 10px; }
.avatar-preview img { width: 72px; height: 72px; border-radius: 16px; object-fit: cover; background: #eef2f7; border: 1px solid #e1e9f4; }
.avatar-preview-fallback { width: 72px; height: 72px; display: grid; place-items: center; border-radius: 16px; background: linear-gradient(180deg, #e0f2fe, #eef2ff); color: #2563eb; font-size: 24px; font-weight: 900; border: 1px solid #e1e9f4; }
.avatar-download { justify-self: start; display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border: 0; border-radius: 9px; background: #f1f0ff; color: #6254e8; font-size: 13px; font-weight: 900; text-decoration: none; cursor: pointer; }

.result-section-title { margin: 18px 0 12px; color: #64748b; font-size: 15px; font-weight: 900; }
.stat-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.stat-card { padding: 16px; border-radius: 12px; border: 1px solid #e1e9f4; background: #fff; }
.stat-label { color: #64748b; font-size: 12px; font-weight: 800; }
.stat-value { margin-top: 10px; color: #172033; font-size: 20px; font-weight: 900; }

.tag-area { display: flex; flex-wrap: wrap; gap: 10px; }
.soft-tag { padding: 8px 12px; border-radius: 999px; background: #f1f0ff; color: #6254e8; border: 1px solid #dedaff; font-size: 13px; font-weight: 800; text-decoration: none; }
.soft-tag.alt { background: #fff0f7; color: #db2777; border-color: #ffd4e8; }

.field-panel { padding: 16px; border-radius: 14px; border: 1px solid #e1e9f4; background: #fff; }
.field-panel pre { max-height: 300px; overflow: auto; margin: 0; white-space: pre-wrap; word-break: break-word; color: #334155; font-size: 12px; line-height: 1.6; }
.debug-fields {
    padding: 0;
    overflow: hidden;
}
.debug-fields summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    color: #475569;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    list-style: none;
}
.debug-fields summary::-webkit-details-marker { display: none; }
.debug-fields summary::after {
    content: '点击展开';
    padding: 5px 9px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 12px;
}
.debug-fields[open] summary::after {
    content: '已展开';
    color: #64748b;
    background: #f1f5f9;
}
.debug-fields pre {
    border-top: 1px solid #e1e9f4;
    padding: 16px;
}
@media (max-width: 900px) {
    .info-card-grid, .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .result-resource-layout { grid-template-columns: 1fr; }
    .result-side-panel { grid-template-columns: 1fr; }
    .platform-track { animation-duration: 32s; }
}

@media (max-width: 600px) {
    .top-actions {
        top: 12px;
        right: 12px;
        gap: 8px;
        flex-wrap: wrap;
    }

    .web-login-entry,
    .web-history-entry {
        min-height: 36px;
        padding: 0 12px;
        font-size: 13px;
    }

    .web-login-entry.logged {
        max-width: 176px;
        min-width: 144px;
        padding-left: 6px;
        gap: 7px;
    }

    .web-login-entry.logged::after {
        padding: 5px 7px;
        font-size: 11px;
    }

    .web-user-avatar {
        width: 28px;
        height: 28px;
    }

    .container {
        padding: 72px 15px 24px;
    }

    .header {
        padding-top: 76px;
    }

    .logo-frame {
        width: 74px;
        height: 74px;
        margin-bottom: 14px;
        border-radius: 24px;
    }

    .logo {
        width: 62px;
        height: 62px;
        border-radius: 19px;
    }

    .header h1 {
        font-size: 1.8rem;
    }

    .card {
        padding: 58px 18px 22px;
    }

    .media-stage {
        min-height: 260px;
    }

    .media-stage video,
    .media-stage img {
        max-height: 520px;
    }

    .result-hero-top {
        display: grid;
    }

    .history-card {
        grid-template-columns: 64px minmax(0, 1fr);
        align-items: start;
    }

    .history-card img,
    .history-cover-empty {
        width: 64px;
        height: 64px;
    }

    .history-actions {
        grid-column: 1 / -1;
        grid-template-columns: 1fr 1fr;
        min-width: 0;
    }

    .history-actions button {
        min-width: 0;
        padding: 0 10px;
    }

    .input-group::after {
        display: none;
    }

    .parse-command {
        grid-template-columns: 1fr;
    }

    .parse-login-required {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .parse-login-required button {
        width: 100%;
    }

    .input-group input {
        padding-right: 18px;
    }

    .platform-panel {
        padding: 20px 0 22px;
    }

    .platform-panel-head {
        padding: 0 16px;
        gap: 6px;
    }

    .platform-tag {
        width: 128px;
        min-height: 136px;
        padding: 18px 10px 15px;
        gap: 9px;
        flex-basis: 128px;
    }

    .platform-logo {
        flex-basis: 50px;
        width: 50px;
        height: 50px;
        border-radius: 14px;
    }

    .platform-logo img {
        width: 30px;
        height: 30px;
        inset: 10px;
    }

    .platform-hint {
        gap: 14px;
    }

    .home-content-panel {
        padding: 20px;
        border-radius: 20px;
    }

    .home-content-head {
        display: grid;
    }

    .home-content-grid,
    .home-content-links,
    .home-content-images {
        grid-template-columns: 1fr;
    }

    .home-content-card {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .home-content-action {
        grid-column: 2;
    }

    .download-btn {
        display: block;
        margin-bottom: 10px;
        text-align: center;
    }

    .detail-grid,
    .image-grid {
        grid-template-columns: 1fr;
    }

    .image-card img {
        height: min(72vh, 520px);
    }

    .resource-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .resource-action {
        text-align: center;
    }
}

@media (max-width: 420px) {
    .history-dialog {
        max-height: calc(100vh - 24px);
    }

    .history-head,
    .history-list {
        padding-left: 14px;
        padding-right: 14px;
    }

    .history-card {
        grid-template-columns: 1fr;
    }

    .history-card img,
    .history-cover-empty {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 10;
    }

    .history-meta {
        gap: 6px;
        font-size: 11px;
    }

    .history-actions {
        grid-template-columns: 1fr;
    }
}
