.gallery-modal {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    overflow: auto;
    backdrop-filter: blur(3px);
}
.gallery-modal-content {
    position: relative;
    width: 90%;
    max-width: 1100px;
    margin: auto;
    top: 50%;
    transform: translateY(-50%);
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 60px);
    animation: galleryModalFadeIn 0.3s ease;
}
@keyframes galleryModalFadeIn {
    from { opacity: 0; transform: translateY(calc(-50% - 20px)); }
    to { opacity: 1; transform: translateY(-50%); }
}
.gallery-modal-header {
    display: flex;
    flex-direction: column;
    padding: 18px 24px 12px;
    border-bottom: 1px solid #eaeaea;
    background-color: #ffffff;
    position: relative;
}
.gallery-modal-header h3 {
    margin: 0 0 16px 0;
    font-size: 1.25rem;
    color: #1a1a1a;
    font-weight: 600;
    text-align: center;
}
.gallery-select-tab-bar {
    display: flex;
    background: #f5f7fa;
    border-radius: 10px;
    padding: 4px;
    gap: 8px;
    margin: 0 auto;
    width: 80%;
    max-width: 320px;
    justify-content: center;
}
.gallery-select-tab-btn {
    background: none;
    border: none;
    padding: 10px 28px;
    border-radius: 8px;
    font-size: 1rem;
    color: #5f6368;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.18s;
    box-shadow: none;
    position: relative;
    flex: 1;
    text-align: center;
}
.gallery-select-tab-btn.active {
    background: linear-gradient(90deg, #4285f4 0%, #1a73e8 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(66,133,244,0.10);
    font-weight: 600;
    z-index: 1;
}
.gallery-select-tab-btn:not(.active):hover {
    background: #e8f0fe;
    color: #1a73e8;
    box-shadow: 0 2px 8px rgba(66,133,244,0.06);
}
.gallery-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #606060;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    position: absolute;
    right: 16px;
    top: 16px;
}
.gallery-modal-close:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: #1a1a1a;
}
.gallery-modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
    background-color: #f9fafc;
}
.gallery-breadcrumb {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    padding: 12px 16px;
    background-color: #ffffff;
    border-radius: 12px;
    font-size: 0.95rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid #e8eaed;
}
.gallery-breadcrumb-item {
    display: flex;
    align-items: center;
}
.gallery-breadcrumb-item:not(:last-child)::after {
    content: "/";
    margin: 0 10px;
    color: #c0c0c0;
}
.gallery-breadcrumb-item a {
    color: #5f6368;
    text-decoration: none;
    transition: color 0.2s;
}
.gallery-breadcrumb-item a:hover {
    color: #1a73e8;
    text-decoration: underline;
}
.gallery-breadcrumb-item.active {
    color: #1a73e8;
    font-weight: 500;
}
.gallery-folders {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.gallery-folder {
    height: 120px;
    border-radius: 16px;
    border: 1px solid #e8eaed;
    background: linear-gradient(145deg, #ffffff, #f8faff);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
    padding: 12px 8px;
}
.gallery-folder:hover {
    box-shadow: 0 4px 16px rgba(66, 133, 244, 0.15);
    border-color: #4285f4;
    background: linear-gradient(145deg, #f8faff, #edf4ff);
}
.gallery-folder:active {
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.08);
}
.gallery-folder-icon {
    font-size: 2.4rem;
    color: #4285f4;
    margin-bottom: 6px;
    filter: drop-shadow(0 2px 6px rgba(66, 133, 244, 0.2));
    flex-shrink: 0;
}
.gallery-folder:hover .gallery-folder-icon {
    color: #1a73e8;
}
.gallery-folder-name {
    font-size: 0.95rem;
    color: #202124;
    text-align: center;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    padding: 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    white-space: normal;
    line-height: 1.2;
    min-height: 2.4em;
}
.gallery-folder-count {
    font-size: 0.85rem;
    color: #5f6368;
    margin-top: 4px;
    margin-bottom: 6px;
    background-color: #f1f3f4;
    padding: 2px 8px;
    border-radius: 10px;
    position: relative;
    z-index: 1;
}
.gallery-folder:hover .gallery-folder-count {
    background-color: #e8f0fe;
    color: #1a73e8;
}
.gallery-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
}
.gallery-image-item {
    height: 160px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.25s ease;
    background-color: #f5f5f5;
}
.gallery-image-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}
.gallery-image-item:active {
    transform: translateY(-2px);
}
.gallery-image {
    width: 100%;
    height: 130px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}
.gallery-image-item:hover .gallery-image {
    transform: scale(1.05);
}
.gallery-image-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 12px;
    font-size: 0.85rem;
    color: #202124;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}
.gallery-empty {
    text-align: center;
    padding: 60px 0;
    color: #5f6368;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.gallery-empty-icon {
    font-size: 3.5rem;
    margin-bottom: 16px;
    color: #dadce0;
}
.gallery-pagination-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 30px;
}
.gallery-pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}
.gallery-pagination-btn:hover {
    background-color: #f5f7fa;
    border-color: #c0c0c0;
}
.gallery-pagination-btn.active {
    background-color: #1a73e8;
    border-color: #1a73e8;
    color: #fff;
}
.gallery-pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.gallery-pagination-ellipsis {
    color: #5f6368;
    font-size: 1.2rem;
    margin: 0 4px;
}
.gallery-pagination-info {
    margin-left: 16px;
    color: #5f6368;
    font-size: 0.9rem;
    white-space: nowrap;
}
.gallery-action-bar {
    display: flex;
    justify-content: flex-end;
    padding: 20px 24px;
    background-color: #ffffff;
    border-top: 1px solid #eaeaea;
    gap: 16px;
}
.gallery-action-btn {
    display: flex;
    align-items: center;
    padding: 0;
    background: #ffffff;
    border: 1px solid #dadce0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    width: 280px;
    height: 64px;
}
.gallery-action-btn:hover {
    border-color: #1a73e8;
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.15);
    transform: translateY(-2px);
}
.gallery-action-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.gallery-action-btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #f8f9fa;
}
.gallery-action-btn.disabled:hover {
    transform: none;
    border-color: #dadce0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}
.gallery-action-btn .btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #4285f4 0%, #1a73e8 100%);
    color: #ffffff;
}
.gallery-action-btn .btn-content {
    flex: 1;
    padding: 0 16px;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.gallery-action-btn .btn-title {
    font-weight: 600;
    color: #202124;
    font-size: 1rem;
    margin-bottom: 4px;
}
.gallery-action-btn .btn-subtitle {
    color: #5f6368;
    font-size: 0.85rem;
}
.gallery-back-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background-color: #ffffff;
    border: 1px solid #dadce0;
    border-radius: 8px;
    color: #1a73e8;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}
.gallery-back-btn:hover {
    background-color: #f5f7fa;
    border-color: #1a73e8;
    box-shadow: 0 4px 8px rgba(26, 115, 232, 0.15);
}
.gallery-back-btn i {
    margin-right: 8px;
}
.gallery-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
    color: #5f6368;
    font-size: 1rem;
    gap: 16px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    margin: 20px 0;
}
.gallery-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(66, 133, 244, 0.2);
    border-top-color: #4285f4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 10px rgba(66, 133, 244, 0.1);
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.gallery-preview {
    margin-top: 20px;
    padding: 20px;
    background-color: #f9fafc;
    border-radius: 12px;
    border: 1px solid #e8eaed;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.gallery-preview-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: #202124;
    display: flex;
    align-items: center;
    gap: 8px;
}
.gallery-preview-title svg {
    color: #1a73e8;
}
.gallery-preview-images {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}
.gallery-preview-image-container {
    position: relative;
    width: 90px;
    height: 90px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e8eaed;
}
.gallery-preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}
.gallery-preview-image-container:hover .gallery-preview-image {
    transform: scale(1.05);
}
.gallery-preview-image-more {
    width: 90px;
    height: 90px;
    border-radius: 8px;
    background-color: #f1f3f4;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: #5f6368;
    border: 1px solid #e8eaed;
}
.gallery-preview-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background-color: #e8f0fe;
    color: #1a73e8;
    border-radius: 8px;
    font-size: 0.95rem;
    margin-top: 16px;
    font-weight: 500;
}
@media (max-width: 768px) {
    .gallery-modal-content {
        width: 95%;
        margin: 20px auto;
    }
    .gallery-modal-header {
        padding: 16px 20px;
    }
    .gallery-modal-body {
        padding: 16px;
    }
    .gallery-folders {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 12px;
    }
    .gallery-images {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 16px;
    }
    .gallery-folder {
        height: 110px;
    }
    .gallery-folder-icon {
        font-size: 2.2rem;
    }
    .gallery-image-item {
        height: 140px;
    }
    .gallery-image {
        height: 110px;
    }
    .gallery-action-btn {
        height: 56px;
        width: 240px;
    }
    .gallery-action-btn .btn-icon {
        width: 56px;
        height: 56px;
    }
    .gallery-action-btn .btn-title {
        font-size: 0.95rem;
    }
    .gallery-action-btn .btn-subtitle {
        font-size: 0.8rem;
    }
}
@media (max-width: 600px) {
    .gallery-modal {
        background: transparent !important;
        padding: 0;
        display: flex;
        align-items: center !important;
        justify-content: center !important;
        min-height: 100vh;
        min-width: 100vw;
        box-sizing: border-box;
    }
    .gallery-modal-content {
        width: min(96vw, 420px);
        max-width: 96vw;
        min-width: 0;
        margin: 0 auto;
        top: 50%;
        transform: translateY(-50%);
        border-radius: 18px;
        min-height: min(90vh, 480px);
        max-height: 90vh;
        box-shadow: 0 8px 32px rgba(0,0,0,0.18);
        padding: 0;
        background: #fff;
        display: flex;
        flex-direction: column;
        position: relative;
        justify-content: flex-start;
    }
    .gallery-action-btn {
        height: 42px;
        font-size: 0.95rem;
        border-radius: 8px;
        width: auto;
        padding: 0 16px;
    }
    .gallery-action-btn .btn-icon {
        width: 32px;
        height: 42px;
    }
    .gallery-action-btn .btn-title {
        font-size: 0.95rem;
    }
    .gallery-action-btn .btn-subtitle {
        display: none;
    }
    .gallery-image-item {
        height: 100px;
        border-radius: 8px;
        position: relative;
        overflow: hidden;
        touch-action: manipulation;
    }
    .gallery-image {
        height: 80px;
        border-radius: 8px 8px 0 0;
        pointer-events: none;
    }
    .gallery-image-overlay {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 30px;
        background: rgba(0, 0, 0, 0.4);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 2;
        opacity: 1;
    }
    .gallery-image-select-btn {
        padding: 4px 8px;
        font-size: 0.8rem;
        border-radius: 6px;
        width: 70%;
        max-width: 80px;
        position: relative;
        transform: none;
        left: auto;
        top: auto;
        margin: 0 auto;
    }
    .gallery-modal-header {
        padding: 16px 16px 12px;
        border-radius: 18px 18px 0 0;
        background: #fff;
        position: sticky;
        top: 0;
        z-index: 10;
        min-height: 48px;
    }
    .gallery-modal-header h3 {
        font-size: 1.1rem;
        margin: 0 0 14px 0;
        text-align: center;
        padding-right: 24px;
    }
    .gallery-modal-close {
        position: absolute;
        right: 12px;
        top: 12px;
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.2rem;
        z-index: 20;
        background: rgba(0,0,0,0.05);
        border: none;
        color: #555;
        border-radius: 50%;
        transition: all 0.18s;
    }
    .gallery-modal-close:active {
        background: rgba(0,0,0,0.1);
        transform: scale(0.95);
    }
    .gallery-select-tab-bar {
        gap: 4px;
        padding: 3px;
        border-radius: 10px;
        margin: 0 auto;
        width: 90%;
        max-width: 280px;
    }
    .gallery-select-tab-btn {
        font-size: 0.92rem;
        padding: 8px 0;
        border-radius: 8px;
        flex: 1;
        text-align: center;
    }
    .gallery-modal-body {
        padding: 10px 8px 18px 8px;
        overflow-y: auto;
        flex: 1;
        background: #fff;
    }
    .gallery-breadcrumb {
        font-size: 0.9rem;
        padding: 5px 4px;
        margin-bottom: 8px;
    }
    .gallery-folder {
        height: 90px;
        padding: 10px 6px;
        border-radius: 12px;
        background: linear-gradient(145deg, #ffffff, #f5f8ff);
        justify-content: flex-start;
    }
    .gallery-folder-icon {
        margin-bottom: 3px;
    }
    .gallery-folder-icon svg {
        width: 28px;
        height: 28px;
    }
    .gallery-folder-name {
        font-size: 0.85rem;
        margin-bottom: 2px;
        max-width: 100%;
        padding: 0 2px;
        line-height: 1.2;
        height: auto;
        min-height: 2.4em;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        word-break: break-word;
    }
    .gallery-folder-count {
        font-size: 0.75rem;
        background-color: #f1f3f4;
        padding: 1px 6px;
        border-radius: 8px;
        margin-top: 2px;
        margin-bottom: 0;
        white-space: nowrap;
    }
    .gallery-images {
        gap: 8px;
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    .gallery-image-item {
        height: 100px;
        border-radius: 8px;
    }
    .gallery-image {
        height: 80px;
        border-radius: 8px 8px 0 0;
    }
    .gallery-image-info {
        font-size: 0.7rem;
        padding: 2px 4px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }
    .gallery-action-bar {
        padding: 10px 8px 16px 8px;
        gap: 8px;
        background: #fff;
        border-radius: 0 0 18px 18px;
        box-shadow: 0 -2px 8px rgba(0,0,0,0.04);
    }
    .gallery-action-btn {
        height: 48px;
        font-size: 1.05rem;
        border-radius: 10px;
    }
    .gallery-action-btn .btn-icon {
        width: 40px;
        height: 48px;
    }
    .gallery-action-btn .btn-title {
        font-size: 1.05rem;
    }
    .gallery-action-btn .btn-subtitle {
        font-size: 0.92rem;
    }
    .gallery-image-single-select-btn {
        width: 26px;
        height: 26px;
        font-size: 0.95rem;
        right: 2px;
        bottom: 2px;
    }
    .gallery-preview-image-container, .gallery-preview-image-more {
        width: 36px;
        height: 36px;
        border-radius: 5px;
    }
    .gallery-preview-count {
        font-size: 0.8rem;
        padding: 3px 6px;
        border-radius: 5px;
        margin-top: 6px;
    }
    .gallery-section-title {
        font-size: 0.95rem;
        margin: 8px 0 4px;
        padding-bottom: 2px;
    }
    .gallery-pagination-container {
        gap: 2px;
        margin-top: 6px;
    }
    .gallery-pagination-btn {
        min-width: 22px;
        height: 22px;
        font-size: 0.75rem;
        border-radius: 5px;
        padding: 0 4px;
    }
    .gallery-pagination-info {
        margin-left: 4px;
        font-size: 0.75rem;
    }
    .gallery-loading {
        padding: 20px;
        font-size: 0.9rem;
        gap: 8px;
        width: 160px;
        height: 160px;
        max-width: 160px;
        margin: 30px auto;
        border-radius: 16px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    }
    
    .gallery-spinner {
        width: 36px;
        height: 36px;
        border-width: 3px;
        margin-bottom: 4px;
    }
    
    .gallery-loading-more {
        padding: 15px;
        font-size: 0.85rem;
        gap: 8px;
        width: 140px;
        height: 140px;
        max-width: 140px;
        margin: 20px auto;
        border-radius: 16px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    
    .gallery-loading-more .gallery-spinner {
        width: 32px;
        height: 32px;
        border-width: 2px;
    }
    
    .gallery-loading-text {
        font-size: 0.9rem;
        text-align: center;
        margin: 0;
    }
    
    .gallery-loading-subtext {
        font-size: 0.8rem;
        max-width: 100%;
        line-height: 1.3;
        text-align: center;
        margin: 0;
    }
    
    .gallery-empty {
        padding: 25px 15px;
        width: 160px;
        height: 160px;
        max-width: 160px;
        margin: 30px auto;
        border-radius: 16px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    
    .gallery-empty-text {
        font-size: 0.95rem;
        text-align: center;
    }
    
    .gallery-empty-subtext {
        font-size: 0.8rem;
        text-align: center;
    }
    
    .gallery-load-more-btn {
        width: 140px;
        max-width: 140px;
        padding: 10px;
        border-radius: 20px;
    }
}

/* 添加新的CSS样式，支持图片悬停效果和选择按钮 */

.gallery-section-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: #5f6368;
    margin: 24px 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e8eaed;
    display: flex;
    align-items: center;
}

.gallery-section-title svg {
    margin-right: 8px;
    color: #1a73e8;
}

.gallery-image-wrapper {
    position: relative;
    height: 130px;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

.gallery-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
    padding: 0 10px;
}

.gallery-image-item:hover .gallery-image-overlay {
    opacity: 1;
}

.gallery-image-select-btn {
    background: #1a73e8;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    width: 80%;
    max-width: 120px;
    text-align: center;
    margin: 0 auto;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.gallery-image-select-btn:hover {
    background: #0d62c9;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

@media (max-width: 600px) {
    .gallery-image-select-btn {
        padding: 4px 8px;
        font-size: 0.8rem;
        border-radius: 6px;
        width: 70%;
        max-width: 80px;
    }
}

.gallery-empty-text {
    font-size: 1.1rem;
    font-weight: 500;
    color: #5f6368;
    margin-bottom: 8px;
}

.gallery-empty-subtext {
    font-size: 0.9rem;
    color: #80868b;
}

/* 修改面包屑导航样式，支持图标 */
.gallery-breadcrumb-item a,
.gallery-breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.gallery-breadcrumb-item svg {
    color: #5f6368;
    flex-shrink: 0;
}

.gallery-breadcrumb-item.active svg {
    color: #1a73e8;
}

/* 修改文件夹图标样式 */
.gallery-folder-icon svg {
    color: #ffc107;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.gallery-action-btn.loading .btn-icon {
    position: relative;
}

.gallery-action-btn.loading .btn-icon svg {
    opacity: 0;
}

.gallery-action-btn.loading .btn-icon:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin-top: -12px;
    margin-left: -12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.gallery-action-btn.secondary-action {
    background-color: #f8f9fa;
    border-color: #dadce0;
    width: auto;
    padding: 0 24px;
}

.gallery-action-btn.secondary-action:hover {
    background-color: #f1f3f5;
    border-color: #c0c0c0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.gallery-action-btn.secondary-action .btn-content {
    justify-content: center;
    text-align: center;
}

.gallery-action-btn.secondary-action .btn-title {
    color: #5f6368;
    font-weight: 500;
}

/* 绿色主操作按钮（全部图片） */
.gallery-action-btn.green-action {
    background: linear-gradient(90deg, #34c759 0%, #30b06b 100%);
    color: #fff;
    border: none;
    box-shadow: 0 4px 16px rgba(52,199,89,0.10);
    font-weight: 600;
    font-size: 1rem;
    border-radius: 12px;
    transition: all 0.2s;
}
.gallery-action-btn.green-action:hover:not(:disabled):not(.disabled) {
    background: linear-gradient(90deg, #30b06b 0%, #34c759 100%);
    box-shadow: 0 8px 24px rgba(52,199,89,0.18);
    transform: translateY(-2px);
}
.gallery-action-btn.green-action:disabled,
.gallery-action-btn.green-action.disabled {
    background: #e0e0e0;
    color: #bdbdbd;
    cursor: not-allowed;
    box-shadow: none;
}

/* 蓝色主操作按钮（文件夹） */
.gallery-action-btn.blue-action {
    background: linear-gradient(90deg, #4285f4 0%, #1a73e8 100%);
    color: #fff;
    border: none;
    box-shadow: 0 4px 16px rgba(66,133,244,0.10);
    font-weight: 600;
    font-size: 1rem;
    border-radius: 12px;
    transition: all 0.2s;
}
.gallery-action-btn.blue-action:hover:not(:disabled):not(.disabled) {
    background: linear-gradient(90deg, #1a73e8 0%, #4285f4 100%);
    box-shadow: 0 8px 24px rgba(66,133,244,0.18);
    transform: translateY(-2px);
}
.gallery-action-btn.blue-action:disabled,
.gallery-action-btn.blue-action.disabled {
    background: #e0e0e0;
    color: #bdbdbd;
    cursor: not-allowed;
    box-shadow: none;
}
.gallery-action-btn.blue-action .btn-title {
    color: #fff;
}
.gallery-action-btn.blue-action .btn-subtitle {
    color: rgba(255,255,255,0.8);
}
.gallery-action-btn.blue-action .btn-icon svg {
    stroke: #fff;
    fill: none;
}

/* 单张图片选择按钮美化 */
.gallery-image-single-select-btn {
    position: absolute;
    right: 10px;
    bottom: 10px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4285f4 0%, #1a73e8 100%);
    color: #fff;
    border: none;
    box-shadow: 0 2px 8px rgba(66,133,244,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 2;
}
.gallery-image-single-select-btn:hover {
    background: linear-gradient(135deg, #1a73e8 0%, #4285f4 100%);
    box-shadow: 0 4px 16px rgba(66,133,244,0.22);
    transform: scale(1.08);
}
@media (max-width: 600px) {
    .gallery-image-single-select-btn {
        width: 28px;
        height: 28px;
        right: 6px;
        bottom: 6px;
        font-size: 0.9rem;
    }
}

.gallery-load-more-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
    margin-bottom: 10px;
}

.gallery-load-more-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: #f1f3f4;
    border: none;
    border-radius: 20px;
    padding: 10px 20px;
    font-size: 0.95rem;
    color: #5f6368;
    cursor: pointer;
    transition: all 0.2s;
}

.gallery-load-more-btn:hover {
    background-color: #e8f0fe;
    color: #1a73e8;
}

.gallery-load-more-btn.loading {
    background-color: #e8f0fe;
    color: #1a73e8;
    pointer-events: none;
}

.gallery-load-more-btn.disabled {
    background-color: #f1f3f4;
    color: #9aa0a6;
    cursor: not-allowed;
}

.gallery-spinner-small {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(26, 115, 232, 0.2);
    border-top-color: #1a73e8;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.gallery-loading-more {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
    color: #5f6368;
    font-size: 0.95rem;
    gap: 12px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    margin: 10px 0;
    transition: all 0.3s ease;
}

.gallery-loading-more .gallery-spinner {
    width: 30px;
    height: 30px;
    border-width: 2px;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

/* 添加错误信息样式 */
.gallery-error-message {
    padding: 10px 15px;
    margin: 10px auto;
    background-color: #fee2e2;
    color: #ef4444;
    border-radius: 8px;
    text-align: center;
    font-size: 0.9rem;
    max-width: 90%;
    border: 1px solid #fecaca;
}

@media (max-width: 600px) {
    .gallery-error-message {
        padding: 8px 12px;
        font-size: 0.85rem;
        margin: 8px auto;
    }
}

/* 文件夹项样式 */
.folder-item {
    background: white;
    border-radius: 10px;
    padding: 12px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    border: 1px solid #f0f3fa;
    transition: all 0.2s ease;
    position: relative;
    cursor: pointer;
}

.folder-item:hover {
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.08);
    border-color: #e0f2fe;
    transform: translateY(-1px);
}

.folder-item.selected {
    background: #f0f9ff;
    border-color: #bae6fd;
}

.folder-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #f0f9ff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #38bdf8;
    font-size: 18px;
    flex-shrink: 0;
}

.folder-info {
    flex: 1;
    overflow: hidden;
}

.folder-name {
    font-weight: 500;
    font-size: 15px;
    color: #333;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.folder-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
}

.folder-meta .folder-count,
.folder-meta .image-count,
.folder-meta .empty-folder {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    border-radius: 4px;
    background-color: #f8fafc;
}

.folder-meta .folder-count {
    color: #0369a1;
    background-color: #f0f9ff;
}

.folder-meta .image-count {
    color: #0f766e;
    background-color: #ecfdf5;
}

.folder-meta .empty-folder {
    color: #94a3b8;
    background-color: #f1f5f9;
}

.folder-checkbox {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    z-index: 2;
} 