/* ============================================================
   changelog.css —— 「关于系统」更新日志弹窗
   深色弹窗外壳、左侧标签栏、右侧面板、使用技巧/反馈/介绍、
   更多版本卡片。扩展下载卡片（.ext-*）也在此处，供复用同款卡片样式。
   ============================================================ */

/* 更新日志弹窗样式 */
.changelog-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    /* 无遮罩：背景保持透明，弹窗直接覆盖在页面上；
       该层仍用于承载“点击外部关闭”与居中布局 */
    background-color: transparent;
}

.changelog-modal-content {
    background-color: var(--auth-card);
    margin: 5% auto;
    padding: 0;
    width: 800px;
    height: 600px;
    box-shadow: 0 10px 40px 0 var(--auth-shadow);
    border: 1px solid var(--auth-line);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    color: var(--auth-text);
}

.changelog-modal-header {
    padding: 20px;
    background-color: var(--auth-card-2);
    border-bottom: 1px solid var(--auth-line);
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.changelog-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--auth-text);
}

.changelog-close {
    color: var(--auth-muted);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    /* 重置 <button> 默认样式，保持与原 <span> 一致的外观 */
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
}

.changelog-close:hover,
.changelog-close:focus {
    color: var(--auth-text);
    text-decoration: none;
    cursor: pointer;
}

.changelog-modal-body {
    padding: 0;
    overflow: hidden;
    flex: 1;
    display: flex;
}

/* 标签栏 */
.changelog-tabs {
    width: 140px;
    flex-shrink: 0;
    background-color: var(--auth-bg);
    border-right: 1px solid var(--auth-line);
    padding: 16px 0;
    display: flex;
    flex-direction: column;
}

.changelog-tab {
    padding: 12px 20px;
    font-size: 14px;
    color: var(--auth-muted);
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
    -webkit-user-select: none;
    user-select: none;
}

.changelog-tab:hover {
    background-color: var(--auth-card-2);
    color: var(--auth-text);
}

.changelog-tab.active {
    background-color: var(--auth-card);
    color: var(--auth-brand-text);
    border-left-color: var(--auth-brand);
    font-weight: 600;
}

/* 面板容器 */
.changelog-panels {
    flex: 1;
    overflow-y: auto;
    padding: 24px 28px;
}

/* 弹窗滚动条 */
.changelog-panels::-webkit-scrollbar {
    width: 8px;
}
.changelog-panels::-webkit-scrollbar-thumb {
    background: var(--auth-input-hover);
    border-radius: 8px;
}
.changelog-panels::-webkit-scrollbar-thumb:hover {
    background: var(--auth-muted);
}
.changelog-panels::-webkit-scrollbar-track {
    background: transparent;
}

.changelog-panel {
    display: none;
}

.changelog-panel.active {
    display: block;
}

.changelog-panel h3 {
    margin-top: 0;
    color: var(--auth-text);
    margin-bottom: 10px;
    font-size: 1.15rem;
}

.changelog-panel h4 {
    margin: 18px 0 8px;
    color: var(--auth-text);
    opacity: 0.85;
    font-size: 1rem;
}

.changelog-panel ul {
    margin-bottom: 18px;
    padding-left: 20px;
}

.changelog-panel li {
    margin-bottom: 6px;
    color: var(--auth-muted);
    line-height: 1.7;
}

/* 使用技巧 / 反馈说明中的内联强调与链接 */
.tips-list li strong,
.changelog-panel ul li strong {
    color: var(--auth-text);
}

.feedback-inline {
    color: var(--auth-brand);
    text-decoration: none;
}

.feedback-inline:hover {
    text-decoration: underline;
}

/* 意见反馈 */
.feedback-desc,
.feedback-tip,
.intro-text {
    color: var(--auth-muted);
    line-height: 1.8;
    margin: 0 0 14px;
}

.feedback-list,
.versions-list {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
}

.feedback-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    margin-bottom: 8px;
    background-color: var(--auth-card-2);
    border: 1px solid var(--auth-line);
    border-radius: 6px;
}

.feedback-label {
    color: var(--auth-text);
    font-size: 14px;
}

.feedback-list a {
    color: var(--auth-brand);
    text-decoration: none;
    font-size: 14px;
}

.feedback-list a:hover {
    text-decoration: underline;
}

.feedback-text {
    color: var(--auth-muted);
    font-size: 14px;
}

.feedback-tip {
    font-size: 13px;
    color: var(--auth-muted);
}

/* 产品介绍：功能卡片网格 */
.intro-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 14px 0 16px;
}

.intro-feature {
    display: flex;
    gap: 12px;
    padding: 14px;
    background-color: var(--auth-card-2);
    border: 1px solid var(--auth-line);
    border-radius: 10px;
}

.intro-feature-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background-color: var(--auth-sel-bg);
    border: 1px solid var(--auth-sel-border);
    color: var(--auth-brand-text);
}

.intro-feature-text {
    min-width: 0;
}

.intro-feature-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--auth-text);
    margin-bottom: 4px;
}

.intro-feature-desc {
    font-size: 12.5px;
    color: var(--auth-muted);
    line-height: 1.6;
}

.intro-privacy {
    margin: 0;
    padding: 10px 14px;
    font-size: 12.5px;
    line-height: 1.7;
    color: var(--auth-muted);
    background-color: var(--auth-sel-bg);
    border: 1px solid var(--auth-sel-border);
    border-radius: 8px;
}

/* 更多版本卡片 */
.version-cards {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 8px;
}

.version-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    background-color: transparent;
    border: none;
    border-radius: 16px;
    text-decoration: none;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.version-card:hover {
    background-color: var(--auth-card-2);
}

.version-card.featured {
    border: none;
    box-shadow: none;
}

.version-card-icon {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    overflow: hidden;
}

.version-card-icon svg {
    display: block;
}
.version-card-icon img {
    display: block;
    width: 48px;
    height: 48px;
    border-radius: 12px;
}

.version-card-text {
    flex: 1;
    min-width: 0;
}

.version-card-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--auth-text);
    margin-bottom: 6px;
}

.version-card-desc {
    font-size: 14px;
    color: var(--auth-muted);
    line-height: 1.5;
}

.version-card-arrow {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.85;
}

/* 弹窗内的版本卡片箭头：覆盖 SVG 中硬编码的浅蓝描边，统一为主题品牌色 */
.changelog-modal-content .version-card-arrow svg path {
    stroke: var(--auth-brand);
}

.version-card:hover .version-card-arrow {
    opacity: 1;
    transform: translateX(2px);
}

/* ===== 扩展安装引导弹窗（现代简约主题，强调色为主题蓝） ===== */
.ext-mask {
    background: transparent;  /* 无遮罩：不变暗、不模糊，仅保留点击外部关闭 */
}

.ext-dialog {
    position: relative;
    width: 750px;
    max-width: calc(100vw - 40px);
    background: var(--auth-card);
    border: 1px solid var(--auth-line);
    border-radius: 24px;
    padding: 48px 56px 40px;
    box-shadow: 0 24px 64px var(--auth-shadow);
    color: var(--auth-text);
    text-align: center;
    animation: ext-pop 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes ext-pop {
    from { opacity: 0; transform: translateY(12px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* 右上角关闭按钮 */
.ext-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--auth-muted);
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.15s ease, color 0.15s ease;
}
.ext-close:hover { color: var(--auth-text); background: var(--auth-card-2); }

/* 顶部图标徽章 */
.ext-badge {
    width: 52px;
    height: 52px;
    margin: 4px auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    background: var(--auth-sel-bg);
    border: 1px solid var(--auth-sel-border);
}

/* 标题与副标题 */
.ext-title {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.2px;
    color: var(--auth-text);
}
.ext-subtitle {
    margin: 0 0 24px;
    font-size: 13.5px;
    color: var(--auth-muted);
}

/* 浏览器选择区 */
.ext-picker {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 18px;
}

.ext-item {
    position: relative;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 4px 12px;
    border: 1px solid var(--auth-line);
    border-radius: 12px;
    background: var(--auth-card-2);
    cursor: pointer;
    transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.ext-item-logo {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ext-item-logo img,
.ext-item-logo svg {
    width: 40px;
    height: 40px;
    display: block;
}
.ext-item-name {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--auth-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.ext-item:hover {
    background: var(--auth-card-2);
    border-color: var(--auth-input-hover);
}

/* 选中项：主题蓝高亮 + 右上角对勾 */
.ext-item.active {
    background: var(--auth-sel-bg);
    border-color: var(--auth-brand);
    box-shadow: 0 4px 16px var(--auth-brand-shadow-18, rgba(91, 140, 255, 0.18));
}
.ext-item.active .ext-item-name {
    color: var(--auth-brand-text);
    font-weight: 600;
}
.ext-item.active::after {
    content: "";
    position: absolute;
    top: 6px;
    right: 6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--auth-brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/10px no-repeat;
}

/* 检测提示 */
.ext-detect {
    margin: 0 0 20px;
    text-align: center;
    font-size: 13px;
    color: var(--auth-muted);
}
.ext-detect b { color: var(--auth-brand-text); font-weight: 600; }

/* 底部操作行：访问官网（主按钮） + 打赏支持（次级小按钮） */
.ext-footer {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 访问官网：品牌蓝实心主按钮 */
.ext-btn-site {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    border: none;
    border-radius: 11px;
    background: var(--auth-brand);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.16s ease, transform 0.1s ease, box-shadow 0.16s ease;
    box-shadow: 0 6px 18px rgba(91, 140, 255, 0.3); /* color-mix 降级（旧浏览器） */
    box-shadow: 0 6px 18px color-mix(in srgb, var(--auth-brand) 30%, transparent);
}
.ext-btn-site:hover { background: var(--auth-brand-hover); }
.ext-btn-site:active { transform: scale(0.985); }

/* 打赏支持：幽灵描边小按钮 */
.ext-btn-reward {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 44px;
    padding: 0 18px;
    border: 1px solid var(--auth-sel-border);
    border-radius: 11px;
    background: var(--auth-sel-bg);
    color: var(--auth-brand-text);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.1s ease;
}
.ext-btn-reward:hover {
    background: var(--auth-brand);
    border-color: var(--auth-brand);
    color: #fff;
}
.ext-btn-reward:active { transform: scale(0.985); }

/* 打赏视图：二维码卡片 */
.ext-qr-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin: 20px 0 16px;
}
.ext-qr-card {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--auth-line);
    border-radius: 14px;
    background: var(--auth-card-2);
}
.ext-qr-img {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 10px;
    background: #fff;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.ext-qr-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.ext-qr-card figcaption {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--auth-text);
}
.ext-qr-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.ext-reward-tip {
    margin: 0 0 18px;
    font-size: 13px;
    color: var(--auth-muted);
    text-align: center;
}

/* 返回按钮（次级幽灵样式） */
.ext-btn-ghost {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 42px;
    border: 1px solid var(--auth-line);
    border-radius: 11px;
    background: transparent;
    color: var(--auth-muted);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease;
}
.ext-btn-ghost:hover { background: var(--auth-card-2); color: var(--auth-text); }

@media (max-width: 520px) {
    .ext-dialog { padding: 26px 20px 22px; }
    .ext-picker { grid-template-columns: repeat(3, 1fr); }
}
