/* ==========================================================================
   Gallery — community image gallery matching the site theme
   --------------------------------------------------------------------------
   Clean header, image grid, upload/lightbox modals. Orange (#2bbdf6 / --orange)
   remapped to the site accent (#2bbdf6). Semantic reds (delete/error) and
   greens (like/success) preserved. Tokens (--qr-*) come from qubitrp.css.
   ========================================================================== */

    .gallery-page {
        background: #0b0f13;
        padding: 56px 0 0;
        min-height: calc(100vh - 78px);
    }

    .gallery-container {
        max-width: 1400px;
        margin: 0 auto;
        padding: 0 1rem 5rem;
    }

    .gallery-header {
        text-align: center;
        margin-bottom: 2.5rem;
    }

    .gallery-badge {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 6px 16px;
        margin-bottom: 20px;
        border: 1px solid rgba(43, 189, 246, 0.4);
        border-radius: 999px;
        background: var(--qr-green-soft);
        color: var(--qr-green-bright);
        font-size: 0.74rem;
        font-weight: 700;
        letter-spacing: 1.4px;
        text-transform: uppercase;
    }

    .gallery-title {
        font-size: clamp(2.2rem, 5vw, 3.4rem);
        font-weight: 800;
        letter-spacing: -0.5px;
        color: #ffffff;
        margin-bottom: 0.75rem;
    }
    .gallery-title span { color: var(--qr-green); }

    .gallery-subtitle {
        font-size: 1.08rem;
        color: rgba(233, 246, 255, 0.55);
        margin: 0 auto 1.5rem;
        max-width: 640px;
    }

    .upload-button {
        display: inline-flex;
        align-items: center;
        gap: 0.75rem;
        background: linear-gradient(135deg, #2bbdf6 0%, #1a9fd4 100%);
        color: white;
        padding: 1rem 2rem;
        border-radius: 16px;
        font-weight: 700;
        font-size: 1.05rem;
        text-decoration: none;
        transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        border: none;
        cursor: pointer;
        margin-top: 1rem;
        position: relative;
        z-index: 1;
        box-shadow: 0 4px 20px rgba(43, 189, 246, 0.3);
    }

    .upload-button:hover {
        transform: translateY(-3px) scale(1.02);
        box-shadow: 0 12px 32px rgba(43, 189, 246, 0.4);
        color: white;
    }

    .upload-button:active {
        transform: translateY(-1px) scale(0.98);
    }

    .upload-button i {
        font-size: 1.2rem;
        transition: transform 0.3s ease;
    }

    .upload-button:hover i {
        transform: rotate(10deg) scale(1.1);
    }

    .gallery-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
        margin-bottom: 3rem;
    }

    .gallery-card {
        background: var(--card-bg);
        border: 2px solid var(--border-color);
        border-radius: 20px;
        overflow: hidden;
        transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
        text-decoration: none;
        display: block;
        position: relative;
    }

    .gallery-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, rgba(43, 189, 246, 0.1) 0%, rgba(43, 189, 246, 0.1) 100%);
        opacity: 0;
        transition: opacity 0.4s ease;
        z-index: 1;
        pointer-events: none;
    }

    .gallery-card:hover::before {
        opacity: 1;
    }

    .gallery-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 16px 40px rgba(43, 189, 246, 0.2);
        border-color: rgba(43, 189, 246, 0.5);
    }

    .gallery-image-container {
        position: relative;
        width: 100%;
        height: 200px;
        overflow: hidden;
        background: linear-gradient(135deg, rgba(43, 189, 246, 0.05) 0%, rgba(43, 189, 246, 0.05) 100%);
    }

    .gallery-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .gallery-card:hover .gallery-image {
        transform: scale(1.08) rotate(1deg);
    }

    .gallery-card-body {
        padding: 1.25rem;
        position: relative;
        z-index: 2;
    }

    .gallery-card-title {
        font-size: 1.15rem;
        font-weight: 700;
        color: var(--text-primary);
        margin-bottom: 0.5rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        transition: color 0.3s ease;
    }

    .gallery-card:hover .gallery-card-title {
        color: #2bbdf6;
    }

    .gallery-card-description {
        font-size: 0.875rem;
        color: var(--text-secondary);
        margin-bottom: 1rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        line-height: 1.5;
    }

    .gallery-card-footer {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-top: 1.25rem;
        border-top: 2px solid var(--border-color);
        transition: border-color 0.3s ease;
    }

    .gallery-card:hover .gallery-card-footer {
        border-color: rgba(43, 189, 246, 0.3);
    }

    .gallery-user {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        font-size: 0.9rem;
        color: var(--text-secondary);
        transition: all 0.3s ease;
    }

    .gallery-card:hover .gallery-user {
        color: var(--text-primary);
    }

    .user-avatar {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        border: 2px solid var(--qr-green);
        transition: all 0.3s ease;
        box-shadow: 0 2px 8px rgba(43, 189, 246, 0.2);
    }

    .gallery-card:hover .user-avatar {
        transform: scale(1.1);
        border-width: 3px;
        box-shadow: 0 4px 12px rgba(43, 189, 246, 0.4);
    }

    .gallery-stats {
        display: flex;
        align-items: center;
        gap: 1.25rem;
    }

    .stat-item {
        display: flex;
        align-items: center;
        gap: 0.4rem;
        color: var(--text-secondary);
        font-size: 0.95rem;
        font-weight: 600;
        transition: all 0.3s ease;
        padding: 0.4rem 0.75rem;
        border-radius: 8px;
        background: var(--bg-secondary);
    }

    .gallery-card:hover .stat-item {
        background: rgba(43, 189, 246, 0.1);
        color: var(--text-primary);
    }

    .stat-item i {
        color: var(--qr-green);
        font-size: 1rem;
        transition: transform 0.3s ease;
    }

    .gallery-card:hover .stat-item i {
        transform: scale(1.15);
    }

    .upload-modal {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.85);
        backdrop-filter: blur(8px);
        z-index: 1000;
        align-items: center;
        justify-content: center;
        animation: fadeIn 0.3s ease;
    }

    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    @keyframes slideUp {
        from {
            opacity: 0;
            transform: translateY(30px) scale(0.95);
        }
        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }

    .upload-modal.active {
        display: flex;
    }

    .upload-modal-content {
        background: var(--card-bg);
        border-radius: 24px;
        padding: 2.5rem;
        max-width: 650px;
        width: 90%;
        max-height: 90vh;
        overflow-y: auto;
        box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
        border: 2px solid rgba(43, 189, 246, 0.2);
        animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .upload-modal-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 2rem;
        padding-bottom: 1.5rem;
        border-bottom: 2px solid var(--border-color);
    }

    .upload-modal-title {
        font-size: 2rem;
        font-weight: 800;
        background: linear-gradient(135deg, #2bbdf6 0%, #3b82f6 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    .upload-modal-title i {
        background: linear-gradient(135deg, #2bbdf6 0%, #1a9fd4 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .close-modal {
        background: var(--bg-secondary);
        border: 2px solid var(--border-color);
        width: 40px;
        height: 40px;
        border-radius: 12px;
        font-size: 1.25rem;
        color: var(--text-secondary);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .close-modal:hover {
        background: linear-gradient(135deg, #2bbdf6 0%, #1a9fd4 100%);
        color: white;
        border-color: #2bbdf6;
        transform: rotate(90deg) scale(1.1);
    }

    .form-group {
        margin-bottom: 1.75rem;
    }

    .form-label {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-weight: 700;
        color: var(--text-primary);
        margin-bottom: 0.75rem;
        font-size: 1.05rem;
    }

    .form-label i {
        color: var(--qr-green);
        font-size: 1rem;
    }

    .form-control {
        width: 100%;
        padding: 1rem 1.25rem;
        background: var(--bg-secondary);
        border: 2px solid var(--border-color);
        border-radius: 12px;
        color: var(--text-primary);
        font-size: 1rem;
        transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .form-control:hover {
        border-color: rgba(43, 189, 246, 0.4);
    }

    .form-control:focus {
        outline: none;
        border-color: #2bbdf6;
        box-shadow: 0 0 0 4px rgba(43, 189, 246, 0.15);
        transform: translateY(-1px);
    }

    textarea.form-control {
        resize: vertical;
        min-height: 120px;
        font-family: inherit;
    }

    .file-input-wrapper {
        position: relative;
        overflow: hidden;
        display: inline-block;
        width: 100%;
    }

    .file-input-label {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 1rem;
        padding: 3rem 2rem;
        background: linear-gradient(135deg, rgba(43, 189, 246, 0.03) 0%, rgba(43, 189, 246, 0.03) 100%);
        border: 3px dashed var(--border-color);
        border-radius: 16px;
        cursor: pointer;
        transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        color: var(--text-secondary);
        position: relative;
        overflow: hidden;
    }

    .file-input-label::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        background: radial-gradient(circle, rgba(43, 189, 246, 0.1) 0%, transparent 70%);
        border-radius: 50%;
        transform: translate(-50%, -50%);
        transition: all 0.5s ease;
    }

    .file-input-label:hover::before {
        width: 300px;
        height: 300px;
    }

    .file-input-label:hover {
        border-color: #2bbdf6;
        background: linear-gradient(135deg, rgba(43, 189, 246, 0.08) 0%, rgba(43, 189, 246, 0.08) 100%);
        transform: translateY(-2px);
    }

    .file-input-label i {
        font-size: 3rem;
        color: var(--qr-green);
        transition: transform 0.3s ease;
    }

    .file-input-label:hover i {
        transform: scale(1.1) rotate(5deg);
    }

    .file-input-label span {
        font-weight: 600;
        font-size: 1.05rem;
        position: relative;
        z-index: 1;
    }

    .file-input-wrapper input[type="file"] {
        position: absolute;
        left: -9999px;
    }

    .images-preview-grid {
        margin-top: 1.5rem;
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }

    .preview-item {
        position: relative;
        border-radius: 12px;
        overflow: hidden;
        border: 2px solid rgba(43, 189, 246, 0.3);
        box-shadow: 0 4px 12px rgba(43, 189, 246, 0.15);
        aspect-ratio: 1;
    }

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

    .preview-item-remove {
        position: absolute;
        top: 0.5rem;
        right: 0.5rem;
        background: rgba(239, 68, 68, 0.9);
        color: white;
        border: none;
        border-radius: 50%;
        width: 28px;
        height: 28px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        font-size: 0.9rem;
        transition: all 0.3s ease;
    }

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

    .image-details-item {
        margin-bottom: 1.5rem;
        padding: 1.5rem;
        background: var(--bg-secondary);
        border: 2px solid var(--border-color);
        border-radius: 16px;
    }

    .image-details-header {
        display: flex;
        align-items: center;
        gap: 1rem;
        margin-bottom: 1rem;
        padding-bottom: 1rem;
        border-bottom: 2px solid var(--border-color);
    }

    .image-details-thumb {
        width: 60px;
        height: 60px;
        object-fit: cover;
        border-radius: 8px;
        border: 2px solid var(--qr-green);
    }

    .image-details-name {
        font-weight: 700;
        color: var(--text-primary);
        font-size: 1rem;
    }

    .submit-button {
        width: 100%;
        background: linear-gradient(135deg, #2bbdf6 0%, #1a9fd4 100%);
        color: white;
        padding: 1.25rem 2rem;
        border-radius: 16px;
        font-weight: 700;
        font-size: 1.15rem;
        border: none;
        cursor: pointer;
        transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.75rem;
        box-shadow: 0 4px 20px rgba(43, 189, 246, 0.3);
        position: relative;
        overflow: hidden;
    }

    .submit-button::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
        transition: left 0.5s ease;
    }

    .submit-button:hover::before {
        left: 100%;
    }

    .submit-button:hover {
        transform: translateY(-3px) scale(1.02);
        box-shadow: 0 12px 32px rgba(43, 189, 246, 0.4);
    }

    .submit-button:active {
        transform: translateY(-1px) scale(0.98);
    }

    .submit-button i {
        font-size: 1.3rem;
        transition: transform 0.3s ease;
    }

    .submit-button:hover i {
        transform: rotate(10deg) scale(1.1);
    }

    .alert {
        padding: 1.25rem 1.5rem;
        border-radius: 16px;
        margin-bottom: 2rem;
        display: flex;
        align-items: center;
        gap: 1rem;
        font-weight: 600;
        animation: slideDown 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

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

    .alert-success {
        background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(34, 197, 94, 0.05) 100%);
        border: 2px solid rgba(34, 197, 94, 0.4);
        color: #16a34a;
    }

    .alert-success i {
        font-size: 1.5rem;
        color: #22c55e;
    }

    .alert-error {
        background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.05) 100%);
        border: 2px solid rgba(239, 68, 68, 0.4);
        color: #dc2626;
    }

    .alert-error i {
        font-size: 1.5rem;
        color: #ef4444;
    }

    .empty-state {
        text-align: center;
        padding: 5rem 2rem;
        color: var(--text-secondary);
        background: linear-gradient(135deg, rgba(43, 189, 246, 0.03) 0%, rgba(43, 189, 246, 0.03) 100%);
        border-radius: 24px;
        border: 2px dashed var(--border-color);
    }

    .empty-state i {
        font-size: 5rem;
        background: linear-gradient(135deg, #2bbdf6 0%, #3b82f6 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        margin-bottom: 1.5rem;
        animation: float 3s ease-in-out infinite;
    }

    @keyframes float {
        0%, 100% { transform: translateY(0); }
        50% { transform: translateY(-10px); }
    }

    .empty-state h2 {
        font-size: 1.75rem;
        font-weight: 700;
        color: var(--text-primary);
        margin-bottom: 0.75rem;
    }

    .empty-state p {
        font-size: 1.1rem;
        color: var(--text-secondary);
    }

    .pagination {
        display: flex;
        justify-content: center;
        gap: 0.5rem;
        margin-top: 3rem;
    }

    .pagination a,
    .pagination span {
        padding: 0.75rem 1rem;
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        border-radius: 8px;
        color: var(--text-primary);
        text-decoration: none;
        transition: all 0.3s ease;
    }

    .pagination a:hover {
        background: var(--qr-green);
        color: white;
        border-color: var(--qr-green);
    }

    .pagination .active {
        background: var(--qr-green);
        color: white;
        border-color: var(--qr-green);
    }

    /* Image Viewer Modal */
    .image-viewer-modal {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(12px);
        z-index: 2000;
        align-items: center;
        justify-content: center;
        animation: fadeIn 0.3s ease;
    }

    .image-viewer-modal.active {
        display: flex;
    }

    .image-viewer-content {
        background: #12181f;
        border-radius: 18px;
        max-width: 1200px;
        width: 95%;
        max-height: 95vh;
        overflow-y: auto;
        box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
        border: 1px solid var(--qr-border);
        border-top: 2px solid var(--qr-green);
        animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        display: grid;
        grid-template-columns: 1fr 400px;
    }

    @media (max-width: 1024px) {
        .image-viewer-content {
            grid-template-columns: 1fr;
        }
    }

    .image-viewer-main {
        position: relative;
        background: #000;
        border-radius: 18px 0 0 18px;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        min-height: 500px;
    }

    @media (max-width: 1024px) {
        .image-viewer-main {
            border-radius: 24px 24px 0 0;
            min-height: 400px;
        }
    }

    .image-viewer-main img {
        width: 100%;
        height: auto;
        max-height: 85vh;
        object-fit: contain;
    }

    .close-viewer {
        position: absolute;
        top: 1.5rem;
        right: 1.5rem;
        background: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(8px);
        border: 2px solid rgba(43, 189, 246, 0.5);
        width: 48px;
        height: 48px;
        border-radius: 50%;
        font-size: 1.5rem;
        color: white;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        z-index: 10;
    }

    .close-viewer:hover {
        background: linear-gradient(135deg, #2bbdf6 0%, #1a9fd4 100%);
        border-color: #2bbdf6;
        transform: rotate(90deg) scale(1.1);
    }

    .nav-arrow {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        background: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(8px);
        border: 2px solid rgba(43, 189, 246, 0.5);
        width: 56px;
        height: 56px;
        border-radius: 50%;
        font-size: 1.5rem;
        color: white;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        z-index: 10;
    }

    .nav-arrow:hover {
        background: linear-gradient(135deg, #2bbdf6 0%, #1a9fd4 100%);
        border-color: #2bbdf6;
        transform: translateY(-50%) scale(1.1);
    }

    .nav-arrow.disabled {
        opacity: 0.3;
        cursor: not-allowed;
        pointer-events: none;
    }

    .nav-arrow-prev {
        left: 1.5rem;
    }

    .nav-arrow-next {
        right: 1.5rem;
    }

    @media (max-width: 768px) {
        .nav-arrow {
            width: 44px;
            height: 44px;
            font-size: 1.2rem;
        }

        .nav-arrow-prev {
            left: 1rem;
        }

        .nav-arrow-next {
            right: 1rem;
        }
    }

    .image-viewer-sidebar {
        padding: 2.5rem;
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    .image-viewer-header h2 {
        font-size: 2rem;
        font-weight: 800;
        color: var(--text-primary);
        margin-bottom: 1rem;
        line-height: 1.3;
    }

    .image-viewer-description {
        color: var(--text-secondary);
        line-height: 1.6;
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .image-viewer-user {
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 1.25rem;
        background: #0e141a;
        border-radius: 14px;
        border: 1px solid var(--qr-border);
        transition: all 0.3s ease;
    }

    .image-viewer-user:hover {
        border-color: rgba(43, 189, 246, 0.4);
        background: rgba(43, 189, 246, 0.05);
    }

    .viewer-user-avatar {
        width: 56px;
        height: 56px;
        border-radius: 50%;
        border: 3px solid var(--qr-green);
        box-shadow: 0 4px 12px rgba(43, 189, 246, 0.3);
    }

    .viewer-user-info {
        flex: 1;
    }

    .viewer-user-name {
        font-weight: 700;
        font-size: 1.1rem;
        color: var(--text-primary);
        margin-bottom: 0.25rem;
    }

    .viewer-user-date {
        font-size: 0.9rem;
        color: var(--text-secondary);
    }

    .image-viewer-actions {
        display: flex;
        gap: 1rem;
    }

    .action-button {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.75rem;
        padding: 1rem;
        background: #0e141a;
        border: 1px solid var(--qr-border);
        border-radius: 10px;
        font-weight: 700;
        font-size: 1rem;
        color: var(--text-primary);
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .action-button i {
        font-size: 1.2rem;
        transition: transform 0.3s ease;
    }

    .action-button:hover {
        transform: translateY(-2px);
        border-color: var(--qr-green);
        background: rgba(43, 189, 246, 0.1);
    }

    .action-button:hover i {
        transform: scale(1.1);
    }

    .action-button.liked {
        background: rgba(43, 189, 246, 0.15);
        border-color: var(--qr-green);
        color: var(--qr-green);
    }

    .action-button.liked i {
        color: var(--qr-green);
    }

    .image-viewer-comments {
        border-top: 1px solid var(--qr-border);
        padding-top: 2rem;
    }

    .comments-title {
        font-size: 1.5rem;
        font-weight: 700;
        color: var(--text-primary);
        margin-bottom: 1.5rem;
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    .comments-title i {
        color: var(--qr-green);
    }

    .comments-list {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        max-height: 300px;
        overflow-y: auto;
        margin-bottom: 1.5rem;
    }

    .comment-item {
        padding: 1rem;
        background: #0e141a;
        border-radius: 10px;
        border: 1px solid var(--qr-border);
    }

    .comment-header {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .comment-avatar {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        border: 2px solid var(--qr-green);
    }

    .comment-user-info {
        flex: 1;
    }

    .comment-username {
        font-weight: 700;
        color: var(--text-primary);
        font-size: 0.95rem;
    }

    .comment-date {
        font-size: 0.8rem;
        color: var(--text-secondary);
    }

    .comment-text {
        color: var(--text-secondary);
        line-height: 1.5;
        font-size: 0.95rem;
    }

    .comment-form {
        display: flex;
        gap: 0.75rem;
    }

    .comment-input {
        flex: 1;
        padding: 0.875rem 1rem;
        background: #0b0f14;
        border: 1px solid var(--qr-border);
        border-radius: 10px;
        color: var(--text-primary);
        font-size: 0.95rem;
        transition: all 0.3s ease;
    }

    .comment-input:focus {
        outline: none;
        border-color: var(--qr-green);
        box-shadow: 0 0 0 4px rgba(43, 189, 246, 0.15);
    }

    .comment-submit {
        padding: 0.875rem 1.5rem;
        background: linear-gradient(135deg, #2bbdf6 0%, #1a9fd4 100%);
        color: white;
        border: none;
        border-radius: 12px;
        font-weight: 700;
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .comment-submit:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(43, 189, 246, 0.4);
    }

    .no-comments {
        text-align: center;
        padding: 2rem;
        color: var(--text-secondary);
        font-style: italic;
    }

    /* Report Modal */
    .report-modal {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.8);
        backdrop-filter: blur(8px);
        z-index: 3000;
        align-items: center;
        justify-content: center;
    }

    .report-modal.active {
        display: flex;
    }

    .report-modal-content {
        background: var(--card-bg);
        border-radius: 20px;
        max-width: 500px;
        width: 90%;
        max-height: 90vh;
        overflow-y: auto;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
        border: 2px solid rgba(43, 189, 246, 0.3);
        animation: slideUp 0.3s ease;
    }

    .report-modal-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 1.5rem 2rem;
        border-bottom: 2px solid var(--border-color);
    }

    .report-modal-title {
        font-size: 1.5rem;
        font-weight: 700;
        color: var(--text-primary);
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    .report-modal-title i {
        color: var(--qr-green);
    }

    .report-modal-body {
        padding: 2rem;
    }

    .report-form-group {
        margin-bottom: 1.5rem;
    }

    .report-form-label {
        display: block;
        font-weight: 600;
        color: var(--text-primary);
        margin-bottom: 0.5rem;
        font-size: 0.95rem;
    }

    .report-form-select,
    .report-form-textarea {
        width: 100%;
        padding: 0.875rem 1rem;
        background: #000;
        border: 2px solid var(--border-color);
        border-radius: 12px;
        color: var(--text-primary);
        font-size: 0.95rem;
        transition: all 0.3s ease;
    }

    .report-form-select option {
        background: #000;
        color: var(--text-primary);
    }

    .report-form-select:focus,
    .report-form-textarea:focus {
        outline: none;
        border-color: var(--qr-green);
        box-shadow: 0 0 0 4px rgba(43, 189, 246, 0.15);
    }

    .report-form-textarea {
        resize: vertical;
        min-height: 100px;
    }

    .report-modal-footer {
        display: flex;
        gap: 1rem;
        padding: 1.5rem 2rem;
        border-top: 2px solid var(--border-color);
    }

    .report-btn {
        flex: 1;
        padding: 0.875rem 1.5rem;
        border-radius: 12px;
        font-weight: 700;
        font-size: 0.95rem;
        cursor: pointer;
        transition: all 0.3s ease;
        border: none;
    }

    .report-btn-cancel {
        background: var(--bg-secondary);
        color: var(--text-primary);
        border: 2px solid var(--border-color);
    }

    .report-btn-cancel:hover {
        background: var(--border-color);
    }

    .report-btn-submit {
        background: linear-gradient(135deg, #2bbdf6 0%, #1a9fd4 100%);
        color: white;
    }

    .report-btn-submit:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(43, 189, 246, 0.4);
    }

    .report-button-small {
        padding: 0.5rem;
        background: none;
        border: none;
        color: var(--text-secondary);
        cursor: pointer;
        font-size: 0.9rem;
        transition: color 0.3s ease;
    }

    .report-button-small:hover {
        color: #ef4444;
    }

/* ===================== Gallery detail (show) page ===================== */
    .gallery-detail-container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 2rem 1rem;
    }

    .back-button {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        color: var(--text-secondary);
        text-decoration: none;
        margin-bottom: 2rem;
        padding: 0.75rem 1.25rem;
        border-radius: 12px;
        background: var(--card-bg);
        border: 2px solid var(--border-color);
        transition: all 0.3s ease;
        font-weight: 600;
    }

    .back-button:hover {
        color: var(--qr-green);
        border-color: var(--qr-green);
        transform: translateX(-4px);
    }

    .image-detail-card {
        background: var(--card-bg);
        border: 2px solid var(--border-color);
        border-radius: 24px;
        overflow: hidden;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    }

    .image-main-container {
        position: relative;
        width: 100%;
        max-height: 600px;
        background: linear-gradient(135deg, rgba(43, 189, 246, 0.05) 0%, rgba(43, 189, 246, 0.05) 100%);
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .image-main {
        width: 100%;
        max-height: 600px;
        object-fit: contain;
    }

    .image-detail-body {
        padding: 2.5rem;
    }

    .image-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 2rem;
        gap: 2rem;
    }

    .image-info {
        flex: 1;
    }

    .image-title {
        font-size: 2.25rem;
        font-weight: 800;
        color: var(--text-primary);
        margin-bottom: 1rem;
        line-height: 1.3;
    }

    .image-meta {
        display: flex;
        align-items: center;
        gap: 2rem;
        flex-wrap: wrap;
    }

    .meta-author {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    .meta-avatar {
        width: 48px;
        height: 48px;
        border-radius: 50%;
        border: 3px solid var(--qr-green);
        box-shadow: 0 4px 12px rgba(43, 189, 246, 0.3);
    }

    .meta-author-info {
        display: flex;
        flex-direction: column;
    }

    .meta-author-name {
        font-weight: 700;
        color: var(--text-primary);
        font-size: 1.1rem;
    }

    .meta-date {
        font-size: 0.9rem;
        color: var(--text-secondary);
    }

    .image-actions {
        display: flex;
        gap: 1rem;
        align-items: center;
    }

    .action-button {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.875rem 1.5rem;
        border-radius: 12px;
        font-weight: 700;
        font-size: 1rem;
        transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        border: none;
        cursor: pointer;
        text-decoration: none;
    }

    .like-button {
        background: linear-gradient(135deg, rgba(43, 189, 246, 0.1) 0%, rgba(43, 189, 246, 0.05) 100%);
        border: 2px solid var(--border-color);
        color: var(--text-primary);
    }

    .like-button:hover {
        background: linear-gradient(135deg, #2bbdf6 0%, #1a9fd4 100%);
        color: white;
        border-color: #2bbdf6;
        transform: translateY(-2px) scale(1.05);
        box-shadow: 0 8px 20px rgba(43, 189, 246, 0.3);
    }

    .like-button.liked {
        background: linear-gradient(135deg, #2bbdf6 0%, #1a9fd4 100%);
        color: white;
        border-color: #2bbdf6;
    }

    .like-button i {
        font-size: 1.2rem;
        transition: transform 0.3s ease;
    }

    .like-button:hover i {
        transform: scale(1.2);
    }

    .delete-button {
        background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%);
        border: 2px solid rgba(239, 68, 68, 0.3);
        color: #ef4444;
    }

    .delete-button:hover {
        background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
        color: white;
        border-color: #ef4444;
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
    }

    .image-description {
        padding: 2rem;
        background: var(--bg-secondary);
        border-radius: 16px;
        margin-bottom: 2.5rem;
        border: 2px solid var(--border-color);
    }

    .image-description p {
        font-size: 1.1rem;
        line-height: 1.8;
        color: var(--text-primary);
        margin: 0;
    }

    .comments-section {
        margin-top: 3rem;
    }

    .comments-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 2rem;
        padding-bottom: 1rem;
        border-bottom: 2px solid var(--border-color);
    }

    .comments-title {
        font-size: 1.75rem;
        font-weight: 700;
        color: var(--text-primary);
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    .comments-title i {
        color: var(--qr-green);
    }

    .comment-form {
        margin-bottom: 2.5rem;
        padding: 2rem;
        background: linear-gradient(135deg, rgba(43, 189, 246, 0.03) 0%, rgba(43, 189, 246, 0.03) 100%);
        border-radius: 16px;
        border: 2px solid var(--border-color);
    }

    .comment-textarea {
        width: 100%;
        padding: 1rem 1.25rem;
        background: var(--card-bg);
        border: 2px solid var(--border-color);
        border-radius: 12px;
        color: var(--text-primary);
        font-size: 1rem;
        resize: vertical;
        min-height: 100px;
        font-family: inherit;
        transition: all 0.3s ease;
        margin-bottom: 1rem;
    }

    .comment-textarea:focus {
        outline: none;
        border-color: #2bbdf6;
        box-shadow: 0 0 0 4px rgba(43, 189, 246, 0.15);
    }

    .comment-submit {
        background: linear-gradient(135deg, #2bbdf6 0%, #1a9fd4 100%);
        color: white;
        padding: 1rem 2rem;
        border-radius: 12px;
        font-weight: 700;
        font-size: 1rem;
        border: none;
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .comment-submit:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(43, 189, 246, 0.4);
    }

    .comments-list {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }

    .comment-item {
        padding: 1.5rem;
        background: var(--card-bg);
        border: 2px solid var(--border-color);
        border-radius: 16px;
        transition: all 0.3s ease;
    }

    .comment-item:hover {
        border-color: rgba(43, 189, 246, 0.3);
        box-shadow: 0 4px 16px rgba(43, 189, 246, 0.1);
    }

    .comment-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 1rem;
    }

    .comment-author {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    .comment-avatar {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        border: 2px solid var(--qr-green);
    }

    .comment-author-name {
        font-weight: 700;
        color: var(--text-primary);
    }

    .comment-date {
        font-size: 0.85rem;
        color: var(--text-secondary);
    }

    .comment-text {
        color: var(--text-primary);
        line-height: 1.6;
        font-size: 1rem;
    }

    .empty-comments {
        text-align: center;
        padding: 3rem;
        color: var(--text-secondary);
    }

    .empty-comments i {
        font-size: 3rem;
        color: var(--qr-green);
        margin-bottom: 1rem;
        opacity: 0.5;
    }

    @media (max-width: 768px) {
        .image-header {
            flex-direction: column;
        }

        .image-actions {
            width: 100%;
            flex-wrap: wrap;
        }

        .action-button {
            flex: 1;
        }
    }

/* ==========================================================================
   Lightbox comment form — scoped overrides so the appended show-page rules
   (same class names) don't turn the modal form into a bordered box.
   ========================================================================== */
.image-viewer-comments .comment-form {
    display: flex;
    gap: 0.6rem;
    align-items: stretch;
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    border-radius: 0;
}
.image-viewer-comments .comment-input {
    background: #0b0f14;
    border: 1px solid var(--qr-border);
    border-radius: 10px;
}
.image-viewer-comments .comment-submit {
    padding: 0 1.15rem;
    border-radius: 10px;
    min-width: 52px;
    justify-content: center;
    align-items: center;
}
.image-viewer-comments .comment-item {
    padding: 1rem;
    background: #0e141a;
    border: 1px solid var(--qr-border);
    border-radius: 10px;
}
