:root {
  --ruby: #9b111e; --ruby-bright: #d52b3d; --wine: #3a0813; --ink: #120a0d;
  --paper: #fff8f1; --muted: #a99191; --line: rgba(255, 228, 211, .14); --gold: #e9b56b;
  --shadow: 0 22px 70px rgba(8, 1, 3, .35);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; color: var(--paper); background: var(--ink); font-family: Inter, sans-serif; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button:active { transform: scale(.97); }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid rgba(233,181,107,.78); outline-offset: 3px; }
.button-letter { display: inline-block; white-space: pre; }
button:hover .button-letter, button:focus-visible .button-letter, a.button:hover .button-letter, a.button-secondary:hover .button-letter, a.ruby-nav:hover .button-letter { animation: letter-wave .62s ease-in-out both; animation-delay: calc(var(--letter-index) * 26ms); }
.app-shell { position: relative; isolation: isolate; min-height: 100vh; overflow: clip; background: radial-gradient(circle at 85% 4%, rgba(155,17,30,.28), transparent 34rem), linear-gradient(135deg, #190609 0%, #3a0813 44%, #100507 100%); }
.app-shell::before, .app-shell::after { position: fixed; inset: 0; z-index: 0; pointer-events: none; content: ""; }
.app-shell::before { opacity: .32; background: radial-gradient(ellipse at 50% 100%, rgba(213,43,61,.14), transparent 62%); animation: ruby-glow 12s ease-in-out infinite alternate; }
.app-shell::after { inset: -18%; opacity: .78; mix-blend-mode: screen; background: radial-gradient(ellipse 34% 45% at 19% 29%, rgba(246,48,82,.9), rgba(197,18,51,.48) 32%, transparent 77%), radial-gradient(ellipse 30% 50% at 79% 62%, rgba(102,10,48,.86), rgba(160,12,47,.4) 37%, transparent 80%), radial-gradient(ellipse 42% 32% at 50% 93%, rgba(255,101,78,.68), rgba(165,17,45,.35) 42%, transparent 78%), radial-gradient(ellipse 34% 39% at 91% 9%, rgba(176,15,50,.74), rgba(93,8,36,.32) 40%, transparent 78%); background-size: 135% 145%, 145% 160%, 150% 140%, 160% 160%; background-position: 0% 35%, 100% 65%, 30% 100%, 85% 0%; transform-origin: center; animation: lava-flow 26s ease-in-out infinite alternate, ruby-glow 11s ease-in-out infinite alternate; }
.app-shell > * { position: relative; z-index: 1; }
.app-shell > .wave-field, .app-shell > .ember-field { position: fixed; z-index: 0; }
.ember-field { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.ember-field > i { position: absolute; top: var(--ember-y); left: var(--ember-x); width: var(--ember-size); aspect-ratio: 1; border-radius: 50%; background: var(--ember-color); box-shadow: 0 0 9px var(--ember-glow); opacity: .3; animation: ember-drift var(--ember-duration) ease-in-out var(--ember-delay) infinite alternate; }
.wave-field { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; opacity: .72; mask-image: linear-gradient(to top, transparent 0%, #000 18%, #000 74%, transparent 100%); }
.wave-field::before, .wave-field::after { position: absolute; display: block; content: ""; pointer-events: none; filter: blur(28px); transform-origin: center; }
.wave-field::before { left: -18%; bottom: -24%; width: 138%; height: 74%; border-radius: 43% 57% 0 0 / 18% 28% 0 0; background: radial-gradient(ellipse at 48% 2%, rgba(255,82,111,.25), rgba(203,24,65,.16) 38%, rgba(105,10,43,.06) 68%, transparent 76%); animation: ruby-wave 19s ease-in-out infinite alternate; }
.wave-field::after { left: -24%; bottom: -17%; width: 150%; height: 61%; border-radius: 58% 42% 0 0 / 25% 17% 0 0; background: radial-gradient(ellipse at 56% 0%, rgba(153,17,63,.18), rgba(246,70,89,.12) 42%, rgba(82,9,35,.04) 70%, transparent 77%); animation: ruby-wave 27s ease-in-out infinite alternate-reverse; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px clamp(20px, 5vw, 80px); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px); position: sticky; top: 0; z-index: 5; background: rgba(18, 6, 9, .8); }
.brand { color: var(--paper); text-decoration: none; display: flex; align-items: center; gap: 13px; font-family: Cinzel, serif; letter-spacing: .04em; font-size: 1.03rem; }
.beta-badge { display: inline-block; flex: 0 0 auto; padding: 5px 8px; border: 1px solid rgba(213,43,61,.58); border-radius: 3px; color: #ffd7d2; background: rgba(155,17,30,.2); font-family: Inter, sans-serif; font-size: .58rem; font-weight: 700; letter-spacing: .08em; line-height: 1.2; white-space: nowrap; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; color: var(--ink); background: linear-gradient(135deg, #f7d492, var(--ruby-bright)); clip-path: polygon(50% 0, 90% 22%, 100% 68%, 50% 100%, 0 68%, 10% 22%); }
.nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.nav button, .icon-button { border: 1px solid transparent; color: #efdcd5; background: transparent; padding: 9px 12px; border-radius: 6px; transition: .2s; }
.nav button:hover, .nav button.active { color: #fff; background: rgba(213,43,61,.18); border-color: rgba(213,43,61,.35); }
.nav a.ruby-nav { display: inline-block; padding: 9px 12px; border: 1px solid transparent; border-radius: 6px; color: #efdcd5; text-decoration: none; transition: color .2s, background .2s, border-color .2s; }
.nav a.ruby-nav:hover { color: #fff; background: rgba(213,43,61,.18); border-color: rgba(213,43,61,.35); }
.ruby-home-card { color: inherit; text-decoration: none; }
.nav .logout { color: var(--gold); }
.page { max-width: 1250px; margin: auto; padding: clamp(30px, 6vw, 76px) clamp(20px, 5vw, 70px); animation: reveal .5s ease both; }
.hero { display: grid; grid-template-columns: 1.2fr .8fr; align-items: end; gap: 50px; min-height: 390px; }
.eyebrow { color: var(--gold); font-size: .73rem; letter-spacing: .18em; text-transform: uppercase; font-weight: 700; }
h1, h2, h3 { font-family: Cinzel, serif; font-weight: 600; margin: 0 0 14px; }
h1 { font-size: clamp(2.7rem, 7vw, 6.5rem); line-height: .96; max-width: 800px; letter-spacing: .01em; }
h2 { font-size: clamp(1.7rem, 3vw, 2.6rem); }
h3 { font-size: 1.2rem; }
p { color: #d8c0ba; line-height: 1.7; }
.lede { font-size: 1.08rem; max-width: 600px; }
.hero-crest { width: min(100%, 280px); aspect-ratio: 1; justify-self: center; overflow: hidden; border-radius: 28px; box-shadow: var(--shadow); transform: perspective(650px) rotateX(var(--look-x, 0deg)) rotateY(var(--look-y, 0deg)); transition: transform .24s ease-out; }
.hero-crest img { display: block; width: 100%; height: 100%; object-fit: cover; animation: logo-float 7s ease-in-out infinite; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 35px; }
.feature-card, .panel, .stat { border: 1px solid var(--line); background: linear-gradient(145deg, rgba(255,255,255,.075), rgba(255,255,255,.025)); box-shadow: var(--shadow); }
.feature-card { position: relative; overflow: hidden; min-height: 220px; padding: 24px; display: flex; flex-direction: column; justify-content: space-between; text-align: left; color: var(--paper); transition: transform .25s, border-color .25s, background .25s, box-shadow .25s; animation: rise .55s ease both; }
.feature-card > span { position: relative; z-index: 1; }
.feature-card:nth-child(2) { animation-delay: .08s; } .feature-card:nth-child(3) { animation-delay: .16s; } .feature-card:nth-child(4) { animation-delay: .24s; }
.feature-card:hover { transform: translateY(-7px); border-color: rgba(233,181,107,.65); background: linear-gradient(145deg, rgba(155,17,30,.42), rgba(255,255,255,.04)); box-shadow: 0 18px 44px rgba(8,1,3,.38), 0 0 25px rgba(213,43,61,.17); }
.feature-card::after { position: absolute; inset: -80% auto -80% -40%; width: 32%; content: ""; pointer-events: none; opacity: 0; transform: rotate(24deg) translateX(-180%); background: linear-gradient(90deg, transparent, rgba(255,235,217,.16), transparent); }
.feature-card:hover::after { opacity: 1; transform: rotate(24deg) translateX(520%); transition: transform .75s ease, opacity .2s ease; }
.feature-card .symbol { color: var(--gold); font-size: 2rem; }
.feature-card p { margin: 0; font-size: .9rem; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 26px; }
.panel { padding: 24px; margin-bottom: 18px; }
.panel, .item, .stat { transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease, background-color .22s ease; animation: rise .48s ease both; }
.panel:hover, .item:hover, .stat:hover { transform: translateY(-3px); border-color: rgba(233,181,107,.38); box-shadow: 0 18px 44px rgba(8,1,3,.38), 0 0 22px rgba(213,43,61,.11); }
.grid-2 > :nth-child(2), .grid-3 > :nth-child(2), .stats > :nth-child(2) { animation-delay: .08s; }
.grid-3 > :nth-child(3), .stats > :nth-child(3) { animation-delay: .16s; }
.grid-3 > :nth-child(4), .stats > :nth-child(4) { animation-delay: .24s; }
.grid-2, .grid-3 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 28px; }
.stat { padding: 20px; } .stat strong { display: block; font-family: Cinzel, serif; color: var(--gold); font-size: 2.1rem; } .stat span { color: var(--muted); font-size: .82rem; }
.item { border: 1px solid var(--line); padding: 18px; background: rgba(0,0,0,.12); }
.item h3 { margin-bottom: 7px; } .item p { margin: 5px 0; font-size: .9rem; }
.wiki-embed > p { margin-top: 0; }
.wiki-embed > a { display: inline-block; text-decoration: none; }
.channel-preview { min-height: 190px; display: flex; flex-direction: column; justify-content: center; gap: 8px; margin: -18px -18px 18px; padding: 22px; background: radial-gradient(circle at 80% 20%, rgba(213,43,61,.35), transparent 60%), #18080d; border-bottom: 1px solid var(--line); }
.channel-preview span { color: var(--gold); font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; }
.channel-preview strong { font-family: Cinzel, serif; font-size: 1.3rem; }
.channel-preview small { color: var(--muted); }
.short-heading { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--gold); font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.short-frame { margin-top: 8px; }
.badge { display: inline-block; padding: 5px 9px; border-radius: 20px; color: #ffdca8; background: rgba(233,181,107,.13); font-size: .72rem; letter-spacing: .05em; }
.button, .button-secondary { border: 0; padding: 11px 16px; color: white; background: var(--ruby); border-radius: 5px; transition: .2s; } .button:hover { background: var(--ruby-bright); transform: translateY(-1px); }
.button-secondary { background: transparent; border: 1px solid var(--line); color: #edcfca; } .button-danger { background: #5d0e18; }
.actions { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; } label { display: grid; gap: 7px; color: #e9d2cb; font-size: .83rem; } input, textarea, select { width: 100%; padding: 12px 13px; color: var(--paper); border: 1px solid rgba(255,255,255,.15); background: rgba(0,0,0,.22); border-radius: 4px; outline: 0; } textarea { min-height: 95px; resize: vertical; } input:focus, textarea:focus, select:focus { border-color: var(--gold); } option { color: #241015; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; } .login-box { width: min(430px, 100%); padding: 38px; border: 1px solid rgba(233,181,107,.3); background: linear-gradient(145deg, rgba(81,7,20,.8), rgba(18,4,8,.92)); box-shadow: var(--shadow); } .login-box h1 { font-size: 2.5rem; }
.table-wrap { overflow-x: auto; } table { border-collapse: collapse; width: 100%; min-width: 620px; } th, td { text-align: left; padding: 13px 10px; border-bottom: 1px solid var(--line); font-size: .88rem; } th { color: var(--gold); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; } tbody tr { animation: rise .35s ease both; transition: background-color .2s ease; } tbody tr:hover { background: rgba(213,43,61,.1); } .muted { color: var(--muted); }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 9; max-width: 350px; padding: 13px 16px; background: #281117; border: 1px solid var(--gold); color: var(--paper); transform: translateY(130%); transition: transform .3s; } .toast.show { transform: translateY(0); }
.empty { padding: 35px; text-align: center; color: var(--muted); border: 1px dashed var(--line); }
.discord-profile { display: flex; align-items: center; gap: 24px; max-width: 680px; }
.discord-avatar { width: 112px; height: 112px; flex: 0 0 auto; display: grid; place-items: center; overflow: hidden; border: 2px solid rgba(233,181,107,.45); border-radius: 50%; background: linear-gradient(135deg, var(--ruby), #18080d); color: var(--gold); font-family: Cinzel, serif; font-size: 2.5rem; }
.discord-avatar img { width: 100%; height: 100%; object-fit: cover; }
.discord-info h3 { margin: 8px 0 0; font-size: 1.5rem; }
.discord-username { margin: 2px 0 10px; color: var(--muted); }
.discord-link { display: inline-block; margin-top: 14px; text-decoration: none; }
@keyframes reveal { from { opacity: 0; } to { opacity: 1; } } @keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ruby-embers { from { transform: translate3d(0, 4vh, 0); } to { transform: translate3d(0, -7vh, 0); } } @keyframes ruby-glow { from { opacity: .55; } to { opacity: 1; } } @keyframes ember-flicker { from { opacity: .3; } to { opacity: .65; } }
@keyframes ember-drift { 0% { transform: translate3d(0,0,0) scale(.7); opacity: .25; } 48% { opacity: .82; } 100% { transform: translate3d(var(--ember-dx),var(--ember-dy),0) scale(1.2); opacity: .32; } }
@keyframes lava-flow { 0% { background-position: 0% 35%, 100% 65%, 30% 100%, 85% 0%; transform: translate3d(-4%, -3%, 0) scale(1.08) rotate(-2deg); } 50% { background-position: 100% 15%, 0% 45%, 75% 30%, 10% 100%; transform: translate3d(3%, 4%, 0) scale(1.16) rotate(2deg); } 100% { background-position: 35% 100%, 65% 0%, 0% 60%, 100% 28%; transform: translate3d(-3%, 6%, 0) scale(1.1) rotate(-2deg); } }
@keyframes ruby-wave { 0% { transform: translate3d(-3%, 3%, 0) rotate(-2deg); border-radius: 43% 57% 0 0 / 18% 28% 0 0; } 50% { transform: translate3d(2%, -3%, 0) rotate(1deg); border-radius: 55% 45% 0 0 / 27% 15% 0 0; } 100% { transform: translate3d(4%, 1%, 0) rotate(3deg); border-radius: 47% 53% 0 0 / 13% 23% 0 0; } }
@keyframes letter-wave { 0%, 100% { transform: translateY(0); } 28% { transform: translateY(-.42em); } 55% { transform: translateY(.04em); } 78% { transform: translateY(-.14em); } }
@keyframes logo-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; min-height: auto; } .hero-crest { min-height: 150px; } .cards, .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .site-header { align-items: flex-start; flex-direction: column; } .brand { gap: 8px; font-size: .88rem; } .beta-badge { padding: 4px 6px; font-size: .52rem; } .nav { justify-content: flex-start; } .page { padding-top: 34px; } .cards, .grid-2, .grid-3, .stats, .form-grid { grid-template-columns: 1fr; } .discord-profile { align-items: flex-start; flex-direction: column; } h1 { font-size: 3.3rem; } .login-box { padding: 25px; } }
@media (prefers-reduced-motion: reduce) { .app-shell::before, .app-shell::after, .wave-field, .wave-field::before, .wave-field::after, .ember-field > i, .hero-crest img { animation: none; } .hero-crest { transform: none; transition: none; } .button-letter, .feature-card, .feature-card::after, .panel, .item, .stat, tbody tr, .nav a.ruby-nav { animation: none; transition: none; } .app-shell button:hover .button-letter, .app-shell button:focus-visible .button-letter, .app-shell a.button:hover .button-letter, .app-shell a.button-secondary:hover .button-letter, .app-shell a.ruby-nav:hover .button-letter { animation: none; } .feature-card:hover, .panel:hover, .item:hover, .stat:hover, button:active { transform: none; } .page { animation: none; } }
