/* =======================
   Sarorpheap — Purple Theme
   ======================= */

/* ---- Design tokens ---- */
:root{
  /* Light (rarely used, still clean) */
  --bg: #f5f3fb;
  --ink: #1b132b;
  --muted:#7c6f9a;
  --card: #ffffff;
  --line: #e2dcf4;

  /* Sarorpheap purple accent */
  --accent:#b78cff;

  --radius: 16px;
  --shadow: 0 8px 28px rgba(27, 19, 43, .12);
}

/* ===== Sarorpheap Dark (MAIN) ===== */
[data-theme="dark"] {
  --bg: #140b24;        /* deep purple night */
  --ink: #f2effa;      /* soft white */
  --muted: #b9aed6;    /* calm muted lavender */
  --card: #1f1436;     /* card slightly lifted */
  --line: #3a2a5e;     /* subtle borders */

  /* Sarorpheap signature */
  --accent: #c9a7ff;

  --shadow: 0 14px 36px rgba(0,0,0,.45);
}

:root{
  --header-h: 72px; /* your header height */
}

/* Keep header visible */
.as-header{
  position: sticky;   /* or 'fixed' if you prefer */
  top: 0;
  z-index: 100;
  background: var(--bg);
}

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

/* Ensure anchors stop *below* the header */
.as-section{
  scroll-margin-top: calc(var(--header-h) + 6px);
}

.as-links {
  display: flex;
  align-items: center;
  gap: 18px; /* space between logo and links */
}

.as-links .as-logo img {
  height: 36px;
  width: auto;
  display: block;
}



.as-header{
  position: fixed;
  left: 0; right: 0;
}

body{ padding-top: var(--header-h); }

/* ===== Top nav links ===== */
.as-links {
  display: flex;
  gap: 24px;
  align-items: center;
}

.as-links a {
  position: relative;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--ink, #e6eaf2);
  padding: 6px 0;
  transition: color 0.25s ease;
}

.as-links a:hover {
  color: var(--accent, #ff4d6d);
}

/* underline effect on hover / active */
.as-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -4px;
  height: 2px;
  border-radius: 999px;
  background: var(--accent, #ff4d6d);
  transform: scaleX(0);
  transition: transform 0.25s ease;
  transform-origin: center;
}

.as-links a:hover::after,
.as-links a.active::after {
  transform: scaleX(1);
}



*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- Layout helpers ---- */
.as-wrap{ width:min(1250px, 92vw); margin-inline:auto; }
.as-section{ margin: 24px 0; }


.as-nav{
  display:flex; align-items:center; gap:14px;
  padding: 10px 0;
}
.as-logo{
  display:flex; align-items:center; gap:10px; text-decoration:none; color:inherit;
}
.as-logo img{ width:28px; height:28px; object-fit:contain; }
.as-links{ display:flex; gap:14px; }
.as-links a{ color:inherit; text-decoration:none; opacity:.85; padding:6px 8px; border-radius:10px; }
.as-links a:hover{ background: color-mix(in oklab, var(--card) 85%, transparent); }
.as-spacer{ flex:1; }
/* Theme toggle button */
.as-theme-btn {
  margin-left: auto;   /* push to far right */
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  background: var(--card);
  color: var(--ink);
  transition: background 0.25s, transform 0.2s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.as-theme-btn:hover {
  background: color-mix(in oklab, var(--card) 85%, var(--accent));
  transform: translateY(-1px);
}

.as-theme-btn:active {
  transform: scale(0.96);
}

/* Dark theme adjustments */
[data-theme="dark"] .as-theme-btn {
  background: var(--line);
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

/* On mobile: icon only */
@media (max-width: 640px) {
  .as-theme-btn {
    padding: 8px 10px;
    font-size: 18px;
    font-weight: 400;
  }
  .as-theme-btn::after {
    content: ""; /* remove text label */
    display: none;
  }
}

/* ---- Cards ---- */
.as-card{
  background: var(--card);
  border: 1px solid color-mix(in oklab, var(--line) 70%, transparent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.as-pad{ padding: 16px; }

/* ---- Hero: two cards grid ---- */
.as-hero{
  display:grid; gap:16px;
  grid-template-columns: 1fr;
}
@media (min-width: 860px){
  .as-hero{ grid-template-columns: 1.1fr .9fr; }
}

/* =======================
   Confession Form
   ======================= */

/* Confession Title Image */
img.title {
  display: block;
  margin: 0 auto 16px;       /* center and add bottom space */
  max-width: 100%;           /* never overflow container */
  width: clamp(240px, 50vw, 720px); /* responsive: min 240px, scale up to 520px */
}

.counter{ margin: 6px 0 10px; text-align: center; opacity:.85; }



.horizontal-form{ display:flex; flex-direction:column; gap:10px; }

.input-row{
  display:grid; gap:10px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px){
  .input-row{ grid-template-columns: 1fr 1fr; }
}

.responsive-input,
.horizontal-form input[type="text"],
.horizontal-form input[type="password"],
.horizontal-form input[type="search"]{
  width:100%; padding:10px 12px;
  border-radius: 10px;
  border: 1px solid color-mix(in oklab, var(--line) 70%, transparent);
  background: color-mix(in oklab, var(--card) 95%, transparent);
  color: var(--ink);
  outline: none;
}

textarea#confessionText{
  width:100%; min-height: 280px; resize: vertical;
  border-radius: 12px;
  border: 1px solid color-mix(in oklab, var(--line) 70%, transparent);
  background: color-mix(in oklab, var(--card) 95%, transparent);
  color: var(--ink);
  padding: 12px;
  outline:none;
}

/* Upload zone */
.upload-zone{
  display:flex; align-items:center; gap:10px;
  padding: 12px;
  border-radius: 12px;
  border: 1px dashed color-mix(in oklab, var(--line) 70%, transparent);
  background: color-mix(in oklab, var(--card) 95%, transparent);
  cursor:pointer; user-select:none;
}
.upload-zone.dragging{ border-style: solid; }
.upload-zone.has-file{ border-color: var(--accent); }
.upload-icon{ font-size:18px; }
.upload-hint{ opacity:.7; font-size:.92rem; }

.form-row{ display:grid; gap:10px; grid-template-columns: 1fr; }
.form-row label{ opacity:.9; }

.info-note {
  font-size: 1rem;
  text-align: center;
  opacity: .8;
  font-weight: 600;   /* makes it bold */
}

.info-note a {
  color: var(--accent);
  font-weight: 600;   /* keeps the link bold too */
}
.form-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;                 /* space if multiple buttons */
  margin-top: 0px;          /* spacing from above */
  padding: 10px 0;           /* vertical breathing */
}

.form-actions button {
  padding: 12px 20px;
  border: none;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
  transition: background .2s, transform .15s;
}

.form-actions button:hover {
  background: color-mix(in oklab, var(--accent) 85%, black);
  transform: translateY(-2px);
}

#responseMessage {
  text-align: center;
  display: block;
  margin-top: 12px;
  font-size: 1.1rem;
  font-weight: 600;
}

/* Sending animation */
.sending-animation{
  position:fixed; top:45%; left:50%; transform: translate(-50%,-50%);
  font-size: 22px; color:#ff69b4; background: var(--card);
  padding: 16px 24px; border-radius: 20px; box-shadow: var(--shadow); z-index: 50;
}

/* =======================
   COTW block
   ======================= */
.cotw-head{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-bottom:10px; }
.cotw-badge {
  position: relative;
  display: inline-block;
  padding: 6px 14px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 13px;
  color: var(--accent);
  border: 2px solid var(--accent);
  overflow: hidden;
}

/* Animated border glow running around */
.cotw-badge::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  border-radius: 12px;
  background: conic-gradient(
    from 0deg,
    var(--accent),
    transparent 120deg,
    var(--accent) 240deg,
    transparent 360deg
  );
  animation: spinBorder 3s linear infinite;
  z-index: 0;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  padding: 2px;
}

.cotw-badge span {
  position: relative;
  z-index: 1;
}

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

/* Blink effect */
.cotw-badge {
  animation: blinkText 2s infinite;
}

@keyframes blinkText {
  0%, 100% { color: var(--accent); }
  50% { color: color-mix(in oklab, var(--accent) 50%, transparent); }
}
/* ===== COTW polish (non-breaking refinements) ===== */

/* ID: a touch bolder + gentle accent underline */
.cotw-id{
  opacity:.9;
  font-weight:700;
  letter-spacing:.2px;
  position:relative;
  display:inline-block;
  padding-bottom:2px;
}
.cotw-id::after{
  content:"";
  position:absolute; left:0; right:0; bottom:-2px;
  height:2px; border-radius:2px;
  background: color-mix(in oklab, var(--accent) 28%, transparent);
}

/* Image: same look, but tighten radius/shadow, keep border */
.cotw-img{
  width:100%; height:auto;
  border-radius:12px;
  border:1px solid color-mix(in oklab, var(--line) 70%, transparent);
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.cotw-img-link:hover .cotw-img{
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0,0,0,.22);
  border-color: color-mix(in oklab, var(--line) 55%, transparent);
}

/* Confession text box with fixed size */
.cotw-text {
  line-height: 1.55;
  max-height: 200px;   /* adjust as you like */
  overflow-y: auto;
  padding-right: 6px;  /* space for scrollbar */
}

/* Optional: style the scrollbar */
.cotw-text::-webkit-scrollbar {
  width: 6px;
}
.cotw-text::-webkit-scrollbar-thumb {
  background: color-mix(in oklab, var(--line) 80%, transparent);
  border-radius: 4px;
}
.cotw-text::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* Meta: subtle chips for readability, still minimal */
.cotw-meta{
  display:flex; flex-wrap:wrap; gap:10px 12px;
  margin-top:10px;
  opacity:.95;
}
.cotw-meta span{
  display:inline-flex; align-items:center; gap:6px;
  padding:4px 10px; border-radius:999px;
  background: color-mix(in oklab, var(--line) 12%, transparent);
  border:1px solid color-mix(in oklab, var(--line) 45%, transparent);
  font-size:13px;
}

/* Empty state: center + lighter */
.cotw-empty{
  opacity:.7;
  text-align:center;
  padding: 16px 0;
}

/* Label above music (if you use .cotw-music-label) */
.cotw-music-label{
  margin: 14px 0 8px;
  text-align:center;
  font-size:13px; font-weight:700; letter-spacing:.2px;
  color: color-mix(in oklab, var(--ink) 72%, transparent);
}

/* Responsive trims */
@media (max-width: 720px){
  .cotw-text{ max-width: 100%; }
  .cotw-meta span{ font-size:12.5px; padding:4px 8px; }
}

/* =======================
   Recent Confessions
   ======================= */


/* === Recent confession list container === */
#recentList {
  min-height: 960px;    /* keeps box from collapsing */
  max-height: 960px;    /* stops it from growing too tall */
  overflow-y: auto;
  padding-right: 6px;        /* room for scrollbar */
  list-style: none;
  margin: 0;
  padding-left: 0;
}

/* prettier scrollbar (WebKit browsers) */
#recentList::-webkit-scrollbar {
  width: 8px;
}
#recentList::-webkit-scrollbar-thumb {
  background: rgba(128,128,128,0.5);
  border-radius: 4px;
}
#recentList::-webkit-scrollbar-thumb:hover {
  background: rgba(128,128,128,0.7);
}
.confession-card{
  background: color-mix(in oklab, var(--card) 98%, transparent);
  border: 1px solid color-mix(in oklab, var(--line) 70%, transparent);
  border-radius: 12px; padding:12px;
}

/* spacing between confession items */
#recentList li {
  margin-bottom: 16px;   /* adjust gap size */
  list-style: none;      /* remove bullets if not already */
}

/* keep the last one flush (no extra gap at the bottom) */
#recentList li:last-child {
  margin-bottom: 0;
}




/* === Search bar styling === */
.search-row {
  display: flex;
  justify-content: center;
  margin: 1rem auto;
  max-width: 420px;
}

#confSearchGlobal {
  width: 100%;
  padding: 0.6rem 1rem;
  font-size: 0.95rem;
  border: 2px solid var(--accent, #4a90e2);
  border-radius: 1.5rem;
  background: var(--bg, #1e2230);
  color: var(--fg, #fff);
  outline: none;
  transition: all 0.25s ease;

}

#confSearchGlobal::placeholder {
  color: #aaa;
  opacity: 0.8;
}

#confSearchGlobal:focus {
  border-color: var(--accent-focus, #6aa8f7);
  box-shadow: 0 0 0 3px rgba(74,144,226,0.35);
}

/* Dark/light theme handling */
:root[data-theme="dark"] #confSearchGlobal {
  background: #2b3042;
  color: #f3f3f3;
}
:root:not([data-theme="dark"]) #confSearchGlobal {
  background: #fff;
  color: #333;
  border-color: #ccc;
}

/* Native clear (×) styling */
#confSearchGlobal::-webkit-search-cancel-button {
  -webkit-appearance: none;
  height: 14px;
  width: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%23aaa' stroke-width='2'%3E%3Cline x1='1' y1='1' x2='13' y2='13'/%3E%3Cline x1='13' y1='1' x2='1' y2='13'/%3E%3C/svg%3E") no-repeat center;
  cursor: pointer;
  opacity: 0.7;
}
#confSearchGlobal::-webkit-search-cancel-button:hover {
  opacity: 1;
}





.confession-card > strong{ display:block; margin-bottom:6px; }
.confession-card p{ margin: 8px 0 10px; line-height: 1.6; }

.meta-row{
  display:flex; align-items:flex-start; justify-content:space-between; gap:12px;
}
.meta-left{ display:grid; gap:6px; font-size:.95rem; opacity:.9; }
.meta-right .thumb{
  width: 120px; height: 120px; object-fit: cover;
  border-radius: 10px; border:1px solid color-mix(in oklab, var(--line) 70%, transparent);
}
@media (max-width: 520px){
  .meta-right .thumb{ width:100px; height:100px; }
}

/* ===== Sarorpheap Load More Button (Calm & Compact) ===== */
#loadMoreBtn {
  padding: 8px 22px;              /* 👈 shorter height */
  border: none;
  border-radius: 999px;
  cursor: pointer;

  /* Sarorpheap soft purple */
  background: linear-gradient(
    135deg,
    #b78cff,
    #9b7ae6
  );

  color: #f7f4ff;
  font-weight: 600;
  font-size: 0.85rem;             /* 👈 slightly smaller text */
  letter-spacing: 0.4px;

  box-shadow:
    0 4px 10px rgba(143,106,217,0.28), /* 👈 subtle, no glow */
    inset 0 0 0 1px rgba(255,255,255,0.12);

  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

/* hover = tiny lift only */
#loadMoreBtn:hover {
  transform: translateY(-1px);
  box-shadow:
    0 6px 14px rgba(143,106,217,0.32),
    inset 0 0 0 1px rgba(255,255,255,0.18);
}

/* active = soft press */
#loadMoreBtn:active {
  transform: scale(0.96);
  box-shadow:
    0 3px 8px rgba(143,106,217,0.22),
    inset 0 2px 4px rgba(0,0,0,0.2);
}

/* =======================
   Modal (confirm submit)
   ======================= */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none; /* shown with JS */
  align-items: center;   /* vertical center */
  justify-content: center; /* horizontal center */
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(2px);
  z-index: 2000;
}

.modal .modal-content {
  background: var(--card);
  color: var(--ink);
  border: 1px solid color-mix(in oklab, var(--line) 70%, transparent);
  border-radius: 16px;
  box-shadow: var(--shadow);
  width: 90%;
  max-width: 420px;
  padding: 20px;
  text-align: center;
  animation: popIn .25s ease;
}

.modal-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}

.modal-btn {
  padding: 10px 14px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.15s ease;
}
.modal-btn:hover { transform: translateY(-2px); }

.modal-btn.cancel {
  background: color-mix(in oklab, var(--ink) 8%, transparent);
  color: inherit;
}
.modal-btn.confirm {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

/* small entry animation */
@keyframes popIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* =======================
   Image Lightbox
   ======================= */
.img-preview-backdrop{
  position: fixed; inset: 0; background: rgba(0,0,0,.65);
  display: grid; place-items: center; opacity: 0; pointer-events: none;
  transition: opacity .18s ease; z-index: 70;
}
.img-preview-backdrop.show{ opacity:1; pointer-events: auto; }
.img-preview{
  position: relative; background: var(--card); padding: 10px;
  border-radius: 14px; box-shadow: var(--shadow); max-width: 92vw; max-height: 92vh;
}
.img-preview img{ max-width: 86vw; max-height: 80vh; display:block; border-radius: 10px; }
.img-preview-close{
  position: absolute; top: 6px; right: 6px;
  width: 34px; height: 34px; border-radius: 50%;
  border: 0; cursor: pointer; font-size: 18px; line-height: 1;
  color: var(--ink);
  background: color-mix(in oklab, var(--card) 90%, transparent);
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
}

/* =======================
   Links & misc
   ======================= */
a{ color: var(--accent); }
a:hover{ text-decoration: underline; }

.telegram-link {
  background: color-mix(in oklab, var(--card) 90%, transparent);
  border: 1px solid color-mix(in oklab, var(--accent) 50%, transparent);
  border-radius: 12px;
  padding: 16px;
  margin-top: 20px;
  text-align: center;
  font-size: 1rem;
  line-height: 1.6;
  box-shadow: 0 6px 14px rgba(0,0,0,0.25);
}

.telegram-link a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.telegram-link a:hover {
  text-decoration: underline;
}

/* Small label (About card placeholder) */
.as-label{ font-size:.9rem; opacity:.7; margin-bottom: 8px; }

/* Scroll containers (if you use inside About) */



/* ===== Music (ms- namespace) ===== */


.ms-heading {
  margin: 0 0 12px 0;
  font-size: 1.4rem;
  font-weight: 700;
  text-align: center;
  color: var(--ink, #e6eaf2);
  letter-spacing: .5px;
}


.ms-player{
  /* FIXED box size + internal scroll */
  height: 620px;                 /* <- fixed player height */
  max-width: 100%;
  margin: 0 auto;

  display: flex;
  flex-direction: column;
  min-width: 0;

  background: color-mix(in oklab, var(--card, #0f1630) 90%, transparent);
  border-radius: 18px;
  padding: 16px;
  box-shadow:
    inset 0 0 0 1px color-mix(in oklab, var(--line, #2a3552) 55%, transparent),
    var(--shadow, 0 10px 28px rgba(0,0,0,.35));
}

/* === Music Top Player (ms-top refresh) === */
.ms-top {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;

  background: linear-gradient(
    135deg,
    color-mix(in oklab, var(--card,#0f1630) 92%, transparent),
    color-mix(in oklab, var(--card,#0f1630) 85%, transparent)
  );
  box-shadow: 0 4px 14px rgba(0,0,0,.35),
              inset 0 0 0 1px color-mix(in oklab, var(--line,#2a3552) 60%, transparent);
}

/* Play/Pause button (bigger + glowing) */
.ms-pp {
  width: 50px; height: 50px;
  border-radius: 14px; border: 0;
  display: grid; place-items: center;
  font-size: 20px; font-weight: bold;
  cursor: pointer;

  background: linear-gradient(135deg, var(--accent,#ff4d6d), #6ee7f3);
  color: #fff;
  box-shadow: 0 6px 18px rgba(255,77,109,.4);
  transition: transform .15s ease, filter .2s ease;
}
.ms-pp:hover { filter: brightness(1.08); transform: scale(1.05); }

/* Track info */
.ms-track { flex: 1; min-width: 0; }
.ms-title {
  font-weight: 700; letter-spacing: .3px; font-size: 17px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--ink,#e6eaf2);
}
.ms-times {
  font-size: 13px;
  margin-top: 2px;
  color: var(--muted,#9aa7bf);
}

/* Progress bar (slimmer + neon gradient fill) */
.ms-bar {
  position: relative;
  height: 5px;
  margin-top: 12px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--line,#2a3552) 60%, transparent);
  overflow: hidden;
  cursor: pointer;
}
.ms-fill {
  height: 100%; width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent,#ff4d6d), #6ee7f3, #4ade80);
  box-shadow: 0 0 6px rgba(255,77,109,.5);
  transition: width .12s linear;
}

/* === Music Tools / Search Bar === */
.ms-tools {
  display: flex;
  justify-content: center;   /* centers the search box */
  margin: 18px 0 14px;       /* spacing above and below */
}

.ms-search {
  flex: 1;
  max-width: 420px;          /* keeps it from stretching too wide */
  position: relative;
}

.ms-search input {
  width: 100%;
  padding: 12px 14px 12px 40px;   /* left padding for icon space */
  border-radius: 14px;
  border: 0;
  outline: 0;
  font-size: 15px;
  color: var(--ink, #e6eaf2);
  
  background: color-mix(in oklab, var(--card,#0f1630) 82%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--line,#2a3552) 65%, transparent),
              0 4px 10px rgba(0,0,0,.25);

  transition: all .2s ease;
}

.ms-search input::placeholder {
  color: var(--muted,#9aa7bf);
  opacity: .8;
}

/* Glow + lift on focus */
.ms-search input:focus {
  background: color-mix(in oklab, var(--card,#0f1630) 90%, transparent);
  box-shadow: 0 0 0 2px var(--accent,#ff4d6d), 
              0 6px 16px rgba(255,77,109,.25);
}

/* Optional search icon inside */
.ms-search::before {
  content: "🔍";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  opacity: .7;
  pointer-events: none;
}
/* list */
.ms-list{
  /* take remaining height and scroll */
  flex: 1;
  min-height: 0;
  overflow: auto;

  list-style:none; margin:8px 0 0; padding:0;
  scrollbar-width: thin; scrollbar-color: var(--accent,#ff4d6d) transparent;
}
.ms-list::-webkit-scrollbar{ width:6px; }
.ms-list::-webkit-scrollbar-thumb{ background: var(--accent,#ff4d6d); border-radius:3px; }

/* row */
.ms-row{
  position:relative; display:flex; align-items:center; gap:10px;
  padding:6px 10px 10px 34px; margin:2px 0; border-radius:10px;
  cursor:pointer; line-height:1.25; font-size:14px;
  background: transparent;
}
.ms-row:hover{ background: color-mix(in oklab, var(--card,#0f1630) 74%, transparent); }
.ms-row.active{ color: var(--accent,#ff4d6d); font-weight:700; }
.ms-row.active::before{
  content:"⏵"; position:absolute; left:10px; top:50%; transform:translateY(-50%);
  color: var(--accent,#ff4d6d);
}
.ms-row.playing::before{ content:"⏸"; }

/* title + 💔 pill */
.ms-r-title{
  display:flex; align-items:center; gap:8px;
  flex:1; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.ms-rx{
  display:inline-flex; align-items:center; gap:6px;
  font-size:12px; line-height:1;
  border:0; cursor:pointer;
  color:var(--ink,#e6eaf2);
  background: color-mix(in oklab, var(--card,#0f1630) 70%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--line,#2a3552) 60%, transparent);
  border-radius:999px; padding:4px 8px;
}
.ms-rx .ms-e{ filter: drop-shadow(0 0 6px rgba(255,77,109,.25)); }
.ms-rx .ms-n{ opacity:.9; min-width:1ch; }
.ms-r-time{ margin-left:8px; font-size:12px; color:var(--muted,#9aa7bf); }



/* ===== Footer ===== */
#siteFooter {
  max-width: 1250px;          /* keep aligned with main sections */
  margin: 40px auto 0 auto;  /* spacing above, centered */
  padding: 20px;             /* inner padding like sections */

  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;

  font-size: 14px;
  border-top: 1px solid color-mix(in oklab, var(--line) 70%, transparent);
  background: color-mix(in oklab, var(--card) 95%, transparent);
  border-radius: 12px;
}

[data-theme="dark"] #siteFooter {
  background: color-mix(in oklab, var(--card) 85%, transparent);
}

#siteFooter .footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

#siteFooter .footer-copy {
  opacity: 0.7;
}

#siteFooter .footer-right {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

#siteFooter .footer-right a {
  text-decoration: none;
  color: var(--ink, #111);
  transition: color .2s;
}

[data-theme="dark"] #siteFooter .footer-right a {
  color: var(--ink, #e6eaf2);
}

#siteFooter .footer-right a:hover {
  color: var(--accent);
}



/* ===== SAD MODE (Droplet Bounce + Lightning) ===== */


/* Overlay is non-blocking so the site remains interactive */
.sad-overlay{ position:fixed; inset:0; z-index:10000; pointer-events:none; opacity:0; transition:opacity .15s ease; }
.sad-overlay.on{ opacity:1; }

/* Badge */
.sad-badge{
  position:fixed; top:10px; left:50%; transform:translateX(-50%);
  z-index:10001; pointer-events:none;
  font-weight:800; font-size:13px; letter-spacing:.5px;
  padding:8px 12px; border-radius:999px;
  background:color-mix(in oklab,var(--ink, #e7eef9) 8%, transparent);
  color:color-mix(in oklab,var(--ink, #e7eef9) 95%, white);
  border:1px solid color-mix(in oklab,var(--line, #3b4455) 70%, transparent);
  text-transform:uppercase;
  box-shadow:0 6px 24px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.05);
}

/* Canvas used for rain + splash + lightning */
#sadFX{ position:fixed; inset:0; width:100vw; height:100vh; display:block; pointer-events:none; }

/* Optional gentle vignette */
.sad-overlay.on::after{
  content:""; position:fixed; inset:0; pointer-events:none;
  background:radial-gradient(1200px 800px at 50% -10%, rgba(0,0,0,0), rgba(0,0,0,.22) 70%);
}




#sadToggle {
  display: block;
  margin: 16px auto;
  text-align: center;
  max-width: fit-content;   /* 👈 makes sure the button width hugs content */
}

/* ==== Sad Mode Button Styling (Minimal) ==== */
.sad-btn {
  display: block;
  margin: 12px auto;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;

  color: #dfe7f7;
  background: #1a1f2b;
  border: 1px solid rgba(200, 220, 255, 0.15);

  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  transition: all 0.2s ease;
}

.sad-btn:hover {
  background: #222836;
  border-color: rgba(200, 220, 255, 0.3);
  box-shadow: 0 3px 8px rgba(0,0,0,0.5),
              0 0 6px rgba(160,190,255,0.25);
}

.sad-btn:active {
  transform: scale(0.95);
  background: #181d28;
}

/* off (default) */
.sad-btn[aria-pressed="false"] { background:#1a1f2b; }

/* on */
.sad-btn[aria-pressed="true"]  { background:#243048; box-shadow:0 0 10px rgba(160,190,255,.25); }

.sad-overlay {
  transition: opacity 1s ease; /* was 0.15s */
}


/* share bar inside each confession */
.share-bar { display:flex; gap:8px; margin-top:10px; flex-wrap:wrap; }
.share-btn {
  padding:6px 10px; border-radius:8px; cursor:pointer;
  border:1px solid rgba(255,255,255,.12); background:#1b2230; color:#e7eefc;
  font-size:12px; font-weight:700;
}
.share-btn:hover{ background:#21293a; }


/* ===== User Song Upload — same width as other sections ===== */

/* Don’t alter section layout/width at all */
#user-upload {
  display: block;            /* revert grid so parent layout stays consistent */
}

/* Make the card follow your global .as-card width (full available) */
#user-upload .as-card {
  width: 100%;               /* fill parent like other sections */
  text-align: center;
  border-radius: 20px;
  border: 1px solid color-mix(in oklab, var(--line) 60%, transparent);
  box-shadow: 0 12px 28px rgba(0,0,0,.14);
}

/* Heading */
#user-upload h2 {
  margin: 0 0 12px;
  font-weight: 800;
  letter-spacing: .2px;
}

/* Only the inner form content is kept comfortably narrow & centered */
#user-upload .upload-zone .grid {
  width: 100%;
  margin-inline: auto;
}

/* Labels */
#user-upload label > div {
  text-align: left;
  margin-bottom: 6px;
  opacity: .85;
}

/* Inputs */
#user-upload input[type="text"],
#user-upload input[type="search"],
#user-upload input[type="file"] {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid color-mix(in oklab, var(--line) 70%, transparent);
  background: color-mix(in oklab, var(--card) 96%, transparent);
  color: var(--ink);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
#user-upload input[type="text"]:focus,
#user-upload input[type="file"]:focus {
  border-color: color-mix(in oklab, var(--accent) 45%, var(--line));
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 18%, transparent);
}

/* Upload button */
#user-upload #psSend {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  letter-spacing: .2px;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(0,0,0,.18);
  transition: transform .15s ease, filter .2s ease, box-shadow .2s ease;
}
#user-upload #psSend:hover { transform: translateY(-1px); filter: brightness(1.05); }
#user-upload #psSend:active { transform: translateY(0); }
#user-upload #psSend:disabled { opacity: .65; cursor: not-allowed; }

/* Controls row */
#user-upload .upload-zone [style*="display:flex"][style*="align-items:center"] {
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* Progress bar */
#user-upload #psProg {
  width: min(420px, 100%);
  height: 10px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--line) 60%, transparent);
  border: 1px solid color-mix(in oklab, var(--line) 55%, transparent);
  overflow: hidden;
}
#user-upload #psProgBar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #6ee7f3, #4ade80);
  background-size: 200% 100%;
  animation: psStripe2 2s linear infinite;
  transition: width .12s linear;
}
@keyframes psStripe2 { 0%{background-position:0% 0} 100%{background-position:200% 0} }

/* Duplicate panel */
#user-upload #psDup {
  width: 100%;
  margin: 6px auto 0;
  text-align: left;
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(
    145deg,
    color-mix(in oklab, var(--card) 96%, transparent),
    color-mix(in oklab, var(--card) 90%, transparent)
  );
  border: 1px solid color-mix(in oklab, var(--accent) 26%, var(--line));
  box-shadow: 0 10px 22px rgba(0,0,0,.12);
  font-size: 14px;
  line-height: 1.55;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .25s ease, transform .25s ease;
}
#user-upload #psDup:not(:empty) {
  opacity: 1;
  transform: translateY(0);
}

/* Duplicate panel title */
#user-upload #psDup::before {
  content: "Possible duplicates";
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  margin-bottom: 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  color: color-mix(in oklab, var(--accent) 85%, var(--ink));
  background: color-mix(in oklab, var(--accent) 14%, var(--card));
  border: 1px solid color-mix(in oklab, var(--accent) 28%, var(--line));
}

/* Duplicate rows */
#user-upload #psDup .dup-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  transition: background .18s ease, transform .12s ease;
}
#user-upload #psDup .dup-line:hover {
  background: color-mix(in oklab, var(--ink) 6%, transparent);
  transform: translateX(2px);
}
#user-upload #psDup .dup-line::before {
  content: "•";
  width: 18px; height: 18px;
  border-radius: 50%;
  display: inline-grid; place-items: center;
  background: color-mix(in oklab, var(--accent) 20%, var(--card));
  color: var(--accent);
  font-weight: 900;
  line-height: 1;
}

/* Uploader chip */
#user-upload #psDup em {
  font-style: normal;
  font-weight: 600;
  color: color-mix(in oklab, var(--ink) 80%, var(--accent));
  background: color-mix(in oklab, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in oklab, var(--accent) 24%, var(--line));
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 6px;
}

/* Helper text */
#user-upload .muted {
  text-align: center;
  opacity: .85;
}

/* Mobile tweaks (no width override for card/section) */
@media (max-width: 720px) {
  #user-upload #psSend { width: 100%; }
  #user-upload #psProg { width: 100%; }
}


/* ===== COTW custom player ===== */
.cotw-music-label {
  margin: 16px 0 10px;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.cotw-music-label::before,
.cotw-music-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
  opacity: 0.6;   /* lighter for minimal look */
}
/* Player container */
.cotw-player {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
}

/* Play button */
.cotw-play {
  background: transparent;
  border: none;
  color: var(--ink);
  font-size: 18px;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform .15s ease;
}
.cotw-play:hover { transform: scale(1.2); }

/* Progress bar container */
.cotw-progress {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}

/* Progress fill */
.cotw-progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #22d3ee, #a78bfa);
  border-radius: 999px;
  transition: width .15s linear;
}



.as-label {
  display: flex;
  align-items: center;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  margin: 6px 0 12px; /* top 6px, left/right 0, bottom 12px */
}
.as-label::before,
.as-label::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--line);
  margin: 0 10px;
}



/* ===== Su Mei — Easter Egg (scoped) ===== */
.su-easter {
  position: fixed; inset: 0;
  display: none; /* toggled by JS */
  place-items: center;
  backdrop-filter: blur(4px);
  background: color-mix(in oklab, var(--ink) 2%, transparent);
  z-index: 3000;
}
.su-easter.show { display: grid; animation: suFade .18s ease-out both; }
@keyframes suFade { from { opacity: 0 } to { opacity: 1 } }

.su-card {
  width: min(420px, 92vw);
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%);
  border: 1px solid color-mix(in oklab, var(--line) 70%, transparent);
  border-radius: 14px;
  box-shadow: 0 16px 44px rgba(0,0,0,.35);
  padding: 16px;
  text-align: center;
}

.su-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  font-weight: 700; font-size: 12px;
  color: var(--accent);
  border: 1.5px dashed color-mix(in oklab, var(--accent) 70%, transparent);
  background: color-mix(in oklab, var(--accent) 10%, transparent);
  margin-bottom: 8px;
}

.su-text {
  margin: 6px 0 12px;
  line-height: 1.55;
  color: var(--ink);
  opacity: .95;
}

/* Subtle pulsing ring behind the badge */
.su-badge::after{
  content:"";
  position:absolute; transform: translate(-50%,-50%);
  left:50%; top:50%; width:0; height:0; border-radius:999px;
  box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 24%, transparent);
  animation: suPulse 1.8s ease-out infinite;
  pointer-events:none;
}
@keyframes suPulse {
  0%  { box-shadow: 0 0 0 0   color-mix(in oklab, var(--accent) 24%, transparent) }
  70% { box-shadow: 0 0 0 18px color-mix(in oklab, var(--accent) 0%, transparent) }
  100%{ box-shadow: 0 0 0 0   color-mix(in oklab, var(--accent) 0%, transparent) }
}


/* Overlay */
.love-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 20, 30, 0.5);
  opacity: 0;
  transition: opacity .4s ease;
  z-index: 9999;
}
.love-overlay.show { opacity: 1; }

/* Popup */
.love-popup {
  background: #fff;
  color: #b5179e;
  border: 1px solid #b5179e;
  padding: 14px 20px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  text-align: center;
  font-style: italic;
  box-shadow: inset 0 0 8px rgba(181,23,158,0.2);
  animation: gentleGlow 3s infinite alternate;
}
@keyframes gentleGlow {
  from { box-shadow: inset 0 0 5px rgba(181,23,158,0.2); }
  to   { box-shadow: inset 0 0 15px rgba(181,23,158,0.5); }
}


/* =========================
   Visitors — Compact Flat Style (Sarorpheap)
   ========================= */

/* whole card smaller */
.visitors-card{
  padding: 14px;
  border-radius: 18px;
}

/* header */
.vis-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom: 10px;
}
.vis-title{
  margin:0;
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: .2px;
}
.vis-sub{
  font-size: .8rem;
  opacity: .65;
}

/* === Stats strip (not big boxes) === */
.vis-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.vis-box{
  border-radius: 14px;
  padding: 10px 12px;
  border: 1px solid color-mix(in oklab, var(--line) 65%, transparent);
  background: color-mix(in oklab, var(--card) 92%, transparent);
  box-shadow: none; /* no heavy look */
}

.vis-label{
  font-size: .75rem;
  font-weight: 800;
  opacity: .7;
  letter-spacing: .3px;
  text-transform: uppercase;
}

.vis-value{
  margin-top: 4px;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.1;
  color: var(--ink);
}

/* === Geo layout === */
.vis-geo{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 4px;
}

/* each block is minimal */
.geo-block{
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

/* titles */
.geo-title{
  font-size: .85rem;
  font-weight: 900;
  opacity: .85;
  margin: 0 0 8px 0;
  display:flex;
  align-items:center;
  gap:8px;
}
.geo-title::before{
  content:"";
  width:10px;
  height:10px;
  border-radius: 999px;
  background: var(--accent);
  opacity: .9;
}

/* list becomes slim “rows” */
.geo-list{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap: 6px;
}

.geo-list li{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;

  padding: 8px 10px;
  border-radius: 12px;

  border: 1px solid color-mix(in oklab, var(--line) 55%, transparent);
  background: color-mix(in oklab, var(--card) 94%, transparent);
}

/* name */
.geo-list li span:first-child{
  font-size: .85rem;
  font-weight: 700;
  opacity: .92;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* count = tiny pill (small) */
.geo-list li span:last-child{
  font-size: .78rem;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 999px;
  min-width: 34px;
  text-align:center;

  color: var(--accent);
  background: color-mix(in oklab, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in oklab, var(--accent) 35%, transparent);
}

/* empty */
.geo-empty{
  padding: 10px;
  border-radius: 12px;
  border: 1px dashed color-mix(in oklab, var(--line) 60%, transparent);
  opacity: .65;
  font-size: .85rem;
}

/* note */
.vis-note{
  margin-top: 10px;
  font-size: .75rem;
  opacity: .6;
  text-align:center;
}

/* mobile: stack */
@media (max-width: 720px){
  .vis-grid{ grid-template-columns: 1fr; }
  .vis-geo{ grid-template-columns: 1fr; }
}