/* github-auth.css - GitHub OAuth认证界面样式（双仓库版本） */

/* ── 插件获取模态框 ───────────────────────────────────── */
.plugin-access-modal {
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
}

.plugin-access-modal .login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.plugin-access-modal .login-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.plugin-access-modal .login-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* ── GitHub认证状态显示 ───────────────────────────────────── */
.github-auth-status {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.status-item:last-child {
    margin-bottom: 0;
}

.status-label {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
}

.status-value {
    font-weight: 600;
    font-family: 'DM Mono', monospace;
    font-size: 0.9rem;
}

.status-value.connected {
    color: var(--success-color);
}

.status-value.disconnected {
    color: var(--text-tertiary);
}

/* ── 插件获取步骤样式 ───────────────────────────────────── */
.plugin-access-steps {
    margin-bottom: 2rem;
}

.step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2.5rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.step:hover {
    border-color: rgba(0, 204, 128, 0.2);
    background: rgba(0, 204, 128, 0.02);
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: #021a0e;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1.2rem;
    margin-right: 1.5rem;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-content h4 {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.8rem;
    font-size: 1.3rem;
}

.step-content p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* ── 仓库选择样式 ───────────────────────────────────── */
.repo-selection {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1rem;
}

.repo-card {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.repo-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), rgba(0, 204, 128, 0.5));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.repo-card:hover {
    border-color: rgba(0, 204, 128, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.repo-card:hover::before {
    transform: scaleX(1);
}

.repo-card.selected {
    border-color: var(--primary-color);
    background: rgba(0, 204, 128, 0.05);
    box-shadow: 0 4px 15px rgba(0, 204, 128, 0.1);
}

.repo-card.selected::before {
    transform: scaleX(1);
}

.repo-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.repo-header h5 {
    color: var(--text-primary);
    font-weight: 600;
    margin: 0;
    font-size: 1.1rem;
}

.repo-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.repo-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.repo-meta span {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
}

.repo-status {
    margin-top: 1rem;
    text-align: center;
}

/* ── 状态徽章样式 ───────────────────────────────────── */
.status-badge {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-block;
    min-width: 80px;
}

.status-badge.pending {
    background: rgba(212, 168, 78, 0.1);
    color: var(--warning-color);
    border: 1px solid rgba(212, 168, 78, 0.2);
}

.status-badge.sent {
    background: rgba(0, 204, 128, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(0, 204, 128, 0.2);
}

.status-badge.accepted {
    background: rgba(0, 204, 128, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(0, 204, 128, 0.2);
}

.status-badge.failed {
    background: rgba(224, 92, 106, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(224, 92, 106, 0.2);
}

/* ── 邀请状态样式 ───────────────────────────────────── */
.invite-status {
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
}

.status-pending {
    color: var(--warning-color);
    background: rgba(212, 168, 78, 0.1);
    border: 1px solid rgba(212, 168, 78, 0.2);
}

.status-sent {
    color: var(--success-color);
    background: rgba(0, 204, 128, 0.1);
    border: 1px solid rgba(0, 204, 128, 0.2);
}

.status-accepted {
    color: var(--success-color);
    background: rgba(0, 204, 128, 0.1);
    border: 1px solid rgba(0, 204, 128, 0.2);
}

.status-failed {
    color: var(--danger-color);
    background: rgba(224, 92, 106, 0.1);
    border: 1px solid rgba(224, 92, 106, 0.2);
}

/* ── 仓库信息摘要样式 ───────────────────────────────────── */
.repo-info-summary {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 1.5rem;
}

.repo-info-summary h4 {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.repo-details {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.repo-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.repo-info-item:last-child {
    border-bottom: none;
}

.repo-info-item strong {
    color: var(--text-primary);
    font-weight: 600;
    min-width: 120px;
}

.repo-info-item span {
    color: var(--text-secondary);
    font-family: 'DM Mono', monospace;
    font-size: 0.9rem;
    word-break: break-all;
}

/* ── GitHub认证按钮样式 ───────────────────────────────────── */
#github-auth-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #24292e;
    color: white;
    border: 1px solid #444d56;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

#github-auth-btn:hover {
    background: #2f363d;
    border-color: #586069;
    transform: translateY(-1px);
}

#github-auth-btn:active {
    transform: translateY(0);
}

/* ── GitHub状态指示器 ───────────────────────────────────── */
.github-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.github-status.connected {
    background: rgba(0, 204, 128, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(0, 204, 128, 0.2);
}

.github-status.disconnected {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-tertiary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.github-status::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.github-status.connected::before {
    background: var(--success-color);
}

.github-status.disconnected::before {
    background: var(--text-tertiary);
}

/* ── 响应式设计 ───────────────────────────────────── */
@media (max-width: 768px) {
    .plugin-access-modal {
        margin: 1rem;
        max-width: calc(100vw - 2rem);
    }
    
    .repo-selection {
        grid-template-columns: 1fr;
    }
    
    .step {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    
    .step-number {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .repo-info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .repo-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* ── 动画效果 ───────────────────────────────────── */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.status-badge.pending {
    animation: pulse 2s infinite;
}

.step {
    animation: fadeInUp 0.6s ease-out;
}

.step:nth-child(1) { animation-delay: 0.1s; }
.step:nth-child(2) { animation-delay: 0.2s; }
.step:nth-child(3) { animation-delay: 0.3s; }
.step:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── 进度指示器 ───────────────────────────────────── */
.step-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2rem 0;
    gap: 1rem;
}

.progress-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.progress-dot.active {
    background: var(--primary-color);
    transform: scale(1.2);
}

.progress-dot.completed {
    background: var(--success-color);
}

/* ── 加载状态 ───────────────────────────────────── */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
}

/* ═══════════════════════════════════════════════════════════════
   插件获取页面（独立 HTML 版）
═══════════════════════════════════════════════════════════════ */

.plugin-access-page {
    max-width: 900px;
    padding: 0.5rem 0 3rem;
}

/* 页面标题 */
.plugin-page-header {
    margin-bottom: 2rem;
}
.plugin-page-title-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.plugin-page-icon {
    width: 40px;
    height: 40px;
    color: var(--primary-color);
    flex-shrink: 0;
}
.plugin-page-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.3rem;
}
.plugin-page-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0;
}

/* GitHub 连接横幅 */
.github-connect-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.2rem 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.github-connect-banner.banner-connected {
    background: rgba(0, 204, 128, 0.06);
    border-color: rgba(0, 204, 128, 0.2);
}
.banner-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.banner-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}
.banner-desc {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 0.2rem;
}
.github-avatar-sm {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 204, 128, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    flex-shrink: 0;
}

/* 仓库卡片网格 */
.plugin-repos-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 3rem;
    align-items: stretch; /* 两卡片等高，视觉整齐 */
}
@media (max-width: 700px) {
    .plugin-repos-grid { grid-template-columns: 1fr; }
}

/* 单个仓库卡片 */
.plugin-repo-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    min-width: 0; /* 关键：允许 grid 子项在内部内容超长时收缩，防止被 clone 命令等撑开 */
    overflow: hidden; /* 双保险：内部任何子元素都不得溢出卡片 */
}
.plugin-repo-card:hover {
    border-color: rgba(0, 204, 128, 0.25);
    box-shadow: 0 4px 20px rgba(0, 204, 128, 0.06);
}

/* 卡片头部 */
.repo-card-header {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
}
.repo-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.repo-icon-magic {
    background: rgba(0, 204, 128, 0.12);
    color: var(--primary-color);
}
.repo-icon-hive {
    background: rgba(99, 179, 237, 0.12);
    color: #63b3ed;
}
.repo-card-title-block {
    flex: 1;
    min-width: 0;
}
.repo-card-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.3rem;
}
.repo-card-url {
    font-size: 0.78rem;
    color: var(--text-tertiary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-family: 'DM Mono', monospace;
    transition: color 0.2s;
}
.repo-card-url:hover { color: var(--primary-color); }

/* 状态徽章 */
.repo-card-status-badge {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}
.repo-card-status-badge.badge-pending  { background: rgba(255,255,255,0.06); color: var(--text-secondary); }
.repo-card-status-badge.badge-sent     { background: rgba(212,168,78,0.12);  color: var(--warning-color); border: 1px solid rgba(212,168,78,0.25); }
.repo-card-status-badge.badge-accepted { background: rgba(0,204,128,0.12);   color: var(--primary-color); border: 1px solid rgba(0,204,128,0.25); }
.repo-card-status-badge.badge-failed   { background: rgba(239,68,68,0.1);    color: var(--danger-color);  border: 1px solid rgba(239,68,68,0.2); }

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}
.dot-pending  { background: var(--text-tertiary); }
.dot-sent     { background: var(--warning-color); }
.dot-accepted { background: var(--primary-color); animation: pulse-dot 2s infinite; }
.dot-failed   { background: var(--danger-color); }

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* 卡片描述 */
.repo-card-desc {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.6;
    margin: 0;
}

/* 标签 */
.repo-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.repo-tag {
    font-size: 0.72rem;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    font-family: 'DM Mono', monospace;
}

/* 元信息 */
.repo-card-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-tertiary);
}
.repo-card-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* 操作区域 */
.repo-card-action {
    margin-top: auto; /* 撑满底部，两卡片操作区对齐 */
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    min-width: 0; /* 允许内部 clone 命令块正确收缩并触发省略号 */
}
.btn-block {
    width: 100%;
    justify-content: center;
}
.action-hint {
    font-size: 0.78rem;
    color: var(--text-tertiary);
    text-align: center;
    margin: 0.5rem 0 0;
}

/* 邀请已发送状态 */
.repo-action-sent {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.invite-sent-info {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
}
.invite-sent-title {
    font-weight: 600;
    color: var(--warning-color);
    font-size: 0.9rem;
}
.invite-sent-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
    line-height: 1.5;
}

/* 已获权限状态 */
.access-granted-info {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    margin-bottom: 1rem;
}
.access-granted-title {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9rem;
}
.access-granted-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
}

/* 克隆命令块 */
.clone-command-block {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 0.6rem 0.8rem;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    min-width: 0; /* 关键：在 flex 父级内允许收缩，交给内部 code 做省略号 */
    box-sizing: border-box;
}
.clone-command-block code {
    flex: 1 1 0;
    min-width: 0; /* 必须，配合 flex:1 才能正确触发 text-overflow */
    font-size: 0.78rem;
    color: var(--primary-color);
    font-family: 'DM Mono', monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: none;
    padding: 0;
}
.copy-btn {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 0.2rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
    flex-shrink: 0;
}
.copy-btn:hover { color: var(--primary-color); }

/* 获取流程 */
.plugin-flow-section {
    margin-bottom: 2.5rem;
}
.plugin-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 1.2rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.plugin-flow-steps {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.plugin-flow-step {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    padding: 0.8rem 1rem;
    flex: 1;
    min-width: 180px;
}
.flow-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #021a0e;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.flow-step-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}
.flow-step-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
    line-height: 1.4;
}
.flow-step-arrow {
    color: var(--text-tertiary);
    font-size: 1.2rem;
    flex-shrink: 0;
}
@media (max-width: 700px) {
    .plugin-flow-steps { flex-direction: column; }
    .flow-step-arrow { transform: rotate(90deg); }
}

/* FAQ */
.plugin-faq-section {
    margin-bottom: 2rem;
}
.plugin-faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.faq-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s;
}
.faq-item[open] {
    border-color: rgba(0, 204, 128, 0.2);
}
.faq-question {
    padding: 1rem 1.2rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question::after {
    content: '▶';
    font-size: 0.7rem;
    color: var(--text-tertiary);
    transition: transform 0.2s;
}
.faq-item[open] .faq-question::after {
    transform: rotate(90deg);
}
.faq-answer {
    padding: 0 1.2rem 1rem;
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.7;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* 技术支持栏 */
.plugin-support-bar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 1rem 1.2rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
}
.plugin-support-bar a {
    color: var(--primary-color);
    text-decoration: none;
}
.plugin-support-bar a:hover { text-decoration: underline; }

/* btn-ghost 补充 */
.btn-ghost {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
}
.btn-ghost:hover {
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--text-primary);
}
.btn-sm {
    padding: 0.45rem 0.9rem;
    font-size: 0.82rem;
}
.icon-svg-xs {
    width: 12px;
    height: 12px;
}

/* ── 分支信息展示（只读） ─────────────────────────────────────── */

.branch-info {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    padding: 0.75rem 1rem;
}

.branch-info-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.6rem;
}

.branch-info-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.branch-info-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.3rem 0.5rem;
    border-radius: 5px;
}

.branch-info-item-highlight {
    background: rgba(0, 204, 128, 0.06);
}

.branch-ver {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 3.2rem;
}

.branch-name {
    font-size: 0.75rem;
    font-weight: 400;
    font-family: 'DM Mono', monospace;
    color: var(--text-tertiary);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.1rem 0.45rem;
    border-radius: 4px;
}

.branch-badge-latest {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--primary-color);
    background: rgba(0, 204, 128, 0.12);
    border: 1px solid rgba(0, 204, 128, 0.25);
    padding: 0.1rem 0.45rem;
    border-radius: 4px;
    letter-spacing: 0.03em;
}

/* ── 获权后克隆分支 Tab ──────────────────────────────────────── */

.clone-branch-tabs {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-bottom: 0.6rem;
}

.clone-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.75rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap; /* Tab 文案不换行，保证“UE 4.25”这种整体显示 */
}

/* 窄容器下 Tab 紧凑化，避免 4 个 UE 版本 Tab 换成多行后再被挤变形 */
@media (max-width: 1280px) {
    .clone-tab {
        padding: 0.28rem 0.55rem;
        font-size: 0.75rem;
        gap: 0.25rem;
    }
    .clone-tab-badge {
        font-size: 0.6rem;
        padding: 0.02rem 0.28rem;
    }
    .clone-command-block code {
        font-size: 0.72rem;
    }
}

.clone-tab:hover {
    border-color: rgba(255, 255, 255, 0.25);
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}

.clone-tab-active {
    border-color: var(--primary-color);
    background: rgba(0, 204, 128, 0.12);
    color: var(--primary-color);
}

.clone-tab-badge {
    font-size: 0.65rem;
    font-weight: 700;
    background: rgba(0, 204, 128, 0.2);
    color: var(--primary-color);
    padding: 0.05rem 0.35rem;
    border-radius: 3px;
}