/* 全局样式 */
:root {
    --primary-color: #4080ff;
    --primary-light: #eef4ff;
    --secondary-color: #ff6b9b;
    --text-main: #333;
    --text-light: #6c7293;
    --success-color: #2ecc71;
    --warning-color: #e67e22;
    --danger-color: #e74c3c;
    --bg-color: #f5f7fe;
    --card-bg: #ffffff;
    --border-radius: 12px;
    --shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--bg-color);
    overflow-y: scroll; /* 始终显示垂直滚动条 */
}

/* 修复Firefox的滚动条 */
html {
    scrollbar-width: thin; /* Firefox */
}

.container {
    display: grid;
    grid-template-columns: 80px 1fr;
    grid-template-rows: 70px 1fr;
    grid-template-areas: 
        "sidebar header"
        "sidebar content";
    height: 100vh;
    max-height: 100vh;
}

/* 头部样式 */
header {
    grid-area: header;
    background-color: var(--card-bg);
    color: var(--text-main);
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.03);
    z-index: 10;
}

header h1 {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--text-main);
}

/* 侧边栏样式 */
.sidebar {
    grid-area: sidebar;
    background-color: var(--card-bg);
    padding: 20px 0;
    box-shadow: 1px 0 5px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 20;
}

.sidebar nav {
    width: 100%;
    margin-top: 40px;
}

.sidebar nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sidebar nav ul li {
    width: 100%;
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
}

.sidebar nav ul li a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
    border-radius: 12px;
}

.sidebar nav ul li a:hover,
.sidebar nav ul li.active a {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.sidebar .logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 20px;
}

/* 内容区域样式 */
.content {
    grid-area: content;
    padding: 20px 30px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* 软件包选项卡样式 */
.package-tabs {
    display: flex;
    margin-top: 15px;
    margin-bottom: 20px;
    flex-shrink: 0;
    gap: 10px;
}

.package-tabs .tab {
    padding: 10px 20px;
    cursor: pointer;
    background-color: var(--card-bg);
    border: none;
    border-radius: 8px;
    transition: var(--transition);
    color: var(--text-light);
    font-weight: 500;
    box-shadow: var(--shadow);
}

.package-tabs .tab:hover {
    background-color: var(--primary-light);
}

.package-tabs .tab.active {
    background-color: var(--primary-color);
    color: white;
}

/* 历史版本切换开关 */
.history-toggle {
    display: flex;
    align-items: center;
    align-self: center;
    flex-shrink: 0;
}

.toggle-label {
    margin-left: 10px;
    font-size: 14px;
    color: var(--text-light);
}

/* 开关样式 */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ddd;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:focus + .slider {
    box-shadow: 0 0 1px var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 24px;
}

.slider.round:before {
    border-radius: 50%;
}

/* 表格样式 */
.table-container {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    position: relative;
    overflow: hidden;
}

.data-table-wrapper {
    overflow-y: scroll; /* 始终显示滚动条，防止布局跳动 */
    overflow-x: hidden;
    flex: 1;
    border-radius: 8px;
    margin-right: -8px; /* 补偿滚动条宽度 */
    padding-right: 8px; /* 补偿滚动条宽度 */
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.data-table thead {
    position: sticky;
    top: 0;
    z-index: 2;
    background-color: var(--card-bg);
}

.data-table th,
.data-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eef0f7;
}

/* 包名称单元格样式 - 使其可点击 */
.data-table td:first-child {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 15px;
    cursor: pointer;
    color: var(--primary-color);
    transition: color 0.2s;
}

/* 特殊表格中的包名称样式 - 确保推送版本和允许更新列表也应用相同的文本溢出样式 */
#push-version-list td:first-child,
#allow-update-list td:first-child {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 15px;
    color: var(--text-main);
}

.data-table td:first-child:hover {
    color: #2a6ad7;
    text-decoration: underline;
}

/* 设置各列宽度 */
.data-table th:nth-child(1),
.data-table td:nth-child(1) {
    width: 40%;
}

.data-table th:nth-child(2),
.data-table td:nth-child(2) {
    width: 15%;
}

.data-table th:nth-child(3),
.data-table td:nth-child(3) {
    width: 20%;
}

.data-table th:nth-child(4),
.data-table td:nth-child(4) {
    width: 10%;
}

.data-table th:nth-child(5),
.data-table td:nth-child(5) {
    width: 15%;
}

.data-table th {
    background-color: var(--card-bg);
    font-weight: 600;
    color: var(--text-light);
    box-shadow: 0 1px 0 #eef0f7; /* 添加底部阴影，增强表头与内容的分隔 */
}

.data-table tr {
    transition: background-color 0.2s;
}

.data-table tr:hover {
    background-color: #f8faff;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* 按钮样式 */
button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-weight: 500;
    margin-right: 5px;
}

button:hover {
    background-color: #2a6ad7;
}

button.danger, 
.delete-btn {
    background-color: var(--danger-color);
}

button.danger:hover,
.delete-btn:hover {
    background-color: #c0392b;
}

button.warning,
.move-btn {
    background-color: var(--warning-color);
}

button.warning:hover,
.move-btn:hover {
    background-color: #d35400;
}

.move-btn[data-is-legacy="true"] {
    background-color: var(--success-color);
}

.move-btn[data-is-legacy="true"]:hover {
    background-color: #27ae60;
}

.edit-metadata-btn {
    background-color: var(--primary-color);
}

.edit-metadata-btn:hover {
    background-color: #2a6ad7;
}

/* 设置页面样式 */
.settings-form {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow);
    max-width: 600px;
    margin: 20px auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-main);
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #dde5ef;
    border-radius: 8px;
    font-size: 14px;
    transition: border 0.2s;
}

.form-group input:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* 标签容器样式 */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 4px;
}

/* 标签样式 */
.tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    text-align: center;
    margin-right: 0; /* 移除右边距，改用gap控制间距 */
    margin-bottom: 0; /* 移除底部边距，改用gap控制间距 */
}

.tag-latest {
    background-color: var(--success-color);
}

.tag-legacy {
    background-color: var(--warning-color);
}

.tag-release {
    background-color: var(--primary-color);
}

/* 删除旧的历史版本行样式 */
.legacy-row {
    background-color: rgba(255, 248, 230, 0.3);
}

.legacy-row td {
    color: var(--text-light);
}

/* 搜索和错误提示 */
.loading, .error-message {
    padding: 20px;
    text-align: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    border-radius: 8px;
}

.loading {
    color: var(--primary-color);
    display: none;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 20px 40px;
    box-shadow: var(--shadow);
}

.error-message {
    color: var(--danger-color);
    background-color: #fdf3f2;
    border-radius: 8px;
    display: none;
    padding: 15px 30px;
    box-shadow: var(--shadow);
    max-width: 90%;
    animation: fadeIn 0.3s, fadeOut 0.3s 4.7s;
}

@keyframes fadeOut {
    from {opacity: 1}
    to {opacity: 0}
}

/* 页内容 */
.page {
    animation: fadeIn 0.5s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

@keyframes fadeIn {
    from {opacity: 0}
    to {opacity: 1}
}

#packages-page {
    display: flex;
    flex-direction: column;
    flex: 1;
}

#packages-page h2 {
    flex-shrink: 0;
    margin-bottom: 20px;
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-main);
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
    animation: modalOpen 0.3s;
}

.modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    max-width: 500px;
    width: 80%;
    position: relative;
}

@keyframes modalOpen {
    from {opacity: 0}
    to {opacity: 1}
}

.close-confirm {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #aaa;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close-confirm:hover {
    color: #555;
}

.modal-content h3 {
    margin-top: 0;
    color: var(--text-main);
    font-size: 1.5rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.modal-content p {
    margin-bottom: 20px;
    line-height: 1.5;
    color: var(--text-light);
    font-size: 15px;
}

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 30px;
}

.modal-buttons button {
    min-width: 90px;
    padding: 10px 20px;
}

/* 设置滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(193, 193, 193, 0.4);
    border-radius: 4px;
    transition: background 0.3s;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(168, 168, 168, 0.6);
}

/* 表头排序样式 */
.sortable {
    cursor: pointer;
    position: relative;
    user-select: none;
}

.sortable:hover {
    background-color: var(--primary-light);
}

.sortable i {
    margin-left: 5px;
    font-size: 12px;
    color: var(--text-light);
    opacity: 0.5;
}

.sortable.sort-asc i {
    opacity: 1;
}

.sortable.sort-desc i {
    opacity: 1;
}

.sort-asc i.fa-sort {
    display: none;
}

.sort-asc i.fa-sort-up {
    display: inline-block;
}

.sort-asc i.fa-sort-down {
    display: none;
}

.sort-desc i.fa-sort {
    display: none;
}

.sort-desc i.fa-sort-up {
    display: none;
}

.sort-desc i.fa-sort-down {
    display: inline-block;
}

.data-table th i.fa-sort-up,
.data-table th i.fa-sort-down {
    display: none;
}

.data-table th.sort-asc i.fa-sort {
    display: none;
}

.data-table th.sort-asc i.fa-sort-up {
    display: inline-block;
}

.data-table th.sort-desc i.fa-sort {
    display: none;
}

.data-table th.sort-desc i.fa-sort-down {
    display: inline-block;
}

.data-table th.sortable {
    white-space: nowrap;
}

/* 移动按钮样式优化 */
.move-btn, 
.delete-btn,
.edit-metadata-btn {
    padding: 8px 12px;
    position: relative;
    overflow: hidden;
    width: 40px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.move-btn i, 
.delete-btn i,
.edit-metadata-btn i {
    transition: transform 0.3s;
    font-size: 14px;
}

.move-btn:hover i, 
.delete-btn:hover i,
.edit-metadata-btn:hover i {
    transform: translateY(-2px);
}

.move-btn[data-is-legacy="true"]:hover i {
    transform: translateY(-2px);
}

/* 操作栏样式 */
.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

/* 操作按钮通用样式 */
.action-button {
    padding: 8px 15px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    background-color: var(--primary-color);
    color: white;
}

.action-button i {
    margin-right: 5px;
}

.action-button:hover {
    background-color: var(--primary-color);
    opacity: 0.9;
}

/* 上传模态框样式 */
.upload-modal-content {
    max-width: 450px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 0;
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #f0f0f0;
}

.modal-header h3 {
    font-size: 22px;
    font-weight: 500;
    color: #333;
    margin: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.close-upload {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #aaa;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close-upload:hover {
    color: #555;
}

.upload-container {
    background-color: transparent;
    padding: 25px;
    margin-top: 0;
}

.file-drop-area {
    border: 2px dashed #d1d8e4;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #f7f9fc;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 220px;
}

.progress-info-label {
    font-size: 14px;
    color: #647288;
    margin-bottom: 8px;
    font-weight: 500;
}

.obs-progress {
    height: 100%;
    background-color: #2196F3; /* 使用不同颜色区分OBS上传进度 */
    width: 0%;
    transition: width 0.2s;
}

/* 提示消息样式 */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #333;
    color: #fff;
    padding: 12px 20px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.toast.show {
    opacity: 1;
}

.toast-success {
    background-color: #4CAF50;
}

.toast-error {
    background-color: #f44336;
}

.toast-info {
    background-color: #2196F3;
}

.drop-area-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    padding: 20px;
}

.upload-icon {
    font-size: 50px;
    color: var(--primary-color);
    margin-bottom: 15px;
    opacity: 0.8;
}

.file-drop-area:hover,
.file-drop-area.active {
    background-color: #eef2f7;
    border-color: var(--primary-color);
}

.drop-text {
    color: #647288;
    font-size: 16px;
    text-align: center;
    line-height: 1.5;
}

.file-input {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

.upload-progress-container {
    margin-top: 20px;
    display: none;
}

.file-info {
    margin-bottom: 12px;
}

.file-name {
    font-weight: 500;
    font-size: 14px;
    color: #333;
}

.progress-bar {
    height: 8px;
    background-color: #eaeef2;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress {
    height: 100%;
    background-color: var(--primary-color);
    width: 0%;
    transition: width 0.2s;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.percentage {
    font-size: 13px;
    color: #647288;
}

.cancel-upload-btn {
    background-color: transparent;
    color: #647288;
    border: 1px solid #cfd8e2;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.cancel-upload-btn:hover {
    background-color: #f1f3f7;
    color: #333;
}

/* 元数据编辑模态框样式 */
.metadata-modal-content {
    max-width: 650px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 0;
    overflow: hidden;
}

.metadata-modal-content .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 25px;
    border-bottom: 1px solid #f0f0f0;
}

.metadata-modal-content .modal-title {
    flex: 1;
}

.metadata-modal-content .modal-title h3 {
    font-size: 22px;
    font-weight: 500;
    color: #333;
    margin: 0;
    border-bottom: none;
    padding-bottom: 5px;
}

.metadata-modal-content .package-name {
    font-size: 14px;
    color: var(--text-light);
    margin-top: 4px;
    word-break: break-all;
}

.metadata-form {
    padding: 25px;
}

.metadata-form .form-group {
    margin-bottom: 20px;
}

.metadata-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-main);
}

.metadata-form textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 1px solid #dde5ef;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.2s;
}

.metadata-form textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

.metadata-form input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #dde5ef;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.metadata-form input[type="text"]:focus {
    border-color: var(--primary-color);
    outline: none;
}

.metadata-modal-content .modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 30px;
}

.metadata-modal-content .primary-btn {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 500;
}

.metadata-modal-content .primary-btn:hover {
    background-color: #2a6ad7;
}

.metadata-modal-content .secondary-btn {
    background-color: #f1f3f7;
    color: var(--text-main);
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 500;
}

.metadata-modal-content .secondary-btn:hover {
    background-color: #e4e7ed;
}

.close-metadata {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #aaa;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close-metadata:hover {
    color: #555;
}

/* 带按钮的输入框 */
.input-with-button {
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-with-button input {
    flex: 1;
    cursor: pointer;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.input-with-button input[id="package-commit"] {
    font-size: 12px;
    letter-spacing: -0.5px;
    padding-right: 5px;
}

.select-btn {
    background-color: #f1f3f7;
    color: var(--text-main);
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.select-btn:hover {
    background-color: #e4e7ed;
}

/* 分支选择模态框 */
.branch-select-modal-content,
.commit-select-modal-content {
    max-width: 650px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 0;
    overflow: hidden;
}

.branch-select-container,
.commit-select-container {
    padding: 25px;
}

.search-container {
    position: relative;
    margin-bottom: 15px;
}

.search-container input {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 1px solid #dde5ef;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.search-container input:focus {
    border-color: var(--primary-color);
    outline: none;
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #647288;
}

.branch-list,
.commit-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
    border: 1px solid #eaeef2;
    border-radius: 8px;
}

.branch-item,
.commit-item {
    padding: 15px;
    border-bottom: 1px solid #eaeef2;
    cursor: pointer;
    transition: background-color 0.2s;
}

.branch-item:last-child,
.commit-item:last-child {
    border-bottom: none;
}

.branch-item:hover,
.commit-item:hover {
    background-color: #f5f7fa;
}

.branch-item.selected,
.commit-item.selected {
    background-color: #e9f0ff;
    border-left: 3px solid var(--primary-color);
}

.branch-item .branch-name {
    font-weight: 500;
    color: var(--text-main);
}

.commit-item .commit-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.commit-item .commit-message {
    font-weight: 500;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 580px;
    position: relative;
}

.commit-item .commit-message:hover::after {
    content: attr(title);
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    z-index: 10;
    white-space: normal;
    max-width: 500px;
    word-break: break-word;
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
    margin-top: 5px;
}

.commit-item .commit-sha {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 13px;
    color: #647288;
    background-color: #f1f3f7;
    border-radius: 4px;
    padding: 4px 8px;
    display: inline-block;
    overflow-x: auto;
    max-width: 100%;
    white-space: nowrap;
    margin-bottom: 3px;
    letter-spacing: -0.3px;
}

.commit-item .commit-time {
    font-size: 12px;
    color: var(--text-light);
}

.current-branch, 
.repository-name {
    font-size: 14px;
    color: var(--text-light);
    margin-top: 4px;
}

.loading-indicator {
    text-align: center;
    padding: 20px;
    color: var(--text-light);
}

/* Markdown相关样式 */
.markdown-hint {
    font-size: 12px;
    color: var(--text-light);
    font-weight: normal;
}

.markdown-toggle {
    display: flex;
    align-items: center;
    margin-top: 8px;
}

.markdown-toggle .toggle-label {
    margin-left: 10px;
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.switch.small {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 18px;
}

.switch.small input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch.small .slider:before {
    position: absolute;
    content: "";
    height: 12px;
    width: 12px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
}

.switch.small input:checked + .slider:before {
    transform: translateX(18px);
}

.markdown-preview {
    margin-top: 15px;
    border: 1px solid #dde5ef;
    border-radius: 8px;
    padding: 15px;
    background-color: #f9fafc;
    display: none;
    max-height: 300px;
    overflow-y: auto;
}

.markdown-preview.active {
    display: block;
}

/* Markdown内容样式 */
.markdown-preview,
.markdown-content,
.details-description {
    color: var(--text-main);
    line-height: 1.6;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

.markdown-preview h1,
.markdown-content h1,
.details-description h1 {
    font-size: 2em;
    margin: 0.67em 0 0.3em;
    font-weight: 600;
    padding-bottom: 0.3em;
    border-bottom: 1px solid #eaecef;
    line-height: 1.25;
}

.markdown-preview h2,
.markdown-content h2,
.details-description h2 {
    font-size: 1.5em;
    margin: 0.83em 0 0.3em;
    font-weight: 600;
    padding-bottom: 0.3em;
    border-bottom: 1px solid #eaecef;
    line-height: 1.25;
}

.markdown-preview h3,
.markdown-content h3,
.details-description h3 {
    font-size: 1.25em;
    margin: 1em 0 0.5em;
    font-weight: 600;
    line-height: 1.25;
}

.markdown-preview h4,
.markdown-content h4,
.details-description h4 {
    font-size: 1em;
    margin: 1.33em 0 0.5em;
    font-weight: 600;
    line-height: 1.25;
}

.markdown-preview h5,
.markdown-content h5,
.details-description h5 {
    font-size: 0.875em;
    margin: 1.67em 0 0.5em;
    font-weight: 600;
    line-height: 1.25;
}

.markdown-preview h6,
.markdown-content h6,
.details-description h6 {
    font-size: 0.85em;
    margin: 2.33em 0 0.5em;
    font-weight: 600;
    line-height: 1.25;
    color: var(--text-light);
}

.markdown-preview p,
.markdown-content p,
.details-description p {
    margin: 0 0 16px 0;
    line-height: 1.6;
}

.markdown-preview strong,
.markdown-content strong,
.details-description strong {
    font-weight: 600;
}

.markdown-preview em,
.markdown-content em,
.details-description em {
    font-style: italic;
}

.markdown-preview ul,
.markdown-content ul,
.details-description ul {
    padding-left: 2em;
    margin-bottom: 16px;
}

.markdown-preview ol,
.markdown-content ol,
.details-description ol {
    padding-left: 2em;
    margin-bottom: 16px;
}

.markdown-preview ul ul,
.markdown-preview ul ol,
.markdown-preview ol ul,
.markdown-preview ol ol,
.markdown-content ul ul,
.markdown-content ul ol,
.markdown-content ol ul,
.markdown-content ol ol,
.details-description ul ul,
.details-description ul ol,
.details-description ol ul,
.details-description ol ol {
    margin-top: 0;
    margin-bottom: 0;
}

.markdown-preview li,
.markdown-content li,
.details-description li {
    margin-bottom: 0.25em;
}

.markdown-preview li + li,
.markdown-content li + li,
.details-description li + li {
    margin-top: 0.25em;
}

.markdown-preview code,
.markdown-content code,
.details-description code {
    font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 85%;
    padding: 0.2em 0.4em;
    margin: 0;
    background-color: rgba(27, 31, 35, 0.05);
    border-radius: 3px;
}

.markdown-preview pre,
.markdown-content pre,
.details-description pre {
    font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
    word-wrap: normal;
    padding: 16px;
    overflow: auto;
    font-size: 85%;
    line-height: 1.45;
    background-color: #f6f8fa;
    border-radius: 6px;
    margin-bottom: 16px;
}

.markdown-preview pre code,
.markdown-content pre code,
.details-description pre code {
    background-color: transparent;
    padding: 0;
    margin: 0;
    border: 0;
    word-break: normal;
    white-space: pre;
    font-size: 100%;
    display: inline;
    overflow: visible;
    line-height: inherit;
    word-wrap: normal;
}

.markdown-preview blockquote,
.markdown-content blockquote,
.details-description blockquote {
    padding: 0 1em;
    color: #6a737d;
    border-left: 0.25em solid #dfe2e5;
    margin: 0 0 16px 0;
}

.markdown-preview blockquote > :first-child,
.markdown-content blockquote > :first-child,
.details-description blockquote > :first-child {
    margin-top: 0;
}

.markdown-preview blockquote > :last-child,
.markdown-content blockquote > :last-child,
.details-description blockquote > :last-child {
    margin-bottom: 0;
}

.markdown-preview hr,
.markdown-content hr,
.details-description hr {
    height: 0.25em;
    padding: 0;
    margin: 24px 0;
    background-color: #e1e4e8;
    border: 0;
}

.markdown-preview table,
.markdown-content table,
.details-description table {
    display: block;
    width: 100%;
    overflow: auto;
    border-spacing: 0;
    border-collapse: collapse;
    margin-top: 0;
    margin-bottom: 16px;
}

.markdown-preview table th,
.markdown-content table th,
.details-description table th {
    font-weight: 600;
    padding: 6px 13px;
    border: 1px solid #dfe2e5;
}

.markdown-preview table td,
.markdown-content table td,
.details-description table td {
    padding: 6px 13px;
    border: 1px solid #dfe2e5;
}

.markdown-preview table tr,
.markdown-content table tr,
.details-description table tr {
    background-color: #fff;
    border-top: 1px solid #c6cbd1;
}

.markdown-preview table tr:nth-child(2n),
.markdown-content table tr:nth-child(2n),
.details-description table tr:nth-child(2n) {
    background-color: #f6f8fa;
}

.markdown-preview img,
.markdown-content img,
.details-description img {
    max-width: 100%;
    box-sizing: border-box;
    background-color: #fff;
}

.markdown-preview a,
.markdown-content a,
.details-description a {
    color: var(--primary-color);
    text-decoration: none;
}

.markdown-preview a:hover,
.markdown-content a:hover,
.details-description a:hover {
    text-decoration: underline;
}

/* 详情模态框样式 */
.details-modal-content {
    max-width: 650px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 0;
    overflow: hidden;
}

.details-content {
    padding: 25px;
}

.details-section {
    margin-bottom: 25px;
}

.details-section h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-main);
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 8px;
}

.details-tags {
    margin-bottom: 15px;
    display: flex;
}

.details-description {
    background-color: #f9fafc;
    border-radius: 8px;
    padding: 15px;
    color: var(--text-main);
    line-height: 1.6;
    border: 1px solid #eaeef2;
    max-height: 300px;
    overflow-y: auto;
}

.details-item {
    display: flex;
    margin-bottom: 10px;
    align-items: flex-start;
}

.details-label {
    width: 100px;
    font-weight: 500;
    color: var(--text-light);
    flex-shrink: 0;
}

.details-value {
    flex: 1;
    word-break: break-all;
}

.details-value.monospace {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 13px;
    background-color: #f1f3f7;
    padding: 4px 8px;
    border-radius: 4px;
    letter-spacing: -0.3px;
}

.close-details {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #aaa;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close-details:hover {
    color: #555;
}

/* 必填字段标记 */
.required {
    color: #e74c3c;
    margin-left: 2px;
}

/* 表单验证错误提示 */
.form-error {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

/* 推送版本模态框 */
.push-version-modal-content {
    max-width: 800px;
    width: 90%;
    padding: 0;
}

.push-version-container {
    padding: 20px 25px;
}

.push-version-description {
    margin-bottom: 20px;
    color: #666;
}

.packages-table-container {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
    border: 1px solid #eee;
    border-radius: 4px;
}

/* 推送版本标签 - 用于选择推送版本模态框 */
.pushed-version-tag {
    background-color: #4caf50;
    color: white;
    padding: 2px 8px;
    border-radius: 50%;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

/* 主表格中的推送版本标签 */
.tag.tag-pushed {
    background-color: #9C27B0; /* 紫色 */
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    margin-right: 5px;
}

.danger-btn {
    background-color: var(--danger-color);
    color: white;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 500;
}

.danger-btn:hover {
    background-color: #c0392b;
}

.current-pushed-version {
    font-size: 13px;
    color: #666;
    margin-top: 5px;
}

.current-pushed-version .highlight {
    color: #9C27B0;
    font-weight: 500;
}

.close-upload,
.close-metadata,
.close-branch-select,
.close-commit-select,
.close-details,
.close-push-version {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #aaa;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close-upload:hover,
.close-metadata:hover,
.close-branch-select:hover,
.close-commit-select:hover,
.close-details:hover,
.close-push-version:hover {
    color: #555;
}

/* 推送版本标签页 */
.push-version-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.push-version-tabs .tab {
    padding: 10px 20px;
    cursor: pointer;
    margin-right: 10px;
    border-radius: 4px 4px 0 0;
    background-color: #f5f5f5;
    color: #666;
    font-weight: 500;
    transition: all 0.3s;
}

.push-version-tabs .tab:hover {
    background-color: #e9e9e9;
}

.push-version-tabs .tab.active {
    background-color: var(--primary-color);
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-description {
    margin-bottom: 15px;
    color: #666;
    font-size: 14px;
}

/* 允许更新的开关 */
.allow-update-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    margin: 0 auto;
}

.allow-update-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.location-tag {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    color: white;
    background-color: #666;
}

.location-tag.current {
    background-color: var(--success-color);
}

.location-tag.legacy {
    background-color: var(--warning-color);
}

/* 批量操作按钮 */
.batch-update-btns {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.batch-update-btns button {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.success-btn {
    background-color: var(--success-color);
    color: white;
}

.success-btn:hover {
    background-color: #27ae60;
}

.warning-btn {
    background-color: var(--warning-color);
    color: white;
}

.warning-btn:hover {
    background-color: #d35400;
}

/* 添加用户菜单相关样式 */
.user-profile {
    position: relative;
    cursor: pointer;
}

.user-profile i {
    font-size: 24px;
    color: #4a90e2;
}

.user-menu {
    position: absolute;
    top: 100%;
    right: 0;
    width: 200px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
    overflow: hidden;
}

.user-info {
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.username {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.role {
    font-size: 12px;
    color: #777;
}

.divider {
    height: 1px;
    background-color: #eee;
}

.menu-item {
    padding: 12px 15px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.menu-item:hover {
    background-color: #f5f5f5;
}

.menu-item i {
    margin-right: 8px;
    color: #666;
    font-size: 14px;
}

/* 登录状态提示样式 */
.auth-status {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    z-index: 9999;
    display: none;
    animation: fadeIn 0.3s, fadeOut 0.3s 2.7s;
}

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

@keyframes fadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-10px); }
} 