/* ============================================================
   Largephotos theme — global design system
   Light + real dark theme (data-theme="dark" on <html>).
   ============================================================ */

:root {
	--lp-bg: #fcfcfa;
	--lp-surface: #ffffff;
	--lp-ink: #101012;
	--lp-sec: #71716b;
	--lp-muted: #a0a09a;
	--lp-line: rgba(16,16,18,0.07);
	--lp-line-2: rgba(16,16,18,0.12);
	--lp-panel: #f4f4f1;
	--lp-chip: #f0f0ec;
	--lp-accent: #0047ff;
	--lp-accent-2: #0047e0;
	--lp-accent-tint: rgba(0,71,224,0.06);
	--lp-green: #0a8a4a;
	--lp-warn: #c2410c;
	--lp-danger: #b91c1c;
	--lp-nav-bg: rgba(255,255,255,0.75);
	--lp-shadow-nav: 0 8px 32px rgba(16,16,18,0.06);
	--lp-shadow-card: 0 16px 40px rgba(16,16,18,0.10);
	--lp-r-pill: 999px;
	--lp-r-card: 20px;
	--lp-r-input: 13px;
	--lp-font: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	--lp-mono: 'JetBrains Mono', ui-monospace, monospace;
	--lp-hero-glow: radial-gradient(1100px 420px at 50% -80px, #eef2f9, #fcfcfa 70%);
}

:root[data-theme="dark"] {
	--lp-bg: #0c0c0e;
	--lp-surface: #17171a;
	--lp-ink: #f3f3f0;
	--lp-sec: #a7a7a1;
	--lp-muted: #6f6f69;
	--lp-line: rgba(255,255,255,0.08);
	--lp-line-2: rgba(255,255,255,0.14);
	--lp-panel: #17171a;
	--lp-chip: #202024;
	--lp-accent: #5ca4ff;
	--lp-accent-2: #86bcff;
	--lp-accent-tint: rgba(92,164,255,0.10);
	--lp-nav-bg: rgba(20,20,23,0.72);
	--lp-shadow-nav: 0 8px 32px rgba(0,0,0,0.5);
	--lp-shadow-card: 0 16px 40px rgba(0,0,0,0.55);
	--lp-hero-glow: radial-gradient(1100px 420px at 50% -80px, #14161c, #0c0c0e 70%);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.lp-body {
	background: var(--lp-bg);
	color: var(--lp-ink);
	font-family: var(--lp-font);
	-webkit-font-smoothing: antialiased;
	transition: background .25s, color .25s;
}
a { color: var(--lp-ink); text-decoration: none; }
a:hover { color: var(--lp-accent-2); }
img { max-width: 100%; }
h1, h2, h3 { letter-spacing: -0.5px; }

.lp-page { min-height: 100vh; display: flex; flex-direction: column; background: var(--lp-hero-glow); }
.lp-main { flex: 1; }
.lp-eyebrow { font-family: var(--lp-mono); text-transform: uppercase; letter-spacing: 2px; font-size: 11px; color: var(--lp-accent-2); font-weight: 500; }

/* ---- Buttons (shared with plugin) ---- */
.lp-btn { font-family: var(--lp-font); font-weight: 700; font-size: 14px; border-radius: var(--lp-r-pill); padding: 10px 20px; border: 1px solid transparent; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: background .15s, color .15s, transform .1s; }
.lp-btn:active { transform: translateY(1px); }
.lp-btn-dark { background: var(--lp-ink); color: var(--lp-bg); }
.lp-btn-dark:hover { background: var(--lp-accent); color: #fff; }
.lp-btn-accent { background: var(--lp-accent); color: #fff; }
.lp-btn-accent:hover { background: var(--lp-accent-2); }
.lp-btn-ghost { background: transparent; color: var(--lp-ink); border-color: var(--lp-line-2); }
.lp-btn-ghost:hover { background: var(--lp-panel); }
.lp-block { width: 100%; justify-content: center; }

/* ---- Floating nav ---- */
.lp-topnav { position: sticky; top: 14px; z-index: 60; max-width: 1240px; margin: 14px auto 0; padding: 0 20px; }
.lp-nav-pill { display: flex; align-items: center; gap: 18px; background: var(--lp-nav-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid var(--lp-line); border-radius: var(--lp-r-pill); padding: 9px 10px 9px 20px; box-shadow: var(--lp-shadow-nav); transition: padding .2s; }
.lp-topnav.is-scrolled .lp-nav-pill { padding-top: 7px; padding-bottom: 7px; }
.lp-logo { display: flex; align-items: center; }
.lp-logo img { height: 22px; width: auto; }
.lp-logo-light { display: none; }
:root[data-theme="dark"] .lp-logo-dark, :root[data-theme="dark"] .lp-footer-brand .lp-logo-dark { display: none; }
:root[data-theme="dark"] .lp-logo-light, :root[data-theme="dark"] .lp-footer-brand .lp-logo-light { display: inline; }
.lp-nav-links { display: flex; gap: 2px; font-size: 14px; font-weight: 600; }
.lp-nav-links a { color: var(--lp-sec); padding: 7px 15px; border-radius: var(--lp-r-pill); }
.lp-nav-links a:hover, .lp-nav-links .current-menu-item a { color: var(--lp-ink); background: var(--lp-chip); }
.lp-nav-spacer { flex: 1; }
.lp-nav-login { font-size: 14px; font-weight: 600; color: var(--lp-sec); padding: 7px 10px; }
.lp-nav-login:hover { color: var(--lp-ink); }
.lp-nav-upload { padding: 10px 22px; }
.lp-nav-bell { position: relative; font-size: 17px; padding: 4px 8px; }
.lp-bell-dot { position: absolute; top: 2px; right: 4px; width: 8px; height: 8px; background: var(--lp-accent); border-radius: 50%; border: 2px solid var(--lp-surface); }
.lp-nav-avatar img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; display: block; }
.lp-nav-burger { display: none; background: none; border: none; font-size: 20px; cursor: pointer; color: var(--lp-ink); }

@media (max-width: 900px) {
	.lp-nav-links { display: none; position: absolute; top: 64px; left: 20px; right: 20px; flex-direction: column; background: var(--lp-surface); border: 1px solid var(--lp-line); border-radius: 18px; padding: 10px; box-shadow: var(--lp-shadow-card); }
	.lp-nav-pill.is-open .lp-nav-links { display: flex; }
	.lp-nav-burger { display: block; }
}
@media (max-width: 560px) { .lp-nav-login { display: none; } }

/* ---- Hero ---- */
.lp-hero { max-width: 1240px; margin: 0 auto; padding: 64px 20px 30px; text-align: center; animation: lp-rise .7s cubic-bezier(.2,.8,.2,1) both; }
@keyframes lp-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.lp-hero-badge { display: inline-flex; align-items: center; gap: 8px; background: var(--lp-accent-tint); border: 1px solid rgba(0,71,224,0.22); border-radius: var(--lp-r-pill); padding: 6px 16px; font-size: 12.5px; font-weight: 700; color: var(--lp-accent-2); margin-bottom: 22px; }
.lp-hero-badge .lp-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--lp-accent-2); }
.lp-hero-title { font-size: clamp(44px, 6vw, 74px); font-weight: 800; letter-spacing: -3px; line-height: 0.98; margin: 0 0 16px; }
.lp-hero-title span { color: var(--lp-accent-2); }
.lp-hero-sub { font-size: 17px; color: var(--lp-sec); margin: 0 auto 26px; max-width: 520px; line-height: 1.55; }
.lp-hero-stats { display: flex; gap: 22px; justify-content: center; font-size: 13px; color: var(--lp-muted); font-weight: 500; flex-wrap: wrap; }
.lp-hero-stats strong { color: var(--lp-ink); }

/* ---- "Why" band ---- */
.lp-why { max-width: 1240px; margin: 40px auto; padding: 0 20px; }
.lp-why-inner { background: var(--lp-panel); border-radius: 28px; padding: 44px; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.lp-why-inner h2 { font-size: 28px; font-weight: 800; letter-spacing: -1px; margin: 8px 0 12px; }
.lp-why-inner p { color: var(--lp-sec); line-height: 1.6; margin-bottom: 20px; }
.lp-why-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.lp-why-list li { display: flex; flex-direction: column; gap: 4px; }
.lp-why-list strong { font-size: 15px; }
.lp-why-list span { font-size: 13px; color: var(--lp-sec); }
@media (max-width: 780px) { .lp-why-inner { grid-template-columns: 1fr; padding: 30px; } }

/* ---- Masonry (shared card styles live in plugin css; ensure grid here too) ---- */
.lp-masonry { columns: 3; column-gap: 18px; max-width: 1240px; margin: 0 auto; padding: 0 20px; }
@media (max-width: 900px) { .lp-masonry { columns: 2; } }
@media (max-width: 560px) { .lp-masonry { columns: 1; } }
.lp-card { display: block; position: relative; break-inside: avoid; margin-bottom: 18px; border-radius: var(--lp-r-card); overflow: hidden; background: var(--lp-panel); transition: transform .18s, box-shadow .18s; }
.lp-card:hover { transform: translateY(-3px); box-shadow: var(--lp-shadow-card); }
.lp-card-img { width: 100%; display: block; }
.lp-card-play { position: absolute; top: 12px; right: 12px; z-index: 2; width: 34px; height: 34px; border-radius: 50%; background: rgba(16,16,18,0.6); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; }
.lp-card-foot { position: absolute; inset: auto 0 0 0; display: flex; align-items: center; gap: 8px; padding: 26px 14px 12px; color: #fff; background: linear-gradient(to top, rgba(0,0,0,.55), transparent); opacity: 0; transition: opacity .18s; }
.lp-card:hover .lp-card-foot { opacity: 1; }
.lp-card-av { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.lp-card-name { font-size: 13px; font-weight: 600; flex: 1; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.lp-card-dl { font-family: var(--lp-mono); font-size: 11.5px; }

/* ---- Detail page ---- */
.lp-detail { max-width: 1240px; margin: 24px auto; padding: 0 20px; display: grid; grid-template-columns: 1.6fr 1fr; gap: 34px; align-items: start; }
@media (max-width: 900px) { .lp-detail { grid-template-columns: 1fr; } }
.lp-detail-media { border-radius: var(--lp-r-card); overflow: hidden; background: var(--lp-panel); }
.lp-detail-img { width: 100%; display: block; }
.lp-detail-side { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 18px; }
.lp-detail-author { display: flex; align-items: center; gap: 12px; }
.lp-avatar-ring { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; padding: 2px; background: linear-gradient(135deg, var(--lp-accent), #5ca4ff); }
.lp-detail-name { font-weight: 700; font-size: 16px; display: block; }
.lp-detail-handle { color: var(--lp-muted); font-size: 13px; }
.lp-detail-author .lp-follow-btn { margin-left: auto; }
.lp-detail-title { font-size: 24px; font-weight: 800; letter-spacing: -1px; margin: 0; }
.lp-detail-actions { display: flex; gap: 10px; }
.lp-icon-btn { display: inline-flex; align-items: center; gap: 7px; background: var(--lp-surface); border: 1px solid var(--lp-line-2); border-radius: var(--lp-r-pill); padding: 9px 16px; font-family: var(--lp-font); font-weight: 600; font-size: 14px; color: var(--lp-ink); cursor: pointer; }
.lp-icon-btn.is-active { color: var(--lp-accent); border-color: var(--lp-accent); background: var(--lp-accent-tint); }
.lp-like-btn.is-active span:first-child { color: var(--lp-danger); }
.lp-download-block { background: var(--lp-panel); border-radius: var(--lp-r-card); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.lp-download-label { font-size: 12px; font-family: var(--lp-mono); text-transform: uppercase; letter-spacing: 1.5px; color: var(--lp-muted); }
.lp-size-picker { display: flex; gap: 6px; background: var(--lp-chip); border-radius: var(--lp-r-pill); padding: 4px; }
.lp-size-picker button { flex: 1; border: none; background: transparent; padding: 8px; border-radius: var(--lp-r-pill); font-family: var(--lp-font); font-weight: 600; font-size: 13px; color: var(--lp-sec); cursor: pointer; }
.lp-size-picker button.is-active { background: var(--lp-surface); color: var(--lp-ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.lp-tip-block { background: var(--lp-accent-tint); border: 1px solid rgba(0,71,224,.18); border-radius: var(--lp-r-card); padding: 16px; }
.lp-tip-label { display: block; font-size: 13px; color: var(--lp-sec); margin-bottom: 10px; }
.lp-tip-amounts { display: flex; gap: 8px; }
.lp-tip-amounts button { flex: 1; border: 1px solid var(--lp-line-2); background: var(--lp-surface); border-radius: var(--lp-r-input); padding: 10px; font-family: var(--lp-font); font-weight: 700; cursor: pointer; color: var(--lp-ink); }
.lp-tip-amounts button:hover { border-color: var(--lp-accent); color: var(--lp-accent); }
.lp-tip-inline { background: none; border: none; padding: 0; }
.lp-license-note { border: 1px solid var(--lp-line-2); border-radius: var(--lp-r-input); padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.lp-license-note strong { font-size: 14px; }
.lp-license-note span { font-size: 13px; color: var(--lp-sec); }
.lp-detail-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; }
.lp-detail-meta dt { font-size: 11px; font-family: var(--lp-mono); text-transform: uppercase; letter-spacing: 1px; color: var(--lp-muted); }
.lp-detail-meta dd { margin: 2px 0 0; font-weight: 600; font-size: 14px; }
.lp-detail-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.lp-tag { background: var(--lp-chip); color: var(--lp-sec); border-radius: var(--lp-r-pill); padding: 5px 12px; font-size: 12.5px; }
.lp-morelike { max-width: 1240px; margin: 30px auto; padding: 0 20px; }
.lp-morelike h2 { font-size: 20px; font-weight: 700; margin-bottom: 16px; }
.lp-morelike-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.lp-morelike-card { border-radius: 14px; overflow: hidden; aspect-ratio: 1; }
.lp-morelike-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.lp-morelike-card:hover img { transform: scale(1.05); }

/* ---- Profile ---- */
.lp-profile { max-width: 1100px; margin: 20px auto 0; padding: 0 20px; }
.lp-profile-cover { height: 200px; border-radius: var(--lp-r-card); background: linear-gradient(120deg, var(--lp-accent), #5ca4ff); }
.lp-profile-head { display: flex; align-items: flex-end; gap: 20px; margin: -50px 0 0; padding: 0 10px; position: relative; }
.lp-profile-avatar { width: 110px; height: 110px; border-radius: 50%; border: 4px solid var(--lp-bg); object-fit: cover; }
.lp-profile-id { flex: 1; padding-bottom: 6px; }
.lp-profile-id h1 { font-size: 26px; font-weight: 800; margin: 0; }
.lp-profile-handle { color: var(--lp-muted); font-size: 14px; }
.lp-profile-bio { color: var(--lp-sec); font-size: 14px; margin: 8px 0 0; max-width: 460px; }
.lp-profile-actions { display: flex; gap: 10px; padding-bottom: 10px; }
.lp-profile-stats { display: flex; gap: 26px; padding: 20px 10px; border-bottom: 1px solid var(--lp-line); margin-bottom: 22px; font-size: 14px; color: var(--lp-sec); flex-wrap: wrap; }
.lp-profile-stats strong { color: var(--lp-ink); }
.lp-profile-gear { margin-left: auto; font-family: var(--lp-mono); font-size: 12px; }
.lp-profile-grid { padding: 0; }

/* ---- Content pages (About/License/etc.) ---- */
.lp-page-wrap { max-width: 820px; margin: 0 auto; padding: 30px 20px 60px; }
.lp-app-page { max-width: 1240px; }
.lp-page-head h1 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; letter-spacing: -1.5px; margin: 10px 0 24px; }
.lp-entry { font-size: 16px; line-height: 1.7; color: var(--lp-ink); }
.lp-entry h2 { font-size: 24px; font-weight: 700; margin: 34px 0 12px; }
.lp-entry h3 { font-size: 19px; font-weight: 700; margin: 24px 0 8px; }
.lp-entry p { margin: 0 0 16px; color: var(--lp-sec); }
.lp-entry ul, .lp-entry ol { color: var(--lp-sec); line-height: 1.7; }
.lp-entry a { color: var(--lp-accent-2); text-decoration: underline; }
.lp-entry .lp-tldr { background: var(--lp-panel); border-radius: var(--lp-r-card); padding: 20px 24px; margin: 0 0 24px; }
.lp-entry .lp-faq { border-top: 1px solid var(--lp-line); padding: 16px 0; }
.lp-entry .lp-faq strong { display: block; margin-bottom: 6px; color: var(--lp-ink); }

/* ---- Blog ---- */
.lp-blog-list { display: flex; flex-direction: column; gap: 24px; }
.lp-blog-item { display: grid; grid-template-columns: 200px 1fr; gap: 20px; align-items: start; }
.lp-blog-thumb img { border-radius: 14px; width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.lp-blog-item h2 { font-size: 20px; margin: 0 0 8px; }
.lp-blog-excerpt { color: var(--lp-sec); font-size: 14.5px; }
.lp-read-more { color: var(--lp-accent-2); font-weight: 600; font-size: 14px; }
@media (max-width: 640px) { .lp-blog-item { grid-template-columns: 1fr; } }

/* ---- 404 ---- */
.lp-404 { max-width: 520px; margin: 60px auto; text-align: center; padding: 0 20px; }
.lp-404-frame { width: 120px; height: 90px; border: 3px solid var(--lp-line-2); border-radius: 12px; margin: 0 auto 24px; position: relative; }
.lp-404-frame::after { content: ""; position: absolute; inset: 16px; border: 2px dashed var(--lp-line-2); border-radius: 6px; }
.lp-404 h1 { font-size: 30px; font-weight: 800; }
.lp-404 p { color: var(--lp-sec); }
.lp-404-search { margin: 20px 0; }
.lp-404-search input { width: 100%; border: 1px solid var(--lp-line-2); border-radius: var(--lp-r-pill); padding: 12px 20px; font-family: var(--lp-font); font-size: 15px; background: var(--lp-surface); color: var(--lp-ink); }

/* ---- Footer ---- */
.lp-footer { border-top: 1px solid var(--lp-line); margin-top: 40px; background: var(--lp-bg); }
.lp-footer-inner { max-width: 1240px; margin: 0 auto; padding: 44px 20px; display: grid; grid-template-columns: 1.4fr 2fr; gap: 40px; }
.lp-footer-brand p { color: var(--lp-sec); font-size: 14px; margin: 12px 0 0; max-width: 260px; }
.lp-footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.lp-footer-cols h4 { font-size: 12px; font-family: var(--lp-mono); text-transform: uppercase; letter-spacing: 1.5px; color: var(--lp-muted); margin: 0 0 12px; }
.lp-footer-cols a { display: block; color: var(--lp-sec); font-size: 14px; padding: 5px 0; }
.lp-footer-cols a:hover { color: var(--lp-ink); }
.lp-footer-base { max-width: 1240px; margin: 0 auto; padding: 20px; border-top: 1px solid var(--lp-line); display: flex; justify-content: space-between; gap: 16px; font-size: 12.5px; color: var(--lp-muted); flex-wrap: wrap; }
@media (max-width: 780px) { .lp-footer-inner { grid-template-columns: 1fr; } }

/* ---- Theme toggle FAB ---- */
.lp-theme-toggle { position: fixed; bottom: 20px; right: 20px; z-index: 70; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--lp-line-2); background: var(--lp-surface); color: var(--lp-ink); font-size: 18px; cursor: pointer; box-shadow: var(--lp-shadow-nav); }

/* ---- Follow active ---- */
.lp-follow-btn.is-active { background: var(--lp-panel); color: var(--lp-sec); }

/* ---- Pagination ---- */
.lp-archive-nav, .pagination { max-width: 1240px; margin: 30px auto; padding: 0 20px; text-align: center; }
.lp-archive-nav .page-numbers, .pagination .page-numbers { display: inline-block; padding: 8px 14px; border-radius: var(--lp-r-pill); color: var(--lp-sec); font-weight: 600; }
.lp-archive-nav .page-numbers.current { background: var(--lp-ink); color: var(--lp-bg); }

.lp-empty { text-align: center; color: var(--lp-sec); padding: 40px 20px; }
