* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2196F3;
    --secondary-color: #1976D2;
    --success-color: #4CAF50;
    --danger-color: #f44336;
    --warning-color: #ff9800;
    --bg-color: #f5f5f5;
    --card-bg: #ffffff;
    --text-color: #333333;
    --border-color: #e0e0e0;
    --sidebar-width: 30%;
    --sidebar-collapsed-width: 40px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    min-height: 100vh;
    padding: 20px;
    overflow: hidden;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    background: var(--bg-color);
    border-radius: 16px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* 主头部样式 */
.main-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 28px 36px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.15);
    flex-shrink: 0;
}

.main-header h1 {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.main-header button {
    padding: 11px 22px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 内容包装器 */
.content-wrapper {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

/* 侧边栏样式 */
.sidebar {
    width: var(--sidebar-width);
    min-width: 280px;
    max-width: 500px;
    background: linear-gradient(180deg, #1a1c23 0%, #252836 100%);
    color: white;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                min-width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                max-width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    height: 100%;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.08);
    z-index: 10;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
    min-width: var(--sidebar-collapsed-width);
    max-width: var(--sidebar-collapsed-width);
}

.sidebar-header {
    padding: 26px 24px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
}

.sidebar-header h2 {
    font-size: 18px;
    font-weight: 600;
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.3px;
}

.sidebar.collapsed .sidebar-header {
    justify-content: center;
    padding: 12px 2px;
}

.sidebar.collapsed .sidebar-header h2 {
    display: none;
}

.sidebar.collapsed .sidebar-toggle {
    width: 32px;
    height: 32px;
    font-size: 14px;
    padding: 6px;
}

.sidebar-toggle {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: rotate(90deg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sidebar-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 18px 16px;
}

/* 侧边栏搜索框 */
.sidebar-search {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-search input {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: white;
    font-size: 14px;
    transition: all 0.3s ease;
    outline: none;
}

.sidebar-search input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.sidebar-search input:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.sidebar.collapsed .sidebar-search {
    display: none;
}

.sidebar.collapsed .sidebar-content {
    padding: 10px 2px;
}

.sidebar-content::-webkit-scrollbar {
    width: 5px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* 导航项 */
.nav-item {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    border-radius: 10px;
    margin-bottom: 8px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 1px solid transparent;
    font-size: 14px;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateX(3px);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    color: white;
    border-color: rgba(102, 126, 234, 0.4);
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateX(3px);
}

.nav-item-index {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    margin-right: 14px;
    min-width: 50px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.25);
}

.nav-item-name {
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.4;
}

.sidebar.collapsed .nav-item {
    padding: 8px 2px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-bottom: 6px;
    border-radius: 6px;
}

.sidebar.collapsed .nav-item-index {
    display: block;
    width: auto;
    margin: 0;
    text-align: center;
    padding: 4px 2px;
    font-size: 9px;
    min-width: auto;
}

.sidebar.collapsed .nav-item-name {
    display: none;
}

/* 主内容区 */
.main-content {
    flex-grow: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #ffffff;
}

.admin-btn {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.admin-btn:hover {
    background: #fafafa;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* Content Styles */
.content, .admin-content {
    padding: 36px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    scrollbar-width: none; /* Firefox */
}

.content::-webkit-scrollbar,
.admin-content::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.main-content .content {
    max-width: 100%;
}

/* 公告栏样式 */
.announcement-bar {
    background: linear-gradient(135deg, #fff3e0 0%, #ffecb3 100%);
    border-bottom: 2px solid #ffb74d;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.15);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.announcement-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 32px;
    cursor: pointer;
    user-select: none;
}

.announcement-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.announcement-title {
    color: #e65100;
    font-size: 14px;
    font-weight: 700;
}

.announcement-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #e65100;
    padding: 4px 8px;
    border-radius: 4px;
    transition: transform 0.3s, background 0.2s;
}

.announcement-toggle:hover {
    background: rgba(230, 81, 0, 0.1);
}

.announcement-bar.collapsed .announcement-toggle {
    transform: rotate(180deg);
}

.announcement-body {
    max-height: 200px;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 32px 14px 52px;
}

.announcement-bar.collapsed .announcement-body {
    max-height: 0;
    padding: 0 32px 0 52px;
}

.announcement-icon {
    font-size: 20px;
    flex-shrink: 0;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.announcement-text {
    color: #e65100;
    font-size: 14px;
    line-height: 1.6;
    font-weight: 500;
}

/* 后台管理头部 */

#admin-view {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* 后台管理头部 */
#admin-view header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 28px 36px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.15);
}

#admin-view header h1 {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.back-btn {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    margin-right: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 11px 22px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.3);
}

.logout-btn {
    background: rgba(244, 67, 54, 0.9);
    color: white;
    padding: 11px 22px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.logout-btn:hover {
    background: rgba(211, 47, 47, 0.95);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
}

/* Front View - 列表布局 */
.masonry-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

@media (max-width: 768px) {
    .masonry-grid {
        gap: 20px;
    }

    /* 侧边栏响应式 */
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        z-index: 1000;
        width: var(--sidebar-collapsed-width);
        min-width: var(--sidebar-collapsed-width);
        max-width: var(--sidebar-collapsed-width);
        transform: translateX(-100%);
    }

    .sidebar.mobile-open {
        transform: translateX(0);
        width: 85%;
        min-width: 280px;
        max-width: 400px;
    }

    .main-content {
        margin-left: 0;
    }

    /* 添加移动端菜单按钮 */
    .container::before {
        content: '☰';
        position: fixed;
        top: 20px;
        left: 20px;
        z-index: 1001;
        width: 40px;
        height: 40px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        cursor: pointer;
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    }
}

@media (min-width: 769px) and (max-width: 1200px) {
    .container {
        max-width: 1400px;
    }

    :root {
        --sidebar-width: 280px;
    }
}

.script-card {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.script-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.script-card.pinned {
    border: 2px solid var(--warning-color);
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 48px;
}

.card-images {
    position: relative;
}

.card-images.single .card-image {
    display: block;
}

.card-images.placeholder .card-image {
    display: flex;
}

.card-images.multiple {
    position: relative;
}

.images-carousel {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 8px;
    background: #f5f5f5;
}

.carousel-image {
    flex: 0 0 100%;
    height: 100%;
    object-fit: contain;
    scroll-snap-align: start;
    border-radius: 8px;
    background: white;
}

.carousel-info {
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 6px 14px;
    text-align: center;
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 10;
    backdrop-filter: blur(4px);
}

.gif-image {
    object-fit: contain !important;
}

.upload-tips {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

.images-preview {
    margin-top: 12px;
    min-height: 100px;
}

.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.preview-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--border-color);
}

.preview-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.preview-item.gif-item img {
    object-fit: contain;
    background: #f5f5f5;
}

.remove-image-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 28px;
    height: 28px;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.remove-image-btn:hover {
    background: #d32f2f;
    transform: scale(1.1);
}

.gif-badge {
    position: absolute;
    bottom: 4px;
    left: 4px;
    background: var(--warning-color);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    z-index: 10;
}

.preview-placeholder {
    text-align: center;
    padding: 40px;
    color: #999;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
}

.card-content {
    padding: 0;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* 卡片布局 - 上下结构 */
.card-content {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    position: relative;
}

.card-index {
    font-size: 18px;
    font-weight: 800;
    color: white;
    background: rgba(255, 255, 255, 0.22);
    padding: 8px 16px;
    border-radius: 10px;
    display: inline-block;
    flex-shrink: 0;
    backdrop-filter: blur(12px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    letter-spacing: 0.5px;
}

.card-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

/* 置顶旗帜标志 */
.pinned-flag {
    font-size: 20px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    animation: waveFlag 2s ease-in-out infinite;
}

@keyframes waveFlag {
    0%, 100% {
        transform: rotate(-5deg);
    }
    50% {
        transform: rotate(5deg);
    }
}

.card-category {
    font-size: 11px;
    font-weight: 700;
    color: white;
    padding: 5px 12px;
    border-radius: 8px;
    display: inline-block;
    white-space: nowrap;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 卡片主要内容区域 - 上下两行 */
.card-body {
    padding: 20px;
    display: flex;
    flex-direction: row;
    gap: 20px;
    background: white;
    position: relative;
}

/* 代码和结果之间的分割虚线 */
.card-body::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 20px;
    bottom: 20px;
    width: 0;
    border-left: 2px dashed #e0e0e0;
    transform: translateX(-50%);
}

/* 左侧代码区域 */
.card-code-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

/* 右侧结果区域 */
.card-result-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
    justify-content: center;
}

/* 区域标题 */
.section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 代码区样式 */
.card-command {
    background: linear-gradient(135deg, #1e1e1e 0%, #2d2d2d 100%);
    padding: 16px;
    border-radius: 0;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    font-family: 'Courier New', 'Consolas', 'Fira Code', monospace;
    font-size: 13px;
    color: #d4d4d4;
    overflow-x: auto;
    word-break: break-all;
    line-height: 1.7;
    font-weight: 400;
    border: none;
    border-top: 1px solid #3d3d3d;
}

.code-lines {
    counter-reset: code-line;
}

.code-line {
    display: flex;
    min-height: 1.7em;
}

.code-line .line-num {
    counter-increment: code-line;
    display: inline-block;
    width: 36px;
    min-width: 36px;
    text-align: right;
    padding-right: 16px;
    color: #6a6a6a;
    user-select: none;
    flex-shrink: 0;
}

.code-line .line-num::before {
    content: counter(code-line);
}

.code-line .line-code {
    flex: 1;
    white-space: pre;
    min-width: 0;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-color);
    line-height: 1.4;
    letter-spacing: -0.3px;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 100%);
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.1);
}

.card-command-wrapper {
    margin-bottom: 0;
    background: linear-gradient(135deg, #1e1e1e 0%, #2d2d2d 100%);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #3d3d3d;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.card-command-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, #252525 0%, #353535 100%);
    border-bottom: 1px solid #3d3d3d;
}

.copy-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

.copy-btn:hover {
    background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

.copy-btn:active {
    transform: translateY(0);
}

.copy-btn.copy-success {
    background: linear-gradient(135deg, #4CAF50 0%, #388E3C 100%);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.copy-btn.copy-error {
    background: linear-gradient(135deg, #f44336 0%, #D32F2F 100%);
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3);
}

/* 结果展示区样式 */
.result-display {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 16px;
    min-height: 120px;
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    align-items: center;
    justify-content: center;
}

.result-display .result-images {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.result-display .result-image {
    width: 100%;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    background: white;
    object-fit: contain;
    max-height: 300px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.result-display .result-image:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: scale(1.01);
}

/* 功能描述 */
.card-description {
    color: #555;
    font-size: 14px;
    line-height: 1.8;
    padding: 14px 16px;
    margin-top: 12px;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
    word-break: break-word;
}

.result-display .result-text {
    color: #333;
    font-size: 14px;
    line-height: 1.8;
    padding: 14px 16px;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
    border-radius: 8px;
    border-left: 3px solid var(--success-color);
    word-break: break-word;
    white-space: pre-wrap;
}

.result-placeholder {
    color: #adb5bd;
    font-size: 14px;
    text-align: center;
    padding: 40px 20px;
    font-style: italic;
}

/* 响应式布局 */
@media (max-width: 768px) {
    .main-header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
        padding: 20px;
    }

    .main-header h1 {
        font-size: 22px;
    }

    .card-body {
        flex-direction: column;
        gap: 16px;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 12px 16px;
    }

    .card-categories {
        justify-content: flex-start;
    }

    .card-index {
        font-size: 16px;
        padding: 6px 12px;
    }

    .card-title {
        font-size: 16px;
    }

    .result-display {
        max-height: 300px;
    }

    .card-command {
        font-size: 12px;
    }
}

/* Admin Table Styles */
.admin-actions {
    margin-bottom: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.scripts-table {
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--primary-color);
    color: white;
}

th, td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    font-weight: 600;
    font-size: 14px;
}

.table-index {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}

.category-badge {
    display: inline-block;
    color: white;
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    margin-right: 4px;
    margin-bottom: 4px;
}

.table-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

td {
    font-size: 14px;
}

tr:hover {
    background: #f5f5f5;
}

.command-cell {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.published {
    background: #e8f5e9;
    color: var(--success-color);
}

.status-badge.unpublished {
    background: #ffebee;
    color: var(--danger-color);
}

.pinned-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: #fff3e0;
    color: var(--warning-color);
}

.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-action {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-edit {
    background: var(--primary-color);
    color: white;
}

.btn-edit:hover {
    background: var(--secondary-color);
}

.btn-delete {
    background: var(--danger-color);
    color: white;
}

.btn-delete:hover {
    background: #d32f2f;
}

.btn-toggle {
    background: var(--warning-color);
    color: white;
}

.btn-toggle:hover {
    background: #f57c00;
}

.btn-pin {
    background: #9C27B0;
    color: white;
}

.btn-pin:hover {
    background: #7B1FA2;
}

/* Modal Styles */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 32px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

.modal-content.large {
    max-width: 800px;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
}

.close:hover {
    color: #333;
}

/* 高亮动画 */
@keyframes highlight {
    0% {
        box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.3);
        border-color: #667eea;
        transform: scale(1.02);
    }
    50% {
        box-shadow: 0 0 30px 4px rgba(102, 126, 234, 0.25);
        border-color: #764ba2;
        transform: scale(1.02);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0);
        border-color: transparent;
        transform: scale(1);
    }
}

/* 侧边栏空状态 */
.sidebar-empty {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.6);
}

.sidebar-empty .empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.sidebar-empty p {
    font-size: 14px;
    margin: 0;
}

/* 侧边栏分页控件 */
.sidebar-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 12px;
    margin-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.pagination-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-icon-btn {
    padding: 8px;
    min-width: 36px;
    height: 36px;
}

.pagination-icon {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

.pagination-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.08);
}

.pagination-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.pagination-btn:disabled:hover:not(.pagination-icon-btn) {
    transform: none;
}

.pagination-info {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    font-weight: 600;
    padding: 0 8px;
    min-width: 60px;
    text-align: center;
}

.sidebar.collapsed .sidebar-pagination {
    flex-direction: column;
    gap: 4px;
    padding: 8px 2px;
}

.sidebar.collapsed .pagination-icon-btn {
    min-width: 28px;
    height: 28px;
}

.sidebar.collapsed .pagination-icon {
    width: 14px;
    height: 14px;
}

.sidebar.collapsed .pagination-info {
    display: none;
}

.sidebar.collapsed .pagination-icon {
    width: 18px;
    height: 18px;
}

.modal-content h2 {
    margin-bottom: 24px;
    color: var(--text-color);
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    font-family: 'Courier New', monospace;
}

.form-group input[type="file"] {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
}

.form-group.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.image-preview {
    margin-top: 12px;
    min-height: 150px;
    border: 2px dashed var(--border-color);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9f9f9;
}

.image-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 4px;
}

.btn-primary {
    padding: 14px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    display: inline-block;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd6 0%, #6a4194 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-export, .btn-import {
    padding: 14px 24px;
    background: linear-gradient(135deg, #4CAF50 0%, #388E3C 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
    display: inline-block;
}

.btn-export:hover, .btn-import:hover {
    background: linear-gradient(135deg, #388E3C 0%, #2E7D32 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.btn-import {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

.btn-import:hover {
    background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

.btn-announcement {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
    display: inline-block;
    padding: 14px 24px;
}

.btn-announcement:hover {
    background: linear-gradient(135deg, #f57c00 0%, #ef6c00 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.4);
}

.btn-storage {
    padding: 14px 24px;
    background: linear-gradient(135deg, #607D8B 0%, #455A64 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(96, 125, 139, 0.3);
    display: inline-block;
}

.btn-storage:hover {
    background: linear-gradient(135deg, #455A64 0%, #37474F 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(96, 125, 139, 0.4);
}

/* 存储状态徽章 */
.storage-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.storage-file { background: #e8f5e9; color: #2e7d32; }
.storage-indexeddb { background: #e3f2fd; color: #1565c0; }
.storage-local { background: #fff3e0; color: #e65100; }

/* 存储设置弹窗 */
.storage-desc {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.storage-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.storage-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
}

.storage-option:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.04);
    transform: translateX(4px);
}

.storage-option-icon {
    font-size: 32px;
    flex-shrink: 0;
    width: 48px;
    text-align: center;
}

.storage-option-info h3 {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.storage-option-info p {
    font-size: 13px;
    color: #888;
    line-height: 1.4;
}

.storage-option-badge {
    position: absolute;
    top: -8px;
    right: 12px;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
}

.storage-option-badge.recommended {
    background: linear-gradient(135deg, #4CAF50, #388E3C);
    color: white;
}

.storage-option-badge.legacy {
    background: #e0e0e0;
    color: #666;
}

.storage-current {
    padding: 12px 16px;
    background: #f5f5f5;
    border-radius: 8px;
    font-size: 14px;
    color: #555;
    text-align: center;
}

.storage-current strong {
    color: #667eea;
}

/* 远程数据源 */
.section-divider {
    display: flex;
    align-items: center;
    margin: 24px 0 16px;
    font-size: 15px;
    font-weight: 700;
    color: #444;
}

.section-divider::before,
.section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}

.section-divider span {
    padding: 0 12px;
    white-space: nowrap;
}

.remote-desc {
    color: #888;
    font-size: 13px;
    margin-bottom: 12px;
    line-height: 1.5;
}

.remote-input-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.remote-input-group input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
    min-width: 0;
}

.remote-input-group input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.btn-save-remote {
    padding: 8px 16px;
    background: linear-gradient(135deg, #4CAF50, #388E3C);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.btn-save-remote:hover { opacity: 0.85; }

.btn-load-remote {
    padding: 8px 16px;
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.btn-load-remote:hover { opacity: 0.85; }

.btn-clear-remote {
    padding: 8px 16px;
    background: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.btn-clear-remote:hover { background: #eee; }

.remote-status {
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
}

.remote-status.success {
    background: #e8f5e9;
    color: #2e7d32;
}

.remote-status.error {
    background: #fbe9e7;
    color: #c62828;
}

.remote-status.loading {
    background: #e3f2fd;
    color: #1565c0;
}

.text-muted {
    color: #999;
    font-size: 12px;
    font-weight: 400;
}

/* 星级评分样式 */
.star-rating-input {
    display: flex;
    gap: 8px;
}

.star-rating-input .star-option {
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    line-height: 1;
    opacity: 0.35;
    filter: grayscale(100%);
}

.star-rating-input .star-option:hover {
    opacity: 0.7;
    filter: grayscale(0%);
    transform: scale(1.2) rotate(-5deg);
}

.star-rating-input .star-option.active {
    opacity: 1;
    filter: grayscale(0%) drop-shadow(0 2px 6px rgba(255, 215, 0, 0.5));
    transform: scale(1.1);
}

.star-rating-input .star-option.active:hover {
    transform: scale(1.25) rotate(-5deg);
}

.star-icon {
    width: 32px;
    height: 32px;
}

/* 前台卡片推荐指数 */
.card-metrics {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 14px 16px;
    border-top: 1px dashed var(--border-color);
    margin-top: 12px;
    flex-wrap: wrap;
}

.card-rating,
.card-risk {
    display: flex;
    align-items: center;
    gap: 8px;
}

.metric-label {
    font-size: 13px;
    color: #999;
    font-weight: 500;
}

.rating-stars {
    display: flex;
    gap: 3px;
}

.star-display {
    line-height: 1;
    display: inline-block;
    transition: transform 0.3s ease;
}

.star-display.filled {
    filter: drop-shadow(0 1px 4px rgba(255, 215, 0, 0.4));
    animation: starPop 0.4s ease forwards;
}

.star-display.empty {
    opacity: 0.35;
}

@keyframes starPop {
    0% { transform: scale(0); opacity: 0; }
    60% { transform: scale(1.3); }
    100% { transform: scale(1); opacity: 1; }
}

.star-display.filled .star-icon {
    width: 20px;
    height: 20px;
}

.star-display.empty .star-icon {
    width: 20px;
    height: 20px;
}

/* 管理表格星级 */
.table-stars {
    display: flex;
    gap: 2px;
    justify-content: center;
}

.table-stars .star-icon {
    width: 16px;
    height: 16px;
}

/* 风险指数样式 */
.risk-level-input {
    display: flex;
    align-items: center;
    gap: 6px;
}

.risk-level-input .risk-option {
    font-size: 22px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    line-height: 1;
    opacity: 0.25;
    filter: grayscale(80%);
}

.risk-level-input .risk-option:hover {
    opacity: 0.6;
    filter: grayscale(0%);
    transform: scale(1.2);
}

.risk-level-input .risk-option.active {
    opacity: 1;
    filter: grayscale(0%) drop-shadow(0 1px 4px rgba(244, 67, 54, 0.4));
    transform: scale(1.1);
}

.risk-level-input .risk-option.active:hover {
    transform: scale(1.25);
}

.risk-label {
    font-size: 13px;
    font-weight: 600;
    margin-left: 8px;
    padding: 3px 10px;
    border-radius: 12px;
    color: #999;
    background: #f5f5f5;
    transition: all 0.3s ease;
}

.risk-label-1 { color: #4CAF50; background: #e8f5e9; }
.risk-label-2 { color: #8BC34A; background: #f1f8e9; }
.risk-label-3 { color: #FF9800; background: #fff3e0; }
.risk-label-4 { color: #FF5722; background: #fbe9e7; }
.risk-label-5 { color: #f44336; background: #ffebee; animation: riskPulse 1.5s infinite; }

@keyframes riskPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* 前台卡片风险显示 */
.risk-display {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 15px;
}

.risk-bolt {
    display: inline-block;
    animation: boltFlash 0.4s ease forwards;
}

.risk-bolt:nth-child(1) { animation-delay: 0s; }
.risk-bolt:nth-child(2) { animation-delay: 0.08s; }
.risk-bolt:nth-child(3) { animation-delay: 0.16s; }
.risk-bolt:nth-child(4) { animation-delay: 0.24s; }
.risk-bolt:nth-child(5) { animation-delay: 0.32s; }

@keyframes boltFlash {
    0% { transform: scale(0) rotate(-15deg); opacity: 0; }
    60% { transform: scale(1.3) rotate(5deg); }
    100% { transform: scale(1) rotate(0); opacity: 1; }
}

.risk-text {
    font-size: 12px;
    font-weight: 700;
    margin-left: 4px;
    letter-spacing: 0.5px;
}

.risk-display-none {
    color: #ccc;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
        padding: 24px 20px;
    }

    .masonry-grid {
        column-count: 1;
    }

    .content, .admin-content {
        padding: 24px 20px;
    }

    .modal-content {
        padding: 24px;
        margin: 10px;
    }

    table {
        font-size: 12px;
    }

    th, td {
        padding: 8px;
    }

    .command-cell {
        max-width: 150px;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 16px 20px;
    }

    .card-categories {
        justify-content: flex-start;
    }

    .card-index {
        font-size: 16px;
        padding: 7px 14px;
    }

    .card-body {
        padding: 24px 20px;
    }

    .action-buttons {
        flex-direction: column;
    }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state .icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 24px;
    margin-bottom: 8px;
    color: #666;
}

.empty-state p {
    font-size: 14px;
}

/* 图片放大查看器 */
.image-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.viewer-content {
    position: relative;
    width: 90%;
    height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.viewer-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.viewer-close:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: rotate(90deg);
}

.viewer-prev,
.viewer-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.viewer-prev {
    left: 20px;
}

.viewer-next {
    right: 20px;
}

.viewer-prev:hover,
.viewer-next:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.1);
}

.viewer-image-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
}

.viewer-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    cursor: grab;
}

.viewer-image-container img:active {
    cursor: grabbing;
}

.viewer-info {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 24px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10;
}

/* 隐藏单张图片时的导航按钮 */
.image-viewer.single .viewer-prev,
.image-viewer.single .viewer-next {
    display: none;
}

/* 点击图片的视觉反馈 */
.card-images img,
.carousel-image {
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-images img:hover,
.carousel-image:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 版本历史按钮 */
.btn-version-history {
    background: linear-gradient(135deg, #00BCD4, #0097A7) !important;
    color: white !important;
}

.btn-version-history:hover {
    background: linear-gradient(135deg, #0097A7, #00838F) !important;
}

/* 版本历史弹窗 */
.version-modal-content {
    max-width: 700px !important;
}

.version-desc {
    color: #888;
    font-size: 13px;
    margin-bottom: 16px;
    line-height: 1.5;
}

.version-list {
    max-height: 500px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.version-empty {
    text-align: center;
    padding: 40px 20px;
    color: #bbb;
    font-size: 14px;
    border: 2px dashed #e0e0e0;
    border-radius: 8px;
}

.version-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 14px 16px;
    transition: all 0.2s ease;
}

.version-item:hover {
    border-color: #00BCD4;
    background: #f0f9fa;
    box-shadow: 0 2px 8px rgba(0, 188, 212, 0.1);
}

.version-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.version-time {
    font-size: 12px;
    color: #888;
    font-family: 'Courier New', monospace;
}

.version-label {
    font-size: 11px;
    font-weight: 700;
    color: #00BCD4;
    background: rgba(0, 188, 212, 0.1);
    padding: 2px 10px;
    border-radius: 10px;
}

.version-preview {
    margin-bottom: 10px;
}

.version-name {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.version-cmd {
    display: block;
    font-size: 12px;
    color: #888;
    font-family: 'Courier New', monospace;
    background: white;
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.version-actions {
    display: flex;
    gap: 8px;
}

.btn-version {
    padding: 5px 12px;
    border: none;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-version-view {
    background: #e3f2fd;
    color: #1565c0;
}

.btn-version-view:hover {
    background: #bbdefb;
}

.btn-version-restore {
    background: #e8f5e9;
    color: #2e7d32;
}

.btn-version-restore:hover {
    background: #c8e6c9;
}

.btn-version-delete {
    background: #ffebee;
    color: #c62828;
}

.btn-version-delete:hover {
    background: #ffcdd2;
}

/* 版本详情弹窗 */
.version-detail-content {
    max-width: 650px !important;
}

.version-detail {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.version-detail-row {
    font-size: 14px;
    line-height: 1.6;
    color: #444;
}

.version-detail-row strong {
    color: #333;
    margin-right: 4px;
}

.version-detail-row.version-detail-time {
    color: #888;
    font-size: 13px;
    padding-top: 8px;
    border-top: 1px solid #e9ecef;
}

.version-code {
    background: linear-gradient(135deg, #1e1e1e 0%, #2d2d2d 100%);
    color: #d4d4d4;
    padding: 14px;
    border-radius: 8px;
    font-family: 'Courier New', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.6;
    overflow-x: auto;
    margin: 4px 0;
    border: 1px solid #3d3d3d;
}

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 20px;
    line-height: 44px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    transform: translateY(10px);
    z-index: 900;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary-dark);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.back-to-top:active {
    transform: translateY(0);
}

/* Header按钮组样式 */
header div {
    display: flex;
    gap: 8px;
}

