/* 面霸 Mianba — 全局布局壳层（固定侧边栏，内容区独立滚动） */

/* 产品品牌图 */
.product-logo {
    display: block;
    object-fit: contain;
    flex-shrink: 0;
}

.product-logo--xs {
    width: 32px;
    height: 32px;
}

.product-logo--sm {
    width: 40px;
    height: 40px;
}

.product-logo--md {
    width: 56px;
    height: 56px;
}

.product-logo--hero {
    width: min(100%, 360px);
    height: auto;
    margin-left: auto;
    margin-right: auto;
}

.product-logo--login-hero {
    width: min(100%, 420px);
    height: auto;
    filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.25));
}

.product-brand-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

.product-brand-link:hover .product-brand-name {
    color: #091426;
}

/* 全局字体渲染 — 减少切换时的亚像素抖动 */
html {
    font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.app-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 16rem;
    height: 100vh;
    z-index: 50;
    display: flex;
    flex-direction: column;
    padding: 16px;
    background: #fbf8fa;
    border-right: 1px solid #c5c6cd;
    box-sizing: border-box;
    contain: layout style paint;
}

.app-main {
    margin-left: 16rem;
    min-height: 100vh;
    flex: 1;
    box-sizing: border-box;
}

.app-main--scroll {
    overflow-y: auto;
    height: 100vh;
}

/* 主内容区内边距 — 与侧边栏保持距离 */
.app-content-inset {
    padding-left: 2rem;
    padding-right: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    box-sizing: border-box;
}

@media (min-width: 1280px) {
    .app-content-inset {
        padding-left: 2.75rem;
        padding-right: 2.75rem;
    }
}

/* 匹配报告 */
.report-hero-title {
    font-size: 2rem;
    line-height: 2.625rem;
    font-weight: 700;
    color: #091426;
    letter-spacing: -0.02em;
}

.report-hero-label {
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #00a472;
    margin-bottom: 0.5rem;
}

.match-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.625rem;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.match-badge--strong { background: rgba(78, 222, 163, 0.22); color: #005236; }
.match-badge--partial { background: rgba(255, 193, 7, 0.22); color: #7a5c00; }
.match-badge--weak { background: rgba(255, 152, 0, 0.18); color: #9a4d00; }
.match-badge--none { background: rgba(186, 26, 26, 0.12); color: #ba1a1a; }

.match-item {
    border-radius: 0.75rem;
    padding: 1rem;
    border: 1px solid #c5c6cd;
    border-left-width: 4px;
}

.match-item--strong { border-left-color: #00a472; background: rgba(78, 222, 163, 0.06); }
.match-item--partial { border-left-color: #f59e0b; background: rgba(245, 158, 11, 0.06); }
.match-item--weak { border-left-color: #f97316; background: rgba(249, 115, 22, 0.05); }
.match-item--none { border-left-color: #ba1a1a; background: rgba(186, 26, 26, 0.04); }

.tip-box {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    background: rgba(78, 222, 163, 0.12);
    border-left: 3px solid #00a472;
    font-size: 14px;
    line-height: 1.5;
    color: #00301e;
}

.tip-box-label {
    font-size: 12px;
    font-weight: 600;
    color: #00a472;
    margin-bottom: 0.25rem;
    letter-spacing: 0.04em;
}

.dim-bar-fill {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.6s ease;
}

.dim-bar-fill--0 { background: linear-gradient(90deg, #00a472, #4edea3); }
.dim-bar-fill--1 { background: linear-gradient(90deg, #1e293b, #57657a); }
.dim-bar-fill--2 { background: linear-gradient(90deg, #515f74, #8590a6); }
.dim-bar-fill--3 { background: linear-gradient(90deg, #00301e, #00a472); }

.question-card {
    border: 1px solid #c5c6cd;
    border-radius: 0.75rem;
    padding: 1.25rem;
    background: #fbf8fa;
}

.question-card-index {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.5rem;
    background: #1e293b;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.library-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #c5c6cd;
    padding-bottom: 0.5rem;
}

.library-tab-btn {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem 0.5rem 0 0;
    font-size: 14px;
    font-weight: 600;
    color: #45474c;
    background: transparent;
    border: none;
    cursor: pointer;
}

.library-tab-btn.active {
    color: #091426;
    background: #f0edef;
    box-shadow: inset 0 -2px 0 #091426;
}

.library-panel[hidden] { display: none !important; }

#analyze-btn,
.analyze-btn {
    color: #ffffff !important;
}

#analyze-btn .material-symbols-outlined,
.analyze-btn .material-symbols-outlined {
    color: #ffffff !important;
}

.analysis-progress-banner {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 100;
    max-width: 360px;
    box-shadow: 0 8px 32px rgba(9, 20, 38, 0.18);
    border-radius: 0.75rem;
    background: #1e293b;
    color: #fff;
    padding: 1rem 1.125rem;
}

.analysis-progress-inner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.analysis-progress-text { flex: 1; min-width: 0; }

.analysis-progress-icon { font-size: 22px; flex-shrink: 0; }
.analysis-progress-title { font-size: 14px; font-weight: 600; margin: 0; }
.analysis-progress-sub { font-size: 12px; opacity: 0.85; margin: 0.25rem 0 0; line-height: 1.4; }

.analysis-progress-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.375rem;
    flex-shrink: 0;
}

.analysis-progress-action {
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    background: #4edea3;
    color: #091426;
    font-size: 12px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.analysis-progress-dismiss {
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.5);
    cursor: pointer;
    white-space: nowrap;
}

.analysis-progress-dismiss:hover {
    background: rgba(255, 255, 255, 0.22);
}

.analysis-progress-banner.is-done .analysis-progress-icon { color: #4edea3; }
.analysis-progress-banner.is-error .analysis-progress-icon { color: #ffdad6; }

.report-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #c5c6cd;
    padding-bottom: 0.5rem;
}

.report-tab-btn {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem 0.5rem 0 0;
    font-size: 14px;
    font-weight: 600;
    color: #45474c;
    background: transparent;
    border: none;
    cursor: pointer;
}

.report-tab-btn.active {
    color: #091426;
    background: #f0edef;
    box-shadow: inset 0 -2px 0 #091426;
}

.report-tab-panel[hidden] { display: none !important; }

.app-main--room {
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* 侧边栏导航项 — 固定高度，避免切换页面时跳动 */
.app-nav-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border-radius: 0.5rem;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    line-height: 16px;
    min-height: 48px;
    box-sizing: border-box;
    transition: background-color 0.2s;
    color: #45474c;
    text-decoration: none;
}

.app-nav-item:hover {
    background: #eae7e9;
}

.app-nav-item.active {
    background: #d5e3fc;
    color: #57657a;
}

.app-nav-item .material-symbols-outlined {
    font-size: 22px;
    width: 22px;
    flex-shrink: 0;
}

/* 首页水平 Tab — 固定位置，仅内容切换 */
.home-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid #c5c6cd;
    margin-bottom: 32px;
    min-height: 44px;
    align-items: flex-end;
}

.home-tab-btn {
    padding: 10px 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    border: none;
    background: transparent;
    color: #45474c;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    white-space: nowrap;
    /* 不用 color transition，避免点击时文字“漂一下” */
}

.home-tab-btn:hover {
    color: #091426;
}

.home-tab-btn.active {
    color: #091426;
    border-bottom-color: #091426;
}

/* 面板互斥显示：不用 opacity 叠层，避免两页文字重影闪烁 */
.home-tab-panels {
    width: 100%;
}

.home-tab-panel {
    width: 100%;
}

.home-tab-panel[hidden] {
    display: none !important;
}

/* 历史记录筛选 — 直接隐藏，不做 opacity 过渡 */
.history-hidden {
    display: none !important;
}

/* JD 输入区 — 拖拽高亮 */
.jd-zone-active {
    border-color: #091426 !important;
    background-color: #f5f3f4 !important;
}

.jd-image-preview {
    max-height: 160px;
    max-width: 100%;
    object-fit: contain;
    border-radius: 0.5rem;
    border: 1px solid #c5c6cd;
}

.jd-image-preview--clickable {
    cursor: zoom-in;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.jd-image-preview--clickable:hover {
    box-shadow: 0 4px 16px rgba(9, 20, 38, 0.12);
    transform: scale(1.02);
}

.image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.image-lightbox.hidden { display: none !important; }

.image-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(9, 20, 38, 0.72);
    backdrop-filter: blur(4px);
}

.image-lightbox-body {
    position: relative;
    z-index: 1;
    max-width: min(92vw, 960px);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.image-lightbox-img {
    max-width: 100%;
    max-height: calc(90vh - 3rem);
    object-fit: contain;
    border-radius: 0.5rem;
    background: #fff;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.image-lightbox-close {
    position: absolute;
    top: -2.5rem;
    right: 0;
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-lightbox-close:hover { background: rgba(255, 255, 255, 0.28); }

.image-lightbox-caption {
    margin-top: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    text-align: center;
    max-width: 100%;
    word-break: break-all;
}

.upload-zone-active {
    border-color: #091426 !important;
    background-color: #eae7e9 !important;
}

.resume-card .check-icon { opacity: 0; transition: opacity .2s; }
.resume-card.selected { border-color: #091426; border-width: 2px; }
.resume-card.selected .check-icon { opacity: 1; }

.circular-chart { display: block; margin: 0 auto; max-width: 80%; max-height: 250px; }
.circle-bg { fill: none; stroke: #e4e2e3; stroke-width: 3.8; }
.circle { fill: none; stroke-width: 2.8; stroke-linecap: round; animation: progress 1s ease-out forwards; }
@keyframes progress { 0% { stroke-dasharray: 0 100; } }

.waveform-bar { animation: bounce 1s infinite alternate ease-in-out; }
@keyframes bounce { 0% { height: 8px; } 100% { height: 32px; } }
.breathing-glow { animation: breath 3s infinite ease-in-out; }
@keyframes breath {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    50% { box-shadow: 0 0 0 20px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.radar-shape {
    clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
    background: rgba(78, 222, 163, 0.25);
    border: 1px solid rgba(0, 164, 114, 0.4);
}
