/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
    --bg: #0a0a0a;
    --bg-alt: #111;
    --bg-card: #1a1a1a;
    --bg-hover: #222;
    --text: #e8e8e8;
    --text-secondary: #999;
    --text-muted: #666;
    --border: #2a2a2a;
    --primary: #8b5cf6;
    --primary-hover: #7c3aed;
    --primary-glow: rgba(139, 92, 246, 0.3);
    --success: #10b981;
    --danger: #ef4444;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 4px 20px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.4);
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans SC', sans-serif;
}
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
svg { flex-shrink: 0; }

/* ─── Container ─── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* ─── Navbar ─── */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(10,10,10,0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}
.navbar-inner {
    display: flex; align-items: center; height: 64px; gap: 24px;
}
.navbar-brand {
    display: flex; align-items: center; gap: 8px;
    font-size: 1.25rem; font-weight: 700;
    color: var(--text); flex-shrink: 0;
}
.logo-icon { color: var(--primary); }
.brand-text { background: linear-gradient(135deg, var(--primary), #c084fc); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.navbar-menu { display: flex; align-items: center; gap: 4px; flex: 1; }
.nav-link {
    padding: 8px 16px; border-radius: var(--radius-sm);
    font-size: 0.9rem; color: var(--text-secondary);
    transition: var(--transition); cursor: pointer;
}
.nav-link:hover { color: var(--text); background: var(--bg-hover); }
.navbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-shrink: 0; }
.nav-avatar-btn { padding: 2px; }
.nav-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; display: block; }
.nav-icon-btn {
    width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; border: none; background: transparent; color: var(--text-secondary);
    cursor: pointer; transition: var(--transition);
}
.nav-icon-btn:hover { background: var(--bg-hover); color: var(--text); }
.mobile-menu-btn { display: none; }
.nav-dropdown { position: relative; }
.dropdown-trigger { display: flex; align-items: center; gap: 4px; }
.dropdown-menu {
    position: absolute; top: 100%; left: 0; margin-top: 8px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 4px; min-width: 160px;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: var(--transition); z-index: 50;
}
.dropdown-menu-right { left: auto; right: 0; }
.nav-dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-item {
    display: block; padding: 10px 16px; border-radius: var(--radius-sm);
    font-size: 0.9rem; color: var(--text-secondary); transition: var(--transition);
}
.dropdown-item:hover { background: var(--bg-hover); color: var(--text); }
.dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }

/* ─── Hero ─── */
.hero {
    position: relative; min-height: 80vh;
    display: flex; align-items: center; overflow: hidden;
    padding-top: 64px;
}
.hero-bg {
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 30% 50%, var(--primary-glow), transparent 60%),
                radial-gradient(ellipse at 70% 50%, rgba(192,132,252,0.1), transparent 40%);
    z-index: 0;
}
.hero-content { position: relative; z-index: 1; padding: 80px 0; }
.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 800;
    line-height: 1.1; margin-bottom: 20px;
    background: linear-gradient(135deg, var(--text) 0%, var(--primary) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-desc {
    font-size: 1.125rem; color: var(--text-secondary);
    max-width: 480px; margin-bottom: 40px; line-height: 1.8;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-scroll {
    position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
    color: var(--text-muted); animation: bounce 2s infinite;
}
@keyframes bounce { 0%,100%{transform:translateX(-50%) translateY(0)} 50%{transform:translateX(-50%) translateY(8px)} }

/* ─── Buttons ─── */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 24px; border-radius: var(--radius-sm);
    font-size: 0.9rem; font-weight: 500; border: 1px solid transparent;
    cursor: pointer; transition: var(--transition); white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); box-shadow: 0 0 30px var(--primary-glow); }
.btn-outline { border-color: var(--border); color: var(--text); background: transparent; }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--bg-hover); color: var(--text); }
.btn-danger-ghost { background: transparent; color: var(--danger); }
.btn-danger-ghost:hover { background: rgba(239,68,68,0.1); }
.btn-sm { padding: 6px 14px; font-size: 0.85rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; }

/* ─── Sections ─── */
.section { padding: 80px 0; }
.section-alt { background: var(--bg-alt); }
.section-sm { padding: 24px 0; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; }
.section-title { font-size: 1.75rem; font-weight: 700; }
.section-more { color: var(--primary); font-size: 0.9rem; transition: var(--transition); }
.section-more:hover { color: var(--primary-hover); }

/* ─── Page Header ─── */
.page-header { padding: 120px 0 40px; text-align: center; }
.page-title { font-size: 2rem; font-weight: 700; }
.page-desc { color: var(--text-secondary); margin-top: 8px; }

/* ─── Category Grid ─── */
.category-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px;
}
.category-card {
    padding: 32px 20px; border-radius: var(--radius);
    background: var(--bg-card); border: 1px solid var(--border);
    text-align: center; transition: var(--transition);
}
.category-card:hover { border-color: var(--primary); transform: translateY(-4px); box-shadow: var(--shadow); }
.category-name { display: block; font-size: 1.1rem; font-weight: 600; margin-bottom: 8px; }
.category-count { font-size: 0.85rem; color: var(--text-muted); }

/* ─── 3D Card Effect ─── */
.card-3d {
    perspective: 800px;
}
.card-3d:hover .album-cover,
.card-3d:hover .category-card-inner {
    transform: rotateY(3deg) rotateX(-3deg);
    transition: 0.15s ease;
}

/* ─── Album Grid ─── */
.album-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px;
}
.album-grid-lg { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.album-card { display: block; border-radius: var(--radius); overflow: hidden; background: var(--bg-card); border: 1px solid var(--border); transition: var(--transition); }
.album-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--primary); }
.album-cover { position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--bg-alt); }
.album-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.album-card:hover .album-cover img { transform: scale(1.05); }
.scroll-wrap { overflow: hidden; margin: 0 -24px; padding: 0 24px; }
.scroll-track { display: flex; gap: 20px; overflow-x: auto; scroll-behavior: smooth; cursor: grab; padding: 8px 0 16px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.scroll-track::-webkit-scrollbar { display: none; }
.scroll-item { flex: 0 0 320px; min-width: 0; }
.album-cover-placeholder { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--text-muted); }
.album-count {
    position: absolute; bottom: 12px; right: 12px;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(8px);
    padding: 4px 12px; border-radius: 20px; font-size: 0.8rem; color: #fff;
}
.album-info { padding: 16px; }
.album-title { font-size: 1rem; font-weight: 600; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.album-author { font-size: 0.85rem; color: var(--text-muted); }
.album-desc { font-size: 0.82rem; color: var(--text-secondary); margin-top: 6px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ─── Masonry Grid ─── */
.masonry-grid {
    columns: 4; column-gap: 16px;
}
.masonry-item {
    break-inside: avoid; margin-bottom: 16px;
}
@media (max-width: 1200px) { .masonry-grid { columns: 3; } }
@media (max-width: 900px) { .masonry-grid { columns: 2; } }
@media (max-width: 600px) { .masonry-grid { columns: 1; } }

.photo-card {
    display: block; border-radius: var(--radius); overflow: hidden;
    background: var(--bg-card); border: 1px solid var(--border);
    transition: var(--transition); position: relative;
}
.photo-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--primary); }
.photo-thumb { position: relative; overflow: hidden; }
.photo-thumb img { width: 100%; display: block; }
.photo-overlay {
    position: absolute; inset: 0; background: rgba(0,0,0,0.5);
    display: flex; align-items: flex-end; padding: 16px; gap: 16px;
    opacity: 0; transition: var(--transition);
}
.photo-card:hover .photo-overlay { opacity: 1; }
.photo-stats { display: flex; gap: 16px; color: #fff; font-size: 0.85rem; }
.photo-stats span { display: flex; align-items: center; gap: 4px; }
.photo-info { padding: 10px 14px; }
.photo-author { font-size: 0.85rem; color: var(--text-muted); }

/* ─── Filter Tabs ─── */
.filter-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-tab {
    padding: 8px 20px; border-radius: 20px; font-size: 0.9rem;
    border: 1px solid var(--border); color: var(--text-secondary);
    transition: var(--transition);
}
.filter-tab:hover, .filter-tab.active { border-color: var(--primary); color: var(--primary); background: rgba(139,92,246,0.1); }

/* ─── Album Hero ─── */
.album-hero {
    padding: 120px 0 40px; text-align: center;
    background: linear-gradient(to bottom, var(--bg-alt), var(--bg));
}
.album-hero-content { max-width: 700px; margin: 0 auto; }
.album-meta { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 16px; }
.album-user { display: flex; align-items: center; gap: 8px; color: var(--text-secondary); font-size: 0.9rem; }
.album-category { padding: 4px 14px; border-radius: 20px; background: rgba(139,92,246,0.1); color: var(--primary); font-size: 0.85rem; }
.album-hero-title { font-size: 2.5rem; font-weight: 800; margin-bottom: 12px; }
.album-hero-desc { color: var(--text-secondary); font-size: 1.05rem; line-height: 1.8; margin-bottom: 20px; }
.album-stats { display: flex; align-items: center; justify-content: center; gap: 24px; color: var(--text-muted); font-size: 0.9rem; }
.album-stats span { display: flex; align-items: center; gap: 6px; }

/* ─── Carousel ─── */
.carousel-section { padding: 0; }
.carousel-container {
    position: relative; width: 100%; overflow: hidden;
}
.carousel-track {
    display: flex; gap: 16px; padding: 40px 80px;
    overflow-x: auto; scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch; cursor: grab; user-select: none;
    scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-slide {
    flex: 0 0 70%; scroll-snap-align: center;
    border-radius: var(--radius-lg); overflow: hidden;
    position: relative; background: var(--bg-card);
    transition: var(--transition);
}
.carousel-slide:hover { transform: scale(1.02); }
.carousel-image-wrap { display: block; }
.carousel-image-wrap img { width: 100%; height: 60vh; object-fit: contain; background: #000; }
.carousel-slide-info {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 16px 24px; background: linear-gradient(transparent, rgba(0,0,0,0.7));
    display: flex; align-items: center; gap: 16px;
}
.carousel-counter { font-size: 0.85rem; color: var(--text-muted); }
.carousel-title { font-size: 0.9rem; }
.carousel-controls {
    position: absolute; top: 50%; left: 0; right: 0;
    transform: translateY(-50%); pointer-events: none;
    display: flex; justify-content: space-between; padding: 0 24px;
}
.carousel-btn {
    pointer-events: auto; width: 48px; height: 48px; border-radius: 50%;
    background: rgba(0,0,0,0.6); border: 1px solid var(--border);
    color: #fff; display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: var(--transition); backdrop-filter: blur(8px);
}
.carousel-btn:hover { background: var(--primary); border-color: var(--primary); }

/* ─── Photo Detail ─── */
.photo-detail { padding-top: 80px; }
.photo-detail-nav {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 24px; border-bottom: 1px solid var(--border);
}
.photo-detail-nav-right { display: flex; gap: 8px; }
.photo-detail-main {
    display: grid; grid-template-columns: 1fr 380px; min-height: calc(100vh - 200px);
}
.photo-detail-image {
    display: flex; align-items: center; justify-content: center;
    background: #000; padding: 40px; position: relative;
}
.photo-full { max-height: 85vh; max-width: 100%; object-fit: contain; }
.photo-detail-caption {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 32px; background: linear-gradient(transparent, rgba(0,0,0,0.7));
}
.photo-detail-caption h2 { font-size: 1.5rem; margin-bottom: 8px; }
.photo-detail-caption p { color: var(--text-secondary); font-size: 0.95rem; }
.photo-detail-side { padding: 24px; overflow-y: auto; border-left: 1px solid var(--border); }
.photo-side-card { background: var(--bg-card); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; border: 1px solid var(--border); }
.photo-user-info { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.photo-username { font-weight: 600; display: block; }
.photo-date { font-size: 0.85rem; color: var(--text-muted); }
.photo-side-actions { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: nowrap; }
.btn-action {
    display: flex; align-items: center; gap: 6px; padding: 10px 14px; white-space: nowrap;
    border-radius: var(--radius-sm); border: 1px solid var(--border);
    background: transparent; color: var(--text); cursor: pointer;
    transition: var(--transition); font-size: 0.9rem;
}
.btn-action:hover { border-color: var(--primary); }
.btn-action.liked { color: var(--danger); border-color: var(--danger); }
.btn-action.favorited { color: var(--primary); border-color: var(--primary); }
.photo-stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat-item { text-align: center; padding: 12px; background: var(--bg-alt); border-radius: var(--radius-sm); }
.stat-label { display: block; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 4px; }
.stat-value { font-size: 1.1rem; font-weight: 600; }

/* ─── Comments ─── */
.comments-title { font-size: 1rem; font-weight: 600; margin-bottom: 16px; }
.comment-form { margin-bottom: 20px; }
.comment-input { margin-bottom: 8px; }
.comment-list { max-height: 400px; overflow-y: auto; }
.comment-item { padding: 12px 0; border-bottom: 1px solid var(--border); }
.comment-item:last-child { border-bottom: none; }
.comment-header { display: flex; justify-content: space-between; margin-bottom: 4px; }
.comment-time { font-size: 0.8rem; color: var(--text-muted); }
.comment-body { font-size: 0.9rem; color: var(--text-secondary); }
.comment-empty, .comment-login-hint { color: var(--text-muted); text-align: center; padding: 20px; font-size: 0.9rem; }
.comment-login-hint a { color: var(--primary); }

/* ─── Auth ─── */
.auth-section { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding-top: 64px; }
.auth-section .container { width: 100%; }
.auth-card { max-width: 500px; width: 100%; margin: 0 auto; padding: 40px; background: var(--bg-card); border-radius: var(--radius-lg); border: 1px solid var(--border); }
.auth-header { text-align: center; margin-bottom: 32px; }
.auth-title { font-size: 1.75rem; font-weight: 700; margin-bottom: 8px; }
.auth-desc { color: var(--text-secondary); font-size: 0.9rem; }
.auth-form .form-group { margin-bottom: 20px; }
.auth-footer { text-align: center; margin-top: 24px; font-size: 0.9rem; color: var(--text-muted); }
.auth-footer a { color: var(--primary); }

/* ─── Forms ─── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 0.9rem; font-weight: 500; margin-bottom: 6px; }
.form-input {
    width: 100%; padding: 10px 16px; border-radius: var(--radius-sm);
    background: var(--bg-alt); border: 1px solid var(--border);
    color: var(--text); font-size: 0.9rem; transition: var(--transition);
    font-family: inherit;
}
.form-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }
textarea.form-input { resize: vertical; min-height: 80px; }
select.form-input { cursor: pointer; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-actions { display: flex; gap: 12px; margin-top: 24px; justify-content: flex-end; }

/* ─── Dashboard ─── */
.dashboard-section { padding-top: 80px; }
.dashboard-grid { display: grid; grid-template-columns: 280px 1fr; gap: 24px; align-items: start; }
.dashboard-side { position: sticky; top: 88px; }
.dash-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.dash-card { background: var(--bg-card); border-radius: var(--radius); padding: 24px; margin-bottom: 16px; border: 1px solid var(--border); }
.dash-card-title { font-size: 1rem; font-weight: 600; margin-bottom: 16px; }
.dash-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.dash-user { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.dash-user .profile-avatar { width: 56px; height: 56px; }
.dash-user .profile-avatar-placeholder { width: 56px; height: 56px; font-size: 1.5rem; line-height: 56px; text-align: center; border-radius: 50%; background: var(--bg-alt); color: var(--text-muted); flex-shrink: 0; }
.dash-role { font-size: 0.85rem; color: var(--text-muted); }
.dash-avatar-form { margin-bottom: 16px; }
.dash-avatar-btn { cursor: pointer; font-size: 0.8rem; }
.dash-stats-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dash-stat { text-align: center; padding: 16px; background: var(--bg-alt); border-radius: var(--radius-sm); }
.dash-stat-value { font-size: 1.5rem; font-weight: 700; display: block; }
.dash-stat-label { font-size: 0.8rem; color: var(--text-muted); }
.dash-nav { display: flex; flex-direction: column; gap: 4px; }
.dash-nav-link { padding: 10px 16px; border-radius: var(--radius-sm); color: var(--text-secondary); transition: var(--transition); }
.dash-nav-link:hover, .dash-nav-link.active { background: var(--bg-hover); color: var(--text); }
.btn.loading { opacity: .7; cursor: not-allowed; position: relative; }
.btn.loading::after { content: ''; width: 16px; height: 16px; border: 2px solid transparent; border-top-color: currentColor; border-radius: 50%; animation: spin .6s linear infinite; display: inline-block; margin-left: 8px; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.dash-quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quick-action { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px; border-radius: var(--radius); background: var(--bg-alt); transition: var(--transition); color: var(--text-secondary); font-size: 0.9rem; }
.quick-action:hover { background: var(--bg-hover); color: var(--text); }
.dash-album-item { display: flex; align-items: center; justify-content: space-between; padding: 12px; border-radius: var(--radius-sm); transition: var(--transition); }
.dash-album-item:hover { background: var(--bg-hover); }
.dash-album-status { font-size: 0.8rem; padding: 2px 10px; border-radius: 10px; }
.dash-empty { color: var(--text-muted); padding: 20px; text-align: center; }
.dash-empty a { color: var(--primary); }

/* ─── Upload ─── */
.upload-dropzone {
    border: 2px dashed var(--border); border-radius: var(--radius-lg);
    padding: 60px 40px; text-align: center; cursor: pointer;
    transition: var(--transition); color: var(--text-muted);
}
.upload-dropzone:hover, .upload-dropzone.dragover { border-color: var(--primary); background: rgba(139,92,246,0.05); }
.upload-dropzone strong { color: var(--primary); }
.upload-hint { font-size: 0.85rem; margin-top: 8px; }
.upload-preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px,1fr)); gap: 12px; margin-top: 16px; }
.upload-preview-item { position: relative; border-radius: var(--radius-sm); overflow: hidden; }
.upload-preview-item img { width: 100%; height: 100px; object-fit: cover; }
.upload-preview-item span { display: block; font-size: 0.8rem; padding: 4px; color: var(--text-muted); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap: 12px; }
.photo-grid-item { position: relative; border-radius: var(--radius-sm); overflow: hidden; }
.photo-grid-item img { width: 100%; height: 120px; object-fit: cover; }
.photo-grid-item.is-cover { outline: 2px solid var(--primary); outline-offset: -2px; }
.photo-grid-badge { position: absolute; top: 8px; left: 8px; background: var(--primary); color: #fff; font-size: 0.75rem; padding: 2px 8px; border-radius: var(--radius-sm); z-index: 1; }
.photo-grid-overlay { position: absolute; bottom: 0; left: 0; right: 0; padding: 8px; background: linear-gradient(transparent, rgba(0,0,0,0.7)); display: flex; gap: 4px; justify-content: center; }

/* ─── Search ─── */
.modal-overlay { display: flex; align-items: center; justify-content: center; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1000; }
.modal-content { background: var(--bg-card); border-radius: var(--radius-lg); padding: 24px; width: 90%; }
.modal-header h3 { margin: 0; font-size: 1.1rem; }
.lightbox { display: none; align-items: center; justify-content: center; position: fixed; inset: 0; background: rgba(0,0,0,.8); z-index: 2000; cursor: zoom-out; }
.lightbox-img { max-width: 90vw; max-height: 90vh; border-radius: var(--radius); object-fit: contain; }
.avatar-zoomable { cursor: zoom-in; }
.search-form { max-width: 600px; margin: 24px auto 0; }
.search-form-inner { display: flex; align-items: center; gap: 12px; }
.search-icon { flex-shrink: 0; color: var(--text-muted); }
.search-input { flex: 1; }
.search-tabs { display: flex; gap: 16px; margin-top: 16px; justify-content: center; }
.search-tab { cursor: pointer; padding: 8px 20px; border-radius: 20px; border: 1px solid var(--border); }
.search-tab input { display: none; }
.search-tab:has(input:checked) { border-color: var(--primary); color: var(--primary); background: rgba(139,92,246,0.1); }
.search-result-info { color: var(--text-muted); margin-bottom: 24px; }

/* ─── Profile ─── */
.profile-header { padding: 120px 0 40px; text-align: center; background: var(--bg-alt); }
.profile-info { max-width: 500px; margin: 0 auto; }
.profile-avatar-wrap { margin-bottom: 16px; }
.profile-avatar { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; margin: 0 auto; border: 3px solid var(--primary); }
.profile-avatar-placeholder {
    width: 100px; height: 100px; border-radius: 50%; margin: 0 auto;
    background: var(--primary); display: flex; align-items: center; justify-content: center;
    font-size: 2.5rem; font-weight: 700; color: #fff;
}
.profile-name { font-size: 1.75rem; font-weight: 700; }
.profile-bio { color: var(--text-secondary); margin-top: 8px; }
.profile-website { color: var(--primary); display: inline-block; margin-top: 8px; }

/* ─── Status ─── */
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.status-dot.active { background: var(--success); }
.status-dot.inactive { background: var(--text-muted); }
.status-badge { padding: 2px 10px; border-radius: 10px; font-size: 0.8rem; background: var(--bg-hover); }
.status-public { background: rgba(16,185,129,0.15); color: var(--success); }
.status-draft { background: rgba(251,191,36,0.15); color: #fbbf24; }
.status-private { background: rgba(239,68,68,0.15); color: var(--danger); }

/* ─── Flash ─── */
.flash-container {
    position: fixed; top: 80px; left: 50%; transform: translateX(-50%);
    z-index: 200; max-width: 480px; width: 90%;
}
.flash {
    padding: 14px 20px; border-radius: var(--radius-sm);
    font-size: 0.9rem; margin-bottom: 8px;
    transition: all 0.5s ease;
}
.flash-success { background: rgba(16,185,129,0.15); border: 1px solid var(--success); color: var(--success); }
.flash-error { background: rgba(239,68,68,0.15); border: 1px solid var(--danger); color: var(--danger); }

/* ─── Pagination ─── */
.pagination-wrap { display: flex; justify-content: center; margin-top: 40px; }
.pagination { display: flex; gap: 8px; align-items: center; }
.page-link { padding: 8px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border); color: var(--text-secondary); font-size: 0.9rem; transition: var(--transition); }
.page-link:hover { border-color: var(--primary); color: var(--primary); }
.page-link.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ─── Avatar ─── */
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.avatar-sm { width: 28px; height: 28px; }

/* ─── Empty State ─── */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state p { margin-bottom: 16px; }

/* ─── Form Card ─── */
.form-card { max-width: 600px; margin: 0 auto; padding: 40px; background: var(--bg-card); border-radius: var(--radius-lg); border: 1px solid var(--border); }
.form-card .page-title { margin-bottom: 32px; }

/* ─── Footer ─── */
.footer { border-top: 1px solid var(--border); padding: 40px 0; margin-top: 40px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.footer a { color: var(--text-muted); font-size: 0.9rem; transition: var(--transition); }
.footer a:hover { color: var(--primary); }
.footer-links { display: flex; gap: 24px; }
.footer-copy { font-size: 0.85rem; color: var(--text-muted); }

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .navbar-menu {
        position: fixed; top: 64px; left: 0; right: 0; bottom: 0;
        background: rgba(10,10,10,0.98); flex-direction: column;
        padding: 24px; display: none; overflow-y: auto;
    }
    .navbar-menu.open { display: flex; }
    .mobile-menu-btn { display: flex; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .dashboard-side { position: static; }
    .photo-detail-main { grid-template-columns: 1fr; }
    .photo-detail-side { border-left: none; border-top: 1px solid var(--border); }
    .carousel-slide { flex: 0 0 90%; }
    .carousel-track { padding: 20px 16px; }
    .hero { min-height: 60vh; }
    .footer-inner { flex-direction: column; text-align: center; }
    .form-row { grid-template-columns: 1fr; }
}
