* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f7fa;
    color: #1a1a1a;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Top Navigation */
.top-nav {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-logo {
    height: 40px;
    width: auto;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0066cc;
    margin: 0;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-icon {
    background: transparent;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
    position: relative;
}

.btn-icon:hover {
    background: #f3f4f6;
}

.notification-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid white;
}

.user-dropdown {
    position: relative;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.user-btn:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

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

.user-name {
    font-weight: 500;
    color: #1f2937;
    font-size: 0.95rem;
}

.dropdown-arrow {
    font-size: 0.7rem;
    color: #6b7280;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 180px;
    padding: 6px 0;
    z-index: 1000;
}

.menu-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 16px;
    color: #374151;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.95rem;
    font-family: inherit;
}

.menu-item:hover {
    background: #f9fafb;
}

.menu-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 6px 0;
}

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

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

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

/* Page Header */
.page-header {
    margin-bottom: 32px;
}

.page-title-section {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.page-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #0066cc;
    margin: 0;
}

.search-box {
    display: flex;
    align-items: center;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0 12px;
    min-width: 300px;
    transition: all 0.2s;
}

.search-box:focus-within {
    background: white;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.search-icon {
    background: none;
    border: none;
    font-size: 1.1rem;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
}

.search-input {
    flex: 1;
    padding: 10px 12px;
    border: none;
    background: transparent;
    font-size: 0.95rem;
    outline: none;
    color: #1f2937;
}

.search-input::placeholder {
    color: #9ca3af;
}

.search-input:focus {
    border-color: #0066cc;
}

.search-btn {
    padding: 10px 20px;
    background: #0066cc;
    color: white;
    border: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background 0.3s;
}

.search-btn:hover {
    background: #0052a3;
}

.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* User Info */
.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: #f5f7fa;
    border-radius: 8px;
    margin-right: 10px;
}

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

.user-name {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.btn-logout {
    padding: 8px 16px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-logout:hover {
    background: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

/* Buttons */
.btn-primary {
    padding: 10px 20px;
    background: #0066cc;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    white-space: nowrap;
}

.btn-primary:hover {
    background: #0052a3;
}

.btn-primary:disabled {
    background: #d1d5db;
    cursor: not-allowed;
}

.btn-secondary {
    padding: 10px 20px;
    background: #f9fafb;
    color: #374151;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    white-space: nowrap;
}

.btn-secondary:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

/* Groups Grid */
.main-content {
    min-height: 400px;
}

.groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.group-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
    cursor: pointer;
    position: relative;
    border: 1px solid #f3f4f6;
}

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

.group-thumbnail {
    width: 100%;
    height: 240px;
    object-fit: cover;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 4rem;
    position: relative;
}

.group-thumbnail::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 100%);
    pointer-events: none;
}

.group-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-count-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(4px);
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.group-info {
    padding: 16px;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 3;
}

.group-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    margin-bottom: 6px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.group-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    color: rgba(255,255,255,0.95);
    font-size: 0.85rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.group-desc {
    margin-top: 10px;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h2 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 10px;
}

.empty-state p {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-large {
    max-width: 1200px;
}

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

.modal-header h2 {
    font-size: 1.5rem;
    color: #333;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.3s;
}

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

.modal-body {
    padding: 30px;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #e1e4e8;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

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

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

.form-input, .form-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e4e8;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: #0066cc;
}

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

/* Group Actions Bar */
.group-actions-bar {
    background: #f5f7fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    display: flex;
    gap: 20px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.action-group {
    flex: 1;
    min-width: 250px;
}

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

/* Selfie Preview */
.selfie-preview {
    text-align: center;
    margin: 20px 0;
}

.selfie-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 12px;
    border: 3px solid #e1e4e8;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Match Controls */
.match-controls {
    background: #f5f7fa;
    padding: 20px;
    border-radius: 8px;
    margin: 25px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.match-info h3 {
    font-size: 1.2rem;
    color: #333;
    margin: 0;
}

.match-actions {
    display: flex;
    gap: 10px;
}

/* Photo Gallery */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.photo-item {
    position: relative;
    border: 3px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
}

.photo-select-checkbox {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #0066cc;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 5;
    cursor: pointer;
    transition: all 0.3s;
}

.photo-select-checkbox:hover {
    background: white;
    transform: scale(1.1);
}

.photo-item.selected .photo-select-checkbox {
    background: #0066cc;
    color: white;
}

.photo-item.selected .photo-select-checkbox span {
    content: '☑';
}

.photo-item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.photo-item.selected {
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.2);
}

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

.photo-info {
    padding: 10px;
    background: white;
    font-size: 0.85rem;
    color: #666;
}

.confidence-score {
    color: #0066cc;
    font-weight: 600;
}

.selected-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #0066cc;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Selfie Upload Options */
.selfie-upload-options {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn-upload-option {
    flex: 1;
    padding: 14px 20px;
    background: white;
    color: #0066cc;
    border: 2px solid #0066cc;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-upload-option:hover {
    background: #0066cc;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

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

.find-button-container {
    margin: 20px 0;
    text-align: center;
}

.btn-find-photos {
    min-width: 200px;
    padding: 14px 30px;
    font-size: 1rem;
}

/* Profile Page Styles */
.profile-container {
    max-width: 900px;
    margin: 30px auto;
    padding: 20px;
}

.profile-header {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 30px;
}

.profile-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid #0066cc;
    object-fit: cover;
}

.profile-info h1 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 1.8rem;
}

.profile-info p {
    margin: 5px 0;
    color: #666;
    font-size: 0.95rem;
}

.profile-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.profile-section h2 {
    margin: 0 0 20px 0;
    color: #0066cc;
    font-size: 1.5rem;
}

.profile-section h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 1.2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 25px 20px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #e0e0e0;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.15);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #0066cc;
    margin: 0 0 8px 0;
}

.stat-label {
    color: #666;
    margin: 0;
    font-size: 0.9rem;
    font-weight: 500;
}

.selfie-section {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.selfie-preview-large {
    flex-shrink: 0;
}

.selfie-preview-large img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
    display: block;
}

.selfie-actions {
    flex: 1;
}

.no-selfie {
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px dashed #d0d0d0;
    border-radius: 12px;
    color: #999;
    font-size: 3rem;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #0066cc;
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 20px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background 0.2s;
}

.back-button:hover {
    background: #f0f7ff;
    text-decoration: none;
}

.button-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Mandatory Selfie Modal */
.mandatory-selfie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.mandatory-modal-content {
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    padding: 40px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.mandatory-modal-content h2 {
    color: #0066cc;
    font-size: 2rem;
    margin: 0 0 15px 0;
}

.mandatory-modal-content p {
    color: #666;
    font-size: 1.1rem;
    margin: 0 0 30px 0;
    line-height: 1.6;
}

.mandatory-modal-content .emoji-large {
    font-size: 4rem;
    margin-bottom: 20px;
    display: block;
}

/* Camera Modal */
.camera-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.camera-container {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.camera-header {
    padding: 20px;
    background: #0066cc;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.camera-header h3 {
    margin: 0;
    font-size: 1.3rem;
}

.camera-header .close-btn {
    color: white;
    background: rgba(255, 255, 255, 0.2);
}

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

.camera-view {
    position: relative;
    background: #000;
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.camera-view video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.camera-controls {
    padding: 20px;
    display: flex;
    gap: 10px;
    justify-content: center;
    background: #f5f7fa;
}

.btn-camera-capture {
    padding: 14px 30px;
    background: #0066cc;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    min-height: 50px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-camera-capture:hover {
    background: #0052a3;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.4);
}

.btn-camera-capture:active {
    transform: scale(0.98);
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
}

.lightbox-container {
    position: relative;
    z-index: 1;
    width: 90%;
    height: 90%;
    max-width: 1400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: calc(100% - 80px);
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    z-index: 10;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    font-size: 2.5rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 30px 20px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.lightbox-counter {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
}

.lightbox-actions {
    display: flex;
    gap: 10px;
}

.btn-lightbox-action {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
    white-space: nowrap;
}

.btn-lightbox-action:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.btn-lightbox-action.selected {
    background: #0066cc;
    border-color: #0066cc;
}

/* Status Messages */
.status {
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
}

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

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

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

/* Admin Tab Switcher */
.admin-tab-switcher {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: #666;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

.tab-btn:hover {
    color: #0066cc;
}

.tab-btn.active {
    color: #0066cc;
    border-bottom-color: #0066cc;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Admin Actions Bar */
.admin-actions-bar {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.btn-danger {
    padding: 12px 24px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-danger:hover:not(:disabled) {
    background: #c82333;
    transform: translateY(-2px);
}

.btn-danger:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Photo Delete Overlay */
.photo-delete-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    display: none;
}

.photo-item.selected .photo-delete-overlay {
    display: block;
}

/* Loading */
#modelsLoading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #0066cc;
    color: white;
    padding: 15px;
    text-align: center;
    font-weight: 600;
    z-index: 2000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

#modelsLoading.hidden {
    display: none;
}

/* Loading Spinner */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 20px;
}

.loading-container p {
    color: #666;
    font-size: 1rem;
    font-weight: 500;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0066cc;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive - Tablet */
@media (max-width: 1024px) {
    .container {
        padding: 15px;
    }

    .main-header {
        padding: 15px 20px;
    }

    .logo {
        font-size: 1.5rem;
    }

    .groups-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }

    .modal-large {
        max-width: 95%;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    body {
        background: #ffffff;
        padding: 0;
    }

    .nav-container {
        padding: 0 16px;
        height: 56px;
    }

    .nav-logo {
        height: 32px;
    }

    .nav-brand {
        font-size: 1.25rem;
    }

    .user-name {
        display: none;
    }

    .dropdown-arrow {
        display: none;
    }

    .container {
        padding: 16px;
        max-width: 100%;
    }

    .page-header {
        margin-bottom: 24px;
    }

    .page-title {
        font-size: 1.5rem;
    }

    .page-actions {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    .search-box {
        width: 100%;
        min-width: auto;
    }

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

    .header-actions {
        flex-direction: column;
        gap: 10px;
    }

    .user-info {
        width: 100%;
        justify-content: space-between;
        padding: 10px 14px;
        margin-right: 0;
    }

    .user-name {
        font-size: 0.85rem;
        flex: 1;
        text-align: left;
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .user-avatar {
        width: 32px;
        height: 32px;
    }

    .btn-logout {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .btn-primary, .btn-secondary {
        width: 100%;
        padding: 12px 20px;
        font-size: 0.9rem;
    }

    .groups-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .group-card {
        border-radius: 10px;
    }

    .group-thumbnail {
        height: 180px;
        font-size: 3rem;
    }

    .photo-count-badge {
        font-size: 0.8rem;
        padding: 5px 10px;
        top: 10px;
        right: 10px;
    }

    .group-info {
        padding: 15px;
    }

    .group-name {
        font-size: 1.1rem;
    }

    .group-meta {
        font-size: 0.85rem;
    }

    .empty-state {
        padding: 60px 15px;
    }

    .empty-icon {
        font-size: 3.5rem;
    }

    .empty-state h2 {
        font-size: 1.5rem;
    }

    .empty-state p {
        font-size: 1rem;
    }

    /* Modal adjustments */
    .modal {
        padding: 10px;
    }

    .modal-content {
        max-width: 100%;
        width: 100%;
        max-height: 95vh;
        border-radius: 10px;
    }

    .modal-large {
        max-width: 100%;
    }

    .modal-header {
        padding: 15px 20px;
    }

    .modal-header h2 {
        font-size: 1.2rem;
    }

    .modal-body {
        padding: 20px;
    }

    .modal-footer {
        padding: 15px 20px;
        flex-direction: column-reverse;
    }

    .modal-footer .btn-primary,
    .modal-footer .btn-secondary {
        width: 100%;
    }

    .group-actions-bar {
        flex-direction: column;
        align-items: stretch;
        padding: 15px;
        gap: 15px;
    }

    .action-group {
        min-width: 100%;
    }

    .action-group label {
        font-size: 0.85rem;
    }

    .form-input {
        font-size: 0.9rem;
        padding: 10px 12px;
    }

    #modalFindBtn {
        width: 100%;
        padding: 12px;
    }

    .selfie-preview img {
        max-width: 150px;
        max-height: 150px;
    }

    .match-controls {
        flex-direction: column;
        align-items: stretch;
        padding: 15px;
        gap: 12px;
    }

    .match-info h3 {
        font-size: 1rem;
        text-align: center;
    }

    .match-actions {
        flex-direction: column;
        gap: 8px;
    }

    .match-actions .btn-primary,
    .match-actions .btn-secondary {
        width: 100%;
    }

    .photo-gallery {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }

    .photo-item img {
        height: 140px;
    }

    .photo-info {
        padding: 8px;
        font-size: 0.8rem;
    }

    .selected-badge {
        font-size: 0.75rem;
        padding: 4px 8px;
        top: 8px;
        right: 8px;
    }

    .status {
        padding: 12px;
        font-size: 0.9rem;
    }

    /* Camera Modal Mobile */
    .camera-modal {
        padding: 10px;
    }

    .camera-container {
        max-width: 100%;
    }

    .camera-header {
        padding: 15px;
    }

    .camera-header h3 {
        font-size: 1.1rem;
    }

    .camera-controls {
        padding: 15px;
        flex-direction: column;
    }

    .camera-controls button {
        width: 100%;
    }

    .btn-camera-capture {
        order: -1;
        padding: 16px 20px;
    }

    .selfie-upload-options {
        flex-direction: column;
    }

    .btn-upload-option {
        width: 100%;
    }

    .btn-find-photos {
        width: 100%;
        min-width: auto;
    }

    /* Lightbox Mobile */
    .lightbox-container {
        width: 100%;
        height: 100%;
    }

    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    .lightbox-nav {
        width: 50px;
        height: 50px;
        font-size: 2rem;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-content img {
        max-height: calc(100% - 120px);
        border-radius: 0;
    }

    .lightbox-info {
        flex-direction: column;
        gap: 12px;
        padding: 20px 15px 15px;
        align-items: stretch;
    }

    .lightbox-counter {
        text-align: center;
        font-size: 1rem;
    }

    .lightbox-actions {
        width: 100%;
        flex-direction: column;
    }

    .btn-lightbox-action {
        width: 100%;
        padding: 12px 16px;
    }
}

/* Responsive - Small Mobile */
@media (max-width: 480px) {
    .logo {
        font-size: 1.2rem;
    }

    .group-thumbnail {
        height: 150px;
        font-size: 2.5rem;
    }

    .photo-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .photo-item img {
        height: 120px;
    }

    .modal-header h2 {
        font-size: 1.1rem;
    }

    .user-name {
        max-width: 100px;
    }
}

/* Profile Page Responsive Styles */
@media (max-width: 768px) {
    .profile-container {
        padding: 16px;
        margin: 20px auto;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
        padding: 20px;
        gap: 20px;
    }

    .profile-info h1 {
        font-size: 1.5rem;
    }

    .selfie-section {
        flex-direction: column;
        gap: 20px;
    }

    .selfie-preview-large,
    .no-selfie {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    .selfie-preview-large img {
        width: 100%;
        height: auto;
        aspect-ratio: 1;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .profile-section {
        padding: 20px;
    }

    .mandatory-modal-content {
        padding: 30px 20px;
    }

    .mandatory-modal-content h2 {
        font-size: 1.5rem;
    }

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

@media (max-width: 480px) {
    .profile-avatar-large {
        width: 80px;
        height: 80px;
    }

    .profile-info h1 {
        font-size: 1.3rem;
    }

    .profile-info p {
        font-size: 0.85rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .button-group {
        flex-direction: column;
    }

    .button-group button {
        width: 100%;
    }
}

/* Event Type Tabs */
.event-type-tabs {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    gap: 12px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 64px;
    z-index: 90;
}

.event-tab {
    padding: 16px 24px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 1rem;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.event-tab:hover {
    color: #0066cc;
    background: #f9fafb;
}

.event-tab.active {
    color: #0066cc;
    border-bottom-color: #0066cc;
}

.event-tab span {
    font-weight: 700;
}

@media (max-width: 768px) {
    .event-type-tabs {
        padding: 0 16px;
    }

    .event-tab {
        padding: 12px 16px;
        font-size: 0.9rem;
    }
}
