/* Reset e variabili globali */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Light Theme */
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary-color: #10b981;
    --accent-color: #f59e0b;
    --background: #f8fafc;
    --background-pattern: radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
                         radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
                         radial-gradient(circle at 40% 40%, rgba(120, 219, 226, 0.3) 0%, transparent 50%);
    --surface: #ffffff;
    --surface-elevated: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-tertiary: #94a3b8;
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --error-color: #ef4444;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    --gradient-secondary: linear-gradient(135deg, var(--secondary-color) 0%, #059669 100%);
    --gradient-accent: linear-gradient(135deg, var(--accent-color) 0%, #d97706 100%);
    --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --glass-bg: rgba(255, 255, 255, 0.25);
    --glass-border: rgba(255, 255, 255, 0.18);
    --radius: 16px;
    --radius-sm: 8px;
    --radius-lg: 20px;
    --header-height: 64px;
    --blur: blur(16px);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme */
@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #3b82f6;
        --primary-dark: #2563eb;
        --primary-light: #60a5fa;
        --secondary-color: #10b981;
        --accent-color: #fbbf24;
        --background: #0f172a;
        --background-pattern: radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
                             radial-gradient(circle at 80% 20%, rgba(236, 72, 153, 0.15) 0%, transparent 50%),
                             radial-gradient(circle at 40% 40%, rgba(14, 165, 233, 0.15) 0%, transparent 50%);
        --surface: #1e293b;
        --surface-elevated: #334155;
        --text-primary: #f8fafc;
        --text-secondary: #cbd5e1;
        --text-tertiary: #94a3b8;
        --border-color: #334155;
        --border-light: #475569;
        --error-color: #f87171;
        --success-color: #34d399;
        --warning-color: #fbbf24;
        --info-color: #60a5fa;
        --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
        --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
        --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
        --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
        --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
        --gradient-secondary: linear-gradient(135deg, var(--secondary-color) 0%, #059669 100%);
        --gradient-accent: linear-gradient(135deg, var(--accent-color) 0%, #d97706 100%);
        --gradient-hero: linear-gradient(135deg, #4c51bf 0%, #553c9a 100%);
        --glass-bg: rgba(30, 41, 59, 0.4);
        --glass-border: rgba(148, 163, 184, 0.18);
    }
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background);
    background-image: var(--background-pattern);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: var(--transition);
}

/* Animated background particles */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 25% 25%, rgba(59, 130, 246, 0.1) 0%, transparent 25%),
        radial-gradient(circle at 75% 75%, rgba(16, 185, 129, 0.1) 0%, transparent 25%);
    animation: backgroundShift 20s ease-in-out infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes backgroundShift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(-10px, -10px) scale(1.02); }
    50% { transform: translate(10px, 10px) scale(0.98); }
    75% { transform: translate(-5px, 5px) scale(1.01); }
}

/* Header with glassmorphism */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--glass-bg);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    transition: var(--transition);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 20px;
    max-width: 100%;
    gap: 16px;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    filter: drop-shadow(0 2px 4px rgba(37, 99, 235, 0.2));
    transition: var(--transition);
}

.logo-img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 8px rgba(37, 99, 235, 0.3));
}

.logo-text {
    font-size: 20px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.album-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--glass-bg);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(8px);
}

/* Main content */
.main-content {
    padding-top: var(--header-height);
    min-height: 100vh;
    padding-bottom: 20px;
}

/* Upload section */
.upload-section {
    padding: 20px;
    position: relative;
}

.upload-card {
    background: var(--glass-bg);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.upload-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0% { opacity: 0; transform: translateX(-100%); }
    50% { opacity: 1; transform: translateX(0); }
    100% { opacity: 0; transform: translateX(100%); }
}

.upload-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl), 0 0 30px rgba(37, 99, 235, 0.15);
}

.upload-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
    text-align: center;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.upload-subtitle {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 32px;
    font-size: 16px;
    font-weight: 500;
}

/* Upload buttons */
.upload-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 32px;
}

.upload-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 32px 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 2px solid var(--glass-border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
}

.upload-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.upload-btn:hover::before {
    left: 100%;
}

.upload-btn:active {
    transform: scale(0.96) translateY(1px);
    border-color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color)10, var(--primary-color)20);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.25);
}

.upload-btn.camera-btn:active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(37, 99, 235, 0.25));
}

.upload-btn.gallery-btn:active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.25));
}

.upload-btn svg {
    width: 40px;
    height: 40px;
    color: var(--primary-color);
    transition: var(--transition);
    filter: drop-shadow(0 2px 4px rgba(37, 99, 235, 0.3));
}

.upload-btn:active svg {
    transform: scale(1.1);
    color: var(--primary-light);
}

.upload-btn span {
    transition: var(--transition);
}

.upload-btn:active span {
    color: var(--primary-color);
    font-weight: 700;
}

/* Upload indicator */
.upload-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 20px;
    margin-top: 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.upload-indicator::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        rgba(59, 130, 246, 0.1) 0%, 
        rgba(16, 185, 129, 0.1) 50%, 
        rgba(59, 130, 246, 0.1) 100%);
    animation: uploadGlow 2s ease-in-out infinite;
}

@keyframes uploadGlow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.upload-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid transparent;
    border-top: 3px solid var(--primary-color);
    border-right: 3px solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: relative;
    z-index: 1;
}

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

.upload-indicator span {
    font-size: 16px;
    font-weight: 600;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
}

/* Gallery section */
.gallery-section {
    padding: 0 20px;
    margin-top: 32px;
}

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

.section-header h2 {
    font-size: 24px;
    font-weight: 800;
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.photo-count {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 600;
    background: var(--glass-bg);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(8px);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    background: var(--glass-bg);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--glass-border);
    transition: var(--transition);
    backdrop-filter: blur(8px);
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: var(--transition);
    z-index: 1;
}

.gallery-item:hover::before {
    opacity: 1;
    animation: shimmerPhoto 1.5s ease-in-out;
}

@keyframes shimmerPhoto {
    0% { transform: translateX(-100%) translateY(-100%); }
    100% { transform: translateX(100%) translateY(100%); }
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
    filter: brightness(0.95) contrast(1.05);
}

.gallery-item:active {
    transform: scale(0.95);
    box-shadow: var(--shadow-lg);
}

.gallery-item:active img {
    filter: brightness(1.1) contrast(1.1) saturate(1.2);
}

.empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    color: var(--text-secondary);
    text-align: center;
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.empty-state::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(59, 130, 246, 0.05) 0%, transparent 70%);
    animation: pulseEmpty 3s ease-in-out infinite;
}

@keyframes pulseEmpty {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

.empty-state svg {
    margin-bottom: 20px;
    opacity: 0.6;
    animation: floatIcon 4s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

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

.empty-state p {
    font-size: 16px;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

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

.modal.hidden {
    display: none;
}

.modal-content {
    background: var(--surface);
    border-radius: var(--radius);
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal-header h2 {
    font-size: 20px;
    font-weight: 700;
}

.close-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

.close-btn:active {
    background: var(--background);
}

/* Form */
.login-form {
    padding: 20px;
}

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

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 16px;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.submit-btn:active {
    background: var(--primary-dark);
}

.modal-footer {
    padding: 16px 20px;
    background: var(--background);
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
}

/* Toast notifications */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--glass-bg);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    color: var(--text-primary);
    padding: 16px 24px;
    border-radius: var(--radius-lg);
    font-size: 15px;
    font-weight: 600;
    z-index: 2000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-xl);
    max-width: calc(100vw - 40px);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.toast::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    animation: toastProgress 3s linear;
}

@keyframes toastProgress {
    0% { width: 100%; }
    100% { width: 0%; }
}

.toast:not(.hidden) {
    transform: translateX(-50%) translateY(0);
    animation: toastSlide 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes toastSlide {
    0% { 
        transform: translateX(-50%) translateY(100px);
        opacity: 0;
        scale: 0.9;
    }
    100% { 
        transform: translateX(-50%) translateY(0);
        opacity: 1;
        scale: 1;
    }
}

.toast.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(100px);
}

.toast.success {
    background: linear-gradient(135deg, var(--success-color)20, var(--success-color)40);
    color: white;
    border-color: var(--success-color);
}

.toast.success::before {
    background: var(--gradient-secondary);
}

.toast.error {
    background: linear-gradient(135deg, var(--error-color)20, var(--error-color)40);
    color: white;
    border-color: var(--error-color);
}

.toast.error::before {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
}

.toast.info::before {
    background: var(--gradient-primary);
}

/* Policy Modal */
.policy-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 4000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.policy-content {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
}

.policy-header {
    padding: 24px;
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.policy-header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

.policy-logo {
    width: 80px;
    height: 80px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    border-radius: 12px;
    object-fit: cover;
}

.policy-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.policy-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
}

.policy-section {
    margin-bottom: 24px;
}

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

.policy-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.policy-section p {
    margin-bottom: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.policy-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.policy-section li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.policy-section li:before {
    content: "•";
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.policy-actions {
    padding: 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn {
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-accept {
    background: var(--gradient-secondary);
    color: white;
    border: 1px solid var(--success-color);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.btn-accept::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-accept:hover::before {
    left: 100%;
}

.btn-accept:active {
    background: var(--success-color);
    transform: translateY(1px);
    box-shadow: var(--shadow-sm);
}

.btn-decline {
    background: var(--glass-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.btn-decline:active {
    background: var(--error-color);
    color: white;
    transform: translateY(1px);
}

/* Micro-interactions and feedback */
@keyframes gentle-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(2.4);
        opacity: 0;
    }
}

.upload-btn:active::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: pulse-ring 0.6s ease-out;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus styles for accessibility */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.upload-btn:focus,
.gallery-item:focus,
.btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 4px;
}

/* Loading states */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(2px);
    border-radius: inherit;
    animation: loadingShimmer 1.5s ease-in-out infinite;
}

@keyframes loadingShimmer {
    0% { opacity: 0.5; }
    50% { opacity: 0.8; }
    100% { opacity: 0.5; }
}

/* Enhanced selections and interactions */
::selection {
    background: var(--primary-color);
    color: white;
}

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

.no-scroll {
    overflow: hidden;
}

}

/* Responsive adjustments for larger phones */
@media (min-width: 375px) {
    .preview-grid,
    .gallery-grid {
        gap: 8px;
    }
}

@media (min-width: 414px) {
    .upload-card {
        padding: 32px 24px;
    }
}

/* Photo viewer fullscreen */
.photo-viewer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 3000;
    display: flex;
    flex-direction: column;
}

.viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent);
}

.viewer-close {
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.viewer-counter {
    color: white;
    font-size: 14px;
    font-weight: 500;
}

.viewer-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 60px 0;
}

.viewer-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    user-select: none;
}

.viewer-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.viewer-nav:active {
    background: rgba(255, 255, 255, 0.2);
}

.viewer-prev {
    left: 16px;
}

.viewer-next {
    right: 16px;
}

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

/* Policy modal mobile responsive */
@media (max-width: 768px) {
    .policy-modal {
        padding: 16px;
    }
    
    .policy-content {
        max-height: 95vh;
    }
    
    .policy-header {
        padding: 20px 16px;
    }
    
    .policy-header h2 {
        font-size: 20px;
    }
    
    .policy-body {
        padding: 20px 16px;
        max-height: 50vh;
    }
    
    .policy-section h3 {
        font-size: 16px;
    }
    
    .policy-actions {
        padding: 20px 16px;
    }
}

/* Tablet and desktop */
@media (min-width: 768px) {
    .main-content {
        max-width: 720px;
        margin: 0 auto;
    }
    
    .preview-grid,
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .policy-actions {
        flex-direction: row;
    }
}