/* ============================================================================
   MOMENTS WEB APP - STYLES
   ============================================================================ */

/* CSS Variables */
:root {
    /* Colors */
    --primary: #FF6B6B;
    --primary-dark: #E85555;
    --primary-light: #FF8A8A;
    --secondary: #4ECDC4;
    --secondary-dark: #3DBDB5;
    --accent: #FFE66D;
    
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
    --info: #3B82F6;
    
    --text-primary: #1A1A2E;
    --text-secondary: #6B7280;
    --text-tertiary: #9CA3AF;
    --text-inverse: #FFFFFF;
    
    --bg-primary: #FFFFFF;
    --bg-secondary: #F5F5F5;
    --bg-tertiary: #FAFAFA;
    --bg-card: #FFFFFF;
    --bg-overlay: rgba(0, 0, 0, 0.5);
    
    --border-light: #E5E7EB;
    --border-medium: #D1D5DB;
    --border-color: var(--border-light);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #FF6B6B, #FFA07A);
    --gradient-secondary: linear-gradient(135deg, #4ECDC4, #44A08D);
    --gradient-warm: linear-gradient(180deg, #FFF5F5, #FFF0EB, #F0F9FF);
    
    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-xxl: 48px;
    
    /* Border Radius */
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 40px rgba(255, 107, 107, 0.3);
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-family-display: 'Fraunces', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 11px;
    --font-size-sm: 13px;
    --font-size-base: 15px;
    --font-size-lg: 17px;
    --font-size-xl: 20px;
    --font-size-2xl: 24px;
    --font-size-3xl: 30px;
    --font-size-4xl: 36px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;
    
    /* Z-Index */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-modal: 300;
    --z-toast: 400;
    --z-tooltip: 500;

    /* Landing surfaces */
    --landing-header-bg: rgba(255, 255, 255, 0.82);
    --landing-card-bg: rgba(255, 255, 255, 0.72);
    --landing-max: 1240px;
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #F3F4F6;
        --text-secondary: #9CA3AF;
        --text-tertiary: #6B7280;
        
        --bg-primary: #111827;
        --bg-secondary: #1F2937;
        --bg-tertiary: #374151;
        --bg-card: #1F2937;
        
        --border-light: #374151;
        --border-medium: #4B5563;

        --landing-header-bg: rgba(17, 24, 39, 0.72);
        --landing-card-bg: rgba(31, 41, 55, 0.78);
    }
}

/* ============================================================================
   BASE STYLES
   ============================================================================ */

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--bg-secondary);
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

button {
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ============================================================================
   LOADING SCREEN
   ============================================================================ */

.loading-screen {
    position: fixed;
    inset: 0;
    background: var(--gradient-warm);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity var(--transition-slow), visibility var(--transition-slow);
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

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

.loading-logo {
    width: 100px;
    height: 100px;
    background: var(--gradient-primary);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
    box-shadow: var(--shadow-glow);
    animation: pulse 2s ease-in-out infinite;
}

.loading-logo i {
    font-size: 48px;
    color: white;
}

.loading-logo img {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-xl);
    object-fit: cover;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.loading-content h1 {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-lg);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    margin: 0 auto;
    animation: spin 1s linear infinite;
}

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

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ============================================================================
   APP LAYOUT
   ============================================================================ */

#app {
    min-height: 100vh;
}

.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.app-header {
    position: sticky;
    top: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-light);
    z-index: var(--z-sticky);
    padding: var(--space-md) var(--space-lg);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
}

.header-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--text-primary);
}

.header-logo i {
    color: var(--primary);
}

.header-nav {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.header-nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    position: relative;
}

.header-nav-item:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.header-nav-item.active {
    color: var(--primary);
    background: rgba(255, 107, 107, 0.1);
}

.header-nav-item .badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    background: var(--primary);
    color: white;
    font-size: 10px;
    font-weight: 600;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.header-lang.segmented {
    padding: 3px;
}

.header-lang.segmented button {
    padding: 6px 10px;
    font-size: 12px;
    min-height: 28px;
}

.header-user {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.header-user:hover {
    background: var(--bg-secondary);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: var(--font-size-sm);
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Main Content */
.app-main {
    flex: 1;
    padding: var(--space-lg);
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Bottom Navigation (Mobile) */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-light);
    padding: var(--space-sm) var(--space-md);
    padding-bottom: calc(var(--space-sm) + env(safe-area-inset-bottom));
    z-index: var(--z-sticky);
}

.bottom-nav-items {
    display: flex;
    justify-content: space-around;
    max-width: 500px;
    margin: 0 auto;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: var(--space-xs) var(--space-md);
    color: var(--text-tertiary);
    font-size: var(--font-size-xs);
    transition: color var(--transition-fast);
    position: relative;
}

.bottom-nav-item i {
    font-size: 20px;
}

.bottom-nav-item.active {
    color: var(--primary);
}

.bottom-nav-item .badge {
    position: absolute;
    top: 0;
    right: 8px;
    min-width: 16px;
    height: 16px;
    background: var(--primary);
    color: white;
    font-size: 9px;
    font-weight: 600;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .header-nav {
        display: none;
    }
    
    .bottom-nav {
        display: block;
    }
    
    .app-main {
        padding-bottom: calc(70px + env(safe-area-inset-bottom));
    }
}

/* ============================================================================
   BUTTONS
   ============================================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: var(--font-size-base);
    transition: all var(--transition-fast);
    white-space: nowrap;
    min-height: 44px;
}

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

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg), 0 4px 20px rgba(255, 107, 107, 0.3);
}

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

.btn-secondary:hover:not(:disabled) {
    background: var(--bg-tertiary);
    border-color: var(--border-medium);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover:not(:disabled) {
    background: var(--primary);
    color: white;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover:not(:disabled) {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

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

.btn-danger:hover:not(:disabled) {
    background: #DC2626;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: var(--space-xs) var(--space-md);
    font-size: var(--font-size-sm);
    min-height: 36px;
}

.btn-lg {
    padding: var(--space-md) var(--space-xl);
    font-size: var(--font-size-lg);
    min-height: 52px;
}

.btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: var(--radius-full);
}

.btn-icon.btn-sm {
    width: 36px;
    height: 36px;
}

/* Social Buttons */
.btn-apple {
    background: #000;
    color: white;
}

.btn-apple:hover:not(:disabled) {
    background: #1a1a1a;
}

.btn-google {
    background: white;
    color: var(--text-primary);
    border: 1px solid var(--border-medium);
}

.btn-google:hover:not(:disabled) {
    background: var(--bg-secondary);
}

.btn-google .google-logo {
    font-weight: bold;
    background: linear-gradient(135deg, #EA4335, #FBBC05, #34A853, #4285F4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================================================
   FORM ELEMENTS
   ============================================================================ */

.form-group {
    margin-bottom: var(--space-md);
}

.form-label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input-wrapper {
    position: relative;
}

.form-input-wrapper .input-icon {
    position: absolute;
    left: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    pointer-events: none;
}

.form-input-wrapper .input-icon-right {
    position: absolute;
    right: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    cursor: pointer;
}

.form-input {
    width: 100%;
    padding: var(--space-md);
    padding-left: calc(var(--space-md) * 2 + 20px);
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

.form-input::placeholder {
    color: var(--text-tertiary);
}

.form-input.no-icon {
    padding-left: var(--space-md);
}

.form-input.error {
    border-color: var(--error);
}

.form-error {
    font-size: var(--font-size-sm);
    color: var(--error);
    margin-top: var(--space-xs);
}

.form-hint {
    font-size: var(--font-size-sm);
    color: var(--text-tertiary);
    margin-top: var(--space-xs);
}

/* Checkbox */
.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    cursor: pointer;
}

.form-checkbox input {
    display: none;
}

.form-checkbox .checkmark {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border-medium);
    border-radius: var(--radius-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.form-checkbox input:checked + .checkmark {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.form-checkbox .label-text {
    font-size: var(--font-size-base);
    color: var(--text-primary);
    line-height: 1.4;
}

/* Toggle */
.form-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
}

.form-toggle input {
    display: none;
}

.form-toggle .toggle-track {
    width: 48px;
    height: 28px;
    background: var(--border-medium);
    border-radius: var(--radius-full);
    position: relative;
    transition: background var(--transition-fast);
}

.form-toggle .toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast);
}

.form-toggle input:checked + .toggle-track {
    background: var(--primary);
}

.form-toggle input:checked + .toggle-track .toggle-thumb {
    transform: translateX(20px);
}

/* Select */
.form-select {
    appearance: none;
    padding-right: calc(var(--space-md) * 2 + 16px);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236B7280' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--space-md) center;
}

/* ============================================================================
   CARDS
   ============================================================================ */

.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.card-header {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border-light);
}

.card-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-primary);
}

.card-body {
    padding: var(--space-lg);
}

.card-footer {
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-light);
}

/* ============================================================================
   ALBUMS GRID
   ============================================================================ */

.albums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.album-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    cursor: pointer;
}

.album-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.album-cover {
    aspect-ratio: 16/10;
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
}

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

.album-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: white;
    opacity: 0.7;
}

.album-visibility-badge {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    padding: var(--space-xs) var(--space-sm);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    display: flex;
    align-items: center;
    gap: 4px;
}

.album-info {
    padding: var(--space-md);
}

.album-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.album-meta {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.album-challenge {
    margin-top: var(--space-xs);
    display: flex;
    gap: var(--space-xs);
    flex-wrap: wrap;
}

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

.album-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-top: var(--space-sm);
}

.album-tag {
    padding: 2px var(--space-sm);
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
}

/* Albums Timeline */
.album-timeline {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.album-timeline-row {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.album-timeline-row:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.album-timeline-cover {
    width: 160px;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--gradient-primary);
    flex-shrink: 0;
}

.album-timeline-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.album-timeline-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.album-timeline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
}

.album-visibility-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    font-size: var(--font-size-xs);
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
}

.album-timeline-desc {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.album-timeline-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.album-timeline-content .album-challenge {
    margin-top: var(--space-sm);
}

@media (max-width: 768px) {
    .album-timeline-row {
        flex-direction: column;
    }
    
    .album-timeline-cover {
        width: 100%;
        aspect-ratio: 16 / 9;
    }
}

/* ============================================================================
   MEDIA GRID
   ============================================================================ */

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: var(--space-sm);
}

.media-item {
    aspect-ratio: 1;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    position: relative;
    transition: transform var(--transition-fast);
}

.media-item:hover {
    transform: scale(1.02);
}

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

.media-item-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

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

.media-type-badge {
    position: absolute;
    bottom: var(--space-xs);
    right: var(--space-xs);
    padding: 2px var(--space-xs);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border-radius: var(--radius-xs);
    font-size: var(--font-size-xs);
}

.media-explicit-badge {
    position: absolute;
    top: var(--space-xs);
    left: var(--space-xs);
    padding: 2px var(--space-sm);
    background: var(--error);
    color: white;
    border-radius: var(--radius-xs);
    font-size: var(--font-size-xs);
    font-weight: 600;
}

/* ============================================================================
   LIGHTBOX
   ============================================================================ */

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: var(--z-modal);
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    color: white;
}

.lightbox-close {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    color: white;
    font-size: 24px;
    transition: background var(--transition-fast);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.lightbox-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    overflow: hidden;
    min-height: 0; /* Wichtig für Flexbox */
}

.lightbox-content img,
.lightbox-content video {
    max-width: 100%;
    max-height: calc(100vh - 150px); /* Platz für Header und Footer */
    width: auto;
    height: auto;
    object-fit: contain;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: var(--radius-full);
    font-size: 24px;
    transition: background var(--transition-fast);
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-nav.prev {
    left: var(--space-lg);
}

.lightbox-nav.next {
    right: var(--space-lg);
}

.lightbox-footer {
    padding: var(--space-md) var(--space-lg);
    color: white;
    text-align: center;
}

/* Lightbox New Layout */
.lightbox-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    padding: var(--space-lg);
    overflow: hidden;
}

.lightbox-media {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
}

.lightbox-media img,
.lightbox-media video {
    max-width: 100%;
    max-height: calc(100vh - 200px);
    width: auto;
    height: auto;
    object-fit: contain;
}

.lightbox-panel {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    color: white;
    max-height: 45vh;
    overflow: auto;
}

.lightbox-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.lightbox-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.12);
    color: white;
    font-size: var(--font-size-sm);
    transition: all var(--transition-fast);
}

.lightbox-action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-action-btn.active {
    background: rgba(255, 107, 107, 0.35);
    color: #fff;
}

.lightbox-caption {
    margin: var(--space-sm) 0;
    font-size: var(--font-size-sm);
    color: #f3f4f6;
}

.lightbox-filename {
    font-size: var(--font-size-xs);
    color: #d1d5db;
    margin-bottom: var(--space-sm);
}

.lightbox-comments {
    margin-top: var(--space-sm);
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.comment-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    padding: var(--space-sm);
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
}

.comment-body {
    flex: 1;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: 2px;
}

.comment-author {
    font-weight: 600;
    font-size: var(--font-size-sm);
}

.comment-time {
    font-size: var(--font-size-xs);
    color: #cbd5e1;
}

.comment-text {
    font-size: var(--font-size-sm);
    color: #f9fafb;
}

.comment-delete {
    color: #fca5a5;
    padding: 4px;
    border-radius: var(--radius-sm);
}

.comment-delete:hover {
    background: rgba(239, 68, 68, 0.2);
}

.comment-form {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
}

.comment-form .form-input {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: #f9fafb;
}

.comment-form .form-input::placeholder {
    color: #cbd5e1;
}

@media (min-width: 1024px) {
    .lightbox-body {
        flex-direction: row;
    }
    
    .lightbox-panel {
        width: 360px;
        max-height: none;
    }
}

/* ============================================================================
   MODALS
   ============================================================================ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-overlay);
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

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

.modal {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.95) translateY(20px);
    transition: transform var(--transition-normal);
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: var(--font-size-xl);
    font-weight: 600;
}

.modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.modal-body {
    padding: var(--space-lg);
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: var(--space-md) var(--space-lg);
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: var(--space-sm);
}

/* ============================================================================
   TOASTS
   ============================================================================ */

#toast-container {
    position: fixed;
    top: var(--space-lg);
    right: var(--space-lg);
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.toast {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: var(--space-md) var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    min-width: 300px;
    max-width: 400px;
    animation: slideIn 0.3s ease;
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--error); }
.toast.warning { border-left: 4px solid var(--warning); }
.toast.info { border-left: 4px solid var(--info); }

.toast-icon {
    font-size: 20px;
}

.toast.success .toast-icon { color: var(--success); }
.toast.error .toast-icon { color: var(--error); }
.toast.warning .toast-icon { color: var(--warning); }
.toast.info .toast-icon { color: var(--info); }

.toast-message {
    flex: 1;
    font-size: var(--font-size-base);
}

.toast-close {
    color: var(--text-tertiary);
    padding: var(--space-xs);
}

.toast-close:hover {
    color: var(--text-primary);
}

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

/* ============================================================================
   COOKIE / PRIVACY CONSENT
   ============================================================================ */

body.consent-required::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.28);
    z-index: 9998;
    pointer-events: none;
}

body.consent-required #app,
body.consent-required #toast-container,
body.consent-required #modal-container {
    pointer-events: none;
    user-select: none;
    filter: blur(6px);
    opacity: 0.22;
}

.cookie-consent {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 9999;
    max-width: 980px;
    margin: 0 auto;
}

.cookie-consent-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 16px;
}

.cookie-consent-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.cookie-consent-lang.segmented {
    padding: 3px;
    gap: 3px;
}

.cookie-consent-lang.segmented button {
    flex: 0 0 auto;
    padding: 7px 10px;
    font-size: 12px;
}

.cookie-consent-title {
    font-family: var(--font-family-display);
    font-weight: 900;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.cookie-consent-text {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

.cookie-consent-checks {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.cookie-consent-check {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
}

.cookie-consent-check input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--primary);
}

.cookie-consent-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.cookie-consent-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    font-weight: 800;
}

@media (max-width: 520px) {
    .cookie-consent {
        left: 12px;
        right: 12px;
        bottom: 12px;
    }

    .cookie-consent-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .cookie-consent-links {
        justify-content: center;
    }
}

/* ============================================================================
   AUTH VIEWS
   ============================================================================ */

.auth-container {
    min-height: 100vh;
    background: var(--gradient-warm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
}

.auth-topbar {
    width: 100%;
    max-width: 520px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-lg);
    background: var(--landing-header-bg);
    border: 1px solid var(--border-light);
    backdrop-filter: blur(8px);
    margin-bottom: 14px;
}

.auth-topbrand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    color: var(--text-primary);
    text-decoration: none;
}

.auth-topbrand img {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.auth-topbrand span {
    font-family: var(--font-family-display);
    letter-spacing: -0.02em;
}

.auth-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 450px;
    overflow: hidden;
}

.auth-header {
    padding: var(--space-xl) var(--space-xl) var(--space-lg);
    text-align: center;
}

.auth-logo {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
    box-shadow: var(--shadow-glow);
}

.auth-logo i {
    font-size: 36px;
    color: white;
}

.auth-title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.auth-subtitle {
    color: var(--text-secondary);
}

.auth-body {
    padding: 0 var(--space-xl) var(--space-xl);
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: var(--space-lg) 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-light);
}

.auth-divider span {
    padding: 0 var(--space-md);
    color: var(--text-tertiary);
    font-size: var(--font-size-sm);
}

.auth-footer {
    padding: var(--space-lg) var(--space-xl);
    background: var(--bg-secondary);
    text-align: center;
}

.auth-link {
    color: var(--primary);
    font-weight: 600;
}

/* Password Requirements */
.password-requirements {
    margin-top: var(--space-sm);
}

.password-requirement {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--font-size-sm);
    color: var(--text-tertiary);
    margin-bottom: 2px;
}

.password-requirement.met {
    color: var(--success);
}

.password-requirement i {
    font-size: 12px;
}

/* Registration Steps */
.register-steps {
    display: flex;
    gap: var(--space-xs);
    margin-bottom: var(--space-xl);
}

.register-step {
    flex: 1;
    height: 4px;
    background: var(--border-light);
    border-radius: var(--radius-full);
    transition: background var(--transition-normal);
}

.register-step.active,
.register-step.completed {
    background: var(--primary);
}

/* ============================================================================
   WELCOME VIEW
   ============================================================================ */

.welcome-container {
    min-height: 100vh;
    background: var(--gradient-warm);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.welcome-decoration {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
}

.welcome-decoration.circle-1 {
    width: 300px;
    height: 300px;
    background: var(--primary);
    opacity: 0.1;
    top: -100px;
    left: -100px;
}

.welcome-decoration.circle-2 {
    width: 250px;
    height: 250px;
    background: var(--secondary);
    opacity: 0.1;
    bottom: -50px;
    right: -50px;
}

.welcome-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    position: relative;
    z-index: 1;
}

.welcome-logo {
    width: 120px;
    height: 120px;
    background: var(--gradient-primary);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-lg);
    box-shadow: var(--shadow-glow);
    animation: pulse 2s ease-in-out infinite;
}

.welcome-logo i {
    font-size: 50px;
    color: white;
}

.welcome-title {
    font-size: var(--font-size-4xl);
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-sm);
}

.welcome-subtitle {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    margin-bottom: var(--space-xxl);
}

.welcome-features {
    width: 100%;
    max-width: 400px;
    margin-bottom: var(--space-xxl);
}

.welcome-feature {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-sm);
}

.welcome-feature-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.welcome-feature-icon.primary {
    background: rgba(255, 107, 107, 0.1);
    color: var(--primary);
}

.welcome-feature-icon.secondary {
    background: rgba(78, 205, 196, 0.1);
    color: var(--secondary);
}

.welcome-feature-icon.accent {
    background: rgba(255, 230, 109, 0.2);
    color: #D4A000;
}

.welcome-feature-text {
    flex: 1;
    font-weight: 500;
}

.welcome-feature-check {
    color: var(--success);
}

.welcome-actions {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

/* ============================================================================
   PROFILE
   ============================================================================ */

.profile-header {
    background: var(--gradient-primary);
    padding: var(--space-xl);
    border-radius: var(--radius-xl);
    color: white;
    margin-bottom: var(--space-lg);
}

.profile-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: var(--space-md);
    overflow: hidden;
}

.profile-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-name {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.profile-username {
    opacity: 0.8;
}

.profile-stats {
    display: flex;
    gap: var(--space-xl);
    margin-top: var(--space-lg);
}

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

.profile-stat-value {
    font-size: var(--font-size-xl);
    font-weight: 700;
}

.profile-stat-label {
    font-size: var(--font-size-sm);
    opacity: 0.8;
}

.profile-avatar-editor {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.profile-avatar-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.settings-subgroup {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
    padding-left: var(--space-md);
    border-left: 2px solid var(--border-color);
}

.settings-subgroup.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* ============================================================================
   CHALLENGES
   ============================================================================ */

.challenge-section {
    margin-bottom: var(--space-lg);
}

.challenge-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-sm);
}

.challenge-toggle {
    flex: 1;
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    cursor: pointer;
    text-align: left;
}

.challenge-toggle h2 {
    margin: 0;
    font-size: var(--font-size-lg);
}

.challenge-toggle p {
    margin: 0;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.challenge-actions {
    display: flex;
    gap: var(--space-xs);
}

.challenge-pill {
    padding: 6px 10px;
    border-radius: 999px;
    font-size: var(--font-size-xs);
    font-weight: 600;
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

.challenge-pill.warning {
    background: rgba(251, 191, 36, 0.15);
    color: var(--warning);
}

.challenge-pill.success {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.challenge-pill.muted {
    background: var(--bg-secondary);
    color: var(--text-tertiary);
}

.challenge-loading,
.challenge-empty {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-secondary);
    padding: var(--space-sm) var(--space-md);
}

.challenge-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.challenge-row {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid transparent;
    cursor: pointer;
}

.challenge-row.selected {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px rgba(255, 107, 107, 0.2);
}

.challenge-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    color: var(--primary);
    flex-shrink: 0;
}

.challenge-icon.done {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.challenge-title {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.challenge-tag {
    font-size: var(--font-size-xs);
    background: var(--bg-secondary);
    padding: 2px 6px;
    border-radius: 999px;
    color: var(--text-tertiary);
}

.challenge-desc {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.challenge-cta {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.challenge-filter {
    margin-bottom: var(--space-md);
}

.challenge-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 6px 10px;
    background: var(--bg-secondary);
    border-radius: 999px;
}

.challenge-complete-modal img {
    width: 100%;
    border-radius: var(--radius-md);
}

.challenge-upload-preview {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    text-align: center;
}

.challenge-upload-preview img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: var(--radius-md);
}

.challenge-complete-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.challenge-complete-header i {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    color: white;
}

.challenge-overview .overview-user {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--border-color);
}

.challenge-overview .overview-user:last-child {
    border-bottom: none;
}

.overview-progress {
    height: 6px;
    background: var(--bg-secondary);
    border-radius: 999px;
    overflow: hidden;
    margin: 4px 0;
}

.overview-progress-bar {
    height: 100%;
    background: var(--primary);
}

.overview-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.overview-info {
    flex: 1;
}

.overview-name {
    font-weight: 600;
}

.overview-meta {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

/* ============================================================================
   QR / IMPORT
   ============================================================================ */

.import-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}

.import-scan-card,
.import-preview-card {
    height: fit-content;
}

.qr-scanner {
    position: relative;
    width: 100%;
    height: 260px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

.qr-scanner video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.qr-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.qr-frame {
    width: 70%;
    height: 70%;
    border: 2px dashed rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-lg);
    box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.15) inset;
}

.import-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    margin: var(--space-md) 0;
    color: var(--text-tertiary);
}

.import-divider::before,
.import-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.import-preview-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.import-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--primary);
    overflow: hidden;
}

.import-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.import-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-top: var(--space-sm);
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.import-permissions {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
}

.share-qr-wrapper {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    align-items: center;
}

.share-qr-image {
    width: 260px;
    height: 260px;
    object-fit: contain;
    background: white;
    padding: var(--space-md);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.share-qr-options {
    width: 100%;
}

/* Home Toggle */
.home-toggle {
    min-width: 220px;
    box-shadow: var(--shadow-sm);
}

.home-toggle button {
    font-weight: 600;
}

/* ============================================================================
   TIMELINE FEED
   ============================================================================ */

.timeline-feed {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.timeline-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    border: 1px solid var(--border-color);
}

.timeline-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
}

.timeline-title {
    font-weight: 600;
}

.timeline-subtitle {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.timeline-media {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: var(--bg-secondary);
}

.timeline-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.timeline-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    padding: var(--space-md);
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.timeline-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: var(--bg-secondary);
    border-radius: 999px;
    color: var(--text-secondary);
    font-size: var(--font-size-xs);
}

/* ============================================================================
   LANDING / LOGIN PAGE
   ============================================================================ */

.landing {
    min-height: 100vh;
    background: radial-gradient(circle at top left, rgba(255, 107, 107, 0.15), transparent 55%),
                radial-gradient(circle at top right, rgba(78, 205, 196, 0.18), transparent 55%),
                var(--bg-primary);
    color: var(--text-primary);
    padding: 24px;
    position: relative;
    /* Sticky headers break when an ancestor has overflow != visible */
    overflow-x: hidden;
}

.landing-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    position: sticky;
    top: 0;
    background: var(--landing-header-bg);
    backdrop-filter: blur(8px);
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    z-index: 5;
    max-width: var(--landing-max);
    margin: 0 auto;
}

.landing-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
}

.landing-logo-img {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.landing-logo {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    color: white;
}

.landing-title {
    font-family: var(--font-family-display);
    font-weight: 800;
    font-size: 19px;
    letter-spacing: -0.02em;
}

.landing-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
}

.landing-nav {
    display: flex;
    gap: 12px;
    flex-wrap: nowrap;
    min-width: 0;
    flex: 1 1 auto;
    justify-content: center;
    padding: 4px;
    border-radius: 999px;
    background: var(--landing-card-bg);
    border: 1px solid var(--border-light);
}

.landing-nav a {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    padding: 7px 10px;
    border-radius: 999px;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.landing-nav a:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.landing-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.landing-lang.segmented {
    padding: 3px;
    gap: 3px;
}

.landing-lang.segmented button,
.lang-toggle.segmented button {
    flex: 0 0 auto;
    padding: 7px 10px;
    font-size: 12px;
}

.landing-action-link {
    color: var(--text-secondary);
    font-weight: 800;
    padding: 10px 12px;
    border-radius: 14px;
    text-decoration: none;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.landing-action-link:hover {
    background: rgba(255, 107, 107, 0.08);
    color: var(--text-primary);
}

.landing-menu-btn {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid var(--border-light);
    background: var(--landing-card-bg);
    color: var(--text-primary);
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.landing-menu-btn:hover {
    background: var(--bg-secondary);
}

.landing-menu-btn .icon-close {
    display: none;
}

.landing.menu-open .landing-menu-btn .icon-bars {
    display: none;
}

.landing.menu-open .landing-menu-btn .icon-close {
    display: inline-flex;
}

.landing-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.38);
    backdrop-filter: blur(2px);
    z-index: 4;
}

.landing.menu-open .landing-menu-overlay {
    display: block;
}

.landing-nav-actions {
    display: none;
}

.landing.compact .landing-header {
    flex-wrap: wrap;
    justify-content: space-between;
}

.landing.compact .landing-menu-btn {
    display: inline-flex;
}

.landing.compact .landing-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 6px;
    padding: 0;
    padding-top: 12px;
    margin-top: 12px;
    border-top: 1px solid var(--border-light);
    background: transparent;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    border-radius: 0;
}

.landing.compact.menu-open .landing-nav {
    display: flex;
}

.landing.compact .landing-nav a {
    padding: 12px 12px;
    background: var(--landing-card-bg);
    border: 1px solid var(--border-light);
    border-radius: 14px;
}

.landing.compact .landing-nav-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.landing.compact .landing-actions .btn.btn-primary {
    display: none;
}

.landing.compact .landing-actions .landing-action-link {
    display: none;
}

.landing.compact .landing-actions {
    gap: 10px;
}

.landing-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr);
    grid-template-areas: "copy login";
    gap: 32px;
    margin-top: 32px;
    align-items: start;
    max-width: var(--landing-max);
    margin-left: auto;
    margin-right: auto;
}

.hero-copy {
    min-width: 0;
    grid-area: copy;
}

.hero-login {
    grid-area: login;
}

.hero-copy h1 {
    font-family: var(--font-family-display);
    font-size: 46px;
    line-height: 1.1;
    margin: 12px 0 16px;
    letter-spacing: -0.03em;
}

.hero-kicker {
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-secondary);
    font-size: 12px;
}

.hero-text {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 12px;
    margin: 24px 0 16px;
    flex-wrap: wrap;
}

.hero-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.hero-visual {
    margin-top: 22px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-light);
    background: var(--landing-card-bg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.hero-visual img {
    width: 100%;
    height: auto;
    animation: heroFloat 8s ease-in-out infinite;
    transform-origin: 50% 50%;
}

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

@media (prefers-reduced-motion: reduce) {
    .hero-visual img {
        animation: none;
    }
}

.landing-login {
    box-shadow: var(--shadow-md);
}

.landing-section {
    margin-top: 56px;
    scroll-margin-top: 100px;
    max-width: var(--landing-max);
    margin-left: auto;
    margin-right: auto;
}

.landing-section h2 {
    font-family: var(--font-family-display);
    font-size: 28px;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.section-sub {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

.feature-grid,
.usecase-grid,
.security-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.feature-card,
.usecase-card,
.security-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 18px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.usecase-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    align-items: start;
}

.usecase-ill {
    width: 72px;
    height: 72px;
    flex-shrink: 0;
    grid-row: 1 / span 2;
}

.usecase-card h3 {
    margin-bottom: 6px;
}

.usecase-card p {
    grid-column: 2 / -1;
    margin-top: 4px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.feature-card i {
    font-size: 20px;
    color: var(--primary);
    margin-bottom: 12px;
}

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

.how-step {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 18px;
    box-shadow: var(--shadow-sm);
}

.how-badge {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #fff;
    background: var(--gradient-secondary);
    margin-bottom: 10px;
}

.how-step h3 {
    margin-bottom: 6px;
}

.how-step p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.challenge-showcase {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 16px;
    align-items: start;
}

.challenge-demo {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 18px;
    box-shadow: var(--shadow-md);
}

.challenge-demo-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.challenge-demo-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: -0.01em;
}

.challenge-demo-title i {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(78, 205, 196, 0.14);
    color: var(--secondary-dark);
    border: 1px solid rgba(78, 205, 196, 0.22);
}

.challenge-demo-count {
    font-weight: 900;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 13px;
}

.challenge-bar {
    height: 12px;
    border-radius: 999px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    overflow: hidden;
    margin: 14px 0 12px;
}

.challenge-bar-inner {
    height: 100%;
    background: var(--gradient-secondary);
}

.challenge-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.challenge-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 16px;
    border: 1px solid var(--border-light);
    background: var(--bg-primary);
}

.challenge-item.done {
    background: rgba(34, 197, 94, 0.08);
    border-color: rgba(34, 197, 94, 0.22);
}

.challenge-item-icon {
    width: 34px;
    height: 34px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 107, 107, 0.12);
    color: var(--primary-dark);
    flex-shrink: 0;
    border: 1px solid rgba(255, 107, 107, 0.2);
}

.challenge-item.done .challenge-item-icon {
    background: rgba(34, 197, 94, 0.14);
    color: #16A34A;
    border-color: rgba(34, 197, 94, 0.22);
}

.challenge-item-body {
    min-width: 0;
    flex: 1;
}

.challenge-item-title {
    font-weight: 900;
    letter-spacing: -0.01em;
    margin-bottom: 2px;
}

.challenge-item-meta {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.4;
}

.challenge-item-tag {
    font-weight: 900;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(34, 197, 94, 0.25);
    background: rgba(34, 197, 94, 0.1);
    color: #16A34A;
    flex-shrink: 0;
}

.challenge-item-tag.pending {
    border-color: rgba(251, 191, 36, 0.25);
    background: rgba(251, 191, 36, 0.12);
    color: #B45309;
}

.challenge-demo-note {
    margin-top: 12px;
    color: var(--text-secondary);
    font-size: 13px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.challenge-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.challenge-pitch {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 16px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
}

.challenge-pitch-icon {
    width: 40px;
    height: 40px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 230, 109, 0.22);
    border: 1px solid rgba(255, 230, 109, 0.3);
    color: #A16207;
    flex-shrink: 0;
}

.challenge-pitch h3 {
    margin-bottom: 6px;
}

.challenge-pitch p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.screens-row {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 8px 2px 14px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.shot-card {
    flex: 0 0 280px;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.shot-frame {
    border-radius: 26px;
    border: 1px solid var(--border-color);
    background: var(--landing-card-bg);
    padding: 12px;
    box-shadow: var(--shadow-md);
}

.shot-frame img {
    width: 100%;
    height: auto;
    border-radius: 18px;
    border: 1px solid var(--border-light);
    aspect-ratio: 9 / 19.5;
    object-fit: cover;
    background: var(--bg-secondary);
}

.shot-card figcaption {
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 13px;
}

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

.example-tile {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
}

.example-tile img {
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: var(--bg-secondary);
    transition: transform var(--transition-normal);
}

.example-tile:hover img {
    transform: scale(1.02);
}

.example-label {
    position: absolute;
    left: 10px;
    bottom: 10px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.7);
    color: #fff;
    font-weight: 800;
    font-size: 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
}

.faq-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    box-shadow: var(--shadow-sm);
}

.faq-item summary {
    cursor: pointer;
    font-weight: 700;
    list-style: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "＋";
    float: right;
    color: var(--text-secondary);
    font-weight: 800;
}

.faq-item[open] summary::after {
    content: "–";
}

.faq-item p {
    margin-top: 10px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.landing-cta {
    margin-top: 64px;
}

.cta-card {
    background: radial-gradient(circle at top left, rgba(255, 107, 107, 0.12), transparent 55%),
                radial-gradient(circle at bottom right, rgba(78, 205, 196, 0.14), transparent 55%),
                var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 22px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.cta-card p {
    color: var(--text-secondary);
    margin-top: 6px;
    line-height: 1.6;
}

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

.landing-footer {
    margin: 48px 0 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    font-size: 14px;
    flex-wrap: wrap;
    gap: 12px;
    max-width: var(--landing-max);
    margin-left: auto;
    margin-right: auto;
}

.footer-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
}

@media (max-width: 1260px) {
    .landing-header {
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .landing-menu-btn {
        display: inline-flex;
    }

    .landing-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 6px;
        padding: 0;
        padding-top: 12px;
        margin-top: 12px;
        border-top: 1px solid var(--border-light);
        background: transparent;
        border-left: 0;
        border-right: 0;
        border-bottom: 0;
        border-radius: 0;
    }

    .landing.menu-open .landing-nav {
        display: flex;
    }

    .landing-nav a {
        padding: 12px 12px;
        background: var(--landing-card-bg);
        border: 1px solid var(--border-light);
        border-radius: 14px;
    }

    .landing-nav-actions {
        display: flex;
        flex-direction: column;
        gap: 8px;
        margin-top: 10px;
    }

    .landing-actions .btn.btn-primary {
        display: none;
    }

    .landing-actions .landing-action-link {
        display: none;
    }

    .landing-actions {
        gap: 10px;
    }
}

@media (max-width: 960px) {
    .landing-hero {
        grid-template-columns: 1fr;
        grid-template-areas: "login" "copy";
    }
    .hero-copy h1 {
        font-size: 38px;
    }
    .usecase-card {
        grid-template-columns: 1fr;
        text-align: left;
    }
    .usecase-card p {
        grid-column: 1 / -1;
    }
    .challenge-showcase {
        grid-template-columns: 1fr;
    }
}

/* Legal pages */
.legal {
    min-height: 100vh;
    padding: 24px;
    background: radial-gradient(circle at top left, rgba(255, 107, 107, 0.12), transparent 55%),
                radial-gradient(circle at top right, rgba(78, 205, 196, 0.14), transparent 55%),
                var(--bg-primary);
}

.legal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: sticky;
    top: 0;
    background: var(--landing-header-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 12px 16px;
    backdrop-filter: blur(8px);
    z-index: 5;
    max-width: 980px;
    margin: 0 auto;
}

.legal-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.legal-brand {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    color: inherit;
    text-decoration: none;
    font-weight: 800;
}

.legal-logo-img {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.legal-content {
    max-width: 980px;
    margin: 28px auto 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 22px;
    box-shadow: var(--shadow-md);
}

.legal-content h1 {
    font-family: var(--font-family-display);
    letter-spacing: -0.02em;
    margin-bottom: 10px;
}

.legal-prose {
    line-height: 1.7;
}

.legal-meta {
    color: var(--text-secondary);
    margin: 6px 0 14px;
}

.legal-placeholder {
    display: inline-block;
    padding: 0 6px;
    border-radius: 8px;
    background: rgba(251, 191, 36, 0.22);
    border: 1px solid rgba(251, 191, 36, 0.35);
    color: var(--text-primary);
    font-weight: 700;
}

.legal-prose h2 {
    font-size: 18px;
    margin-top: 18px;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.legal-prose h3 {
    font-size: 15px;
    margin-top: 14px;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.legal-prose p {
    margin: 10px 0;
    color: var(--text-secondary);
}

.legal-prose p strong,
.legal-prose li strong {
    color: var(--text-primary);
}

.legal-prose ul,
.legal-prose ol {
    margin: 10px 0 10px 18px;
    color: var(--text-secondary);
}

.legal-prose li {
    margin: 6px 0;
}

.legal-prose hr {
    border: 0;
    border-top: 1px solid var(--border-light);
    margin: 18px 0 14px;
}

.legal-lead {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
}

.legal-links {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.media-challenge-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border-radius: 999px;
    padding: 4px 6px;
    font-size: 10px;
}

@media (max-width: 900px) {
    .import-layout {
        grid-template-columns: 1fr;
    }
}

/* ============================================================================
   FRIENDS
   ============================================================================ */

.friends-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.friend-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-card);
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
}

.friend-item:hover {
    background: var(--bg-secondary);
}

.friend-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gradient-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    overflow: hidden;
}

.friend-info {
    flex: 1;
}

.friend-name {
    font-weight: 600;
    color: var(--text-primary);
}

.friend-username {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.friend-actions {
    display: flex;
    gap: var(--space-xs);
}

/* Notifications */
.notifications-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.notification-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.notification-item:hover {
    background: var(--bg-secondary);
}

.notification-item.unread {
    background: rgba(255, 107, 107, 0.06);
    border-color: rgba(255, 107, 107, 0.2);
}

.notification-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.notification-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.notification-icon {
    font-size: 18px;
    color: white;
}

.notification-body {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    margin-bottom: 2px;
}

.notification-text {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.notification-meta {
    font-size: var(--font-size-xs);
    color: var(--text-tertiary);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.notification-hint {
    color: var(--primary);
}

.notification-chevron {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    color: var(--text-tertiary);
}

.notification-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
}

/* ============================================================================
   SHARE VIEW
   ============================================================================ */

.share-banner {
    background: var(--gradient-primary);
    padding: var(--space-md) var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
}

.share-banner-text {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.share-banner-text i {
    font-size: 24px;
}

.share-album-header {
    padding: var(--space-xl);
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-lg);
}

.share-album-title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.share-album-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.share-album-meta-item {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.share-features {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-light);
}

.share-feature {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--font-size-sm);
}

.share-feature.enabled {
    color: var(--success);
}

.share-feature.disabled {
    color: var(--text-tertiary);
}

.share-login-prompt {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
    margin-top: var(--space-lg);
}

.share-login-prompt h3 {
    margin-bottom: var(--space-sm);
}

.share-login-prompt p {
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
}

/* ============================================================================
   EMPTY STATES
   ============================================================================ */

.empty-state {
    text-align: center;
    padding: var(--space-xxl);
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
    font-size: 32px;
    color: var(--text-tertiary);
}

.empty-state-title {
    font-size: var(--font-size-xl);
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.empty-state-text {
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
}

/* ============================================================================
   DROPDOWN
   ============================================================================ */

.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 200px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    padding: var(--space-xs);
    z-index: var(--z-dropdown);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-fast);
}

.dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(var(--space-xs));
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: var(--font-size-base);
    transition: background var(--transition-fast);
    width: 100%;
}

.dropdown-item:hover {
    background: var(--bg-secondary);
}

.dropdown-item.danger {
    color: var(--error);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-light);
    margin: var(--space-xs) 0;
}

.dropdown-lang {
    padding: var(--space-sm) var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.dropdown-label {
    font-size: var(--font-size-sm);
    color: var(--text-tertiary);
}

/* ============================================================================
   TABS
   ============================================================================ */

.tabs {
    display: flex;
    gap: var(--space-xs);
    background: var(--bg-secondary);
    padding: var(--space-xs);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
}

.tab {
    flex: 1;
    padding: var(--space-sm) var(--space-md);
    text-align: center;
    border-radius: var(--radius-sm);
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.tab:hover {
    color: var(--text-primary);
}

.tab.active {
    background: var(--bg-card);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

/* ============================================================================
   SEARCH
   ============================================================================ */

.search-bar {
    position: relative;
    max-width: 400px;
}

.search-bar .form-input {
    padding-right: 44px;
}

.search-bar .search-btn {
    position: absolute;
    right: var(--space-xs);
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--radius-sm);
}

/* ============================================================================
   DESIGN SYSTEM EXTRAS
   ============================================================================ */

/* Headings */
h1, h2, h3, h4 {
    color: var(--text-primary);
    letter-spacing: -0.2px;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.page-title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    margin-top: var(--space-xs);
}

/* Sections */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.section-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
}

.section-action {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.badge-sm {
    min-width: 16px;
    height: 16px;
    font-size: 10px;
}

.badge-primary { background: var(--primary); color: white; }
.badge-secondary { background: var(--secondary); color: white; }
.badge-success { background: var(--success); color: white; }
.badge-warning { background: var(--warning); color: white; }
.badge-danger { background: var(--error); color: white; }
.badge-muted { background: var(--bg-secondary); color: var(--text-secondary); }

/* Pills / Chips */
.pill,
.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    font-weight: 600;
    border: 1px solid var(--border-light);
    background: var(--bg-card);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.chip.active,
.pill.primary {
    background: rgba(255, 107, 107, 0.12);
    color: var(--primary);
    border-color: rgba(255, 107, 107, 0.3);
}

/* Segmented Control */
.segmented {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    border: 1px solid var(--border-light);
}

.segmented button {
    flex: 1;
    padding: 8px 12px;
    border-radius: var(--radius-full);
    font-weight: 600;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.segmented button.active {
    background: var(--bg-card);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

/* Lists */
.list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.list-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    transition: all var(--transition-fast);
}

.list-item:hover {
    background: var(--bg-secondary);
}

.list-item-title {
    font-weight: 600;
}

.list-item-subtitle {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

/* Avatars */
.avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--gradient-secondary);
    color: white;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.avatar.sm { width: 32px; height: 32px; font-size: 12px; }
.avatar.lg { width: 64px; height: 64px; font-size: 18px; }

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

/* Info Boxes / Callouts */
.info-box {
    padding: var(--space-md);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
}

.info-box.primary {
    background: rgba(255, 107, 107, 0.08);
    color: var(--text-primary);
    border-color: rgba(255, 107, 107, 0.2);
}

.info-box.secondary {
    background: rgba(78, 205, 196, 0.1);
    border-color: rgba(78, 205, 196, 0.2);
}

.info-box.success {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.25);
    color: var(--text-primary);
}

.info-box.warning {
    background: rgba(251, 191, 36, 0.12);
    border-color: rgba(251, 191, 36, 0.25);
    color: var(--text-primary);
}

.info-box.error {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.25);
    color: var(--text-primary);
}

/* Skeletons */
.skeleton {
    background: linear-gradient(90deg, var(--bg-secondary), var(--bg-tertiary), var(--bg-secondary));
    background-size: 200% 100%;
    animation: shimmer 1.2s ease-in-out infinite;
    border-radius: var(--radius-md);
}

.skeleton.line { height: 12px; }
.skeleton.card { height: 120px; }

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

/* Thumbnails loading */
.thumb-loading {
    background: linear-gradient(120deg, #2f3542, #3d4451, #2f3542);
    background-size: 200% 100%;
    animation: shimmer 1.4s ease-in-out infinite;
}

/* ============================================================================
   UTILITIES
   ============================================================================ */

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

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-tertiary); }
.text-success { color: var(--success); }
.text-error { color: var(--error); }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-xs); }
.mt-2 { margin-top: var(--space-sm); }
.mt-3 { margin-top: var(--space-md); }
.mt-4 { margin-top: var(--space-lg); }
.mt-5 { margin-top: var(--space-xl); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-xs); }
.mb-2 { margin-bottom: var(--space-sm); }
.mb-3 { margin-bottom: var(--space-md); }
.mb-4 { margin-bottom: var(--space-lg); }
.mb-5 { margin-bottom: var(--space-xl); }

.p-0 { padding: 0; }
.p-1 { padding: var(--space-xs); }
.p-2 { padding: var(--space-sm); }
.p-3 { padding: var(--space-md); }
.p-4 { padding: var(--space-lg); }
.p-5 { padding: var(--space-xl); }

.d-flex { display: flex; }
.d-block { display: block; }
.d-none { display: none; }

.flex-column { flex-direction: column; }
.align-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: var(--space-xs); }
.gap-2 { gap: var(--space-sm); }
.gap-3 { gap: var(--space-md); }
.gap-4 { gap: var(--space-lg); }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-full); }

.shadow { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

.cursor-pointer { cursor: pointer; }

.hidden { display: none !important; }
.visible { visibility: visible !important; }
.invisible { visibility: hidden !important; }

@media (max-width: 768px) {
    .hide-mobile { display: none !important; }
}

@media (min-width: 769px) {
    .hide-desktop { display: none !important; }
}
