/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-title {
    font-size: 1.5rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-title i {
    color: #667eea;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Views */
.view {
    display: block;
}

.view.hidden {
    display: none;
}

/* Hero Section */
.hero-section {
    text-align: center;
    margin-bottom: 3rem;
    color: white;
}

.hero-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-section p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}

.feature {
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
}

.feature i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
    color: rgba(255, 255, 255, 0.8);
}

.feature p {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Admin Header */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.admin-header h2 {
    color: white;
    font-size: 1.8rem;
}

.admin-header .btn {
    margin-left: 1rem;
}

/* Collection Header */
.collection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    flex-wrap: wrap;
    gap: 1rem;
}

.collection-header h2 {
    color: white;
    font-size: 1.8rem;
    flex: 1;
}

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

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

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

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

.btn-primary:hover {
    background: #5a6fd8;
}

.btn-success {
    background: #48bb78;
    color: white;
}

.btn-success:hover {
    background: #38a169;
}

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

.btn-secondary:hover {
    background: #4a5568;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* Collections Grid */
.collections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.collection-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.collection-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.collection-header-info {
    margin-bottom: 0.5rem;
}

.collection-card h3 {
    margin: 0;
    color: #333;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.collection-card p {
    color: #666;
    margin-bottom: 1rem;
}

.collection-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #888;
}

/* Upload Zone */
.upload-zone {
    margin-bottom: 2rem;
}

.upload-settings {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.upload-setting {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.upload-setting label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    white-space: nowrap;
}

.upload-select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: white;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 180px;
}

.upload-select:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.upload-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.upload-select option {
    background: #2d3748;
    color: white;
}

.upload-help {
    flex: 1;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.upload-help i {
    opacity: 0.7;
}

@media (max-width: 768px) {
    .upload-setting {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .upload-select {
        width: 100%;
        min-width: unset;
    }
}

.upload-area {
    border: 2px dashed rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    position: relative;
}

.upload-area:hover {
    border-color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.upload-area.upload-active {
    border-color: rgba(102, 126, 234, 0.8);
    background: rgba(102, 126, 234, 0.1);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.2);
}

.upload-area.upload-active::before {
    content: "✓ Always ready for more files";
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(102, 126, 234, 0.9);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    animation: fadeInUp 0.3s ease-out;
}

.upload-area i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.upload-area p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.upload-queue-status {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 0.5rem 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: fadeInUp 0.3s ease-out;
}

.upload-queue-status i {
    color: #667eea;
    font-size: 0.9rem;
}

.upload-queue-status.processing {
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.4);
    color: white;
}

.upload-queue-status.processing i {
    animation: spin 2s linear infinite;
}

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

.upload-area input[type="file"] {
    display: none;
}

.upload-progress {
    margin-top: 1rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: #48bb78;
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

#progressText {
    color: white;
    font-weight: 500;
}

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

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

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

.gallery-item img,
.gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Thumbnail loading states */
.thumbnail-loading {
    position: relative;
    background: linear-gradient(
        90deg,
        rgba(255,255,255,0.1) 0%,
        rgba(255,255,255,0.2) 50%,
        rgba(255,255,255,0.1) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

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

.thumbnail-loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1.5rem;
    height: 1.5rem;
    border: 2px solid rgba(255,255,255,0.3);
    border-top: 2px solid rgba(255,255,255,0.8);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.gallery-item .play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    pointer-events: none;
}

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

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    margin: 2rem;
    padding: 0;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
}

.modal-header h2 {
    margin: 0;
    color: #333;
}

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

.close-btn:hover {
    background: #f5f5f5;
    color: #333;
}

.modal-body {
    padding: 2rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-weight: normal !important;
    margin-bottom: 0 !important;
}

.checkbox-label input[type="checkbox"] {
    width: auto !important;
    margin: 0;
}

.form-help {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
}

/* Share URL Container */
.share-url-container {
    display: flex;
    gap: 0.5rem;
}

.share-url-container input {
    flex: 1;
}

.share-note {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

/* Viewer Modal */
.viewer-modal .modal-content {
    max-width: 95vw;
    max-height: 95vh;
    background: #000;
    color: white;
    border-radius: 0;
}

.viewer-content {
    position: relative;
    width: 100%;
    height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.viewer-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 3000;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.viewer-close:hover {
    background: rgba(0,0,0,0.9);
}

.viewer-controls {
    position: absolute;
    top: 1rem;
    left: 1rem;
    right: 5rem; /* Leave space for close button (1rem + 3rem button + 1rem margin) */
    z-index: 2500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
}

.viewer-controls-left,
.viewer-controls-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    pointer-events: all;
}

.viewer-btn {
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
    min-width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.viewer-btn:hover {
    background: rgba(0,0,0,0.9);
}

.viewer-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.zoom-indicator {
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    min-width: 4rem;
    text-align: center;
}

.viewer-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    cursor: grab;
    user-select: none;
    background: #000;
}

.viewer-container.dragging {
    cursor: grabbing;
}

.viewer-container.zoomed {
    cursor: move;
}

.viewer-media {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    transform-origin: center center;
}

.viewer-media img,
.viewer-media video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

.viewer-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 2rem;
    pointer-events: none;
    z-index: 2000;
}

.nav-btn {
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    pointer-events: all;
    transition: background 0.3s ease;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover {
    background: rgba(0,0,0,0.9);
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.viewer-instructions {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.7);
    color: rgba(255,255,255,0.8);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    z-index: 2000;
    opacity: 0;
    animation: fadeInUp 0.5s ease 2s forwards;
}

.viewer-instructions p {
    margin: 0;
    text-align: center;
}

.viewer-instructions i {
    margin-right: 0.25rem;
    opacity: 0.7;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Batch Download Styles */
.gallery-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.gallery-controls-left {
    display: flex;
    gap: 0.5rem;
}

.batch-controls {
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.batch-controls-left,
.batch-controls-center,
.batch-controls-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.batch-controls-center {
    flex: 1;
    justify-content: center;
}

/* RAW Download Toggle */
.raw-download-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.raw-download-toggle input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 3rem;
    height: 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 1.2rem;
    height: 1.2rem;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.raw-download-toggle input[type="checkbox"]:checked + .toggle-slider {
    background: #667eea;
    border-color: #667eea;
}

.raw-download-toggle input[type="checkbox"]:checked + .toggle-slider::before {
    transform: translateX(1.5rem);
}

.toggle-label {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.9rem;
}

.toggle-label i {
    color: #667eea;
}

.selection-count {
    color: rgba(255,255,255,0.8);
    font-weight: 500;
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    font-size: 0.9rem;
}

.gallery-item.selectable {
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.gallery-item.selectable:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.gallery-item.selected {
    border: 3px solid #667eea;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102,126,234,0.4);
}

.gallery-item.selected::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(102,126,234,0.2);
    border-radius: 8px;
    pointer-events: none;
}

.selection-checkbox {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 15;
    background: rgba(0,0,0,0.8);
    border-radius: 50%;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.selection-checkbox input[type="checkbox"] {
    display: none;
}

.selection-checkbox .checkmark {
    width: 1.2rem;
    height: 1.2rem;
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.selection-checkbox input[type="checkbox"]:checked + .checkmark {
    background: #667eea;
    border-color: #667eea;
}

.selection-checkbox input[type="checkbox"]:checked + .checkmark::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: white;
    font-size: 0.7rem;
}

/* RAW File Preview Styles */
.raw-icon {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(0,0,0,0.8);
    color: #667eea;
    padding: 0.25rem;
    border-radius: 50%;
    font-size: 0.8rem;
    z-index: 10;
}

.raw-label {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: bold;
    z-index: 10;
}

.raw-preview-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 400px;
}

.raw-preview-content {
    text-align: center;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
}

.raw-icon-large {
    font-size: 4rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.raw-info h3 {
    color: white;
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
}

.raw-info .filename {
    color: rgba(255,255,255,0.8);
    margin: 0 0 1rem 0;
    word-break: break-all;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.raw-details {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.raw-details span {
    background: rgba(255,255,255,0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.7);
}

.raw-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.raw-actions .btn {
    min-width: 150px;
}

.raw-preview-area {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.raw-preview-area .loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: rgba(255,255,255,0.7);
}

.raw-preview-area .loading-spinner i {
    font-size: 2rem;
}

.raw-preview-image {
    text-align: center;
}

.raw-preview-image img {
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.raw-preview-image .preview-note {
    color: rgba(255,255,255,0.6);
    font-size: 0.8rem;
    margin-top: 1rem;
    font-style: italic;
}

.raw-preview-unavailable {
    text-align: center;
    color: rgba(255,255,255,0.7);
}

.raw-preview-unavailable i {
    font-size: 2rem;
    color: #f39c12;
    margin-bottom: 1rem;
}

.raw-preview-unavailable h4 {
    color: white;
    margin: 0 0 1rem 0;
}

.raw-preview-unavailable ul {
    text-align: left;
    display: inline-block;
    margin: 1rem 0;
}

.raw-preview-unavailable li {
    margin: 0.5rem 0;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.admin-only {
    display: none;
}

.admin-mode .admin-only {
    display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .nav-container {
        padding: 0 1rem;
    }
    
    .hero-section h2 {
        font-size: 2rem;
    }
    
    .hero-features {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .collections-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .collection-header,
    .admin-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .collection-actions {
        justify-content: center;
    }
    
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .modal-content {
        margin: 1rem;
    }
    
    .viewer-content {
        height: 80vh;
    }
    
    .viewer-container {
        padding: 0;
    }
    
    .viewer-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        left: 0.5rem;
        right: 4rem; /* Leave space for close button on mobile */
        top: 0.5rem;
    }
    
    .viewer-controls-left {
        order: 2;
    }
    
    .viewer-controls-right {
        order: 1;
        align-self: flex-end;
    }
    
    .viewer-btn {
        min-width: 2rem;
        height: 2rem;
        font-size: 0.9rem;
    }
    
    .zoom-indicator {
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
        min-width: 3rem;
    }
    
    .viewer-nav {
        padding: 0 1rem;
    }
    
    .nav-btn {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.2rem;
    }
    
    .viewer-instructions {
        display: none; /* Hide on mobile to save space */
    }
    
    .share-url-container {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .upload-area {
        padding: 2rem 1rem;
    }
    
    .upload-area i {
        font-size: 2rem;
    }
    
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .batch-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .batch-controls-left,
    .batch-controls-center,
    .batch-controls-right {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .batch-controls-center {
        order: -1; /* Show toggle at top on mobile */
    }
    
    .gallery-controls {
        justify-content: center;
    }
    
    .selection-count {
        order: -1;
        text-align: center;
    }
}

/* Paired Files Styles */
.paired-download-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.paired-download-buttons .btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    min-width: auto;
    white-space: nowrap;
}

.paired-download-buttons .btn i {
    margin-right: 0.25rem;
}

.paired-indicator {
    position: absolute;
    bottom: 0.5rem;
    left: 0.5rem;
    background: linear-gradient(135deg, #4a90e2, #357abd);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.paired-indicator i {
    font-size: 0.8rem;
}

.paired-label {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Paired Download Modal */
.paired-download-modal .modal-content {
    max-width: 600px;
}

.paired-download-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.download-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.download-option:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.option-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.option-info i {
    font-size: 1.5rem;
    color: #4a90e2;
    width: 2rem;
    text-align: center;
}

.option-info h4 {
    margin: 0 0 0.25rem 0;
    color: white;
    font-size: 1rem;
}

.option-info p {
    margin: 0 0 0.25rem 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.file-size {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.download-option .btn {
    margin-left: 1rem;
    min-width: 120px;
}

/* Responsive adjustments for paired download modal */
@media (max-width: 768px) {
    .paired-download-modal .modal-content {
        margin: 1rem;
        max-width: none;
    }
    
    .download-option {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .option-info {
        text-align: center;
    }
    
    .download-option .btn {
        margin-left: 0;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .paired-download-buttons {
        flex-direction: column;
        gap: 0.25rem;
        width: 100%;
    }
    
    .paired-download-buttons .btn {
        width: 100%;
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .paired-indicator {
        bottom: 0.25rem;
        left: 0.25rem;
        padding: 0.2rem 0.4rem;
        font-size: 0.6rem;
    }
    
    .paired-label {
        display: none; /* Hide text on very small screens, just show icon */
    }
    
    .paired-download-buttons .btn {
        padding: 0.3rem 0.5rem;
        font-size: 0.7rem;
    }
}

/* Pagination Styles */
.pagination-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.pagination-info {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pagination-btn {
    min-width: auto;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-pages {
    display: flex;
    gap: 0.25rem;
}

.pagination-page {
    padding: 0.5rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    min-width: 2.5rem;
    text-align: center;
}

.pagination-page:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.pagination-page.active {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.pagination-page.active:hover {
    background: #5a6fd8;
}

.pagination-settings {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.pagination-select {
    padding: 0.4rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.pagination-select:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
}

.pagination-select:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.2);
}

.pagination-select option {
    background: #2d3748;
    color: white;
}

@media (max-width: 768px) {
    .pagination-container {
        margin-top: 1rem;
        padding: 1rem;
    }

    .pagination-controls {
        flex-direction: column;
        gap: 1rem;
    }

    .pagination-pages {
        order: -1;
        justify-content: center;
    }

    .pagination-btn {
        flex: 1;
        max-width: 120px;
    }
}

@media (max-width: 480px) {
    .pagination-container {
        gap: 0.75rem;
        padding: 0.75rem;
    }

    .pagination-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    .pagination-page {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
        min-width: 2rem;
    }

    .pagination-settings {
        flex-direction: column;
        gap: 0.5rem;
    }

    .pagination-select {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }
}

/* Retry Upload Button Styles */
.retry-upload-btn {
    background: #f6ad55 !important;
    border-color: #f6ad55 !important;
    color: white !important;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.retry-upload-btn:hover {
    background: #ed8936 !important;
    border-color: #ed8936 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.4) !important;
}

.retry-upload-btn:active {
    transform: translateY(0);
}

.retry-upload-btn i {
    margin-right: 0.5rem;
    animation: rotate 2s linear infinite;
}

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

@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .retry-upload-btn {
        bottom: 10px !important;
        right: 10px !important;
        padding: 10px 16px !important;
        font-size: 0.9rem !important;
    }
}

@media (max-width: 480px) {
    .retry-upload-btn {
        bottom: 10px !important;
        right: 10px !important;
        left: 10px !important;
        width: auto !important;
        padding: 8px 12px !important;
        font-size: 0.8rem !important;
        text-align: center;
    }
} 

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

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

/* User Management Styles */
.user-management {
    margin-top: 2rem;
}

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

.section-header h3 {
    margin: 0;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.users-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.user-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.user-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.user-main {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.user-main h4 {
    margin: 0;
    color: var(--text-color);
    font-size: 1.1rem;
}

.username {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-family: monospace;
}

.admin-badge {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #000;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.user-meta {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

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

.no-users a {
    color: var(--primary-color);
    text-decoration: none;
}

.no-users a:hover {
    text-decoration: underline;
}

/* Responsive admin layout */
@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .admin-actions {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .section-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .user-main {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
} 