/* ============================================================
   Amped Circuit — shared galaxy + window + electric border CSS.
   Drop this <link> on every page of ampedcircuit.com.
   ============================================================ */

:root {
  --mauve: #DEBADA;
  --mauve-2: #b88cc6;
  --mauve-deep: #4a2d4d;
  --pink: #ff8da6;
  --green: #7be07b;
  --bg: #03020a;
  --window: #0e0918e6;
  --window-line: rgba(222,186,218,0.18);
  --text: #f6f3fa;
  --muted: #8a8294;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100vh; color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; line-height: 1.6; }

/* ========== GALAXY BACKGROUND ========== */
body {
  background:
    radial-gradient(ellipse 100% 80% at 18% 12%, rgba(186,108,232,0.18) 0%, transparent 50%),
    radial-gradient(ellipse 80% 60% at 88% 24%, rgba(255,141,166,0.14) 0%, transparent 55%),
    radial-gradient(ellipse 90% 70% at 50% 88%, rgba(108,158,232,0.18) 0%, transparent 50%),
    radial-gradient(ellipse 60% 100% at 100% 100%, rgba(222,186,218,0.12) 0%, transparent 60%),
    linear-gradient(180deg, #050313 0%, #03020a 50%, #050313 100%);
  background-attachment: fixed;
  position: relative;
  overflow-x: hidden;
}
/* Stars layer — two-layer animated parallax */
body::before, body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-repeat: repeat;
}
body::before {
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.9), transparent),
    radial-gradient(1px 1px at 40% 70%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1.5px 1.5px at 60% 20%, rgba(255,255,255,0.95), transparent),
    radial-gradient(1px 1px at 80% 80%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 10% 60%, rgba(255,255,255,0.6), transparent),
    radial-gradient(2px 2px at 75% 45%, rgba(222,186,218,0.8), transparent),
    radial-gradient(1px 1px at 35% 15%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1.5px 1.5px at 90% 12%, rgba(255,141,166,0.6), transparent);
  background-size: 600px 600px;
  animation: ac-stars 90s linear infinite;
  opacity: 0.85;
}
body::after {
  background-image:
    radial-gradient(1px 1px at 15% 85%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 55% 55%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1.5px 1.5px at 85% 25%, rgba(186,140,198,0.7), transparent),
    radial-gradient(1px 1px at 25% 75%, rgba(255,255,255,0.5), transparent),
    radial-gradient(2px 2px at 70% 90%, rgba(255,255,255,0.7), transparent);
  background-size: 900px 900px;
  animation: ac-stars 140s linear infinite reverse;
  opacity: 0.6;
}
@keyframes ac-stars {
  from { background-position: 0 0; }
  to   { background-position: 600px 600px; }
}

/* ========== TOP BAR — branded ========== */
.ac-topbar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 28px;
  background: linear-gradient(180deg, rgba(3,2,10,0.7), rgba(3,2,10,0.2));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(222,186,218,0.12);
}
.ac-topbar .brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.ac-topbar .brand-logo { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, var(--mauve), var(--mauve-2)); display: flex; align-items: center; justify-content: center; color: #1a0f1a; font-weight: 900; font-size: 20px; }
.ac-topbar .brand-name { font-weight: 800; font-size: 16px; letter-spacing: -0.01em; }
.ac-topbar .brand-name .sub { display: block; font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; margin-top: -2px; }
.ac-topbar .nav { display: flex; gap: 6px; }
.ac-topbar .nav a { padding: 8px 14px; border-radius: 999px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14px; transition: all 0.15s; }
.ac-topbar .nav a:hover { background: rgba(222,186,218,0.08); color: var(--mauve); }
.ac-topbar .nav a.active { background: rgba(222,186,218,0.12); color: var(--mauve); }
.ac-topbar .right { display: flex; gap: 10px; align-items: center; }
.ac-topbar .right .btn { padding: 9px 18px; background: var(--mauve); color: #1a0f1a; border: 0; border-radius: 999px; font-weight: 700; cursor: pointer; text-decoration: none; font-size: 13px; }

/* ========== CONTENT CONTAINER ========== */
.ac-wrap { max-width: 760px; margin: 0 auto; padding: 36px 22px 80px; position: relative; z-index: 1; }

/* ========== ELECTRIC WINDOW — the consistent post/card container ========== */
@property --ac-electric-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
@keyframes ac-electric-rotate {
  from { --ac-electric-angle: 0deg; }
  to   { --ac-electric-angle: 360deg; }
}

.ac-window {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--window);
  border-radius: 22px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: 28px;
  margin-bottom: 22px;
}
.ac-window::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: conic-gradient(
    from var(--ac-electric-angle),
    transparent 0deg,
    transparent 200deg,
    var(--mauve) 240deg,
    var(--pink) 280deg,
    var(--mauve) 320deg,
    transparent 360deg
  );
  -webkit-mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  z-index: 1;
  animation: ac-electric-rotate 4s linear infinite;
}
.ac-window > * { position: relative; z-index: 2; }

/* ========== POST UI ========== */
.ac-post-head { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.ac-avatar { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg, var(--mauve), var(--mauve-2)); flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: #1a0f1a; font-weight: 800; font-size: 18px; overflow: hidden; }
.ac-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ac-post-head .meta { flex: 1; }
.ac-post-head .name { font-weight: 700; font-size: 15px; }
.ac-post-head .name .verified { color: var(--mauve); font-size: 13px; margin-left: 4px; }
.ac-post-head .when { font-size: 12px; color: var(--muted); }
.ac-post-head .menu { padding: 6px 10px; color: var(--muted); cursor: pointer; font-size: 18px; border-radius: 8px; }
.ac-post-head .menu:hover { background: rgba(222,186,218,0.08); }

.ac-post-body { font-size: 16px; line-height: 1.6; color: var(--text); margin: 8px 0 16px; word-wrap: break-word; }
.ac-post-body a { color: var(--mauve); }

.ac-post-media { display: block; width: calc(100% + 56px); margin: 0 -28px 16px; border-top: 1px solid var(--window-line); border-bottom: 1px solid var(--window-line); background: #000; max-height: 600px; object-fit: cover; }

.ac-post-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; border-top: 1px solid var(--window-line); padding-top: 16px; margin-top: 4px; }
.ac-post-actions button { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px; background: transparent; border: 0; color: var(--muted); cursor: pointer; border-radius: 10px; font-size: 13px; font-weight: 600; transition: all 0.15s; }
.ac-post-actions button:hover { background: rgba(222,186,218,0.08); color: var(--mauve); }
.ac-post-actions button.liked { color: var(--pink); }
.ac-post-actions button.reposted { color: var(--green); }
.ac-post-actions svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ac-post-actions .count { font-size: 12px; opacity: 0.85; }

/* ========== COMMENTS ========== */
.ac-comment { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--window-line); }
.ac-comment:last-child { border-bottom: 0; }
.ac-comment .ac-avatar { width: 36px; height: 36px; font-size: 14px; }
.ac-comment .body { flex: 1; }
.ac-comment .body .name { font-weight: 700; font-size: 13px; }
.ac-comment .body .when { font-size: 11px; color: var(--muted); margin-left: 6px; }
.ac-comment .body .text { font-size: 14px; margin-top: 2px; }
.ac-comment .body .controls { display: flex; gap: 14px; margin-top: 6px; font-size: 11px; color: var(--muted); }
.ac-comment .body .controls span { cursor: pointer; }
.ac-comment .body .controls span:hover { color: var(--mauve); }

.ac-comment-box { display: flex; gap: 10px; padding-top: 16px; border-top: 1px solid var(--window-line); margin-top: 8px; }
.ac-comment-box input { flex: 1; padding: 10px 14px; background: #0a0710; border: 1px solid var(--window-line); color: var(--text); border-radius: 999px; font-size: 14px; font-family: inherit; }
.ac-comment-box input:focus { outline: 2px solid var(--mauve); outline-offset: -1px; }
.ac-comment-box button { padding: 10px 18px; background: var(--mauve); color: #1a0f1a; border: 0; border-radius: 999px; font-weight: 700; cursor: pointer; font-size: 13px; }

/* ========== UTILS ========== */
.ac-section-title { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; margin: 22px 0 10px; }
.ac-footer { text-align: center; color: var(--muted); font-size: 12px; padding: 30px 0; }

/* Mobile */
@media (max-width: 640px) {
  .ac-topbar { padding: 14px 16px; }
  .ac-topbar .nav { display: none; }
  .ac-wrap { padding: 22px 14px 60px; }
  .ac-window { padding: 20px; border-radius: 18px; }
  .ac-post-media { width: calc(100% + 40px); margin: 0 -20px 14px; }
}
