/* ===== 基础样式 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 现代简约设计语言 */
    --primary-color: #007AFF;
    --primary-hover: #0056b3;
    --primary-light: rgba(0, 122, 255, 0.1);
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-muted: #999999;
    --bg-main: #F8F9FA;
    --bg-white: #ffffff;
    --border-color: #e5e5e5;
    --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.12);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --transition: all 0.3s ease;
    --max-width: 1200px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ===== 筛选侧边栏 ===== */
.filter-toggle-btn {
    display: none; /* 导航栏已有筛选功能，隐藏此按钮 */
}

.filter-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.filter-overlay.active {
    opacity: 1;
    visibility: visible;
}

.filter-sidebar {
    position: fixed;
    top: 0;
    left: -320px;
    width: 320px;
    height: 100%;
    background: var(--bg-white);
    z-index: 201;
    box-shadow: var(--shadow-hover);
    display: flex;
    flex-direction: column;
    transition: left 0.3s ease;
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

.filter-sidebar.active {
    left: 0;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.filter-header h3 {
    font-size: 20px;
    font-weight: 500;
    color: var(--text-primary);
}

.filter-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 5px;
    transition: var(--transition);
}

.filter-close-btn:hover {
    color: var(--text-primary);
}

.filter-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.filter-group {
    margin-bottom: 30px;
}

.filter-group-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

/* 多选框样式 */
.filter-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.filter-checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.filter-checkbox-item label {
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    flex: 1;
}

.filter-checkbox-item:hover label {
    color: var(--primary-color);
}

/* 单选按钮样式 */
.filter-radios {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-radio-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.filter-radio-item input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.filter-radio-item label {
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    flex: 1;
}

.filter-radio-item:hover label {
    color: var(--primary-color);
}

/* 颜色选择器样式 */
.filter-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.filter-color-item {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: var(--transition);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.filter-color-item:hover {
    transform: scale(1.1);
}

.filter-color-item.active {
    border-color: var(--text-primary);
    box-shadow: 0 0 0 2px white, 0 0 0 4px var(--text-primary);
}

.filter-color-item::after {
    content: attr(data-name);
    position: absolute;
    bottom: -22px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
}

/* 筛选按钮区域 */
.filter-actions {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
}

.filter-actions .btn-reset {
    flex: 1;
    padding: 12px;
    background: var(--bg-white);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 14px;
    transition: var(--transition);
}

.filter-actions .btn-reset:hover {
    background: var(--bg-main);
    border-color: var(--text-muted);
}

.filter-actions .btn-apply {
    flex: 2;
    padding: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.filter-actions .btn-apply:hover {
    background: var(--primary-hover);
}

/* 当前筛选标签 */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.active-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--primary-light);
    border: 1px solid var(--primary-color);
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--primary-color);
}

.active-filter-tag .remove-tag {
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

.active-filter-tag .remove-tag:hover {
    color: var(--primary-hover);
}

/* ===== 顶部导航栏 ===== */
.top-nav {
    background-color: var(--bg-white);
    box-shadow: var(--shadow-light);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 24px;
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: 1px;
}

/* 导航分类下拉菜单 */
.nav-categories {
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-dropdown {
    position: relative;
}

.dropdown-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 14px;
    transition: var(--transition);
}

.dropdown-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.category-dropdown.active .dropdown-btn {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--primary-light);
}

.category-dropdown.has-selection .dropdown-btn {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    min-width: 180px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-hover);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.category-dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu .dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.dropdown-menu .dropdown-item:first-child {
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.dropdown-menu .dropdown-item:last-child {
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.dropdown-menu .dropdown-item:hover {
    background: var(--bg-main);
    color: var(--primary-color);
}

.dropdown-menu .dropdown-item.active {
    background: var(--primary-light);
    color: var(--primary-color);
}

.dropdown-menu .dropdown-item .count {
    font-size: 12px;
    color: var(--text-muted);
}

/* 色调下拉菜单特殊样式 */
.dropdown-menu.color-dropdown {
    min-width: 220px;
    padding: 12px;
}

.dropdown-menu.color-dropdown .color-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.dropdown-menu.color-dropdown .color-option {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.dropdown-menu.color-dropdown .color-option:hover {
    transform: scale(1.1);
}

.dropdown-menu.color-dropdown .color-option.active {
    border-color: var(--text-primary);
    box-shadow: 0 0 0 2px white, 0 0 0 4px var(--text-primary);
}

/* 筛选标签栏 */
.active-filters-bar {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
}

.active-filters-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.filters-label {
    font-size: 13px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.active-filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--primary-light);
    color: var(--primary-color);
    border-radius: var(--radius-sm);
    font-size: 13px;
}

.filter-tag .remove-tag {
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    opacity: 0.7;
}

.filter-tag .remove-tag:hover {
    opacity: 1;
}

.clear-filters-btn {
    padding: 6px 12px;
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.clear-filters-btn:hover {
    color: #e74c3c;
    border-color: #e74c3c;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-box {
    display: flex;
    gap: 10px;
    width: 350px;
}

.search-input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    outline: none;
    transition: var(--transition);
    background: var(--bg-main);
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
    background: var(--bg-white);
}

.search-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

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

/* 灵感板按钮 */
.inspiration-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--bg-white);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 14px;
    transition: var(--transition);
}

.inspiration-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.inspiration-btn svg {
    color: #e74c3c;
}

.favorite-count {
    background: var(--primary-color);
    color: white;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

/* ===== Banner区域 ===== */
.banner {
    background: linear-gradient(135deg, var(--bg-white) 0%, var(--bg-main) 100%);
    padding: 60px 0;
    text-align: center;
}

.banner-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.banner h2 {
    font-size: 36px;
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.banner p {
    font-size: 16px;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

/* ===== 通用区域样式 ===== */
.categories-section,
.images-section {
    max-width: var(--max-width);
    margin: 0 auto 50px;
    padding: 0 20px;
}

.section-header {
    text-align: center;
    margin: 50px 0 30px;
}

.section-header h2 {
    font-size: 28px;
    color: var(--text-primary);
    font-weight: 500;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.divider {
    width: 50px;
    height: 3px;
    background: var(--primary-color);
    margin: 0 auto;
    border-radius: 2px;
}

/* ===== 分类区域 ===== */
.categories-wrapper {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

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

.category-group-title {
    font-size: 18px;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 20px;
    padding-left: 12px;
    border-left: 3px solid var(--primary-color);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.category-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 20px 16px;
    text-align: center;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.category-name {
    font-size: 16px;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 6px;
}

.category-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    line-height: 1.4;
}

.category-count {
    display: inline-block;
    font-size: 12px;
    color: var(--primary-color);
    background: var(--primary-light);
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-weight: 500;
}

/* ===== 图片瀑布流 ===== */
.images-grid {
    column-count: auto;
    column-width: 300px;
    column-gap: 20px;
}

.image-card {
    width: 100%;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    break-inside: avoid;
    margin-bottom: 20px;
}

.image-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.image-wrapper {
    overflow: hidden;
    position: relative;
}

.image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.image-card:hover .image-wrapper img {
    transform: scale(1.05);
}

/* 图片悬停操作层 */
.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.image-card:hover .image-overlay {
    opacity: 1;
    visibility: visible;
}

.overlay-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, background 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.overlay-btn:hover {
    transform: scale(1.15);
    background: #fff;
}

.overlay-btn svg {
    width: 22px;
    height: 22px;
    stroke: var(--text-primary);
    transition: stroke 0.3s ease, fill 0.3s ease;
}

.overlay-btn.favorite-btn:hover svg {
    stroke: #e74c3c;
    fill: #e74c3c;
}

.overlay-btn.favorite-btn.active svg {
    stroke: #e74c3c;
    fill: #e74c3c;
}

.overlay-btn.preview-btn:hover svg {
    stroke: var(--primary-color);
}

.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e9f0 100%);
    color: var(--text-muted);
}

.image-placeholder svg {
    width: 48px;
    height: 48px;
    margin-bottom: 10px;
    opacity: 0.5;
}

.image-info {
    padding: 18px;
}

.image-title {
    font-size: 16px;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.image-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    font-size: 12px;
    color: var(--primary-color);
    background: var(--primary-light);
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    border: none;
}

/* ===== 分页 ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
}

.page-btn {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 14px;
    color: var(--text-primary);
    transition: var(--transition);
}

.page-btn:hover:not(.active):not(:disabled) {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--primary-light);
}

.page-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== 弹窗 ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    max-width: 1000px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 32px;
    color: var(--text-muted);
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .modal-body {
        flex-direction: row;
    }
}

.modal-image-wrapper {
    flex: 1;
    min-height: 300px;
    max-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
}

.modal-image-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.modal-info {
    padding: 30px;
    flex: 0 0 350px;
    overflow-y: auto;
}

.modal-info h2 {
    font-size: 24px;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.modal-info p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
}

.modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 25px;
}

.modal-actions {
    margin-top: 20px;
}

.btn-primary {
    width: 100%;
    padding: 14px 30px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

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

/* ===== 页脚 ===== */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 30px 0;
    text-align: center;
    margin-top: 50px;
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.footer p {
    font-size: 14px;
    color: #999;
    letter-spacing: 1px;
}

/* ===== 加载状态 ===== */
.loading-placeholder {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    font-size: 16px;
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 8px;
}

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

/* ===== 空状态 ===== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}

.empty-state svg {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-state p {
    font-size: 16px;
}

/* ===== 灵感板弹窗 ===== */
.inspiration-modal .inspiration-content {
    background: var(--bg-white);
    width: 95%;
    max-width: 1200px;
    height: 85vh;
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.inspiration-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.inspiration-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.inspiration-body {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* 集合侧边栏 */
.collections-sidebar {
    width: 240px;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    background: var(--bg-main);
}

.collections-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.collections-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.add-collection-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-white);
    color: var(--primary-color);
    border: 1px dashed var(--primary-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
}

.add-collection-btn:hover {
    background: var(--primary-light);
}

.add-collection-form {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.add-collection-form input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    outline: none;
    margin-bottom: 10px;
}

.add-collection-form input:focus {
    border-color: var(--primary-color);
}

.add-collection-form .form-actions {
    display: flex;
    gap: 8px;
}

.add-collection-form button {
    flex: 1;
    padding: 8px;
    border-radius: var(--radius-md);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}

.add-collection-form button:first-child {
    background: var(--primary-color);
    color: white;
    border: none;
}

.add-collection-form button:first-child:hover {
    background: var(--primary-hover);
}

.add-collection-form .btn-cancel {
    background: var(--bg-white);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.collections-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.collection-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 4px;
}

.collection-item:hover {
    background: var(--bg-white);
}

.collection-item.active {
    background: var(--primary-light);
    color: var(--primary-color);
}

.collection-item .collection-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.collection-item .collection-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.collection-item.active .collection-icon {
    background: var(--primary-color);
    color: white;
}

.collection-item .collection-name {
    font-size: 14px;
    font-weight: 500;
}

.collection-item .collection-count {
    font-size: 12px;
    color: var(--text-muted);
}

.collection-item .collection-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: var(--transition);
}

.collection-item:hover .collection-actions {
    opacity: 1;
}

.collection-item .collection-actions button {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.collection-item .collection-actions button:hover {
    background: var(--bg-main);
    color: var(--text-primary);
}

.collection-item .collection-actions button.delete-btn:hover {
    color: #e74c3c;
}

/* 图片展示区 */
.inspiration-images {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.inspiration-images-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
}

.inspiration-images-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.inspiration-images-header .image-count {
    font-size: 13px;
    color: var(--text-muted);
}

.inspiration-grid {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    align-content: start;
}

.inspiration-card {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    cursor: grab;
    transition: var(--transition);
}

.inspiration-card:active {
    cursor: grabbing;
}

.inspiration-card.dragging {
    opacity: 0.5;
    transform: scale(1.05);
}

.inspiration-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.inspiration-card .card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    opacity: 0;
    transition: var(--transition);
}

.inspiration-card:hover .card-overlay {
    opacity: 1;
}

.inspiration-card .card-overlay button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.inspiration-card .card-overlay button:hover {
    transform: scale(1.1);
    background: #fff;
}

.inspiration-card .card-overlay button svg {
    width: 18px;
    height: 18px;
}

.inspiration-card .card-overlay .remove-btn:hover svg {
    color: #e74c3c;
}

.inspiration-card .card-title {
    padding: 10px;
    font-size: 13px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: var(--bg-white);
}

/* 空状态 */
.empty-inspiration {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    padding: 40px;
}

.empty-inspiration svg {
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-inspiration p {
    font-size: 16px;
    margin-bottom: 8px;
}

.empty-inspiration span {
    font-size: 13px;
}

/* 拖放指示 */
.collection-item.drag-over {
    background: var(--primary-light);
    border: 2px dashed var(--primary-color);
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
    .nav-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-actions {
        width: 100%;
        flex-direction: column;
        gap: 10px;
    }

    .search-box {
        width: 100%;
    }
    
    .inspiration-btn span {
        display: none;
    }
    
    .inspiration-btn {
        padding: 10px;
    }

    .banner h2 {
        font-size: 28px;
    }

    .banner p {
        font-size: 14px;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .images-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }

    .image-wrapper {
        height: 160px;
    }

    .modal-info {
        flex: none;
        max-height: 40vh;
    }
    
    /* 灵感板移动端适配 */
    .inspiration-modal .inspiration-content {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
    
    .inspiration-body {
        flex-direction: column;
    }
    
    .collections-sidebar {
        width: 100%;
        max-height: 200px;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .collections-list {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 8px;
        padding: 8px;
    }
    
    .collection-item {
        flex-shrink: 0;
        margin-bottom: 0;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 20px;
    }
    
    .nav-categories {
        display: none;
    }
    
    .search-input {
        width: 120px;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }

    .section-header h2 {
        font-size: 22px;
    }
    
    .active-filters-content {
        flex-wrap: wrap;
    }
    
    .filters-label {
        width: 100%;
        margin-bottom: 8px;
    }
}

/* 平板端导航栏优化 */
@media (max-width: 900px) {
    .nav-content {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .nav-categories {
        order: 3;
        width: 100%;
        justify-content: center;
        padding-top: 10px;
        border-top: 1px solid var(--border-color);
    }
}
