/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8fafc;
    color: #2d3748;
    line-height: 1.6;
}

/* 导航栏 */
.navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 70px;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
}

.nav-brand i {
    font-size: 1.8rem;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 12px;
    color: #a0aec0;
}

.search-box input {
    padding: 10px 12px 10px 40px;
    border: 2px solid #e2e8f0;
    border-radius: 25px;
    width: 300px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.view-controls {
    display: flex;
    background: #f7fafc;
    border-radius: 8px;
    padding: 4px;
}

.view-btn {
    padding: 8px 12px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    color: #718096;
    transition: all 0.3s ease;
}

.view-btn.active,
.view-btn:hover {
    background: white;
    color: #667eea;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.upload-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* 侧边栏 */
.sidebar {
    position: fixed;
    top: 70px;
    left: -320px;
    width: 320px;
    height: calc(100vh - 70px);
    background: white;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    transition: left 0.3s ease;
    z-index: 999;
    overflow-y: auto;
}

.sidebar.open {
    left: 0;
}

.sidebar-content {
    padding: 30px 20px;
}

.sidebar h3 {
    color: #2d3748;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.filter-section h4 {
    color: #4a5568;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.date-filters,
.folder-filters,
.tag-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-btn {
    padding: 6px 12px;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #4a5568;
}

.filter-btn.active,
.filter-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.stats-section {
    background: #f7fafc;
    border-radius: 12px;
    padding: 20px;
}

.stats-section h4 {
    color: #2d3748;
    margin-bottom: 15px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.stat-label {
    color: #718096;
    font-size: 0.9rem;
}

.stat-value {
    font-weight: bold;
    color: #2d3748;
}

/* 主内容区域 */
.main-content {
    margin-top: 70px;
    margin-left: 0;
    transition: margin-left 0.3s ease;
    min-height: calc(100vh - 70px);
}

.main-content.sidebar-open {
    margin-left: 320px;
}

.gallery-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
}

.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.gallery-info h2 {
    color: #2d3748;
    font-size: 2rem;
    margin-bottom: 5px;
}

.gallery-info p {
    color: #718096;
    font-size: 1rem;
}

.gallery-controls {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.control-btn {
    padding: 10px 16px;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #4a5568;
}

.control-btn:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
}

/* 照片网格 */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.photo-grid.masonry {
    columns: 4;
    column-gap: 20px;
}

.photo-grid.list {
    grid-template-columns: 1fr;
    gap: 15px;
}

.photo-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.photo-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.photo-item.masonry {
    break-inside: avoid;
    margin-bottom: 20px;
}

.photo-item.list {
    display: flex;
    align-items: center;
    padding: 15px;
}

.photo-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.photo-item:hover .photo-image {
    transform: scale(1.05);
}

.photo-item.masonry .photo-image {
    height: auto;
}

.photo-item.list .photo-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    margin-right: 15px;
}

.photo-info {
    padding: 15px;
}

.photo-item.list .photo-info {
    padding: 0;
    flex: 1;
}

.photo-title {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.photo-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #718096;
}

.photo-date {
    display: flex;
    align-items: center;
    gap: 5px;
}

.photo-size {
    font-weight: 500;
}

.photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.photo-item:hover .photo-overlay {
    opacity: 1;
}

.photo-actions {
    display: flex;
    gap: 10px;
}

.photo-action-btn {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
}

.photo-action-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* 加载状态 */
.loading-state {
    text-align: center;
    padding: 60px 20px;
    color: #718096;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 空状态 */
.empty-gallery {
    text-align: center;
    padding: 80px 20px;
    color: #718096;
}

.empty-gallery i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-gallery h3 {
    color: #4a5568;
    margin-bottom: 10px;
}

/* 密码设置 */
.password-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.password-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.password-section input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.password-section input:focus {
    outline: none;
    border-color: #667eea;
}

.password-section small {
    display: block;
    margin-top: 5px;
    color: #666;
}

/* 进度显示 */
.progress-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.progress-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s ease;
}

/* 文件列表 */
.files-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.refresh-btn {
    background: #f8f9fa;
    border: 1px solid #ddd;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.refresh-btn:hover {
    background: #e9ecef;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.file-item:hover {
    background: #f8f9ff;
    border-color: #667eea;
}

.file-icon {
    font-size: 1.5rem;
    margin-right: 15px;
    color: #667eea;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.file-meta {
    font-size: 0.9rem;
    color: #666;
}

.file-actions {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 40px;
    color: #666;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* 上传模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.upload-modal {
    max-width: 700px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid #e2e8f0;
    background: #f7fafc;
}

.modal-header h3 {
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #718096;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #e2e8f0;
    color: #2d3748;
}

.modal-body {
    padding: 30px;
}

.upload-area {
    border: 3px dashed #cbd5e0;
    border-radius: 15px;
    padding: 50px 30px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #f7fafc;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #667eea;
    background: #edf2f7;
    transform: translateY(-2px);
}

.upload-icon {
    font-size: 4rem;
    color: #667eea;
    margin-bottom: 20px;
}

.upload-area h4 {
    color: #2d3748;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.upload-area p {
    color: #718096;
    margin-bottom: 25px;
}

#fileInput {
    display: none;
}

.upload-select-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.upload-select-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.upload-progress {
    margin-top: 20px;
}

.progress-item {
    background: #f7fafc;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    border: 1px solid #e2e8f0;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.progress-info strong {
    color: #2d3748;
}

.progress-size {
    color: #718096;
    font-size: 0.9rem;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s ease;
    border-radius: 3px;
}

.progress-text {
    margin-top: 8px;
    font-size: 0.8rem;
    color: #718096;
    text-align: center;
}

/* 上传控制面板 */
.upload-control-panel {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    color: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.upload-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 12px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    opacity: 0.8;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 1.2rem;
    font-weight: bold;
}

.upload-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.control-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 10px 16px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 100px;
    justify-content: center;
}

.control-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

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

.overall-progress {
    position: relative;
}

.overall-progress .progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.overall-progress .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #48bb78, #38a169);
    transition: width 0.3s ease;
    border-radius: 4px;
}

.overall-progress .progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.8rem;
    font-weight: bold;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    margin-top: 0;
}

/* 进度项状态 */
.progress-item.completed {
    background: #f0fff4;
    border-color: #9ae6b4;
}

.progress-item.failed {
    background: #fed7d7;
    border-color: #feb2b2;
}

.progress-item.completed .progress-fill {
    background: linear-gradient(90deg, #48bb78, #38a169) !important;
}

.progress-item.failed .progress-fill {
    background: linear-gradient(90deg, #f56565, #e53e3e) !important;
}

/* 灯箱 */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 3000;
    backdrop-filter: blur(10px);
}

.lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 30px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    z-index: 10;
}

.lightbox-close:hover {
    background: rgba(255,255,255,0.2);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    z-index: 10;
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255,255,255,0.2);
}

.lightbox-image-container {
    position: relative;
    max-width: 90%;
    max-height: 80%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.lightbox-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
}

.lightbox-info {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 20px 30px;
    border-radius: 15px;
    text-align: center;
    backdrop-filter: blur(10px);
    max-width: 90%;
}

.lightbox-info h4 {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.lightbox-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.8);
}

.lightbox-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.lightbox-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.lightbox-btn:hover {
    background: rgba(255,255,255,0.2);
}

/* 幻灯片 */
.slideshow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: black;
    z-index: 4000;
}

.slideshow-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.slideshow-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    z-index: 10;
}

.slideshow-image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

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

.slideshow-controls {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(0,0,0,0.7);
    padding: 15px 25px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

.slideshow-controls button {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.slideshow-controls button:hover {
    background: rgba(255,255,255,0.1);
}

.slideshow-progress {
    width: 200px;
    height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    overflow: hidden;
}

.slideshow-progress .progress-bar {
    height: 100%;
    background: white;
    transition: width 0.3s ease;
}

/* Toast 通知 */
.toast {
    position: fixed;
    top: 90px;
    right: 20px;
    background: rgba(0,0,0,0.9);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 5000;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
}

.toast.show {
    transform: translateX(0);
}

.toast.error {
    background: rgba(220, 53, 69, 0.9);
}

.toast.success {
    background: rgba(40, 167, 69, 0.9);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .photo-grid.masonry {
        columns: 3;
    }

    .sidebar {
        width: 280px;
        left: -280px;
    }

    .main-content.sidebar-open {
        margin-left: 280px;
    }
}

@media (max-width: 968px) {
    .nav-controls {
        gap: 15px;
    }

    .search-box input {
        width: 200px;
    }

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

    .photo-grid.masonry {
        columns: 2;
    }

    .gallery-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .gallery-controls {
        width: 100%;
        justify-content: flex-start;
    }

    .main-content.sidebar-open {
        margin-left: 0;
    }

    .sidebar {
        width: 100%;
        left: -100%;
    }

    .sidebar.open {
        left: 0;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 15px;
        flex-wrap: wrap;
        height: auto;
        min-height: 70px;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .nav-brand {
        font-size: 1.3rem;
    }

    .nav-controls {
        width: 100%;
        margin-top: 15px;
        justify-content: space-between;
    }

    .search-box {
        flex: 1;
        margin-right: 15px;
    }

    .search-box input {
        width: 100%;
    }

    .view-controls {
        display: none;
    }

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

    .photo-grid.masonry {
        columns: 2;
        column-gap: 12px;
    }

    .gallery-container {
        padding: 20px 15px;
    }

    .gallery-info h2 {
        font-size: 1.5rem;
    }

    .control-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .lightbox-prev {
        left: 15px;
    }

    .lightbox-next {
        right: 15px;
    }

    .lightbox-close {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .lightbox-info {
        bottom: 15px;
        padding: 15px 20px;
        max-width: 95%;
    }

    .lightbox-meta {
        flex-direction: column;
        gap: 5px;
    }

    .lightbox-actions {
        flex-wrap: wrap;
        gap: 8px;
    }

    .modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .modal-header {
        padding: 20px;
    }

    .modal-body {
        padding: 20px;
    }

    .upload-area {
        padding: 30px 20px;
    }

    .upload-icon {
        font-size: 3rem;
    }
}

@media (max-width: 480px) {
    .navbar {
        height: auto;
    }

    .nav-container {
        padding: 15px;
    }

    .main-content {
        margin-top: 120px;
    }

    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }

    .photo-grid.masonry {
        columns: 1;
    }

    .photo-image {
        height: 150px;
    }

    .photo-info {
        padding: 10px;
    }

    .gallery-container {
        padding: 15px 10px;
    }

    .sidebar-content {
        padding: 20px 15px;
    }

    .filter-btn {
        font-size: 0.7rem;
        padding: 4px 8px;
    }

    .upload-area {
        padding: 20px 15px;
    }

    .upload-area h4 {
        font-size: 1rem;
    }

    .upload-icon {
        font-size: 2.5rem;
    }
}
