/* Jmanic Beats / RevoCMS — deep-space skin based on Website 001 V3.
   This file changes presentation only; the existing CMS layout is preserved. */
:root {
  --ink: #f2f9ff;
  --forest: #0a1425;
  --green: #62f2ff;
  --lime: #9a7cff;
  --paper: #02050d;
  --white: #0a1425;
  --muted: #8ca3b6;
  --line: rgba(117, 213, 255, 0.16);
  --danger: #ff7180;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  --space-glass: rgba(8, 17, 33, 0.78);
  --space-glass-strong: rgba(10, 20, 37, 0.94);
  --space-cyan: #62f2ff;
  --space-violet: #9a7cff;
}

html { color-scheme: dark; }
.about-page { max-width: 1180px; margin: auto; background: rgba(5,12,24,.9); border: 1px solid var(--line); }
.about-heading { padding: 55px clamp(24px,5vw,65px); background: radial-gradient(circle at 85% 30%,rgba(98,242,255,.12),transparent 38%),linear-gradient(120deg,#09162b,#171a3c); border-bottom: 1px solid var(--line); }
.about-heading h1 { font-size: clamp(36px,5vw,62px); color: var(--ink); }
.about-heading h1 span { color: var(--space-cyan); }
.about-heading p { color: #a1b4c6; margin: 22px 0 0; max-width: 520px; }
.about-body { padding: 45px clamp(24px,5vw,65px); }
.about-body h2 { font-size: 30px; margin-bottom: 18px; }
.about-body p { color: #a1b4c6; line-height: 1.8; max-width: 760px; }
.about-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; margin: 35px 0; }
.about-grid section { border: 1px solid var(--line); border-radius: 10px; padding: 24px; background: rgba(14,28,52,.6); }
.about-grid h3 { font-size: 21px; margin-bottom: 15px; }
.about-grid p { font-size: 13px; margin-bottom: 0; }
.about-actions { display: flex; flex-wrap: wrap; gap: 15px; }
@media(max-width:680px) { .about-grid { grid-template-columns: 1fr; } }
.beat-cover { position: relative; width: 42px; height: 42px; min-width: 42px; max-width: 42px; overflow: hidden; }
.beat-cover img { position: absolute; inset: 0; width: 42px; height: 42px; max-width: 42px; max-height: 42px; display: block; object-fit: contain; }
.cover-upload { padding: 15px; border: 1px solid var(--line); border-radius: 8px; display: flex; flex-direction: column; gap: 12px; }
.cover-upload small { color: var(--muted); }
.cover-preview { width: 84px; height: 84px; max-width: 84px; max-height: 84px; object-fit: contain; border-radius: 8px; border: 1px solid var(--line); }
.cover-preview[hidden] { display: none; }
.beat-filter-link { color: var(--space-cyan); text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; transition: color .18s, text-decoration-color .18s; }
.beat-filter-link:hover { color: #fff; text-decoration-color: var(--space-cyan); }
.beat-filter-link:focus-visible { outline: 1px solid var(--space-cyan); outline-offset: 3px; border-radius: 2px; }
.rating-boxes { display: flex; justify-content: flex-end; gap: 4px; padding: 5px 0; }
.rating-button { position: relative; overflow: hidden; width: 14px; height: 14px; padding: 0; border: 1px solid rgba(131,198,255,.28); border-radius: 3px; background: linear-gradient(145deg,#182c46,#071322); color: transparent; font-size: 0; cursor: pointer; box-shadow: inset 0 1px 0 rgba(255,255,255,.09); transition: border-color .18s, box-shadow .18s, transform .18s, background .18s; }
.rating-button.filled { color: transparent; border-color: rgba(152,224,255,.5); background: linear-gradient(120deg,#6352ff,#367eff); box-shadow: 0 0 9px rgba(98,242,255,.14), inset 0 1px 0 rgba(255,255,255,.22); }
.rating-button::before { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg,transparent 20%,rgba(255,255,255,.38) 50%,transparent 80%); transform: translateX(-150%); transition: transform .45s; }
.rating-button:hover { border-color: var(--space-cyan); background: linear-gradient(120deg,#7968ff,#43b9ff); box-shadow: 0 0 12px rgba(98,242,255,.28); transform: translateY(-1px); }
.rating-button:hover::before { transform: translateX(150%); }
.rating-button:active { transform: translateY(0); }
.rating-button:focus-visible { outline: 2px solid var(--space-cyan); outline-offset: 2px; }
.rating-button:disabled { opacity: .5; cursor: wait; }
.beat-rating small, .rating-status { display: block; font-size: 10px; line-height: 1.5; }
.beat-rating small { color: var(--muted); }
.rating-status { max-width: 145px; color: var(--space-cyan); }
@media(max-width:680px) { .beat-rating { display: block; grid-column: 2; text-align: left; } .rating-boxes { justify-content: flex-start; gap: 6px; } .rating-button { width: 20px; height: 20px; font-size: 0; padding: 0; } }
@media(prefers-reduced-motion:reduce) { .rating-button, .rating-button::before { transition: none; } .rating-button:hover { transform: none; } }

body {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: #02050d;
  background-image:
    linear-gradient(90deg, rgba(2, 5, 13, .97) 0%, rgba(2, 5, 13, .78) 38%, rgba(2, 5, 13, .3) 74%, rgba(2, 5, 13, .14) 100%),
    linear-gradient(180deg, rgba(2, 5, 13, .1), rgba(2, 5, 13, .25) 60%, rgba(2, 5, 13, .94)),
    url("assets/cosmic-background-ai.png");
  background-position: center, center, center top;
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
}

#app { position: relative; z-index: 1; min-height: 100vh; }
main { position: relative; }
::selection { color: #02050d; background: var(--space-cyan); }

.starfield {
  position: fixed;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.starfield .star {
  position: absolute;
  top: calc(var(--star-y) * 1%);
  left: calc(var(--star-x) * 1%);
  width: var(--star-size);
  height: var(--star-size);
  border-radius: 50%;
  opacity: var(--star-base);
  background: var(--star-color);
  box-shadow: 0 0 var(--star-glow) var(--star-color);
  animation: var(--star-animation) var(--star-duration) var(--star-delay) ease-in-out infinite;
}

.starfield .star.is-bright::before,
.starfield .star.is-bright::after {
  position: absolute;
  top: 50%;
  left: 50%;
  content: "";
  background: linear-gradient(90deg, transparent, var(--star-color), transparent);
  transform: translate(-50%, -50%);
}

.starfield .star.is-bright::before { width: calc(var(--star-size) * 7); height: 1px; }
.starfield .star.is-bright::after { width: 1px; height: calc(var(--star-size) * 7); }

/* Existing masthead and navigation layout, reskinned. */
.jmanic-header {
  position: relative;
  z-index: 20;
  color: var(--ink);
  border-bottom: 1px solid rgba(98, 242, 255, .16);
  background: rgba(2, 5, 13, .78);
  box-shadow: 0 14px 60px rgba(0, 0, 0, .32);
  backdrop-filter: blur(22px) saturate(1.2);
}

.jmanic-header::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  content: "";
  opacity: .65;
  background: linear-gradient(90deg, transparent, rgba(98, 242, 255, .5) 25%, rgba(154, 124, 255, .42) 72%, transparent);
}

.masthead {
  background: radial-gradient(ellipse at 56% -55%, rgba(98, 242, 255, .18), transparent 40%), rgba(3, 8, 18, .46);
}

.j-logo::before {
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
  border: 1px solid var(--space-cyan);
  border-radius: 50%;
  content: "";
  box-shadow: 0 0 0 5px rgba(98, 242, 255, .07), 0 0 18px rgba(98, 242, 255, .72), inset 0 0 5px rgba(98, 242, 255, .65);
}

.j-logo-copy strong { color: #f6fbff; letter-spacing: .12em; }
.j-logo-copy small { color: #70899d; letter-spacing: .12em; text-transform: uppercase; }
.mast-user { color: #8499aa; }
.mast-user a, .mast-user button { color: #dff8ff; }
.mast-user a:hover, .mast-user button:hover { color: var(--space-cyan); }

.mast-search input,
.form input,
.form textarea {
  border: 1px solid rgba(117, 213, 255, .17);
  color: var(--ink);
  background: rgba(2, 8, 18, .74);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}

.mast-search input::placeholder,
.form input::placeholder,
.form textarea::placeholder { color: #536a7c; }

.mast-search input:focus,
.form input:focus,
.form textarea:focus {
  border-color: rgba(98, 242, 255, .58);
  box-shadow: 0 0 0 4px rgba(98, 242, 255, .07), 0 0 26px rgba(98, 242, 255, .05);
}

.mast-search button {
  border: 1px solid rgba(98, 242, 255, .28);
  color: #f5fdff;
  background: linear-gradient(120deg, #6352ff, #367eff);
}

.mainbar {
  border-top: 1px solid rgba(117, 213, 255, .1);
  background: rgba(3, 9, 20, .88);
}

.mainbar > div { gap: 5px; padding: 6px 0; }

.mainbar a {
  position: relative;
  overflow: hidden;
  margin: 0;
  padding: 9px 16px;
  border: 1px solid rgba(131, 198, 255, .12);
  border-radius: 9px;
  color: #fff;
  background: linear-gradient(120deg, #6352ff, #367eff);
  box-shadow: 0 12px 34px rgba(65, 83, 255, .3), 0 0 22px rgba(98, 242, 255, .1), inset 0 1px 0 rgba(255,255,255,.12);
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.mainbar a:first-child { border-left: 1px solid rgba(131, 198, 255, .12); }

.mainbar a::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background: linear-gradient(105deg, transparent 23%, rgba(255,255,255,.34) 48%, rgba(98,242,255,.13) 55%, transparent 76%);
  transform: translateX(-145%);
  transition: transform 620ms cubic-bezier(.2,.7,.2,1);
}

.mainbar a:hover::before,
.mainbar a:focus-visible::before { transform: translateX(145%); }

.mainbar a:hover,
.mainbar a:focus-visible,
.mainbar a.active {
  color: #fff;
  border-color: rgba(152, 224, 255, .34);
  background: linear-gradient(120deg, #7968ff, #43b9ff);
  box-shadow: 0 16px 42px rgba(65, 83, 255, .38), 0 0 28px rgba(98, 242, 255, .18), inset 0 1px 0 rgba(255,255,255,.16);
  transform: translateY(-1px);
}

/* Shared controls and accents. */
.button,
.license-button {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(131, 198, 255, .12);
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(120deg, #6352ff, #367eff);
  box-shadow: 0 12px 34px rgba(65, 83, 255, .25), 0 0 20px rgba(98, 242, 255, .07);
}

.button:hover,
.license-button:hover {
  color: #fff;
  background: linear-gradient(120deg, #7968ff, #43b9ff);
}

.button.outline {
  color: #e8f8ff;
  background: rgba(7, 17, 32, .76);
  box-shadow: inset 0 0 0 1px rgba(98, 242, 255, .3);
}

.button.outline:hover { background: rgba(17, 37, 59, .9); }
.eyebrow { color: #9aafbf; }
.eyebrow.light { color: var(--space-cyan); }
.back { color: #8ca3b6; }
.back:hover { color: var(--space-cyan); }

/* Catalogue: original three-column proportions are untouched. */
.catalog-shell {
  border-right: 1px solid rgba(117, 213, 255, .11);
  border-left: 1px solid rgba(117, 213, 255, .11);
  background: rgba(3, 8, 18, .68);
  box-shadow: 0 28px 90px rgba(0,0,0,.35);
  backdrop-filter: blur(15px);
}

.catalog-sidebar { color: var(--ink); background: rgba(2, 7, 16, .92); }
.browse-head {
  color: var(--space-cyan);
  background: linear-gradient(90deg, rgba(99, 83, 255, .22), rgba(10, 27, 48, .92));
  box-shadow: inset 2px 0 var(--space-cyan);
}
.browse-link { color: #94a9ba; border-color: rgba(117, 213, 255, .13); }
.browse-link:hover, .browse-link.active { color: #fff; background: rgba(98, 242, 255, .07); }

.catalog-main { background: rgba(3, 9, 20, .72); }
.catalog-banner {
  border: 1px solid rgba(117, 213, 255, .2);
  color: #f7fbff;
  background:
    radial-gradient(circle at 80% 42%, rgba(98, 242, 255, .24), transparent 20%),
    radial-gradient(circle at 86% 45%, rgba(99, 83, 255, .3), transparent 37%),
    linear-gradient(120deg, rgba(7, 17, 34, .96), rgba(12, 29, 53, .86));
  box-shadow: inset 0 1px rgba(255,255,255,.035), 0 22px 60px rgba(0,0,0,.2);
}
.catalog-banner::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: .48;
  background: repeating-linear-gradient(90deg, transparent 0 31px, rgba(98,242,255,.035) 32px), repeating-linear-gradient(0deg, transparent 0 31px, rgba(98,242,255,.035) 32px);
}
.catalog-banner::after { display: none; content: none; }
.catalog-banner > * { position: relative; z-index: 1; }
.catalog-banner h1 { color: #f7fbff; }
.catalog-banner h1 span {
  color: transparent;
  background: linear-gradient(100deg, #9a7cff, #62f2ff);
  -webkit-background-clip: text;
  background-clip: text;
}
.catalog-banner p { color: #9eb2c2; }
.catalog-tabs { background: rgba(2, 6, 14, .88); }
.catalog-tabs span {
  color: var(--space-cyan);
  background: rgba(10, 22, 40, .96);
  box-shadow: inset 0 2px var(--space-cyan), 0 -10px 30px rgba(98,242,255,.035);
}
.beat-list { background: rgba(2, 6, 14, .88); }

.beat-card {
  border: 1px solid rgba(117, 213, 255, .16);
  border-bottom: 5px solid rgba(98, 242, 255, .18);
  color: var(--ink);
  background: linear-gradient(145deg, rgba(14, 28, 52, .92), rgba(5, 11, 24, .93));
  box-shadow: inset 0 1px rgba(255,255,255,.035), 0 18px 48px rgba(0,0,0,.23);
}
.beat-top { border-color: rgba(117, 213, 255, .14); }
.beat-cover {
  color: #fff;
  background: linear-gradient(135deg, #6352ff, #279fc7);
  box-shadow: 0 0 24px rgba(98,242,255,.14), inset 0 1px rgba(255,255,255,.16);
}
.beat-title { color: #f2f9ff; }
.beat-title:hover { color: var(--space-cyan); }
.beat-sub, .beat-rating { color: #8198aa; }
.beat-sub b, .beat-tags b, .detail-meta b { color: var(--space-cyan); }
.rating-boxes { color: var(--space-violet); text-shadow: 0 0 10px rgba(154,124,255,.45); }

.beat-player {
  border: 1px solid rgba(117, 213, 255, .14);
  background: linear-gradient(90deg, rgba(7, 18, 34, .97), rgba(15, 34, 57, .95));
  box-shadow: inset 0 1px rgba(255,255,255,.035);
}
.play-button {
  color: #03101b;
  background: var(--space-cyan);
  box-shadow: 0 0 16px rgba(98,242,255,.38);
}
.beat-player input[type=range] { accent-color: var(--space-cyan); }
.time-readout { color: var(--space-cyan); background: rgba(1, 5, 12, .86); }
.beat-tags { border-color: rgba(117, 213, 255, .18); color: #91a6b7; background: rgba(4, 12, 25, .8); }

.catalog-right { background: rgba(5, 12, 24, .78); }
.side-title {
  color: #f2f9ff;
  background: linear-gradient(110deg, rgba(99, 83, 255, .54), rgba(11, 38, 57, .92));
  box-shadow: inset 0 1px rgba(255,255,255,.06);
}
.side-body { color: #8ca3b6; background: rgba(4, 11, 22, .72); }
.side-list a { color: #9fb8ca; border-color: rgba(117,213,255,.16); }
.side-list a:hover { color: var(--space-cyan); }
.side-list a::before { color: var(--space-cyan); text-shadow: 0 0 10px rgba(98,242,255,.55); }
.side-placeholder { border-color: rgba(117,213,255,.12); color: #71899c; background: rgba(3,9,19,.4); }
.catalog-empty, .empty { color: var(--ink); background: rgba(8,17,33,.86); }

/* Detail, forum and member screens. */
.beat-detail,
.forum-catalog-wrap,
.content,
.auth,
.edit-shell {
  color: var(--ink);
  background: rgba(5, 12, 24, .84);
  box-shadow: 0 28px 90px rgba(0,0,0,.32);
  backdrop-filter: blur(16px);
}
.beat-detail-header {
  border-color: rgba(117, 213, 255, .2);
  background: radial-gradient(circle at 88% 38%, rgba(98,242,255,.16), transparent 28%), linear-gradient(130deg, rgba(12,27,49,.96), rgba(6,13,27,.93));
}
.beat-detail-header h1 { color: #f6fbff; }
.beat-detail-header p, .detail-meta { color: #8ca3b6; }
.beat-content { border-top-color: var(--space-cyan); box-shadow: 0 -8px 28px rgba(98,242,255,.05); }
.post-frame { border: 1px solid rgba(117,213,255,.15); background: rgba(4,10,22,.9); box-shadow: none; }

.page-hero,
.auth-side {
  color: #fff;
  background: radial-gradient(circle at 78% 35%, rgba(98,242,255,.17), transparent 25%), linear-gradient(135deg, rgba(11,24,46,.97), rgba(34,25,88,.9));
}
.page-hero h1 em { color: transparent; background: linear-gradient(100deg,#9a7cff,#62f2ff); -webkit-background-clip:text; background-clip:text; }
.page-hero p, .auth-side p { color: #91a6b7; }
.thread-list { border-color: rgba(117,213,255,.14); }
.thread-row { color: var(--ink); border-color: rgba(117,213,255,.13); }
.thread-row:hover { color: #fff; background: rgba(98,242,255,.05); }
.thread-main small, .reply-count small, .author small { color: #71899c; }
.avatar { color: #06101f; background: linear-gradient(135deg, var(--space-cyan), #9a7cff); box-shadow: 0 0 18px rgba(98,242,255,.12); }
.original, .reply, .compose-box, .reply-form {
  color: var(--ink);
  border: 1px solid rgba(117,213,255,.14);
  background: linear-gradient(150deg, rgba(13,28,50,.88), rgba(4,10,22,.88));
  box-shadow: var(--shadow);
}
.reply, .reply-form { box-shadow: none; }
.replies-title { border-color: rgba(117,213,255,.14); }
.auth-card { color: var(--ink); }
.auth-card > p, .auth-card small { color: #8ca3b6; }
.auth-card a { color: var(--space-cyan); }

/* CMS screens retain their existing sidebar, table and editor layout. */
.admin-layout { color: var(--ink); background: rgba(5, 12, 24, .88); box-shadow: 0 28px 90px rgba(0,0,0,.34); backdrop-filter: blur(16px); }
.admin-side {
  color: #fff;
  background: radial-gradient(circle at 35% 0, rgba(98,242,255,.11), transparent 26%), linear-gradient(180deg, rgba(9,24,43,.98), rgba(5,10,22,.98));
  border-right: 1px solid rgba(117,213,255,.14);
}
.admin-side nav a { color: #8ca3b6; border-radius: 7px; }
.admin-side nav a:hover { color: #fff; background: linear-gradient(90deg, rgba(98,242,255,.09), rgba(99,83,255,.1)); box-shadow: inset 2px 0 var(--space-cyan); }
.admin-side p { color: #71899c; }
.admin-main { background: rgba(4, 10, 21, .48); }
.table-wrap { border: 1px solid rgba(117,213,255,.14); background: rgba(7,16,31,.84); }
.post-table { color: var(--ink); }
.post-table th, .post-table td { border-color: rgba(117,213,255,.1); }
.post-table th, .post-table small { color: #71899c; }
.post-table tr:hover td { background: rgba(98,242,255,.025); }
.edit-link { color: var(--space-cyan); }
.danger { color: #ff7180; }

.local-note,
.audio-help {
  border: 1px solid rgba(117,213,255,.15);
  border-left: 3px solid var(--space-cyan);
  color: #a9bdcb;
  background: linear-gradient(90deg, rgba(99,83,255,.11), rgba(7,17,32,.84));
}
.audio-help code, .local-note code { color: var(--space-cyan); }
.editor-fields input[type=file] { color: #9fb4c4; background: rgba(2,8,18,.75); }
.editor-fields .code { color: #dffaff!important; background: #020711!important; }
.preview { border-color: rgba(117,213,255,.15); background: rgba(4,10,22,.9); }
.preview-bar { border-color: rgba(117,213,255,.12); color: #71899c; background: rgba(10,21,39,.94); }
.upload-status { color: #8ca3b6; }
.upload-status.success { color: #65f5b5; }
.upload-status.error { color: #ff7180; }

.alert { border-color: #ff7180; color: #ffc4ca; background: rgba(105,22,39,.42); }
.alert.success, .success { border-color: #65f5b5; color: #b9ffdf; background: rgba(18,83,63,.36); }
.modal { color: var(--ink); border: 1px solid rgba(117,213,255,.2); background: linear-gradient(150deg, rgba(13,28,50,.98), rgba(4,10,22,.98)); }
.modal::backdrop { background: rgba(1,4,11,.82); backdrop-filter: blur(8px); }
.modal-close { color: #9eb1bf; }

.j-footer {
  position: relative;
  color: #60798d;
  border-top: 1px solid rgba(117,213,255,.12);
  background: rgba(2, 7, 16, .9);
  backdrop-filter: blur(18px);
}
.j-footer strong { color: #b8ccda; letter-spacing: .1em; }
.j-footer::before { position:absolute; top:-1px; left:0; width:8rem; height:1px; content:""; background:linear-gradient(90deg,var(--space-cyan),transparent); box-shadow:0 0 12px rgba(98,242,255,.42); }

@keyframes twinkle-a { 0%,100%{opacity:var(--star-base);transform:scale(.72)} 47%{opacity:var(--star-peak);transform:scale(1.2)} 82%{opacity:calc(var(--star-peak)*.72);transform:scale(1)} }
@keyframes twinkle-b { 0%,100%{opacity:calc(var(--star-base)*.7);transform:scale(.8)} 27%{opacity:var(--star-peak);transform:scale(1.12)} 73%{opacity:calc(var(--star-peak)*.86);transform:scale(1.05)} }
@keyframes twinkle-c { 0%,100%{opacity:var(--star-base);transform:scale(.68)} 38%{opacity:var(--star-peak);transform:scale(1.28)} 67%{opacity:calc(var(--star-base)*.8);transform:scale(.82)} }

@media (max-width: 900px) {
  body { background-position: center, center, 62% top; }
}

@media (max-width: 680px) {
  body { background-attachment: scroll; background-position: center, center, 68% top; }
  .jmanic-header { background: rgba(2,5,13,.92); }
  .j-logo::before { width: 8px; height: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .starfield .star { animation: none!important; opacity: .44; }
  .mainbar a::before { display: none; }
}
