:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;

    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-modal: rgba(0, 0, 0, 0.5);

    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;

    --border-color: #e2e8f0;
    --border-radius: 0px;
    --border-radius-sm: 0px;
    --border-radius-lg: 0px;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    --transition: all 0.2s ease-in-out;
    --transition-slow: all 0.3s ease-in-out;

    --container-max-width: 100%;
    --header-height: 70px;
    --search-panel-width: 400px;
}

/* Dark Mode */
[data-theme="dark"] {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --secondary-color: #94a3b8;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;

    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-modal: rgba(0, 0, 0, 0.7);

    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;

    --border-color: #334155;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.4);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.4);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.4), 0 8px 10px -6px rgb(0 0 0 / 0.4);
}

.resetFiltersBtn {
    color: #333;
    border: 1px solid #333;
    padding: 6px 12px;
    border-radius: var(--border-radius);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Dark Mode Header Özel Stilleri */
[data-theme="dark"] .header {
    background: rgba(15, 23, 42, 0.95);
    border-bottom-color: #334155;
}

[data-theme="dark"] .logo {
    color: #f1f5f9;
}

[data-theme="dark"] .search-btn {
    border: 1px solid #fff;
    color: #fff;
}

[data-theme="dark"] .search-btn:hover {
    background: #333;
    color: white;
}

[data-theme="dark"] .theme-toggle {
    background: #334155;
    color: #cbd5e1;
}

[data-theme="dark"] .theme-toggle:hover {
    background: #3b82f6;
    color: white;
}

/* Dark mode search input styles */
[data-theme="dark"] .search-input {
    color: #ffffff;
    background-color: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .search-input::placeholder {
    color: #94a3b8;
}

/* Light Mode Header Özel Stilleri */
[data-theme="light"] .header {
    background: rgba(255, 255, 255, 0.95);
    border-bottom-color: #e2e8f0;
}

[data-theme="light"] .logo {
    color: #1e293b;
}

[data-theme="light"] .search-btn {
    border: 1px solid #333;
    color: #333;
}

[data-theme="light"] .search-btn:hover {
    background: #333;
    color: white;
}

[data-theme="light"] .theme-toggle {
    background: #f1f5f9;
    color: #64748b;
}

[data-theme="light"] .theme-toggle:hover {
    background: #2563eb;
    color: white;
}

/* Temel Reset ve Genel Stiller */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
}

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0;
    width: 100%;
}

/* Header Stilleri */
.header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    transition: var(--transition);
    height: 55px;
}

.header .container {
    /*display: flex;*/
    justify-content: space-between;
    /*align-items: center;*/
    height: var(--header-height);
    padding: 0 20px;
}

.header-controls {
    float: right;
    display: flex;
    align-items: center;
    gap: 12px;
    /*margin-top: 13px;*/
}

.theme-toggle {
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: 0;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.theme-toggle:hover {
    background: var(--primary-color);
    color: white;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    transition: var(--transition);
}

.logo i {
    font-size: 1.8rem;
}

#resultCountIcon:hover {
    color: #1d4ed8;
    cursor: pointer;
}

.search-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: none;
    color: white;
    border: 1px solid #333;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.search-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

/* Ana İçerik */
.main-content {
    min-height: calc(100vh - var(--header-height));
    background: var(--bg-secondary);
    position: relative;
    width: 100%;
    overflow: visible;
}



/* Search Modal */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-modal);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-slow);
    backdrop-filter: blur(4px);
}

.search-modal.active {
    opacity: 1;
    visibility: visible;
}

.search-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: var(--search-panel-width);
    height: 100%;
    background: var(--bg-primary);
    box-shadow: var(--shadow-xl);
    transform: translateX(-100%);
    transition: var(--transition-slow);
    overflow-y: auto;
}

.search-modal.active .search-panel {
    transform: translateX(0);
}

.search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-primary);
    position: sticky;
    top: 0;
    z-index: 10;
}

.search-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.close-btn {
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: var(--error-color);
    color: white;
}

/* Search Sections */
.search-section {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.search-section:last-child {
    border-bottom: none;
}

.search-section h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.help-btn {
    width: 32px;
    height: 32px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.help-btn:hover {
    background: var(--primary-color);
    color: white;
}

.search-instruction {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* Search Input */
.search-input-wrapper {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
}

.search-input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    background: var(--bg-primary);
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-input::placeholder {
    color: var(--text-muted);
}

/* People Search Grid */
.people-search-grid {
    /*display: grid;*/
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 8px;
}

.people-search-grid::-webkit-scrollbar {
    width: 6px;
}

.people-search-grid::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 3px;
}

.people-search-grid::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.people-search-grid::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.person-item {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background: var(--bg-primary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 5px;
    float: left;
}

.person-item:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.person-item.selected {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

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

.camera-item {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    font-size: 1.2rem;
}

.camera-item:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

/* Camera Modal */
.camera-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-modal);
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-slow);
    display: flex;
    align-items: center;
    justify-content: center;
}

.camera-modal.active {
    opacity: 1;
    visibility: visible;
}

.camera-panel {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
}

.camera-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.camera-header h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.camera-content {
    padding: 24px;
}

#cameraVideo {
    width: 100%;
    height: 300px;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    object-fit: cover;
}

.camera-controls {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.capture-btn,
.upload-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.capture-btn {
    background: var(--primary-color);
    color: white;
}

.capture-btn:hover {
    background: var(--primary-hover);
}

.upload-btn {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

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

.camera-switch-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    margin-right: auto;
}

.camera-switch-btn:hover {
    background: #d97706;
    transform: scale(1.05);
}

.camera-info {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.camera-error {
    text-align: center;
    padding: 40px 20px;
    color: var(--error-color);
}

.camera-error i {
    font-size: 3rem;
    margin-bottom: 16px;
}

.camera-error p {
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.retry-btn {
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.retry-btn:hover {
    background: var(--primary-hover);
}

.file-preview {
    text-align: center;
    margin-bottom: 20px;
}

.file-preview p {
    margin-top: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Galeri Bölümü */
.gallery {
    padding: 0;
    position: relative;
    z-index: 1;
    min-height: calc(100vh - var(--header-height));
    overflow: visible;
}

.gallery .container {
    position: relative;
    z-index: 2;
    width: 100%;
    min-height: 100%;
}

/* Sonuç Sayısı */
.result-count {
    background: var(--bg-primary);
    padding: 12px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.result-count.no-results {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}

.result-count i {
    font-size: 1rem;
}

.gallery-header {
    display: none;
}

.gallery-header h3 {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    margin-bottom: 8px;
}

.gallery-header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 0;
}

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

.filter-btn {
    padding: 10px 20px;
    background: var(--bg-primary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Image Modal */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

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

.image-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal-close-btn {
    position: absolute;
    top: -50px;
    right: 0;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10000;
}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.modal-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10000;
}

.modal-nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.modal-prev-btn {
    left: -70px;
}

.modal-next-btn {
    right: -70px;
}

.image-modal-image-container {
    max-width: 100%;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--border-radius);
}

.image-modal-info {
    margin-top: 20px;
    color: white;
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 15px;
}

.modal-share-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.2rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-share-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Share Modal */
.share-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-modal);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

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

.share-panel {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    max-width: 400px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.share-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 16px;
    border-bottom: 1px solid var(--border-color);
}

.share-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
    width: 100%;
}

.share-instruction {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0 24px 24px;
    line-height: 1.5;
}

.social-share-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 0 24px 24px;
}

.social-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    transition: var(--transition);
}

.social-btn:hover {
    transform: scale(1.1);
}

.facebook-btn {
    background: #1877f2;
}

.twitter-btn {
    background: #000000;
}

.pinterest-btn {
    background: #e60023;
}

.whatsapp-btn {
    background: #25d366;
}

.email-btn {
    background: #6c757d;
}

.share-link-container {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 24px 24px;
}

.share-link-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: monospace;
}

.copy-link-btn {
    padding: 12px 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.copy-link-btn:hover {
    background: var(--primary-hover);
}

.qr-code-container {
    padding: 0 24px 24px;
    text-align: center;
}

.qr-code-wrapper {
    display: inline-block;
    padding: 16px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

.qr-code {
    width: 200px;
    height: 200px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Responsive modal styles */
@media (max-width: 768px) {
    .modal-prev-btn {
        left: 10px;
    }

    .modal-next-btn {
        right: 10px;
    }

    .modal-close-btn {
        top: 10px;
        right: 10px;
    }

    .image-modal-content {
        max-width: 95vw;
        max-height: 95vh;
    }

    .image-modal-image-container {
        max-height: 70vh;
    }

    .share-panel {
        width: 95%;
        max-width: none;
    }

    .social-share-buttons {
        gap: 8px;
    }

    .social-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .qr-code {
        width: 150px;
        height: 150px;
    }
}

.gallery-grid {
    column-count: 5;
    column-gap: 15px;
    margin: 15px;
    padding: 0;
    width: 100%;
    min-height: calc(100vh - var(--header-height));
    overflow: visible;
    text-align: center;
}

.gallery-item {
    background: var(--bg-primary);
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    transform: translateZ(0);
    will-change: transform;
    border: none;
    margin-bottom: 15px;
    break-inside: avoid;
    display: inline-block;
    width: 100%;
    max-width: 400px;
    max-height: 400px;
}

.gallery-item:nth-child(5n+1) {
    column-span: all;
}

.gallery-item:nth-child(10n+3) {
    column-span: all;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    opacity: 0;
    transition: opacity 0.5s ease;
    backface-visibility: hidden;
    background: var(--bg-tertiary);
    max-width: 400px;
    max-height: 400px;
    object-fit: contain;
}

.gallery-item img.loaded {
    opacity: 1;
}

.gallery-item img.fallback-image {
    opacity: 1;
}

.gallery-item.loading {
    background: var(--bg-tertiary);
    position: relative;
}

.gallery-item.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 2;
    margin-top: -20px;
}

.gallery-item.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-tertiary);
    z-index: 1;
}

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

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

/* Loading Indicator */
.loading-indicator {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    margin: 20px 0;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    opacity: 1;
}

.loading-indicator.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-indicator i {
    margin-right: 8px;
    color: var(--primary-color);
}

.gallery-item:hover {
    transform: scale(1.02);
    z-index: 10;
}

.gallery-item:hover {
    transform: translateY(-2px) translateZ(0);
    box-shadow: var(--shadow-xl);
}

.gallery-item img {
    width: 100%;
    height: auto;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backface-visibility: hidden;
    filter: brightness(0.95);
    background: var(--bg-tertiary);
    max-width: 400px;
    max-height: 400px;
    object-fit: contain;
}

.gallery-item:hover img {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* Fallback resim stili */
.gallery-item img.fallback-image {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    padding: 20px;
    position: relative;
}

.gallery-item img.fallback-image::before {
    content: "📷 Resim Yüklenemedi";
    display: block;
    margin-bottom: 8px;
    font-size: 1.2rem;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

/* Resim yükleme animasyonu */
.gallery-item img {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item img[src*="data:image"] {
    opacity: 1;
}

/* Galeri öğesi overlay efekti */
.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.3) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

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

/* Galeri öğesi overlay */
.gallery-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

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

/* Hover durumunda butonların daha belirgin olması */
.gallery-item:hover .gallery-item-actions {
    opacity: 1;
    transform: translateY(0);
}

.gallery-item-actions {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

/* Paylaş butonu için özel animasyon */
.gallery-item:hover .action-btn .fa-share-alt {
    animation: sharePulse 1.5s ease-in-out infinite;
}

@keyframes sharePulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* Galeri öğesi içerik stilleri */
.gallery-item-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
}

.gallery-item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
}

.tag {
    background: rgba(255, 255, 255, 0.9);
    color: #1e293b;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.tag-more {
    background: rgba(255, 255, 255, 0.7);
    color: #64748b;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.gallery-item-actions {
    display: flex;
    gap: 12px;
    pointer-events: auto;
}

.action-btn {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

/* Paylaş butonu için özel arka plan */
.action-btn .fa-share-alt {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Paylaş butonu için özel hover efekti */
.action-btn .fa-share-alt:hover {
    color: var(--primary-color);
}

/* Paylaş butonu için özel stil */
.action-btn .fa-share-alt {
    color: var(--primary-color);
    transition: all 0.2s ease;
}

.action-btn:hover .fa-share-alt {
    color: var(--primary-hover);
    transform: scale(1.1);
}

/* Paylaş butonu hover durumunda özel efekt */
.action-btn:hover .fa-share-alt {
    background: linear-gradient(135deg, var(--primary-hover), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transform: scale(1.1) rotate(5deg);
}

.section-header {
    margin-bottom: 16px;
}

.help-btn {
    width: 24px;
    height: 24px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.help-btn:hover {
    color: var(--primary-color);
}

.search-instruction {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Search Actions */
.search-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.clear-search-btn {
    background: var(--error-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.clear-search-btn:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.clear-search-btn:active {
    transform: translateY(0);
}

/* Reset Filters Button */
.reset-filters-btn {
    color: #333 !important;
    border: 1px solid #333 !important;
    padding: 6px 12px !important;
    border-radius: var(--border-radius) !important;
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: var(--transition) !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    margin-left: 20px;
}

.reset-filters-btn:hover {
    background: #333 !important;
    transform: translateY(-1px) !important;
    box-shadow: var(--shadow-md) !important;
    color: white !important;
}

.reset-filters-btn:active {
    transform: translateY(0) !important;
}

.reset-filters-btn i {
    font-size: 0.7rem !important;
}




/* Yükleme Göstergesi */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-modal);
    z-index: 1200;
    opacity: 1;
    visibility: visible;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-overlay:not(.active) {
    opacity: 0;
    visibility: hidden;
}

.loading-spinner {
    background: var(--bg-primary);
    padding: 40px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    text-align: center;
}

.loading-spinner i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.loading-spinner p {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Responsive Tasarım */
@media (max-width: 768px) {
    .search-panel {
        width: 100%;
    }

    .hero-content h2 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

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

    .gallery-controls {
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 8px;
    }

    .gallery-grid {
        column-count: 3;
        column-gap: 10px;
        margin: 10px;
    }

    .gallery-item {
        margin-bottom: 12px;
    }

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

    .camera-controls {
        flex-direction: column;
    }
}

@media (max-width: 600px) {
    .gallery-grid {
        column-count: 2;
        column-gap: 8px;
        margin: 8px;
    }

    .gallery-item {
        margin-bottom: 8px;
        max-width: 100%;
    }

    .gallery-item img {
        max-width: 100%;
        max-height: 300px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero {
        padding: 60px 0;
    }

    .gallery {
        padding: 40px 0;
    }

    .gallery-grid {
        column-count: 2;
        column-gap: 8px;
        margin: 8px;
    }

    .gallery-item {
        margin-bottom: 8px;
        max-width: 100%;
    }

    .gallery-item img {
        max-width: 100%;
        max-height: 300px;
    }

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

    .search-section {
        padding: 20px;
    }
}

@media (max-width: 360px) {
    .gallery-grid {
        column-count: 2;
        column-gap: 6px;
        margin: 6px;
    }

    .gallery-item {
        margin-bottom: 6px;
    }

    .gallery-item img {
        max-height: 250px;
    }

    .action-btn {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .gallery-item-actions {
        gap: 8px;
    }
}

/* Erişilebilirlik */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Klavye Navigasyonu */
.search-btn:focus,
.close-btn:focus,
.filter-btn:focus,
.person-item:focus,
.capture-btn:focus,
.upload-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Yüksek Kontrast Modu */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000000;
        --text-secondary: #000000;
        --bg-secondary: #ffffff;
    }
}

/* ===== INDEX.HTML STYLES ===== */

/* Landing Banner */
.landing-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 0;
}

.landing-banner img {
    height: auto;
    width: 100%;
}

.landing-galleries {
    padding: 24px 0;
}

/* 4 sütunlu geniş aralıklı grid */
.landing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 56px;
}

@media (max-width: 1400px) {
    .landing-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 48px;
    }
}

@media (max-width: 1100px) {
    .landing-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
}

@media (max-width: 700px) {
    .landing-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}

/* Kart: köşeler düz, gölgesiz */
.landing-card {
    display: block;
    overflow: hidden;
    background: transparent;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease;
}

.landing-card:hover {
    transform: scale(1.05);
}

.landing-thumb {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: #e9ecef;
    border-radius: 0;
    transition: filter 0.3s ease;
}

.landing-card:hover .landing-thumb {
    filter: brightness(0.8) contrast(1.1);
}

.landing-caption {
    padding-top: 18px;
    text-align: center;
}

.landing-title {
    font-weight: 700;
    letter-spacing: .6px;
    text-transform: uppercase;
}

.landing-sub {
    margin-top: 8px;
    font-size: 12px;
    color: #7a7f87;
    letter-spacing: .4px;
}

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

.muted {
    color: #98a2b3;
}

/* ===== GALLERY.HTML STYLES ===== */

/* Başlık alanı */
.landing-title h1 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: .8px;
    text-transform: uppercase;
    margin: 0;
    text-align: center;
}

.landing-title .divider {
    width: 180px;
    height: 1px;
    background: #7a7f87;
    margin: 16px auto 12px auto;
}

.landing-title p {
    max-width: 860px;
    margin: 0 auto;
    color: #7a7f87;
    font-size: 14px;
    letter-spacing: .4px;
    text-align: center;
}

@media (max-width: 700px) {
    .landing-title h1 {
        font-size: 32px;
    }
}

/* Header home butonu */
.header-left {
    display: flex;
    align-items: center;
    float: left;
}

.home-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f8f9fa;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.home-btn:hover {
    background: #e9ecef;
    transform: scale(1.05);
    color: #000;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ===== SEARCH-RESULTS.HTML STYLES ===== */

.search-results-header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
    margin-bottom: 20px;
}

.search-results-header .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.search-info {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.person-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.search-details h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.search-details p {
    margin: 4px 0 0 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.search-stats {
    display: flex;
    gap: 24px;
    margin-top: 16px;
}

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

.stat-item i {
    color: var(--primary-color);
}

.back-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: none;
    color: #333;
    border: 1px solid #333;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.back-button:hover {
    background: #333;
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.back-button:active {
    transform: translateY(0);
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.no-results i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: var(--text-muted);
}

.no-results h2 {
    margin: 0 0 12px 0;
    color: var(--text-primary);
}

.no-results p {
    margin: 0;
    font-size: 1.1rem;
}

/* ===== SHARE.HTML STYLES ===== */

.share-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--bg-secondary);
}

.share-header {
    text-align: center;
    padding: 0;
}

.share-header h1 {
    color: var(--text-primary);
    font-size: 24px;
}

.share-header p {
    color: var(--text-secondary);
    margin: 0;
}

.shared-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.action-buttons {
    position: fixed;
    bottom: 30px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    z-index: 3;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.btn-secondary:hover {
    background: var(--bg-tertiary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
}

.error-container {
    text-align: center;
    padding: 40px;
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    max-width: 500px;
}

.error-icon {
    font-size: 4rem;
    color: var(--error-color);
    margin-bottom: 20px;
}

.error-title {
    color: var(--text-primary);
    margin-bottom: 10px;
}

.error-message {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* ===== DARK MODE STYLES ===== */

/* Dark mode for search-results */
[data-theme="dark"] .search-results-header {
    background: var(--bg-primary);
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .person-avatar {
    border-color: var(--border-color);
}

[data-theme="dark"] .gallery-item {
    background: var(--bg-primary);
}

[data-theme="dark"] .back-button {
    border: 1px solid #fff;
    color: #fff;
}

[data-theme="dark"] .back-button:hover {
    background: #333;
    color: white;
}

/* Dark mode for share page */
[data-theme="dark"] .share-container {
    background: var(--bg-secondary);
}

/* ===== RESPONSIVE STYLES ===== */

/* Search Results Responsive */
@media (max-width: 1200px) {
    .gallery-grid {
        column-count: 4;
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        column-count: 2;
    }

    .search-info {
        flex-direction: column;
        text-align: center;
    }

    .search-stats {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        column-count: 1;
    }
}

/* Share page responsive */
@media (max-width: 768px) {
    .share-container {
        padding: 10px;
    }

    .image-container {
        max-width: 95vw;
        max-height: 60vh;
    }

    .action-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
    }

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