/**
 * Chatujme Gallery Styles - Modern Redesign 2026
 *
 * Consistent with homepage.css design system
 * Light mode by default, dark mode via nightly.js
 * Mobile-first responsive design with smooth animations
 */

/* ============================================
   Variables - Light Mode (default)
   ============================================ */
:root {
    /* Light theme colors - matching homepage */
    --gallery-bg-primary: #f5f7fa;
    --gallery-bg-secondary: #ffffff;
    --gallery-bg-card: #ffffff;
    --gallery-bg-hover: #f9fafb;
    --gallery-text-primary: #1f2937;
    --gallery-text-secondary: #6b7280;
    --gallery-text-muted: #9ca3af;
    --gallery-accent: #e94560;
    --gallery-accent-hover: #ff6b6b;
    --gallery-success: #4caf50;
    --gallery-warning: #ff9800;
    --gallery-error: #f44336;
    --gallery-border: #e5e7eb;
    --gallery-border-light: #f3f4f6;
    --gallery-overlay: rgba(0, 0, 0, 0.8);
    --gallery-overlay-light: rgba(0, 0, 0, 0.5);
    --gallery-shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --gallery-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --gallery-shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
    --gallery-shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);

    /* Gender colors - matching Chatujme theme */
    --gallery-boys: #21749a;
    --gallery-boys-light: #2a8fb8;
    --gallery-boys-shadow: rgba(33, 116, 154, 0.25);
    --gallery-girls: #cb2f79;
    --gallery-girls-light: #e63d8e;
    --gallery-girls-shadow: rgba(203, 47, 121, 0.25);
    --gallery-unisex: #339900;
    --gallery-unisex-light: #44bb11;
    --gallery-unisex-shadow: rgba(51, 153, 0, 0.25);

    /* Spacing - matching homepage */
    --gallery-gap: 16px;
    --gallery-gap-sm: 8px;
    --gallery-gap-xs: 6px;
    --gallery-gap-md: 15px;
    --gallery-gap-lg: 20px;
    --gallery-radius: 12px;
    --gallery-radius-sm: 8px;
    --gallery-radius-lg: 12px;

    /* Transitions */
    --gallery-transition: all 0.3s ease;
    --gallery-transition-fast: all 0.15s ease;
}

/* ============================================
   Dark Mode Variables
   Triggered by nightly.js (night-mode class or inline style)
   ============================================ */
body.night-mode,
body[style*="background-color: rgb(40, 40, 40)"],
body[style*="background-color:#282828"],
body.dark-mode {
    --gallery-bg-primary: #1a1a2e;
    --gallery-bg-secondary: #16213e;
    --gallery-bg-card: #0f3460;
    --gallery-bg-hover: #1a4080;
    --gallery-text-primary: #e8e8e8;
    --gallery-text-secondary: #a0a0a0;
    --gallery-text-muted: #6b7280;
    --gallery-border: #2a2a4a;
    --gallery-border-light: #1e2842;
    --gallery-shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --gallery-shadow: 0 2px 4px rgba(0,0,0,0.4);
    --gallery-shadow-md: 0 4px 8px rgba(0,0,0,0.4);
    --gallery-shadow-lg: 0 10px 20px rgba(0,0,0,0.5);
    --gallery-overlay: rgba(0, 0, 0, 0.9);
}

/* ============================================
   Base Layout
   ============================================ */
.gallery-container {
    background: var(--gallery-bg-primary);
    color: var(--gallery-text-primary);
    min-height: 300px;
    padding: var(--gallery-gap);
    border-radius: var(--gallery-radius);
}

.gallery-management {
    padding: var(--gallery-gap-md);
}

.gallery-management h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 var(--gallery-gap-lg) 0;
    letter-spacing: -0.5px;
}

/* Loading state - Skeleton */
.gallery-loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--gallery-text-secondary);
    font-size: 16px;
}

.gallery-loading i {
    margin-right: 10px;
    font-size: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Skeleton loading placeholders */
.gallery-skeleton {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--gallery-gap);
}

.skeleton-item {
    border-radius: var(--gallery-radius);
    background: var(--gallery-bg-card);
    overflow: hidden;
    box-shadow: var(--gallery-shadow-sm);
    border: 1px solid var(--gallery-border);
}

.skeleton-thumb {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(
        90deg,
        var(--gallery-border-light) 0%,
        var(--gallery-bg-hover) 50%,
        var(--gallery-border-light) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

.skeleton-thumb.tall {
    aspect-ratio: 3/4;
}

.skeleton-thumb.wide {
    aspect-ratio: 4/3;
}

.skeleton-info {
    padding: 10px 14px;
    display: flex;
    gap: 14px;
}

.skeleton-stat {
    width: 40px;
    height: 14px;
    background: var(--gallery-border-light);
    border-radius: 4px;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

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

/* ============================================
   Top Actions Bar
   ============================================ */
.gallery-top-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--gallery-gap-lg);
    padding: var(--gallery-gap-md);
    background: var(--gallery-bg-card);
    border-radius: var(--gallery-radius);
    box-shadow: var(--gallery-shadow);
    border: 1px solid var(--gallery-border);
}

.gallery-top-actions .btn {
    transition: var(--gallery-transition-fast);
}

.gallery-top-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--gallery-shadow-md);
}

/* ============================================
   Album Cards Grid - Modern Design
   ============================================ */
.gallery-albums-list {
    margin-bottom: var(--gallery-gap-lg);
}

.gallery-albums-grid,
.gallery-album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--gallery-gap);
}

/* Album card - masonry style similar to photos */
.gallery-album-card {
    position: relative;
    background: var(--gallery-bg-card);
    border-radius: var(--gallery-radius);
    overflow: hidden;
    transition: var(--gallery-transition);
    cursor: pointer;
    box-shadow: var(--gallery-shadow);
    border: 1px solid var(--gallery-border);
    animation: gallery-fade-in 0.4s ease;
    display: block;
    text-decoration: none;
    break-inside: avoid;
}

.gallery-album-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--gallery-shadow-lg);
    text-decoration: none;
}

/* Album cover - similar to photo thumb */
.gallery-album-card .album-cover {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: linear-gradient(135deg, var(--gallery-border-light) 0%, var(--gallery-bg-hover) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-album-card .album-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, opacity 0.3s ease;
}

.gallery-album-card:hover .album-cover img {
    transform: scale(1.08);
}

.gallery-album-card .album-cover img {
    pointer-events: none;
}

.gallery-album-card .album-cover .no-photo {
    font-size: 5rem;
    color: var(--gallery-text-muted);
    opacity: 0.5;
}

.gallery-album-card .album-cover .no-photo.fa-lock {
    font-size: 5rem;
    color: #e8a317;
    opacity: 0.85;
}

/* Album overlay - gradient with stats (similar to photo overlay) */
.gallery-album-card .album-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 14px;
    z-index: 5;
}

.gallery-album-card:hover .album-overlay {
    opacity: 1;
    pointer-events: auto;
}

.gallery-album-card .album-overlay button,
.gallery-album-card .album-overlay .btn {
    pointer-events: auto;
}

/* Album stats in overlay - similar to photo stats */
.gallery-album-card .album-stats {
    color: #fff;
    font-size: 0.9rem;
    display: flex;
    gap: 14px;
    transform: translateY(10px);
    transition: transform 0.3s ease;
    align-items: center;
}

.gallery-album-card:hover .album-stats {
    transform: translateY(0);
}

.gallery-album-card .album-stats i {
    margin-right: 4px;
    font-size: 1rem;
}

/* Private badge - absolute positioned */
.album-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    border-radius: var(--gallery-radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 11;
    box-shadow: var(--gallery-shadow);
    backdrop-filter: blur(8px);
}

.album-badge.private {
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
}

/* Private badge alternative name */
.album-private-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--gallery-overlay-light);
    backdrop-filter: blur(8px);
    color: #fff;
    padding: 6px 12px;
    border-radius: var(--gallery-radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 11;
    box-shadow: var(--gallery-shadow);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Album info - below cover (like photo info) */
.gallery-album-card .album-info {
    padding: 10px 14px;
    background: var(--gallery-bg-card);
}

.gallery-album-card .album-name,
.gallery-album-card h4 {
    margin: 0 0 6px 0;
    font-size: 1.05rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--gallery-text-primary);
}

.gallery-album-card .album-count,
.gallery-album-card .photo-count {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--gallery-text-secondary);
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.gallery-album-card .album-count i,
.gallery-album-card .photo-count i {
    color: var(--gallery-accent);
    font-size: 1rem;
}

.gallery-album-card:hover .album-count,
.gallery-album-card:hover .photo-count {
    color: var(--gallery-text-primary);
}

/* Album actions (for management view) */
.gallery-album-card .album-actions {
    display: flex;
    gap: var(--gallery-gap-xs);
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--gallery-border-light);
}

/* Empty state */
.gallery-empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--gallery-text-secondary);
}

.gallery-empty i {
    font-size: 5rem;
    color: var(--gallery-text-muted);
    margin-bottom: 24px;
    opacity: 0.6;
}

.gallery-empty p {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

/* ============================================
   Album Detail View
   ============================================ */
.gallery-album-detail {
    animation: gallery-slide-up 0.4s ease;
}

.album-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--gallery-gap);
    margin-bottom: var(--gallery-gap-lg);
    padding: var(--gallery-gap-md);
    background: var(--gallery-bg-card);
    border-radius: var(--gallery-radius);
    box-shadow: var(--gallery-shadow);
    border: 1px solid var(--gallery-border);
}

.album-header h3 {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    color: var(--gallery-text-primary);
    letter-spacing: -0.3px;
    flex: 1;
}

.album-header .btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--gallery-bg-hover);
    border: 1px solid var(--gallery-border);
    border-radius: var(--gallery-radius-sm);
    color: var(--gallery-text-primary);
    font-weight: 600;
    transition: var(--gallery-transition-fast);
}

.album-header .btn-back:hover {
    background: var(--gallery-bg-card);
    transform: translateX(-4px);
    box-shadow: var(--gallery-shadow-sm);
}

.album-actions-inline {
    display: flex;
    gap: var(--gallery-gap-sm);
    flex-wrap: wrap;
}

.album-actions-inline .btn {
    transition: var(--gallery-transition-fast);
}

.album-actions-inline .btn:hover {
    transform: translateY(-2px);
}

/* ============================================
   Upload Zone - Enhanced Design
   ============================================ */
.gallery-upload-zone {
    margin-bottom: var(--gallery-gap-lg);
    animation: gallery-slide-up 0.3s ease;
}

.gallery-upload-zone .upload-placeholder {
    border: 2px dashed var(--gallery-border);
    border-radius: var(--gallery-radius-lg);
    padding: 50px 40px;
    text-align: center;
    transition: all 0.25s ease;
    background: var(--gallery-bg-card);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    user-select: none;
    min-height: 280px;
}

.gallery-upload-zone .upload-placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(233, 69, 96, 0.03) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.gallery-upload-zone .upload-placeholder::after {
    display: none !important;
    content: none !important;
}

.gallery-upload-zone .upload-placeholder:hover {
    border-color: var(--gallery-accent);
    background: var(--gallery-bg-hover);
    box-shadow: 0 4px 12px rgba(233, 69, 96, 0.08);
}

.gallery-upload-zone .upload-placeholder:hover::before {
    opacity: 1;
}

.gallery-upload-zone .upload-placeholder:hover .upload-button {
    background: var(--gallery-accent-hover);
    transform: scale(1.02);
}

.gallery-upload-zone .upload-placeholder:active {
    transform: scale(0.995);
    box-shadow: 0 2px 6px rgba(233, 69, 96, 0.06);
}

.gallery-upload-zone .upload-placeholder.dragover,
.gallery-upload-zone .upload-placeholder.highlight,
#dropArea.highlight {
    border-color: var(--gallery-accent);
    background: rgba(233, 69, 96, 0.05);
    border-width: 3px;
    box-shadow: 0 0 0 4px rgba(233, 69, 96, 0.06);
}

.upload-placeholder-content {
    pointer-events: none;
    z-index: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.upload-placeholder .upload-icon {
    width: 80px;
    height: 80px;
    color: var(--gallery-accent);
    margin-bottom: 24px;
    opacity: 0.9;
}

.upload-placeholder .upload-text-primary {
    font-size: 1.4rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
}

.upload-placeholder .upload-text-secondary {
    font-size: 1rem;
    color: #666;
    display: block;
}

.upload-placeholder .fa,
.upload-placeholder .fas,
.upload-placeholder .far,
.upload-placeholder i {
    font-size: 6rem !important;
    color: var(--gallery-accent);
    margin-bottom: 30px;
    display: block;
    opacity: 0.9;
    transition: all 0.3s ease;
}

.gallery-upload-zone .upload-placeholder:hover .fa,
.gallery-upload-zone .upload-placeholder:hover .fas,
.gallery-upload-zone .upload-placeholder:hover .far {
    opacity: 1;
    transform: scale(1.1);
}

.upload-primary-text {
    margin: 0 0 12px 0;
    color: var(--gallery-text-primary);
    font-size: 1.6rem;
    font-weight: 600;
    line-height: 1.4;
}

.upload-secondary-text {
    color: var(--gallery-text-secondary);
    font-size: 1.1rem;
    display: block;
    margin-top: 12px;
    line-height: 1.5;
}

/* Legacy support - keep old class names working */
.upload-placeholder p {
    margin: 0 0 16px 0;
    color: var(--gallery-text-primary);
    font-size: 1.8rem !important;
    font-weight: 600;
    line-height: 1.4;
}

.upload-placeholder small {
    color: var(--gallery-text-secondary);
    font-size: 1.2rem !important;
    display: block;
}

.upload-placeholder label,
.upload-placeholder .upload-link {
    color: var(--gallery-accent);
    cursor: pointer;
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.2s ease;
}

.upload-placeholder label:hover,
.upload-placeholder .upload-link:hover {
    color: var(--gallery-accent-hover);
}

.upload-placeholder small {
    color: var(--gallery-text-muted);
    font-size: 0.9rem;
}

/* File input - visually hidden but accessible for label click */
.gallery-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus state for keyboard navigation */
.gallery-file-input:focus + .upload-placeholder,
.gallery-file-input:focus-visible + .upload-placeholder,
label.upload-placeholder:focus-within {
    outline: 3px solid var(--gallery-accent);
    outline-offset: 2px;
    border-color: var(--gallery-accent);
}

/* Preview */
.upload-preview {
    padding: var(--gallery-gap-md);
    background: var(--gallery-bg-card);
    border-radius: var(--gallery-radius);
    box-shadow: var(--gallery-shadow);
    border: 1px solid var(--gallery-border);
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: var(--gallery-gap);
    margin-bottom: var(--gallery-gap);
}

.preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--gallery-radius-sm);
    overflow: hidden;
    background: var(--gallery-bg-hover);
    box-shadow: var(--gallery-shadow-sm);
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-item .btn-remove,
.preview-item .btn-edit {
    position: absolute;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.85rem;
    cursor: pointer;
    opacity: 0;
    transition: var(--gallery-transition-fast);
    box-shadow: var(--gallery-shadow);
}

.preview-item:hover .btn-remove,
.preview-item:hover .btn-edit {
    opacity: 1;
}

.preview-item .btn-remove {
    top: 6px;
    right: 6px;
    background: var(--gallery-error);
}

.preview-item .btn-remove:hover {
    transform: scale(1.1);
}

.preview-item .btn-edit {
    bottom: 6px;
    right: 6px;
    background: var(--gallery-accent);
}

.preview-item .btn-edit:hover {
    transform: scale(1.1);
}

.upload-actions {
    display: flex;
    justify-content: center;
    gap: var(--gallery-gap);
}

/* Progress */
.upload-progress {
    padding: var(--gallery-gap-md);
    background: var(--gallery-bg-card);
    border-radius: var(--gallery-radius);
    box-shadow: var(--gallery-shadow);
    border: 1px solid var(--gallery-border);
}

.upload-progress .progress {
    height: 10px;
    background: var(--gallery-border-light);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

.upload-progress .progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--gallery-accent) 0%, var(--gallery-accent-hover) 100%);
    transition: width 0.4s ease;
    border-radius: 5px;
}

.upload-progress .progress-text {
    color: var(--gallery-text-secondary);
    font-size: 0.95rem;
    text-align: center;
    font-weight: 600;
}

/* ============================================
   Photo Grid - Masonry/Pinterest Layout
   ============================================ */
.gallery-photos-grid {
    margin-top: var(--gallery-gap-lg);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--gallery-gap);
}

.gallery-item {
    position: relative;
    border-radius: var(--gallery-radius);
    overflow: hidden;
    background: var(--gallery-bg-card);
    transition: var(--gallery-transition);
    animation: gallery-fade-in 0.4s ease;
    box-shadow: var(--gallery-shadow);
    border: 1px solid var(--gallery-border);
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--gallery-shadow-lg);
    z-index: 10;
}

.gallery-thumb {
    display: block;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--gallery-border-light) 0%, var(--gallery-bg-hover) 100%);
    aspect-ratio: 1;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.4s ease, opacity 0.3s ease;
}

/* Lazy loading blur-up effect */
.gallery-thumb img.loading {
    filter: blur(10px);
    opacity: 0.7;
    transform: scale(1.05);
}

.gallery-thumb img.loaded {
    filter: blur(0);
    opacity: 1;
    transform: scale(1);
}

.gallery-item:hover .gallery-thumb img {
    transform: scale(1.08);
}

/* Photo overlay on hover */
.gallery-item .photo-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 14px;
}

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

.gallery-item .photo-overlay .photo-stats {
    color: #fff;
    font-size: 0.9rem;
    display: flex;
    gap: 14px;
    transform: translateY(10px);
    transition: transform 0.3s ease;
}

.gallery-item:hover .photo-overlay .photo-stats {
    transform: translateY(0);
}

.gallery-item .photo-overlay .photo-stats i {
    margin-right: 4px;
}

/* Photo overlay actions for management view */
.gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: var(--gallery-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.gallery-item-overlay .btn {
    width: 42px;
    height: 42px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: #fff;
    transition: var(--gallery-transition-fast);
    transform: translateY(10px);
}

.gallery-item:hover .gallery-item-overlay .btn {
    transform: translateY(0);
}

.gallery-item-overlay .btn:hover {
    background: var(--gallery-accent);
    border-color: var(--gallery-accent);
    transform: scale(1.15);
}

.gallery-item-overlay .btn-edit:hover {
    background: var(--gallery-warning);
    border-color: var(--gallery-warning);
}

.gallery-item-overlay .btn-delete:hover {
    background: var(--gallery-error);
    border-color: var(--gallery-error);
}

/* Photo info footer */
.gallery-item-info {
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    color: var(--gallery-text-secondary);
    background: var(--gallery-bg-card);
}

.gallery-item-info .photo-date {
    margin-left: auto;
    font-size: 1.1rem;
    color: var(--gallery-text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.gallery-item-info .photo-date .fa-calendar {
    font-size: 0.75rem;
}

.gallery-item-info .likes,
.gallery-item-info .comments {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1.1rem;
    transition: color 0.2s ease;
}

.gallery-item-info .likes:hover,
.gallery-item-info .comments:hover {
    color: var(--gallery-text-primary);
}

.gallery-item-info .fa-heart {
    color: var(--gallery-accent);
    font-size: 1.2rem;
}

.gallery-item-info .fa-comment {
    color: var(--gallery-boys);
    font-size: 1.2rem;
}

/* Inline like button */
.gallery-item-info .btn-like-inline {
    background: none;
    border: none;
    padding: 4px 8px;
    margin: -4px -8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--gallery-text-secondary);
    font-size: 1.1rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.gallery-item-info .btn-like-inline:hover {
    background: rgba(233, 69, 96, 0.1);
    color: var(--gallery-accent);
}

.gallery-item-info .btn-like-inline.liked {
    color: var(--gallery-accent);
}

.gallery-item-info .btn-like-inline.liked .fa-heart {
    animation: heartPulse 0.3s ease;
}

.gallery-item-info .btn-like-inline .fa-heart {
    color: inherit;
}

@keyframes heartPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.gallery-item-info .comments {
    cursor: pointer;
}

.gallery-item-info .comments:hover {
    color: var(--gallery-boys);
}

/* Sortable ghost */
.gallery-item-ghost {
    opacity: 0.3;
    transform: scale(0.95);
}

/* ============================================
   EXIF Panel
   ============================================ */
.gallery-exif-panel {
    background: var(--gallery-bg-card);
    border-radius: var(--gallery-radius);
    padding: var(--gallery-gap);
    margin-top: var(--gallery-gap);
    box-shadow: var(--gallery-shadow);
    border: 1px solid var(--gallery-border);
}

.exif-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 0;
}

.exif-row:not(:last-child) {
    border-bottom: 1px solid var(--gallery-border-light);
}

.exif-icon {
    font-size: 1.3rem;
    width: 32px;
    text-align: center;
    color: var(--gallery-text-muted);
}

.exif-value {
    color: var(--gallery-text-secondary);
    font-size: 0.95rem;
}

/* ============================================
   Comments & Likes
   ============================================ */
.gallery-comments {
    background: var(--gallery-bg-card);
    border-radius: var(--gallery-radius);
    padding: var(--gallery-gap);
    box-shadow: var(--gallery-shadow);
    border: 1px solid var(--gallery-border);
}

.gallery-comment {
    padding: var(--gallery-gap) 0;
    border-bottom: 1px solid var(--gallery-border-light);
}

.gallery-comment:last-child {
    border-bottom: none;
}

.gallery-comment .comment-author {
    font-weight: 600;
    margin-right: 10px;
    color: var(--gallery-text-primary);
}

.gallery-comment .comment-time {
    color: var(--gallery-text-muted);
    font-size: 0.85rem;
}

.gallery-comment .comment-text {
    margin-top: 6px;
    color: var(--gallery-text-secondary);
    line-height: 1.5;
}

.gallery-likes {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-like {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: transparent;
    border: 2px solid var(--gallery-border);
    border-radius: var(--gallery-radius-sm);
    color: var(--gallery-text-secondary);
    cursor: pointer;
    transition: var(--gallery-transition-fast);
    font-weight: 600;
}

.btn-like:hover {
    border-color: var(--gallery-accent);
    color: var(--gallery-accent);
    transform: translateY(-2px);
}

.btn-like.liked {
    background: var(--gallery-accent);
    border-color: var(--gallery-accent);
    color: #fff;
}

.btn-like .fa-heart {
    transition: transform 0.2s ease;
}

.btn-like:hover .fa-heart,
.btn-like.liked .fa-heart {
    transform: scale(1.2);
}

/* ============================================
   Private Album Lock Screen
   ============================================ */
.gallery-locked {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 30px;
    text-align: center;
    background: var(--gallery-bg-card);
    border-radius: var(--gallery-radius-lg);
    box-shadow: var(--gallery-shadow);
    border: 1px solid var(--gallery-border);
}

.gallery-locked .lock-icon {
    font-size: 5rem;
    color: var(--gallery-text-muted);
    margin-bottom: 24px;
    opacity: 0.6;
}

.gallery-locked h3 {
    margin: 0 0 12px 0;
    color: var(--gallery-text-primary);
    font-size: 1.5rem;
    font-weight: 700;
}

.gallery-locked p {
    color: var(--gallery-text-secondary);
    margin-bottom: 24px;
    font-size: 1rem;
}

.gallery-locked .password-form {
    display: flex;
    gap: 10px;
    max-width: 320px;
    width: 100%;
}

.gallery-locked input[type="password"] {
    flex: 1;
    padding: 12px 18px;
    background: var(--gallery-bg-secondary);
    border: 2px solid var(--gallery-border);
    border-radius: var(--gallery-radius-sm);
    color: var(--gallery-text-primary);
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.gallery-locked input[type="password"]:focus {
    outline: none;
    border-color: var(--gallery-accent);
}

/* ============================================
   Notifications
   ============================================ */
.gallery-notification {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 14px 20px;
    background: var(--gallery-bg-card);
    border-radius: var(--gallery-radius);
    color: var(--gallery-text-primary);
    box-shadow: var(--gallery-shadow-lg);
    transform: translateY(120px);
    opacity: 0;
    transition: var(--gallery-transition);
    z-index: 10000;
    border: 1px solid var(--gallery-border);
    min-width: 280px;
}

.gallery-notification.show {
    transform: translateY(0);
    opacity: 1;
}

.gallery-notification-success {
    border-left: 4px solid var(--gallery-success);
}

.gallery-notification-error {
    border-left: 4px solid var(--gallery-error);
}

.gallery-notification-warning {
    border-left: 4px solid var(--gallery-warning);
}

/* ============================================
   Gender Theme Variants - Matching Homepage
   ============================================ */
/* Boys Theme */
.gallery-container.boys h2,
.gallery-management h2.boys {
    color: var(--gallery-boys);
}

.gallery-container.boys .gallery-album-card:hover,
.gallery-container.boys .gallery-item:hover {
    box-shadow: 0 12px 24px var(--gallery-boys-shadow);
}

.gallery-container.boys .album-private-badge,
.gallery-container.boys .album-badge.private {
    background: var(--gallery-boys);
}

.gallery-container.boys .album-stats i,
.gallery-container.boys .album-count i,
.gallery-container.boys .photo-count i {
    color: var(--gallery-boys);
}

.gallery-container.boys .upload-placeholder:hover,
.gallery-container.boys .upload-placeholder.dragover {
    border-color: var(--gallery-boys);
}

.gallery-container.boys .upload-placeholder .fa {
    color: var(--gallery-boys);
}

.gallery-container.boys .upload-placeholder label,
.gallery-container.boys .upload-placeholder .upload-link {
    color: var(--gallery-boys);
}

.gallery-container.boys .btn-like:hover {
    border-color: var(--gallery-boys);
    color: var(--gallery-boys);
}

.gallery-container.boys .btn-like.liked {
    background: var(--gallery-boys);
    border-color: var(--gallery-boys);
}

.gallery-container.boys .progress-bar {
    background: linear-gradient(90deg, var(--gallery-boys) 0%, var(--gallery-boys-light) 100%);
}

/* Girls Theme */
.gallery-container.girls h2,
.gallery-management h2.girls {
    color: var(--gallery-girls);
}

.gallery-container.girls .gallery-album-card:hover,
.gallery-container.girls .gallery-item:hover {
    box-shadow: 0 12px 24px var(--gallery-girls-shadow);
}

.gallery-container.girls .album-private-badge,
.gallery-container.girls .album-badge.private {
    background: var(--gallery-girls);
}

.gallery-container.girls .album-stats i,
.gallery-container.girls .album-count i,
.gallery-container.girls .photo-count i {
    color: var(--gallery-girls);
}

.gallery-container.girls .upload-placeholder:hover,
.gallery-container.girls .upload-placeholder.dragover {
    border-color: var(--gallery-girls);
}

.gallery-container.girls .upload-placeholder .fa {
    color: var(--gallery-girls);
}

.gallery-container.girls .upload-placeholder label,
.gallery-container.girls .upload-placeholder .upload-link {
    color: var(--gallery-girls);
}

.gallery-container.girls .btn-like:hover {
    border-color: var(--gallery-girls);
    color: var(--gallery-girls);
}

.gallery-container.girls .btn-like.liked {
    background: var(--gallery-girls);
    border-color: var(--gallery-girls);
}

.gallery-container.girls .progress-bar {
    background: linear-gradient(90deg, var(--gallery-girls) 0%, var(--gallery-girls-light) 100%);
}

/* Unisex Theme */
.gallery-container.unisex h2,
.gallery-management h2.unisex {
    color: var(--gallery-unisex);
}

.gallery-container.unisex .gallery-album-card:hover,
.gallery-container.unisex .gallery-item:hover {
    box-shadow: 0 12px 24px var(--gallery-unisex-shadow);
}

.gallery-container.unisex .album-private-badge,
.gallery-container.unisex .album-badge.private {
    background: var(--gallery-unisex);
}

.gallery-container.unisex .album-stats i,
.gallery-container.unisex .album-count i,
.gallery-container.unisex .photo-count i {
    color: var(--gallery-unisex);
}

.gallery-container.unisex .upload-placeholder:hover,
.gallery-container.unisex .upload-placeholder.dragover {
    border-color: var(--gallery-unisex);
}

.gallery-container.unisex .upload-placeholder .fa {
    color: var(--gallery-unisex);
}

.gallery-container.unisex .upload-placeholder label,
.gallery-container.unisex .upload-placeholder .upload-link {
    color: var(--gallery-unisex);
}

.gallery-container.unisex .btn-like:hover {
    border-color: var(--gallery-unisex);
    color: var(--gallery-unisex);
}

.gallery-container.unisex .btn-like.liked {
    background: var(--gallery-unisex);
    border-color: var(--gallery-unisex);
}

.gallery-container.unisex .progress-bar {
    background: linear-gradient(90deg, var(--gallery-unisex) 0%, var(--gallery-unisex-light) 100%);
}

/* ============================================
   Gallery Edit Modals - Complete Modern Redesign
   ============================================ */

/* Modal backdrop */
#createAlbumModal.fade.show ~ .modal-backdrop,
#editAlbumModal.fade.show ~ .modal-backdrop,
#editPhotoModal.fade.show ~ .modal-backdrop {
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
}

/* Modal dialog */
#createAlbumModal .modal-dialog,
#editAlbumModal .modal-dialog,
#editPhotoModal .modal-dialog {
    max-width: 560px;
    margin: 60px auto;
}

/* =================================================================
   GALLERY MODAL - Light mode default, dark via nightly.js
   ================================================================= */

/* Modal Base */
.gallery-modal {
    background: var(--gallery-bg-card);
    border: 1px solid var(--gallery-border);
    border-radius: 8px;
    box-shadow: var(--gallery-shadow-lg);
    overflow: hidden;
}

/* Modal Header */
.gallery-modal .modal-header {
    background: var(--gallery-accent);
    border-bottom: none;
    padding: 14px 20px;
    position: relative;
}

.gallery-modal .modal-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gallery-modal .modal-title i {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.9);
}

.gallery-modal .modal-header .close {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    color: #fff;
    font-size: 18px;
    font-weight: 300;
    line-height: 1;
    opacity: 1;
    transition: all 0.2s ease;
    margin: 0;
    padding: 0;
    text-shadow: none;
    float: none;
}

.gallery-modal .modal-header .close:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Modal Body */
.gallery-modal .modal-body {
    padding: 20px;
    background: var(--gallery-bg-card);
}

/* Form Groups */
.gallery-modal .form-group {
    margin-bottom: 16px;
}

.gallery-modal .form-group:last-child {
    margin-bottom: 0;
}

/* Labels */
.gallery-modal .form-group > label:not(.checkbox-inline) {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gallery-text-primary);
    margin-bottom: 5px;
}

/* Input Fields */
.gallery-modal .form-control {
    width: 100%;
    height: 36px;
    padding: 6px 12px;
    background: var(--gallery-bg-secondary);
    border: 1px solid var(--gallery-border);
    border-radius: 6px;
    color: var(--gallery-text-primary);
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: none;
}

.gallery-modal .form-control::placeholder {
    color: var(--gallery-text-muted);
}

.gallery-modal .form-control:focus {
    outline: none;
    border-color: var(--gallery-accent);
    box-shadow: 0 0 0 2px rgba(233, 69, 96, 0.1);
    color: var(--gallery-text-primary);
}

.gallery-modal textarea.form-control {
    height: auto;
    min-height: 72px;
    resize: vertical;
    padding: 8px 12px;
    line-height: 1.5;
}

/* Help Block */
.gallery-modal .help-block {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: var(--gallery-text-secondary);
    line-height: 1.4;
}

/* Custom Checkbox Toggle */
.gallery-modal .checkbox-inline,
.gallery-modal label.checkbox-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--gallery-bg-hover);
    border: 1px solid var(--gallery-border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--gallery-text-primary);
}

.gallery-modal .checkbox-inline:hover {
    border-color: var(--gallery-accent);
}

.gallery-modal .checkbox-inline input[type="checkbox"] {
    position: relative;
    width: 40px;
    height: 22px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: var(--gallery-border);
    border: 2px solid var(--gallery-border);
    border-radius: 11px;
    outline: none;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0;
}

.gallery-modal .checkbox-inline input[type="checkbox"]::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.gallery-modal .checkbox-inline input[type="checkbox"]:checked {
    background: var(--gallery-accent);
    border-color: var(--gallery-accent);
}

.gallery-modal .checkbox-inline input[type="checkbox"]:checked::before {
    left: calc(100% - 18px);
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.gallery-modal .checkbox-inline span {
    color: var(--gallery-text-primary);
}

/* Modal Footer */
.gallery-modal .modal-footer {
    padding: 12px 20px;
    background: var(--gallery-bg-secondary);
    border-top: 1px solid var(--gallery-border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Buttons */
.gallery-modal .modal-footer .btn {
    height: 34px;
    padding: 0 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gallery-modal .modal-footer .btn i {
    font-size: 12px;
}

.gallery-modal .modal-footer .btn-default {
    background: var(--gallery-bg-card);
    color: var(--gallery-text-secondary);
    border: 1px solid var(--gallery-border);
}

.gallery-modal .modal-footer .btn-default:hover {
    background: var(--gallery-bg-hover);
    color: var(--gallery-text-primary);
}

.gallery-modal .modal-footer .btn-primary {
    background: var(--gallery-accent);
    color: #fff;
    box-shadow: 0 2px 8px rgba(233, 69, 96, 0.25);
}

.gallery-modal .modal-footer .btn-primary:hover {
    opacity: 0.9;
    box-shadow: 0 4px 12px rgba(233, 69, 96, 0.3);
}

.gallery-modal .modal-footer .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* =================================================================
   GENDER THEME VARIANTS FOR MODALS
   Applied directly on .gallery-modal.boys/girls/unisex
   (modals are outside .gallery-container in DOM)
   ================================================================= */

/* Boys */
.gallery-modal.boys .modal-header {
    background: var(--gallery-boys);
}

.gallery-modal.boys .form-control:focus {
    border-color: var(--gallery-boys);
    box-shadow: 0 0 0 3px var(--gallery-boys-shadow);
}

.gallery-modal.boys .checkbox-inline:hover {
    border-color: var(--gallery-boys);
}

.gallery-modal.boys .checkbox-inline input[type="checkbox"]:checked {
    background: var(--gallery-boys);
    border-color: var(--gallery-boys);
}

.gallery-modal.boys .btn-primary {
    background: var(--gallery-boys);
    box-shadow: 0 2px 8px var(--gallery-boys-shadow);
}

.gallery-modal.boys .btn-primary:hover {
    background: var(--gallery-boys-light);
    box-shadow: 0 4px 12px var(--gallery-boys-shadow);
}

/* Girls */
.gallery-modal.girls .modal-header {
    background: var(--gallery-girls);
}

.gallery-modal.girls .form-control:focus {
    border-color: var(--gallery-girls);
    box-shadow: 0 0 0 3px var(--gallery-girls-shadow);
}

.gallery-modal.girls .checkbox-inline:hover {
    border-color: var(--gallery-girls);
}

.gallery-modal.girls .checkbox-inline input[type="checkbox"]:checked {
    background: var(--gallery-girls);
    border-color: var(--gallery-girls);
}

.gallery-modal.girls .btn-primary {
    background: var(--gallery-girls);
    box-shadow: 0 2px 8px var(--gallery-girls-shadow);
}

.gallery-modal.girls .btn-primary:hover {
    background: var(--gallery-girls-light);
    box-shadow: 0 4px 12px var(--gallery-girls-shadow);
}

/* Unisex */
.gallery-modal.unisex .modal-header {
    background: var(--gallery-unisex);
}

.gallery-modal.unisex .form-control:focus {
    border-color: var(--gallery-unisex);
    box-shadow: 0 0 0 3px var(--gallery-unisex-shadow);
}

.gallery-modal.unisex .checkbox-inline:hover {
    border-color: var(--gallery-unisex);
}

.gallery-modal.unisex .checkbox-inline input[type="checkbox"]:checked {
    background: var(--gallery-unisex);
    border-color: var(--gallery-unisex);
}

.gallery-modal.unisex .btn-primary {
    background: var(--gallery-unisex);
    box-shadow: 0 2px 8px var(--gallery-unisex-shadow);
}

.gallery-modal.unisex .btn-primary:hover {
    background: var(--gallery-unisex-light);
    box-shadow: 0 4px 12px var(--gallery-unisex-shadow);
}

/* Responsive */
@media (max-width: 768px) {
    .gallery-modal .modal-header,
    .gallery-modal .modal-body,
    .gallery-modal .modal-footer {
        padding-left: 14px;
        padding-right: 14px;
    }

    .gallery-modal .modal-footer {
        flex-direction: column-reverse;
        gap: 8px;
    }

    .gallery-modal .modal-footer .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   Enhanced Photo Detail Modal
   ============================================ */
#photoDetailModal .modal-dialog {
    max-width: 1100px;
}

#photoDetailModal .modal-content {
    background: var(--gallery-bg-card);
    border: none;
    border-radius: var(--gallery-radius-lg);
    box-shadow: var(--gallery-shadow-lg);
}

#photoDetailModal .modal-header {
    background: var(--gallery-bg-secondary);
    border-bottom: 1px solid var(--gallery-border);
    border-radius: var(--gallery-radius-lg) var(--gallery-radius-lg) 0 0;
    padding: 20px 24px;
}

#photoDetailModal .modal-title {
    color: var(--gallery-text-primary);
    font-weight: 700;
    font-size: 1.3rem;
}

#photoDetailModal .close {
    color: var(--gallery-text-secondary);
    opacity: 0.8;
    font-size: 2rem;
    transition: var(--gallery-transition-fast);
}

#photoDetailModal .close:hover {
    opacity: 1;
    color: var(--gallery-text-primary);
}

#photoDetailModal .modal-body {
    padding: 0;
    color: var(--gallery-text-primary);
}

#photoDetailModal .modal-body .row {
    margin: 0;
}

/* Photo main image section */
.photo-main-section {
    background: var(--gallery-bg-primary);
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    position: relative;
}

#photoDetailImg {
    max-width: 100%;
    max-height: 70vh;
    border-radius: var(--gallery-radius);
    box-shadow: var(--gallery-shadow-lg);
}

/* Photo sidebar */
.photo-sidebar {
    background: var(--gallery-bg-card);
    padding: 24px;
    max-height: 80vh;
    overflow-y: auto;
    border-left: 1px solid var(--gallery-border);
}

/* Custom scrollbar for sidebar */
.photo-sidebar::-webkit-scrollbar {
    width: 8px;
}

.photo-sidebar::-webkit-scrollbar-track {
    background: var(--gallery-bg-secondary);
    border-radius: 4px;
}

.photo-sidebar::-webkit-scrollbar-thumb {
    background: var(--gallery-border);
    border-radius: 4px;
}

.photo-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--gallery-text-muted);
}

/* Photo author */
.photo-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gallery-border-light);
}

#photoAuthorIcon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--gallery-border);
}

#photoAuthorNick {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--gallery-text-primary);
}

/* Photo description */
.photo-description {
    color: var(--gallery-text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
    padding: 12px;
    background: var(--gallery-bg-secondary);
    border-radius: var(--gallery-radius-sm);
    border-left: 3px solid var(--gallery-accent);
}

/* Photo stats */
.photo-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding: 16px;
    background: var(--gallery-bg-secondary);
    border-radius: var(--gallery-radius);
}

.photo-stats .stat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    color: var(--gallery-text-secondary);
}

.photo-stats .stat i {
    font-size: 1.2rem;
}

.photo-stats .stat:nth-child(1) i {
    color: var(--gallery-accent);
}

.photo-stats .stat:nth-child(2) i {
    color: var(--gallery-boys);
}

.photo-stats .stat:nth-child(3) i {
    color: var(--gallery-unisex);
}

/* Like button in modal */
.btn-like {
    width: 100%;
    margin-bottom: 24px;
}

/* EXIF section */
.photo-exif {
    margin-bottom: 24px;
    padding: 16px;
    background: var(--gallery-bg-secondary);
    border-radius: var(--gallery-radius);
}

.photo-exif h5 {
    margin: 0 0 16px 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--gallery-text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.exif-list {
    margin: 0;
}

.exif-list dt {
    color: var(--gallery-text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    margin-top: 12px;
}

.exif-list dt:first-child {
    margin-top: 0;
}

.exif-list dd {
    color: var(--gallery-text-primary);
    font-size: 0.95rem;
    margin-bottom: 0;
    font-weight: 500;
}

/* Comments section */
.photo-comments {
    margin-top: 24px;
}

.photo-comments h5 {
    margin: 0 0 16px 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--gallery-text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 16px;
}

.comment-item {
    padding: 12px;
    margin-bottom: 10px;
    background: var(--gallery-bg-secondary);
    border-radius: var(--gallery-radius-sm);
    border-left: 3px solid transparent;
    transition: var(--gallery-transition-fast);
}

.comment-item:hover {
    border-left-color: var(--gallery-accent);
}

.comment-author {
    font-weight: 700;
    color: var(--gallery-text-primary);
    margin-bottom: 4px;
    font-size: 0.95rem;
}

.comment-time {
    color: var(--gallery-text-muted);
    font-size: 0.8rem;
    margin-left: 8px;
}

.comment-text {
    color: var(--gallery-text-secondary);
    line-height: 1.5;
    margin: 8px 0 0 0;
}

/* Add comment form */
.add-comment-form {
    margin-top: 12px;
}

.add-comment-form textarea {
    background: var(--gallery-bg-secondary);
    border: 2px solid var(--gallery-border);
    color: var(--gallery-text-primary);
    border-radius: var(--gallery-radius-sm);
    padding: 10px 14px;
    transition: border-color 0.2s ease;
    resize: none;
}

.add-comment-form textarea:focus {
    outline: none;
    border-color: var(--gallery-accent);
}

.add-comment-form .btn {
    margin-top: 8px;
}

/* ============================================
   Fancybox Customization - Dark overlay
   ============================================ */
.fancybox__container {
    --fancybox-bg: rgba(0, 0, 0, 0.92);
}

.fancybox__toolbar,
.fancybox__thumbs {
    background: var(--gallery-bg-secondary);
}

.fancybox__caption {
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
    color: #fff;
    padding: 20px;
}

/* ============================================
   Responsive Design - Mobile First
   ============================================ */
@media (max-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .gallery-albums-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: var(--gallery-gap-sm);
    }

    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Modal adjustments for tablets */
    #photoDetailModal .modal-dialog {
        max-width: 900px;
    }
}

@media (max-width: 768px) {
    .gallery-container {
        padding: var(--gallery-gap-sm);
    }

    .gallery-management {
        padding: var(--gallery-gap-sm);
    }

    .gallery-management h2 {
        font-size: 20px;
        margin-bottom: var(--gallery-gap);
    }

    .gallery-top-actions {
        flex-direction: column;
        text-align: center;
    }

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

    .album-actions-inline {
        width: 100%;
        justify-content: stretch;
    }

    .album-actions-inline .btn {
        flex: 1;
    }

    .gallery-albums-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--gallery-gap-sm);
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--gallery-gap-sm);
    }

    .gallery-item-info {
        padding: 8px 10px;
        font-size: 0.8rem;
    }

    .upload-placeholder {
        padding: 40px 20px;
    }

    .upload-placeholder .fa {
        font-size: 3rem;
    }

    .preview-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .gallery-locked .password-form {
        flex-direction: column;
    }

    /* Modal - stack image and sidebar */
    #photoDetailModal .modal-body .row {
        flex-direction: column;
    }

    #photoDetailModal .modal-body .col-md-8,
    #photoDetailModal .modal-body .col-md-4 {
        width: 100%;
        max-width: 100%;
    }

    .photo-sidebar {
        max-height: none;
        border-left: none;
        border-top: 1px solid var(--gallery-border);
    }

    .photo-main-section {
        min-height: 300px;
    }
}

@media (max-width: 480px) {
    .gallery-albums-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--gallery-gap-xs);
    }

    .gallery-item-overlay .btn {
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }

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

    #photoDetailModal .modal-dialog {
        margin: 10px;
    }

    #photoDetailModal .modal-content {
        border-radius: var(--gallery-radius);
    }

    .photo-main-section {
        padding: 12px;
    }

    .photo-sidebar {
        padding: 16px;
    }
}

/* ============================================
   Animations
   ============================================ */
@keyframes gallery-fade-in {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes gallery-slide-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes upload-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.05);
        opacity: 1;
    }
}

/* ============================================
   Fancybox Sidebar Panel (Facebook-style)
   ============================================ */
.fancybox__container.has-sidebar .fancybox__carousel {
    width: calc(100% - 360px);
}

.fancybox__container.has-sidebar .fancybox__footer,
.fancybox__container.has-sidebar .fancybox__thumbs {
    width: calc(100% - 360px) !important;
    max-width: calc(100% - 360px) !important;
}

/* Prevent thumbs from capturing clicks in sidebar area */
.fancybox__container.has-sidebar .f-thumbs,
.fancybox__container.has-sidebar .f-thumbs__viewport,
.fancybox__container.has-sidebar .f-thumbs__track {
    max-width: calc(100% - 360px) !important;
}

/* Fancybox toolbar - prevent sidebar overlap */
.fancybox__container.has-sidebar .fancybox__toolbar {
    right: 370px;
}

/* Chatujme logo in Fancybox toolbar - vertically centered at start */
.fancybox__toolbar {
    display: flex !important;
    align-items: center;
}

.fancybox-logo-column {
    display: flex;
    align-items: center;
    padding: 0 10px;
    height: 100%;
}

.fancybox-chatujme-logo {
    display: flex;
    align-items: center;
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

.fancybox-chatujme-logo:hover {
    opacity: 1;
}

.fancybox-chatujme-logo img {
    height: 28px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

/* Floating logo fallback when toolbar not found */
.fancybox-logo-floating {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1070;
    pointer-events: auto;
}

.fancybox-logo-floating .fancybox-chatujme-logo {
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 14px;
    border-radius: var(--gallery-radius-sm, 8px);
    backdrop-filter: blur(8px);
}

.fancybox-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 360px;
    height: 100vh;
    background: var(--gallery-bg-card, #ffffff);
    display: flex;
    flex-direction: column;
    z-index: 1060;
    box-shadow: -2px 0 20px rgba(0,0,0,0.3);
    overflow: hidden;
}

.fancybox-sidebar-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--gallery-border, #e5e7eb);
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--gallery-bg-secondary, #f5f7fa);
}

.fancybox-sidebar-header .author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.fancybox-sidebar-header .author-info {
    flex: 1;
}

.fancybox-sidebar-header .author-nick {
    font-weight: 600;
    color: var(--gallery-text-primary, #1f2937);
    font-size: 15px;
}

.fancybox-sidebar-header .photo-date {
    font-size: 12px;
    color: var(--gallery-text-muted, #9ca3af);
}

.fancybox-sidebar-header .btn-close-sidebar {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--gallery-text-secondary, #6b7280);
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.fancybox-sidebar-header .btn-close-sidebar:hover {
    background: var(--gallery-accent, #e94560);
    color: white;
}

/* Stats section - kompaktní s dimensions */
.fancybox-sidebar-stats {
    padding: 12px 20px;
    border-bottom: 1px solid var(--gallery-border, #e5e7eb);
    background: var(--gallery-bg-secondary, #f5f7fa);
}

.fancybox-sidebar-stats .stats-row {
    display: flex;
    gap: 16px;
}

.fancybox-sidebar-stats .stat {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--gallery-text-secondary, #6b7280);
    font-size: 13px;
    font-weight: 500;
}

.fancybox-sidebar-stats .stat i {
    font-size: 14px;
}

.fancybox-sidebar-stats .stat.likes i {
    color: var(--gallery-accent, #e94560);
}

/* Dimensions row pod stats */
.fancybox-sidebar-stats .dimensions-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-top: 8px;
    margin-top: 8px;
    border-top: 1px dashed rgba(0,0,0,0.06);
    font-size: 11px;
    color: var(--gallery-text-muted, #9ca3af);
}

.fancybox-sidebar-stats .dimensions-row i {
    font-size: 11px;
    opacity: 0.7;
}

.fancybox-sidebar-stats .dimensions-text {
    font-weight: 500;
}

/* Actions row (like on left, download/fullscreen on right) - icon buttons */
.fancybox-sidebar-actions-row {
    padding: 10px 20px;
    border-bottom: 1px solid var(--gallery-border, #e5e7eb);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fancybox-sidebar-actions-row .actions-right {
    display: flex;
    gap: 8px;
}

.fancybox-sidebar-actions-row .btn-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--gallery-border, #e5e7eb);
    border-radius: 50%;
    background: var(--gallery-bg-card, #ffffff);
    color: var(--gallery-text-secondary, #6b7280);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fancybox-sidebar-actions-row .btn-icon:hover {
    border-color: var(--gallery-accent, #e94560);
    color: var(--gallery-accent, #e94560);
    background: rgba(233, 69, 96, 0.05);
}

.fancybox-sidebar-actions-row .btn-icon i {
    font-size: 16px;
}

.fancybox-sidebar-actions-row .btn-like-sidebar.liked {
    background: var(--gallery-accent, #e94560);
    border-color: var(--gallery-accent, #e94560);
    color: white;
}

.fancybox-sidebar-actions-row .btn-like-sidebar.liked:hover {
    background: var(--gallery-accent-hover, #ff6b6b);
    border-color: var(--gallery-accent-hover, #ff6b6b);
    color: white;
}

/* EXIF info section - KOMPAKTNÍ verze bez nadpisu */
.fancybox-sidebar-exif {
    padding: 10px 20px;
    border-bottom: 1px solid var(--gallery-border, #e5e7eb);
    background: var(--gallery-bg-card, #ffffff);
}

.fancybox-sidebar-exif h4 {
    display: none; /* Skrýt nadpis */
}

.fancybox-sidebar-exif .exif-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Mini EXIF řádky - kompaktní */
.fancybox-sidebar-exif .exif-mini {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--gallery-text-secondary, #6b7280);
    padding: 3px 0;
}

.fancybox-sidebar-exif .exif-mini i {
    width: 14px;
    font-size: 11px;
    color: var(--gallery-text-muted, #9ca3af);
    flex-shrink: 0;
}

/* Technické detaily - méně výrazné */
.fancybox-sidebar-exif .exif-mini.exif-tech {
    color: var(--gallery-text-muted, #9ca3af);
    font-size: 11px;
    padding-top: 4px;
    margin-top: 2px;
    border-top: 1px dashed var(--gallery-border-light, #f3f4f6);
}

.fancybox-sidebar-exif .no-exif {
    font-size: 12px;
    color: var(--gallery-text-muted, #9ca3af);
    font-style: italic;
    text-align: center;
    padding: 4px 0;
}

/* Staré styly - zachovat pro kompatibilitu ale skrýt */
.fancybox-sidebar-exif .exif-row,
.fancybox-sidebar-exif .exif-compact,
.fancybox-sidebar-exif .exif-toggle-wrapper,
.fancybox-sidebar-exif .exif-toggle-btn,
.fancybox-sidebar-exif .exif-extra {
    display: none !important;
}

/* Photo description in sidebar - kompaktní */
.fancybox-sidebar-description {
    padding: 10px 20px;
    border-bottom: 1px solid var(--gallery-border, #e5e7eb);
    background: linear-gradient(135deg, rgba(233, 69, 96, 0.02) 0%, rgba(233, 69, 96, 0.06) 100%);
}

.fancybox-sidebar-description .description-icon {
    display: none; /* Skrýt ikonu citace */
}

.fancybox-sidebar-description .description-text {
    font-size: 13px;
    color: var(--gallery-text-primary, #1f2937);
    line-height: 1.5;
    font-style: normal;
}

.fancybox-sidebar-description .no-description {
    display: none; /* Pokud není popis, sekce se skryje */
}

.fancybox-sidebar-actions {
    padding: 12px 20px;
    border-bottom: 1px solid var(--gallery-border, #e5e7eb);
    display: flex;
    gap: 10px;
}

.fancybox-sidebar-actions .btn-like-sidebar {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: 2px solid var(--gallery-border, #e5e7eb);
    border-radius: 8px;
    background: transparent;
    color: var(--gallery-text-secondary, #6b7280);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fancybox-sidebar-actions .btn-like-sidebar:hover {
    border-color: var(--gallery-accent, #e94560);
    color: var(--gallery-accent, #e94560);
}

.fancybox-sidebar-actions .btn-like-sidebar.liked {
    background: var(--gallery-accent, #e94560);
    border-color: var(--gallery-accent, #e94560);
    color: white;
}

.fancybox-sidebar-actions .btn-like-sidebar.liked:hover {
    background: var(--gallery-accent-hover, #ff6b6b);
    border-color: var(--gallery-accent-hover, #ff6b6b);
}

.fancybox-sidebar-comments {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
}

.fancybox-sidebar-comments h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--gallery-text-primary, #1f2937);
    margin: 0 0 12px 0;
}

.fancybox-comment {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.fancybox-comment .comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.fancybox-comment .comment-content {
    flex: 1;
    background: var(--gallery-bg-secondary, #f5f7fa);
    padding: 10px 14px;
    border-radius: 12px;
}

.fancybox-comment .comment-author {
    font-weight: 600;
    font-size: 13px;
    color: var(--gallery-text-primary, #1f2937);
}

.fancybox-comment .comment-text {
    font-size: 14px;
    color: var(--gallery-text-secondary, #6b7280);
    margin-top: 4px;
    line-height: 1.4;
}

.fancybox-comment .comment-time {
    font-size: 11px;
    color: var(--gallery-text-muted, #9ca3af);
    margin-top: 6px;
}

.fancybox-sidebar-comments .no-comments {
    text-align: center;
    color: var(--gallery-text-muted, #9ca3af);
    padding: 30px 0;
    font-size: 14px;
}

.fancybox-sidebar-form {
    padding: 12px 20px;
    border-top: 1px solid var(--gallery-border, #e5e7eb);
    background: var(--gallery-bg-secondary, #f5f7fa);
    position: relative;
    z-index: 10;
}

.fancybox-sidebar-form .comment-input-wrapper {
    display: flex;
    gap: 10px;
}

.fancybox-sidebar-form textarea {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--gallery-border, #e5e7eb);
    border-radius: 20px;
    resize: none;
    font-size: 14px;
    font-family: inherit;
    background: var(--gallery-bg-card, #ffffff);
    color: var(--gallery-text-primary, #1f2937);
    min-height: 40px;
    max-height: 80px;
}

.fancybox-sidebar-form textarea:focus {
    outline: none;
    border-color: var(--gallery-accent, #e94560);
}

.fancybox-sidebar-form textarea::placeholder {
    color: var(--gallery-text-muted, #9ca3af);
}

.fancybox-sidebar-form .btn-send {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: var(--gallery-accent, #e94560);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.fancybox-sidebar-form .btn-send:hover {
    background: var(--gallery-accent-hover, #ff6b6b);
}

.fancybox-sidebar-form .btn-send:disabled {
    background: var(--gallery-text-muted, #9ca3af);
    cursor: not-allowed;
}

.fancybox-sidebar-login {
    padding: 20px;
    text-align: center;
    color: var(--gallery-text-muted, #9ca3af);
    font-size: 14px;
}

.fancybox-sidebar-login a {
    color: var(--gallery-accent, #e94560);
    text-decoration: none;
    font-weight: 500;
}

.fancybox-sidebar-login a:hover {
    text-decoration: underline;
}

/* Responsive sidebar */
@media (max-width: 900px) {
    .fancybox__container.has-sidebar .fancybox__carousel {
        width: 100%;
    }

    .fancybox-sidebar {
        width: 100%;
        height: 50vh;
        top: auto;
        bottom: 0;
        border-radius: 20px 20px 0 0;
    }
}

@media (max-width: 600px) {
    .fancybox-sidebar {
        height: 60vh;
    }

    .fancybox-sidebar-stats {
        flex-wrap: wrap;
        gap: 12px;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .gallery-upload-zone,
    .gallery-item-overlay,
    .gallery-notification,
    .gallery-top-actions,
    .album-actions-inline,
    .album-header .btn-back,
    .fancybox-sidebar {
        display: none !important;
    }

    .gallery-item {
        break-inside: avoid;
    }
}

/* ============================================
   Private Album Unlock
   ============================================ */

.private-album-unlock {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.unlock-card {
    background: var(--gallery-bg);
    border: 1px solid var(--gallery-border-light);
    border-radius: 16px;
    max-width: 480px;
    width: 100%;
    padding: 48px 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.unlock-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.lock-icon-container {
    text-align: center;
    margin-bottom: 28px;
}

.lock-icon-wrapper {
    display: inline-flex;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f5a623 0%, #e8a317 100%);
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(232, 163, 23, 0.3);
    animation: lockPulse 2.5s ease-in-out infinite;
}

.lock-icon-wrapper i {
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

@keyframes lockPulse {
    0%, 100% { box-shadow: 0 4px 16px rgba(232, 163, 23, 0.3); }
    50% { box-shadow: 0 4px 24px rgba(232, 163, 23, 0.5); }
}

.unlock-content {
    text-align: center;
}

.unlock-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--gallery-text);
    margin: 0 0 10px 0;
}

.unlock-description {
    font-size: 14px;
    color: var(--gallery-text);
    opacity: 0.6;
    margin: 0 0 28px 0;
}

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

.password-input-wrapper {
    position: relative;
}

.password-input-wrapper .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gallery-text);
    opacity: 0.4;
    font-size: 15px;
    pointer-events: none;
}

.password-input-wrapper .password-input {
    height: 46px;
    padding: 10px 16px 10px 40px;
    border: 2px solid var(--gallery-border-light);
    border-radius: 8px;
    font-size: 15px;
    color: var(--gallery-text);
    background: var(--gallery-bg);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.password-input-wrapper .password-input:focus {
    outline: none;
    border-color: #e8a317;
    box-shadow: 0 0 0 3px rgba(232, 163, 23, 0.15);
}

.unlock-error {
    margin-top: 10px;
    padding: 10px 14px;
    background: rgba(220, 53, 69, 0.08);
    border: 1px solid rgba(220, 53, 69, 0.25);
    border-radius: 6px;
    color: #dc3545;
    font-size: 13px;
    text-align: left;
    animation: errorSlideIn 0.3s ease;
}

.unlock-error i {
    margin-right: 6px;
}

.unlock-error .error-text {
    font-weight: 500;
}

@keyframes errorSlideIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.btn-unlock {
    width: 100%;
    height: 46px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--gallery-boys) 0%, #1a5f7f 100%);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(33, 116, 154, 0.3);
}

.btn-unlock:hover,
.btn-unlock:focus {
    background: linear-gradient(135deg, #1a5f7f 0%, var(--gallery-boys) 100%);
    box-shadow: 0 4px 12px rgba(33, 116, 154, 0.4);
    transform: translateY(-1px);
    color: #fff;
}

.girls .btn-unlock {
    background: linear-gradient(135deg, var(--gallery-girls) 0%, #a52561 100%);
    box-shadow: 0 2px 8px rgba(203, 47, 121, 0.3);
}

.girls .btn-unlock:hover,
.girls .btn-unlock:focus {
    background: linear-gradient(135deg, #a52561 0%, var(--gallery-girls) 100%);
    box-shadow: 0 4px 12px rgba(203, 47, 121, 0.4);
    color: #fff;
}

.unisex .btn-unlock {
    background: linear-gradient(135deg, var(--gallery-unisex) 0%, #2a7a00 100%);
    box-shadow: 0 2px 8px rgba(51, 153, 0, 0.3);
}

.unisex .btn-unlock:hover,
.unisex .btn-unlock:focus {
    background: linear-gradient(135deg, #2a7a00 0%, var(--gallery-unisex) 100%);
    box-shadow: 0 4px 12px rgba(51, 153, 0, 0.4);
    color: #fff;
}

@media (max-width: 576px) {
    .unlock-card {
        padding: 32px 20px;
    }
    .lock-icon-wrapper {
        width: 76px;
        height: 76px;
    }
    .lock-icon-wrapper i { font-size: 2.5em; }
    .unlock-title { font-size: 18px; }
    .unlock-description { font-size: 13px; margin-bottom: 20px; }
    .password-input-wrapper .password-input,
    .btn-unlock { height: 42px; font-size: 14px; }
}

/* ============================================
   Sort Toolbar
   ============================================ */
.gallery-sort-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 14px;
    margin-bottom: var(--gallery-gap);
    background: var(--gallery-bg-card);
    border-radius: var(--gallery-radius);
    border: 1px solid var(--gallery-border);
    box-shadow: var(--gallery-shadow-sm);
}

.gallery-sort-toolbar .sort-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.gallery-sort-toolbar .sort-label {
    color: var(--gallery-text-secondary);
    font-size: 1rem;
    font-weight: 500;
    white-space: nowrap;
}

.gallery-sort-toolbar .sort-label i {
    margin-right: 4px;
}

.gallery-sort-btn {
    padding: 6px 14px;
    border: 1px solid var(--gallery-border);
    border-radius: 20px;
    background: var(--gallery-bg-secondary);
    color: var(--gallery-text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--gallery-transition-fast);
    white-space: nowrap;
}

.gallery-sort-btn:hover {
    background: var(--gallery-bg-hover);
    color: var(--gallery-text-primary);
    border-color: var(--gallery-accent);
}

.gallery-sort-btn.active {
    background: var(--gallery-accent);
    color: #fff;
    border-color: var(--gallery-accent);
}

.gallery-sort-btn i {
    margin-right: 3px;
}

.gallery-sort-toolbar .sort-right {
    display: flex;
    align-items: center;
}

.gallery-sort-toolbar .photo-counter {
    color: var(--gallery-text-muted);
    font-size: 0.95rem;
}

/* ============================================
   Infinite Scroll Sentinel & Spinner
   ============================================ */
.gallery-scroll-sentinel {
    width: 100%;
    min-height: 1px;
}

.gallery-load-more-spinner {
    text-align: center;
    padding: 30px 20px;
    color: var(--gallery-text-secondary);
    font-size: 0.95rem;
}

.gallery-load-more-spinner i {
    margin-right: 8px;
}

/* Sort toolbar responsive */
@media (max-width: 576px) {
    .gallery-sort-toolbar {
        padding: 8px 10px;
    }

    .gallery-sort-btn {
        padding: 5px 10px;
        font-size: 0.8rem;
    }

    .gallery-sort-toolbar .sort-label {
        display: none;
    }
}
