/* Zemew global styles */
:root {
  --bg: #0c0f14;
  --bg2: #121723;
  --text: #e7f2ef;
  --muted: #a3b3b0;
  --accent: #00c896;
  --accent-rgb: 0, 200, 150;
  --card: #161b26;
  --danger: #ff5a69;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
}
* { box-sizing: border-box }
html, body { height: 100% }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

.bg-gradient {
  position: fixed; inset: 0; z-index: -2;
  background: radial-gradient(1200px 600px at 20% 10%, rgba(var(--accent-rgb), .18), transparent),
              radial-gradient(900px 500px at 80% 20%, rgba(var(--accent-rgb), .12), transparent),
              linear-gradient(180deg, var(--bg), var(--bg2));
  filter: saturate(120%);
  background-size: 120% 120%, 110% 110%, 100% 100%;
  animation: gradientMove 40s ease-in-out infinite;
}
/* Background mode: Aurora (accent orbs with varied positions) */
body[data-bg="aurora"] .bg-gradient {
  background: radial-gradient(1100px 650px at 15% 15%, rgba(var(--accent-rgb), .22), transparent),
              radial-gradient(900px 600px at 85% 20%, rgba(var(--accent-rgb), .14), transparent),
              radial-gradient(800px 500px at 50% 100%, rgba(255,255,255,.05), transparent),
              linear-gradient(180deg, var(--bg), var(--bg2));
}
/* Background mode: Grid (subtle neon grid overlay) */
body[data-bg="grid"] .bg-gradient {
  background: radial-gradient(900px 500px at 20% 0%, rgba(var(--accent-rgb), .12), transparent),
              repeating-linear-gradient(0deg, rgba(var(--accent-rgb), .06), rgba(var(--accent-rgb), .06) 1px, transparent 1px, transparent 40px),
              repeating-linear-gradient(90deg, rgba(var(--accent-rgb), .06), rgba(var(--accent-rgb), .06) 1px, transparent 1px, transparent 40px),
              linear-gradient(180deg, var(--bg), var(--bg2));
  background-size: 120% 120%, 100% 100%, 100% 100%, 100% 100%;
}
/* Background mode: Mono dark (no accent overlays) */
body[data-bg="mono"] .bg-gradient {
  background: linear-gradient(180deg, var(--bg), var(--bg2));
}
/* Background mode: Sunset (warm dual orbs) */
body[data-bg="sunset"] .bg-gradient {
  background: radial-gradient(1100px 650px at 20% 15%, rgba(255,120,80,.18), transparent),
              radial-gradient(900px 550px at 80% 25%, rgba(255,80,160,.14), transparent),
              linear-gradient(180deg, var(--bg), var(--bg2));
}
/* Background mode: Dots uses canvas; keep subtle base gradient only */
body[data-bg="dots"] .bg-gradient { background: linear-gradient(180deg, var(--bg), var(--bg2)); }
@keyframes gradientMove {
  0% { background-position: 0% 0%, 100% 0%, 50% 0%; }
  50% { background-position: 50% 20%, 60% 30%, 50% 100%; }
  100% { background-position: 0% 0%, 100% 0%, 50% 0%; }
}

.starfield { position: fixed; inset: 0; z-index: -1; width: 100%; height: 100%; display: block; }

.container { max-width: 1000px; margin: 0 auto; padding: 24px; }
.site-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.logo { font-weight: 800; color: var(--text); text-decoration: none; letter-spacing: .5px; }
.nav a { margin-left: 10px; }

.title { font-size: 56px; margin: 0 0 8px; }
.tagline { color: var(--muted); margin: 0 0 8px; }
.subtitle { color: var(--muted); margin: 0 0 20px; font-size: 18px; }
.hero { text-align: center; padding: 96px 0 72px; position: relative; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
.hero .title { color: #fff; }
.cta-row { display: inline-flex; gap: 12px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 12px; text-decoration: none; transition: transform .12s ease, background .2s ease, box-shadow .2s ease; border: 0; cursor: pointer; color: var(--text); }
.btn-primary { background: var(--accent); color: #001d14; box-shadow: var(--shadow); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-secondary { background: #1f2633; }
.btn-secondary:hover { background: #273042; }
.btn-danger { background: #402028; color: #ffd8dd; }
.btn-danger:hover { background: #562834; }

.features { display: grid; grid-template-columns: repeat(1, 1fr); gap: 16px; margin: 0 auto 40px; max-width: 1000px; padding: 0 24px; }
@media (min-width: 700px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .features { grid-template-columns: repeat(4, 1fr); } }
.feature-card { background: var(--card); border-radius: 16px; padding: 16px; box-shadow: var(--shadow); text-align: left; }
.feature-icon { font-size: 22px; margin-bottom: 8px; }

.card, .form-card { background: var(--card); border-radius: 16px; padding: 16px; box-shadow: var(--shadow); }
.card { margin: 16px 0; }
.grid.two-cols > .card { margin: 0; }
.grid.two-cols { display: grid; grid-template-columns: 1fr; gap: 16px; margin: 16px 0; }
@media (min-width: 900px) { .grid.two-cols { grid-template-columns: 1fr 1fr; } }

label { display: block; margin: 8px 0 12px; font-weight: 600; }
input, textarea, select { width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid #283142; background: #0f131c; color: var(--text); }
input:focus, textarea:focus, select:focus { outline: 2px solid rgba(var(--accent-rgb), .3); border-color: rgba(var(--accent-rgb), .3); }
.content, .content p, .content li, .content span,
.content h1, .content h2, .content h3, .content h4, .content h5, .content h6 { color: var(--text); }
.color-picker { width: 44px; height: 32px; padding: 0; border: 0; background: none; cursor: pointer; }
.color-picker::-webkit-color-swatch-wrapper { padding: 0; }
.color-picker::-webkit-color-swatch { border: 2px solid #283142; border-radius: 8px; }
.color-picker::-moz-color-swatch { border: 2px solid #283142; border-radius: 8px; }

.alert { padding: 10px 12px; border-radius: 12px; margin: 12px 0; }
.alert-error { background: #3a1f26; color: #ffd8dd; }
.alert-success { background: #14342f; color: #c6fff1; }
.muted { color: var(--muted); }

.profile { text-align: center; max-width: 680px; margin: 40px auto; }
.avatar { box-shadow: none; height: 120px; width: auto; border-radius: 0; object-fit: contain; max-width: 100%; }
.name { margin-bottom: 8px; }
.bio { color: var(--muted); white-space: pre-wrap; }
.links { display: grid; gap: 18px; margin-top: 24px; }
.link-btn { display: inline-flex; gap: 10px; align-items: center; justify-content: center; width: 100%; padding: 14px 16px; border-radius: 14px; background: linear-gradient(180deg, #172030, #121927); color: var(--text); text-decoration: none; box-shadow: var(--shadow); transition: transform .12s ease, filter .2s ease; position: relative; }
.link-btn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.link-title { font-size: 18px; font-weight: 700; }

/* Masked platform icons colored by accent */
/* platform icon styles removed */
.icon { width: 1.2em; height: 1.2em; display: inline-flex; align-items: center; justify-content: center; }

.site-footer { margin: 40px 0 20px; text-align: center; color: var(--muted); }

.content { display: block; }
.inline { display: inline-flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.icon-input { width: 70px; text-align: center; }
.link-list { list-style: none; padding: 0; margin: 0; }
.link-item { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 12px; background: #121927; margin: 8px 0; }
.drag { cursor: grab; user-select: none; padding: 0 8px; color: #7e8aa0; }

/* No purple or underline styles — normalize links */
a { color: var(--text); text-decoration: none; }
a:hover { text-decoration: none; }

/* --- Home spice additions --- */
.kicker { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #001d14; background: rgba(var(--accent-rgb), .9); box-shadow: var(--shadow); margin-bottom: 10px; }
.title.gradient { background: linear-gradient(90deg, #e7f2ef 0%, #7af0d1 50%, #e7f2ef 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; text-fill-color: transparent; }
.hero { position: relative; overflow: hidden; }
.hero > * { position: relative; z-index: 1; }
.orbs { position: absolute; inset: -20% -10% -10% -10%; z-index: 0; pointer-events: none; filter: blur(2px) saturate(120%); }
.orb { position: absolute; width: 380px; height: 380px; border-radius: 50%; opacity: .25; background: radial-gradient(circle at 30% 30%, rgba(var(--accent-rgb), .9), rgba(var(--accent-rgb), 0) 60%); }
.orb-a { top: 0%; left: -4%; animation: floatA 26s ease-in-out infinite; }
.orb-b { top: 10%; right: -6%; animation: floatB 32s ease-in-out infinite; }
.orb-c { bottom: -8%; left: 20%; animation: floatC 38s ease-in-out infinite; width: 460px; height: 460px; opacity: .18; }
@keyframes floatA { 0%,100% { transform: translateY(0) } 50% { transform: translateY(18px) } }
@keyframes floatB { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-22px) } }
@keyframes floatC { 0%,100% { transform: translateY(0) } 50% { transform: translateY(14px) } }

/* Hover glow refinements */
.btn-primary:hover { box-shadow: 0 10px 30px rgba(var(--accent-rgb), .35), var(--shadow); }
.feature-card { position: relative; border: 1px solid rgba(255,255,255,.04); transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease; }
.feature-card:hover { transform: translateY(-2px); box-shadow: 0 12px 36px rgba(0,0,0,.45), 0 0 0 1px rgba(var(--accent-rgb), .15) inset; border-color: rgba(var(--accent-rgb), .2); }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(14px) scale(.98); transition: opacity .5s ease, transform .6s cubic-bezier(.2,.8,.2,1); will-change: opacity, transform; }
.reveal.is-revealed { opacity: 1; transform: none; }

/* Form width utility */
.form-card.narrow { max-width: 520px; margin: 0 auto; }
.disclaimer-box { max-width: 640px; margin: 0 auto; text-align: center; }

/* Password eye toggle */
.input-with-toggle { position: relative; display: block; }
.input-with-toggle input { width: 100%; padding-right: 40px; }
.eye-toggle { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; appearance: none; -webkit-appearance: none; z-index: 1; }
.eye-toggle:hover { color: var(--text); background: none; }

/* Utilities */
.no-resize { resize: none; }
.no-resize::-webkit-resizer { display: none; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: none; align-items: center; justify-content: center; z-index: 1000; }
.modal-overlay.is-open { display: flex; }
.modal-box { width: 92%; max-width: 520px; background: var(--card); color: var(--text); border-radius: 16px; box-shadow: var(--shadow); padding: 16px; border: 1px solid rgba(255,255,255,.06); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }

/* Styled file input */
.file-input { border: 1px solid #283142; background: #0f131c; color: var(--muted); border-radius: 12px; padding: 6px 10px; }
.file-input::file-selector-button { margin-right: 10px; border: 0; background: var(--accent); color: #001d14; padding: 8px 12px; border-radius: 10px; cursor: pointer; box-shadow: var(--shadow); transition: transform .12s ease, filter .2s ease; }
.file-input::file-selector-button:hover { transform: translateY(-1px); }
/* Safari/old WebKit */
.file-input::-webkit-file-upload-button { margin-right: 10px; border: 0; background: var(--accent); color: #001d14; padding: 8px 12px; border-radius: 10px; cursor: pointer; box-shadow: var(--shadow); transition: transform .12s ease, filter .2s ease; }
.file-input::-webkit-file-upload-button:hover { transform: translateY(-1px); }

/* File picker custom UI */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.file-row { display: flex; align-items: center; gap: 10px; }
.file-choose { cursor: pointer; }

/* Avatar file display */
.file-display { width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid #283142; background: #0f131c; color: var(--muted); }
.file-display:focus { outline: 2px solid rgba(var(--accent-rgb), .3); border-color: rgba(var(--accent-rgb), .3); }

/* Link item layout: left drag handle */
.link-item { flex-direction: row; align-items: center; }
.link-item .drag { align-self: stretch; display: flex; align-items: center; margin: 0; }
/* Stack fields inside each link card */
.link-item .inline { display: grid; grid-template-columns: 1fr; gap: 8px; width: 100%; }
.link-item .inline input { width: 100%; }
.link-item form + form { margin-top: 8px; }

/* Link item actions row */
.link-item .actions { display: inline-flex; gap: 8px; align-items: center; }

/* Subpages list spacing tweaks */
#subpages-list .link-item { padding: 10px; }
#subpages-list .muted { color: var(--muted); }
#subpages-list .btn { height: 34px; padding: 6px 10px; }
#subpages-list .sub-actions { display: inline-flex; gap: 8px; align-items: center; }

/* Mobile stacking fix for Subpages list */
@media (max-width: 720px) {
  #subpages-list .link-item { flex-direction: column; align-items: stretch; gap: 8px; }
  #subpages-list .link-item .drag { align-self: flex-start; }
  #subpages-list .link-item > div { min-width: 0; }
  #subpages-list .link-item a.btn,
  #subpages-list .link-item button.btn { width: 100%; }
  #subpages-list .link-item .sub-actions { display:flex; gap:8px; }
  #subpages-list .link-item .sub-actions .btn { flex: 1 1 auto; width: auto; }
}
