/* ==========================================================================
   Linux 多站点自动化部署控制台 - 核心设计系统 (Vite 增强版，全响应式自适应)
   ========================================================================== */

:root {
    --bg-dark: #090a0f;
    --card-bg: rgba(22, 25, 37, 0.65);
    --card-border: rgba(255, 255, 255, 0.08);
    --primary: #4f46e5;
    --primary-glow: rgba(79, 70, 229, 0.4);
    --primary-hover: #6366f1;
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-error: #ef4444;
    --text-warning: #f59e0b;
    --text-success: #10b981;
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --glow-color-1: rgba(79, 70, 229, 0.15);
    --glow-color-2: rgba(99, 102, 241, 0.1);
}

/* 全局基底重置与体验加固 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    user-select: none; /* 全局防划选 */
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow-x: hidden;
    position: relative;
    padding: 60px 20px 40px; /* 预留顶部悬浮元数据区 */
}

/* 极简背景光斑 */
.glow-bg {
    position: fixed;
    inset: 0;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.glow-1 {
    position: absolute;
    width: 450px;
    height: 450px;
    background: var(--glow-color-1);
    border-radius: 50%;
    filter: blur(80px);
    top: 5%;
    left: 10%;
    animation: pulse 8s infinite alternate;
}

.glow-2 {
    position: absolute;
    width: 550px;
    height: 550px;
    background: var(--glow-color-2);
    border-radius: 50%;
    filter: blur(100px);
    bottom: 5%;
    right: 10%;
    animation: pulse 12s infinite alternate-reverse;
}

@keyframes pulse {
    0% { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.1) translate(30px, 40px); }
}

/* 右上角精致环境配置悬浮窗 */
.meta-wrapper {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 50;
}

.meta-trigger-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.meta-trigger-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.05);
}

.meta-popover {
    position: absolute;
    right: 0;
    top: 40px;
    width: 340px;
    background: rgba(16, 18, 27, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    transform: translateY(-10px) scale(0.95);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.meta-wrapper:hover .meta-popover {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.meta-wrapper.is-open .meta-popover {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.meta-popover-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 8px;
    margin-bottom: 8px;
}

.meta-popover-content {
    font-family: 'Consolas', 'Courier New', Courier, monospace;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.85);
    white-space: pre-wrap;
    line-height: 1.6;
    user-select: text; /* 允许物理复制 */
}

/* 主容器 */
.glass-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 620px; /* 适度拓宽以放置发布前检查面板 */
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* 头部样式 */
.app-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pulse-dot {
    width: 10px;
    height: 10px;
    background-color: var(--text-success);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--text-success);
    animation: logo-pulse 1.8s infinite;
}

@keyframes logo-pulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.app-header h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #fff 0%, #bfc7ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    letter-spacing: 1px;
}

/* 5 Tab 响应式切换器 */
.tab-navigation {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    background: rgba(22, 25, 37, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 6px;
    border-radius: 14px;
    backdrop-filter: blur(10px);
}

.tab-btn {
    flex: 1;
    min-width: 80px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 10px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tab-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
    color: #fff;
    background: var(--primary);
    box-shadow: 0 4px 12px var(--primary-glow);
}

/* 玻璃卡片 */
.deploy-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 28px;
    box-shadow: var(--glass-shadow);
    display: none;
    flex-direction: column;
    gap: 24px;
    transition: border-color 0.3s ease;
}

.deploy-card.active {
    display: flex;
}

.deploy-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

/* 左右两栏或上下栏排版 */
.config-section {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.input-group input {
    background: rgba(10, 11, 18, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 0.95rem;
    transition: all 0.25s ease;
    outline: none;
    user-select: text; /* 允许选择 */
}

.input-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 8px var(--primary-glow);
    background: rgba(10, 11, 18, 0.8);
}

.input-with-prefix {
    display: flex;
    align-items: center;
    background: rgba(10, 11, 18, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.25s ease;
}

.input-with-prefix:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 8px var(--primary-glow);
    background: rgba(10, 11, 18, 0.8);
}

.url-prefix {
    padding-left: 16px;
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.95rem;
    white-space: nowrap;
}

.input-with-prefix input {
    border: none !important;
    background: transparent !important;
    width: 100%;
    padding-left: 4px;
    box-shadow: none !important;
}

.field-tip {
    font-size: 0.78rem;
    color: var(--text-muted);
    padding-left: 4px;
}

/* 密码眼睛定位 */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.password-input-wrapper input {
    width: 100%;
    padding-right: 44px !important;
}

.pwd-toggle-btn {
    position: absolute;
    right: 10px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, transform 0.1s;
    padding: 6px;
    border-radius: 50%;
    z-index: 21;
}

.pwd-toggle-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.pwd-toggle-btn:active {
    transform: scale(0.9);
}

.eye-icon {
    width: 18px;
    height: 18px;
    pointer-events: none;
}

/* 覆盖方式双卡片选择器 */
.mode-selector-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.mode-card {
    background: rgba(22, 25, 37, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.mode-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(22, 25, 37, 0.6);
}

.mode-card.active {
    border-color: var(--primary-hover);
    background: rgba(79, 70, 229, 0.12);
    box-shadow: 0 0 15px var(--primary-glow), inset 0 0 8px rgba(79, 70, 229, 0.2);
}

.mode-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top left, rgba(99, 102, 241, 0.12), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
}

.mode-card.active::before {
    opacity: 1;
}

.mode-card:active {
    transform: scale(0.98);
}

.hidden-radio {
    display: none;
}

.mode-card-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.mode-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main);
}

.mode-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.35;
}

/* 精致滑动开关备份卡片 */
.inline-setting-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 14px 18px;
}

.inline-setting-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main);
}

.inline-setting-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
    line-height: 1.3;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    transition: .3s;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    border-radius: 50%;
    transition: .3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--primary-hover);
    box-shadow: 0 0 10px var(--primary-glow);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

/* 预检面板 preview-card */
.preview-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 14px;
    padding: 16px;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 10px;
    margin-bottom: 12px;
}

.preview-header h3 {
    font-size: 0.9rem;
    font-weight: 600;
}

.preview-badge {
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.preview-badge.is-ready {
    background: rgba(16, 185, 129, 0.15);
    color: var(--text-success);
    border: 1px solid rgba(16, 185, 129, 0.3);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.15);
}

.preview-badge.is-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--text-warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.preview-badge.is-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--text-error);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.preview-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.preview-item-wide {
    grid-column: span 2;
}

.preview-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.preview-value {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 拖拽上传区 */
.hidden-file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 20;
}

.upload-area {
    position: relative;
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 140px;
}

.upload-area.dragging {
    border-color: var(--primary-hover);
    background: rgba(79, 70, 229, 0.08);
    transform: scale(1.01);
}

.upload-icon {
    width: 32px;
    height: 32px;
    color: var(--text-muted);
    margin-bottom: 8px;
    transition: transform 0.3s ease, color 0.3s ease;
    -webkit-user-drag: none;
}

.upload-area:hover .upload-icon, .upload-area.dragging .upload-icon {
    color: var(--primary-hover);
    transform: translateY(-4px);
}

.main-prompt {
    font-size: 0.9rem;
    color: var(--text-main);
}

.main-prompt span {
    color: var(--primary-hover);
    font-weight: 500;
}

.limit-prompt {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* 文件预览 */
.file-info-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 10;
}

.zip-icon {
    width: 42px;
    height: 42px;
    color: var(--primary-hover);
    animation: float 2s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.file-name {
    font-size: 0.9rem;
    font-weight: 500;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-size {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* 进度条 */
.status-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.progress-bar-container {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-hover) 100%);
    transition: width 0.15s ease;
}

.status-text-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
}

.status-msg {
    color: var(--text-muted);
}

.status-percentage {
    color: var(--text-main);
    font-weight: 500;
}

/* 开始发布大按钮 */
.deploy-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 14px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
    position: relative;
    overflow: hidden;
}

.deploy-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(255,255,255,0.1), rgba(255,255,255,0));
    opacity: 0;
    transition: opacity 0.3s;
}

.deploy-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.45);
}

.deploy-btn:hover:not(:disabled)::after {
    opacity: 1;
}

.deploy-btn:active:not(:disabled) {
    transform: translateY(1px);
}

.deploy-btn:disabled {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.25);
    cursor: not-allowed;
    box-shadow: none;
}

/* 列表卡片与头部 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 16px;
    margin-bottom: 8px;
}

.section-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
    background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-header p {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.action-row {
    display: flex;
    gap: 8px;
}

.refresh-list-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    padding: 8px 14px;
    font-size: 0.82rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.refresh-list-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
}

/* 列表与卡片 */
.sites-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    max-height: 480px;
    overflow-y: auto;
    padding-right: 4px;
}

.sites-grid::-webkit-scrollbar {
    width: 5px;
}
.sites-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.site-card {
    background: rgba(10, 11, 18, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 24px 16px 16px; /* 留出顶部距离给右上角开关 */
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    transition: all 0.25s ease;
    position: relative; /* 启用绝对定位基准 */
}

.site-card:hover {
    background: rgba(22, 25, 37, 0.55);
    border-color: rgba(255, 255, 255, 0.12);
}

.site-card-header-toggle {
    position: absolute;
    top: 12px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 5;
}

.toggle-label-text {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
}

.compact-toggle {
    transform: scale(0.8);
    transform-origin: right center;
}

.site-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.site-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.site-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 240px;
}

.site-card-folder {
    font-size: 0.72rem;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

.state-pill {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}

.state-pill.is-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--text-success);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.state-pill.is-muted {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.state-pill.is-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--text-warning);
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.site-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.site-meta-row span {
    white-space: nowrap;
}

.site-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
    flex-shrink: 0;
    max-width: 220px;
}

.action-open-btn, .action-secondary-btn, .action-delete-btn {
    border: none;
    padding: 8px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.action-open-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.action-open-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

.action-secondary-btn {
    background: rgba(79, 70, 229, 0.1);
    border: 1px solid rgba(79, 70, 229, 0.2);
    color: #a5b4fc;
}

.action-secondary-btn:hover {
    background: rgba(79, 70, 229, 0.2);
}

.action-delete-btn {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--text-error);
}

.action-delete-btn:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* 发布历史项 history */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 480px;
    overflow-y: auto;
    padding-right: 4px;
}

.history-list::-webkit-scrollbar {
    width: 5px;
}
.history-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* 聚合发布历史卡片 */
.history-site-card {
    background: rgba(10, 11, 18, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: all 0.25s ease;
}

.history-site-card:hover {
    background: rgba(22, 25, 37, 0.55);
    border-color: rgba(255, 255, 255, 0.12);
}

.history-site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 12px;
}

.history-site-info {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.history-site-icon {
    font-size: 1.1rem;
}

.history-site-folder {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.5px;
}

.history-site-badge {
    font-size: 0.72rem;
    background: rgba(79, 70, 229, 0.15);
    border: 1px solid rgba(79, 70, 229, 0.25);
    color: #a5b4fc;
    padding: 3px 8px;
    border-radius: 20px;
    font-weight: 600;
    white-space: nowrap;
}

/* 时间线流水 */
.history-site-timeline {
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
    padding-left: 14px;
}

/* 虚线时间轴 */
.history-site-timeline::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 6px;
    bottom: 6px;
    width: 1.5px;
    background: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 100%);
}

.timeline-event {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* 时间轴原点 */
.timeline-event::before {
    content: '';
    position: absolute;
    left: -13.5px;
    top: 7px;
    width: 6.5px;
    height: 6.5px;
    background: rgba(255, 255, 255, 0.2);
    border: 1.5px solid var(--bg-dark);
    border-radius: 50%;
    z-index: 2;
    transition: background 0.25s;
}

.timeline-event:first-child::before {
    background: var(--primary-hover);
    box-shadow: 0 0 6px var(--primary-glow);
}

.timeline-event-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.timeline-time {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.timeline-message {
    font-size: 0.78rem;
    color: var(--text-soft);
    line-height: 1.4;
    padding-left: 2px;
}

.history-type {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}

.history-type.is-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--text-success);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.history-type.is-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--text-warning);
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.history-type.is-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--text-error);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.history-time {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.history-main {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main);
}

.history-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* 空状态 */
.empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.empty-state p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* 骨架屏 Loading */
.sites-skeleton {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.skeleton-card {
    height: 80px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.02) 25%, rgba(255, 255, 255, 0.05) 50%, rgba(255, 255, 255, 0.02) 75%);
    background-size: 200% 100%;
    animation: loading-shine 1.5s infinite;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

@keyframes loading-shine {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* 结果弹窗 successModal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(9, 10, 15, 0.85);
    backdrop-filter: blur(10px);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.success-card {
    background: rgba(26, 29, 43, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 40px 30px;
    width: 100%;
    max-width: 460px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    transform: scale(0.92);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .success-card {
    transform: scale(1);
}

.success-icon-wrapper {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-success);
    margin-bottom: 6px;
}

.success-check {
    width: 26px;
    height: 26px;
}

.success-card h2 {
    font-size: 1.3rem;
    font-weight: 600;
}

.success-card p {
    font-size: 0.88rem;
    color: var(--text-muted);
}

.url-output-box {
    display: flex;
    width: 100%;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    margin: 8px 0;
}

.url-output-box input {
    background: transparent;
    border: none;
    color: var(--text-main);
    padding: 12px;
    width: 100%;
    outline: none;
    font-size: 0.88rem;
    text-overflow: ellipsis;
    user-select: text;
}

.copy-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 0 16px;
    font-weight: 500;
    font-size: 0.82rem;
    cursor: pointer;
    transition: background 0.2s;
}

.copy-btn:hover {
    background: var(--primary-hover);
}

.modal-actions-row {
    display: flex;
    gap: 12px;
    width: 100%;
}

.modal-actions-row button {
    flex: 1;
}

.open-link-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10.5px 20px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.2);
    transition: all 0.2s;
}

.open-link-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(16, 185, 129, 0.3);
}

.close-modal-btn {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 10px 20px;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s;
}

.close-modal-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* 响应式调整 */
@media (max-width: 600px) {
    .glass-container {
        max-width: 100%;
    }
    .tab-navigation {
        display: flex;
        flex-wrap: wrap;
    }
    .tab-btn {
        flex: 1 1 30%;
    }
    .mode-selector-group {
        grid-template-columns: 1fr;
    }
    .preview-grid {
        grid-template-columns: 1fr;
    }
    .preview-item-wide {
        grid-column: span 1;
    }
    .meta-wrapper {
        position: static;
        margin-bottom: 12px;
        align-self: flex-end;
    }
    body {
        padding-top: 20px;
        flex-direction: column;
    }
}
