/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: white;
    color: black;
}

/* 相册容器 */
.album-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* 左侧文件夹边栏 */
.folder-sidebar {
    width: 200px;
    background-color: white;
    color: black;
    padding: 20px;
    overflow-y: auto;
    border-right: 1px solid #e0e0e0;
}

.folder-sidebar h2 {
    margin-bottom: 20px;
    font-size: 18px;
    color: black;
}

.update-btn {
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background-color: white;
    color: black;
    cursor: pointer;
    font-size: 14px;
    width: 100%;
    transition: background-color 0.3s;
}

.update-btn:hover {
    background-color: #f0f0f0;
}

.folder-list {
    list-style: none;
}

.folder-item {
    padding: 10px;
    margin-bottom: 5px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    border: 1px solid #e0e0e0;
}

.folder-item:hover {
    background-color: #f0f0f0;
}

.folder-item.active {
    background-color: #e0e0e0;
    color: black;
}

/* 右侧图片网格 */
.image-grid {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: white;
}

.image-grid h2 {
    margin-bottom: 20px;
    font-size: 20px;
    color: black;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
}

/* 分页控件样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    gap: 10px;
}

.pagination-btn {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background-color: white;
    color: black;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.pagination-btn:hover:not(:disabled) {
    background-color: #f0f0f0;
}

.pagination-btn.active {
    background-color: #e0e0e0;
    color: black;
    border-color: #e0e0e0;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.image-item {
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.image-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.image-item {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.image-item .image-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 100%;
    overflow: hidden;
}

.image-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-title {
    padding: 10px;
    font-size: 14px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
    background-color: white;
    color: black;
    border-top: 1px solid #e0e0e0;
}

/* Light Box 样式 */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    background-color: white;
    border-radius: 8px;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: black;
    z-index: 10;
}

.lightbox-body {
    display: flex;
    height: 80vh;
}

.image-section {
    flex: 2;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    border-right: 1px solid #e0e0e0;
}

.image-section img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.text-section {
    flex: 1;
    padding: 20px;
    border-left: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
}

.text-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.text-header h3 {
    font-size: 18px;
    color: black;
}

.edit-btn {
    padding: 5px 10px;
    background-color: white;
    color: black;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-right: 20px;
}

.edit-btn:hover {
    background-color: #f0f0f0;
}

.text-content {
    flex: 1;
    padding: 15px;
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin-bottom: 15px;
    white-space: pre-wrap;
    font-size: 14px;
    line-height: 1.5;
    color: black;
}

.text-editor {
    flex: 1;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.5;
    resize: none;
    color: black;
}

.editor-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.save-btn, .cancel-btn {
    padding: 8px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    background-color: white;
    color: black;
}

.save-btn:hover {
    background-color: #f0f0f0;
}

.cancel-btn:hover {
    background-color: #f0f0f0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .album-container {
        flex-direction: column;
    }
    
    .folder-sidebar {
        width: 100%;
        height: auto;
        padding: 10px;
    }
    
    .folder-list {
        display: flex;
        overflow-x: auto;
        gap: 10px;
    }
    
    .folder-item {
        white-space: nowrap;
        margin-bottom: 0;
    }
    
    .lightbox-body {
        flex-direction: column;
        height: auto;
        max-height: 80vh;
    }
    
    .image-section {
        flex: none;
        height: 50vh;
    }
    
    .text-section {
        flex: none;
        border-left: none;
        border-top: 1px solid #e0e0e0;
    }
}