/* Lumen PWA - Essential Styles */

:root {
    --color-black: #0a0a0a;
    --color-dark: #151515;
    --color-medium: #2a2a2a;
    --color-light: #f5f5f5;
    --color-white: #ffffff;
    --color-accent: #4a90e2;
    --font-display: 'Montserrat', sans-serif;
    --font-body: 'Roboto', sans-serif;
}

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

body {
    font-family: var(--font-body);
    background: var(--color-black);
    color: var(--color-light);
    line-height: 1.6;
}

/* Header */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--color-black);
    border-bottom: 1px solid var(--color-medium);
}
.header-content {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 16px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 2px;
}

/* Navigation */
.nav-tabs {
    display: flex;
    gap: 4px;
}

.tab-btn {
    background: none;
    border: none;
    color: var(--color-light);
    padding: 8px 16px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.tab-btn:hover, .tab-btn.active { opacity: 1; }
/* Header Actions */
.header-actions {
    display: flex;
    gap: 16px;
}

.btn-upload, .btn-profile {
    background: none;
    border: none;
    color: var(--color-light);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
}

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

/* Main Content */
.app-main {
    flex: 1;
    padding: 16px;
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
}
/* Photo Grid - Simple Container for Masonry Layout */
.photo-grid {
    /* Container will be styled by SimpleMasonry JavaScript */
    position: relative;
    margin: 0 auto;
    transition: opacity 0.3s ease;
}

.photo-grid.grid-loading {
    opacity: 0.5;
}

.photo-item {
    position: relative;
    background: var(--color-dark);
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s, opacity 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

.photo-item:hover { transform: translateY(-2px); }

.photo-item img {
    width: 100%;
    height: auto;
    display: block;
    /* Prevent large images from displaying before positioning */
    max-width: 100%;
    object-fit: cover;
}
/* Photo Overlay - Always show photographer */
.photo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), rgba(0,0,0,0.5) 50%, transparent);
    transition: opacity 0.3s;
}

.photo-item:hover .photo-overlay { 
    background: linear-gradient(to top, rgba(0,0,0,0.95), rgba(0,0,0,0.7) 50%, transparent);
}

.photo-photographer {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--color-white);
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.photo-location {
    font-size: 0.75rem;
    color: var(--color-light);
    opacity: 0;
    transition: opacity 0.3s;
}

.photo-item:hover .photo-location {
    opacity: 0.8;
}

/* Series Indicator */
.series-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    backdrop-filter: blur(5px);
}
/* Modals */
.photo-viewer, .upload-modal, .auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.95);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-content {
    background: var(--color-dark);
    border-radius: 8px;
    max-width: 500px;
    width: 100%;
    padding: 32px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close, .viewer-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: var(--color-white);
    font-size: 2rem;
    cursor: pointer;
}
/* Upload Area */
.upload-area {
    border: 2px dashed var(--color-medium);
    border-radius: 8px;
    padding: 48px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.upload-area:hover {
    border-color: var(--color-light);
    background: rgba(255,255,255,0.02);
}

.upload-area.dragover {
    border-color: var(--color-accent);
    background: rgba(74, 144, 226, 0.1);
}

/* Upload Preview */
.upload-preview {
    text-align: center;
}

.upload-preview img {
    max-width: 100%;
    max-height: 200px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    margin-bottom: 16px;
    /* Prevent any possibility of large display */
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Forms */
.input-field {
    background: var(--color-medium);
    border: 1px solid transparent;
    color: var(--color-white);
    padding: 16px;
    border-radius: 4px;
    width: 100%;
    font-family: var(--font-body);
    font-size: 1rem;
    margin-bottom: 16px;
}

.input-field:focus {
    outline: none;
    border-color: var(--color-accent);
}

.input-field::placeholder {
    color: rgba(255,255,255,0.5);
}

/* Enhanced Form Layout */
.form-section {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-medium);
}

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

.form-section h3 {
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--color-light);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.half-width {
    flex: 1;
}

.quarter-width {
    flex: 1;
    min-width: 0;
}

/* Checkbox Styling */
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: var(--color-light);
    font-size: 0.9rem;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    width: 18px;
    height: 18px;
    background: var(--color-medium);
    border-radius: 3px;
    margin-right: 8px;
    position: relative;
    transition: all 0.3s;
}

.checkbox-label input:checked + .checkmark {
    background: var(--color-accent);
}

.checkbox-label input:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    left: 3px;
    top: -2px;
    font-size: 12px;
    color: white;
}
    outline: none;
    border-color: var(--color-accent);
}
/* Buttons */
.btn-primary {
    background: var(--color-accent);
    color: var(--color-white);
    border: none;
    padding: 16px 32px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
}

.btn-primary:hover {
    background: #5ba0f2;
    transform: translateY(-1px);
}

.btn-google {
    background: var(--color-white);
    color: var(--color-black);
    border: none;
    padding: 16px 32px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 16px;
}

/* Loading */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.loading-indicator::after {
    content: 'Loading photos...';
    color: var(--color-light);
    font-size: 0.9rem;
    margin-top: 16px;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 2px solid var(--color-medium);
    border-top-color: var(--color-white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Context Menu */
.photo-context-menu {
    position: fixed;
    background: var(--color-dark);
    border: 1px solid var(--color-medium);
    border-radius: 8px;
    padding: 8px 0;
    z-index: 1000;
    min-width: 160px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.context-menu-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    color: var(--color-light);
    font-size: 0.9rem;
    transition: background 0.2s;
}

.context-menu-item:hover {
    background: var(--color-medium);
}

.context-menu-item svg {
    margin-right: 12px;
    opacity: 0.7;
}

/* Photo overlay enhancements */
.photo-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.photo-title {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 0.9rem;
}

.photo-time {
    font-size: 0.75rem;
    opacity: 0.7;
}

.photo-technical {
    font-size: 0.75rem;
    opacity: 0.8;
    font-family: monospace;
}

.discovery-actions {
    margin-top: 8px;
}

.btn-follow {
    background: var(--color-accent);
    color: white;
    border: none;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-follow:hover {
    background: rgba(74, 144, 226, 0.8);
}

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

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 8px;
    color: var(--color-white);
    font-weight: 500;
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 300px;
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    background: #28a745;
}

.notification-error {
    background: #dc3545;
}

.notification-info {
    background: var(--color-accent);
}

/* Profile View Modal */
.profile-view-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 16px;
}

.profile-view-modal.hidden {
    display: none;
}

.profile-view-modal .modal-content {
    background: var(--color-dark);
    border-radius: 12px;
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 0;
    position: relative;
}

.profile-header {
    background: linear-gradient(135deg, var(--color-medium), var(--color-dark));
    padding: 24px;
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    gap: 24px;
}

.profile-image-display img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--color-light);
}

.profile-basic-info h2 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-white);
}

.profile-username {
    font-size: 1.1rem;
    color: var(--color-accent);
    margin-bottom: 4px;
}

.profile-type {
    font-size: 1rem;
    color: var(--color-light);
    opacity: 0.8;
    text-transform: capitalize;
    margin-bottom: 8px;
}

.profile-tagline {
    font-style: italic;
    color: var(--color-light);
    opacity: 0.9;
}

.profile-content {
    padding: 24px;
}

.profile-section {
    margin-bottom: 32px;
}

.profile-section:last-child {
    margin-bottom: 0;
}

.profile-section h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-light);
    margin-bottom: 12px;
    border-bottom: 2px solid var(--color-accent);
    padding-bottom: 4px;
}

.profile-section p {
    color: var(--color-light);
    line-height: 1.6;
    margin-bottom: 8px;
}

.profile-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    font-weight: 600;
    color: var(--color-accent);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    color: var(--color-light);
    font-size: 1rem;
}

.styles-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.style-tag {
    background: var(--color-medium);
    color: var(--color-light);
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.85rem;
    border: 1px solid var(--color-accent);
}

.availability-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.availability-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.availability-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.availability-indicator.available {
    background: #28a745;
}

.availability-indicator.unavailable {
    background: #dc3545;
}

.profile-actions {
    padding: 24px;
    border-top: 1px solid var(--color-medium);
    display: flex;
    justify-content: center;
}

/* Profile Modal */
.profile-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 16px;
}

.profile-modal.hidden {
    display: none;
}

.profile-modal .modal-content {
    background: var(--color-dark);
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 24px;
    position: relative;
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.profile-image-section {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.profile-image-container {
    text-align: center;
}

.profile-image-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--color-medium);
    margin-bottom: 12px;
}

.btn-change-image {
    background: var(--color-medium);
    border: none;
    color: var(--color-light);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 auto;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.btn-change-image:hover {
    background: var(--color-accent);
}

.form-section h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--color-light);
}

.form-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--color-medium);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--color-medium);
    color: var(--color-light);
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: var(--color-medium);
}

/* Profile Dropdown */
.profile-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--color-dark) !important;
    border: 1px solid var(--color-medium) !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    z-index: 1000;
    min-width: 180px;
    margin-top: 4px;
    list-style: none;
    padding: 0;
    margin-left: 0;
}

.dropdown-menu.hidden {
    display: none;
}

.dropdown-item {
    width: 100% !important;
    padding: 12px 16px !important;
    background: transparent !important;
    border: none !important;
    color: var(--color-light) !important;
    text-align: left !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    font-family: var(--font-body) !important;
    font-size: 0.95rem !important;
    transition: background 0.2s !important;
    outline: none !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.dropdown-item svg {
    flex-shrink: 0;
    stroke: currentColor;
}

.dropdown-item:hover {
    background: var(--color-medium);
}

.dropdown-item:first-child {
    border-radius: 8px 8px 0 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 8px 8px;
}

.dropdown-item.logout {
    color: #ff6b6b;
}

.dropdown-item.logout:hover {
    background: rgba(255, 107, 107, 0.1);
}

.dropdown-divider {
    height: 1px;
    background: var(--color-medium);
    margin: 4px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 8px;
    }
    
    .nav-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .tab-btn {
        font-size: 0.75rem;
        padding: 8px;
    }
    
    .profile-modal {
        padding: 8px;
    }
    
    .profile-modal .modal-content {
        padding: 20px;
        max-height: 95vh;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .form-row .input-field {
        min-width: unset;
    }
    
    .checkbox-grid {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column-reverse;
    }
}