/* Gallery Styles */
.gallery-header {
    text-align: center;
    margin: 30px 0 40px;
}

.gallery-header h1 {
    font-size: 32px;
    color: #8c2485;
    margin-bottom: 10px;
    font-weight: 700;
}

.gallery-subtitle {
    color: #666;
    font-size: 16px;
}

/* Upload Button Section */
.upload-button-section {
    text-align: center;
    margin: 30px 0 40px;
}

.btn-upload-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    background: linear-gradient(135deg, #8c2485 0%, #ce3180 100%);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(140, 36, 133, 0.3);
}

.btn-upload-trigger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(140, 36, 133, 0.4);
}

.btn-upload-trigger i {
    font-size: 20px;
}

/* Upload Section */
.upload-section {
    margin-bottom: 50px;
}

.upload-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.upload-card h3 {
    color: #8c2485;
    margin-bottom: 25px;
    font-size: 24px;
}

.upload-area {
    position: relative;
    border: 3px dashed #8c2485;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.upload-area:hover {
    border-color: #ce3180;
    background: #fef5f9;
}

.upload-area input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

.upload-placeholder {
    pointer-events: none;
}

.upload-placeholder i {
    font-size: 48px;
    color: #8c2485;
    margin-bottom: 15px;
    display: block;
}

.upload-placeholder p {
    font-size: 18px;
    color: #333;
    margin-bottom: 8px;
}

.file-info {
    color: #999;
    font-size: 14px;
}

.preview-container {
    position: relative;
}

.preview-container img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-remove-preview {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255,0,0,0.8);
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s;
    z-index: 20;
}

.btn-remove-preview:hover {
    background: #ff0000;
    transform: scale(1.1);
}

.compression-info {
    margin-top: 10px;
    font-size: 13px;
    color: #666;
}

.compression-info small {
    display: block;
    margin: 3px 0;
}

.btn-upload {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #8c2485 0%, #ce3180 100%);
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 15px;
}

.btn-upload:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(140, 36, 133, 0.4);
}

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

.upload-progress {
    margin-top: 15px;
    position: relative;
}

.progress-bar {
    height: 30px;
    background: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #8c2485, #ce3180);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    z-index: 2;
}

.upload-tips {
    margin-top: 25px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    border-left: 4px solid #8c2485;
}

.upload-tips h4 {
    color: #8c2485;
    margin-bottom: 15px;
    font-size: 18px;
}

.upload-tips ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.upload-tips li {
    padding: 8px 0;
    color: #555;
}

.upload-tips li i {
    margin-right: 10px;
    width: 20px;
}

.upload-tips li .fa-check {
    color: #28a745;
}

.upload-tips li .fa-ban {
    color: #dc3545;
}

/* Gallery Controls */
.gallery-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.gallery-controls h2 {
    color: #333;
    font-size: 24px;
    margin: 0;
}

.photo-count {
    font-size: 16px;
    color: #999;
    font-weight: normal;
}

.view-options {
    display: flex;
    gap: 10px;
}

.view-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 18px;
    color: #666;
}

.view-btn:hover {
    border-color: #8c2485;
    color: #8c2485;
}

.view-btn.active {
    background: #8c2485;
    color: white;
    border-color: #8c2485;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.gallery-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(140, 36, 133, 0.2);
}

.photo-wrapper {
    position: relative;
    padding-top: 133%;
    overflow: hidden;
    background: #f0f0f0;
}

.photo-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.7) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 15px;
}

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

.photo-stats {
    color: white;
    font-size: 14px;
    display: flex;
    gap: 15px;
}

.photo-stats i {
    margin-right: 5px;
}

.photo-info {
    padding: 15px;
}

.photo-title {
    font-size: 16px;
    margin: 0 0 10px 0;
    font-weight: 600;
}

.photo-title a {
    color: #333;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.photo-title a:hover {
    color: #8c2485;
}

.photo-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #666;
    font-size: 14px;
}

.user-link:hover {
    color: #8c2485;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e0e0e0;
}

.user-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

/* Like Button */
.btn-like {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    color: #666;
}

.btn-like:hover {
    border-color: #8c2485;
    background: #fef5f9;
}

.btn-like.liked {
    border-color: #e91e63;
    color: #e91e63;
    background: #ffe0eb;
}

.btn-like i {
    font-size: 16px;
}

.btn-like:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* List View */
.gallery-grid.list-view {
    grid-template-columns: 1fr;
}

.list-view .gallery-item {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 20px;
}

.list-view .photo-wrapper {
    padding-top: 0;
    height: 150px;
}

.list-view .photo-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.no-results i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.no-results h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

/* Infinite Scroll Status */
.scroller-status {
    text-align: center;
    padding: 30px;
}

.scroller-status > div,
.scroller-status > p {
    display: none;
}

.scroller-status.infinite-scroll-request .infinite-scroll-request {
    display: block;
}

.scroller-status.infinite-scroll-last .infinite-scroll-last {
    display: block;
    color: #28a745;
    font-weight: 600;
}

.scroller-status.infinite-scroll-error .infinite-scroll-error {
    display: block;
    color: #dc3545;
}

.loader {
    font-size: 18px;
    color: #8c2485;
}

.loader i {
    margin-right: 10px;
}

/* Pagination */
.pagination-wrapper {
    margin: 40px 0;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.page-link {
    padding: 10px 15px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    transition: all 0.3s;
}

.page-link:hover {
    border-color: #8c2485;
    color: #8c2485;
    background: #fef5f9;
}

.page-link.active {
    background: #8c2485;
    color: white;
    border-color: #8c2485;
}

.page-numbers {
    display: flex;
    gap: 5px;
}

/* Responsive */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .gallery-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .upload-card {
        padding: 20px;
    }
    
    .upload-area {
        padding: 25px;
    }
    
    .btn-upload-trigger {
        padding: 12px 30px;
        font-size: 16px;
    }
    
    .list-view .gallery-item {
        grid-template-columns: 1fr;
    }
    
    .page-numbers {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .gallery-header h1 {
        font-size: 24px;
    }
    
    .btn-upload-trigger {
        padding: 10px 25px;
        font-size: 15px;
        width: 100%;
        max-width: 300px;
    }
    
    .upload-placeholder i {
        font-size: 36px;
    }
}

/* Alert Styles */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert i {
    font-size: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.required {
    color: #dc3545;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #8c2485;
}

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

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

.form-text {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 13px;
}
