.auxnet-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 48px;
    background-color: #222;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.2);
    padding: 4px 0;
}

body[data-user-role="PLAYER"] .auxnet-footer {
    background: rgba(4, 12, 24, 0.82);
    border-top: 1px solid rgba(65, 182, 255, 0.35);
    box-shadow: 0 -10px 30px rgba(9, 52, 104, 0.45);
    backdrop-filter: blur(12px);
}

.footer-new-message {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    min-height: 32px;
    padding: 0 1.25rem;
    border-radius: 999px;
    background: #3af;
    color: #050b14;
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid transparent;
    box-shadow: 0 12px 32px rgba(0, 140, 255, 0.45);
    transition: background 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.footer-new-message:hover,
.footer-new-message:focus {
    background: #4cc2ff;
    box-shadow: 0 16px 38px rgba(0, 140, 255, 0.55);
}

body[data-user-role="PLAYER"] .footer-new-message {
    background: linear-gradient(135deg, rgba(6, 44, 94, 0.9), rgba(12, 90, 180, 0.95));
    border: 1px solid rgba(118, 226, 255, 0.6);
    color: #f3fbff;
}

body[data-user-role="PLAYER"] .footer-new-message:hover,
body[data-user-role="PLAYER"] .footer-new-message:focus {
    background: linear-gradient(135deg, rgba(12, 88, 172, 1), rgba(14, 130, 220, 1));
    border-color: rgba(168, 246, 255, 0.85);
    box-shadow: 0 20px 52px rgba(24, 142, 232, 0.6);
}

.footer-new-message.disabled {
    opacity: 0.45;
    pointer-events: none;
    box-shadow: none;
    cursor: default;
}

body[data-user-role="PLAYER"] .footer-new-message.disabled {
    border-color: rgba(118, 226, 255, 0.25);
    color: rgba(203, 232, 255, 0.6);
}

.logout-button {
    position: absolute;
    right: 10px;
    background-color: #3af;
    color: white;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    text-decoration: none;
    transition: background-color 0.2s ease;
    line-height: 0;
}

.logout-button:hover {
    background-color: #2c8fd6;
}

body[data-user-role="PLAYER"] .logout-button,
body[data-user-role="PLAYER"] .home-button {
    background: linear-gradient(135deg, rgba(9, 39, 66, 0.95), rgba(12, 69, 119, 0.95));
    border: 1px solid rgba(88, 205, 255, 0.4);
    box-shadow: 0 12px 28px rgba(0, 140, 255, 0.35);
    color: #daf3ff;
}

body[data-user-role="PLAYER"] .logout-button:hover,
body[data-user-role="PLAYER"] .home-button:hover {
    background: linear-gradient(135deg, rgba(11, 53, 92, 1), rgba(21, 122, 197, 1));
    border-color: rgba(138, 235, 255, 0.75);
    box-shadow: 0 16px 36px rgba(35, 158, 233, 0.55);
}

.home-button {
    background-color: #3af;
    color: white;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    text-decoration: none;
    transition: background-color 0.2s ease;
    line-height: 0;
}

.home-button:hover {
    background-color: #2c8fd6;
}

header.container {
    margin-top: 0;
    margin-bottom: 1rem;
    padding: 1rem;
}

main.container {
    margin-top: 0;
    padding-top: 0.25rem;
    padding-bottom: 80px;
}

header.container h1 {
    margin: 0;
}

.logo {
    grid-row: 1 / span 2;
    grid-column: 1;
}

.logo img {
    height: 100%;
    display: block;
}

.nav-bar a {
    text-decoration: none;
    padding: 0.25rem 0.75rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--muted-border-color);
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Nova Flat', 'Oxanium', 'Segoe UI', sans-serif;
    font-weight: 400;
    letter-spacing: 0.02em;
    background-color: #04060c;
    color: #e4f6ff;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Oxanium', 'Nova Flat', sans-serif;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #f2fbff;
}

body[data-user-role="PLAYER"] {
    --player-footer-height: 48px;
    --player-footer-gap: clamp(3.5rem, 7vh, 5.5rem);
    color: #e7f4ff;
    font-weight: 400;
    letter-spacing: 0.018em;
    position: relative;
}

body[data-user-role="PLAYER"]::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 10% 90%, rgba(0, 212, 255, 0.14) 0%, rgba(0, 212, 255, 0) 60%),
        radial-gradient(circle at 80% 15%, rgba(0, 102, 255, 0.18) 0%, rgba(0, 102, 255, 0) 55%),
        linear-gradient(155deg, rgba(0, 8, 22, 0.92), rgba(0, 0, 0, 0.9));
    pointer-events: none;
    z-index: -2;
}

body[data-user-role="PLAYER"]::after {
    content: "";
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(135deg, rgba(27, 221, 255, 0.03) 0, rgba(27, 221, 255, 0.03) 2px, transparent 2px, transparent 14px);
    mix-blend-mode: screen;
    pointer-events: none;
    z-index: -1;
}

body[data-user-role="PLAYER"] a,
body[data-user-role="PLAYER"] a:visited {
    color: #7cd7ff;
}

body[data-user-role="PLAYER"] a:hover {
    color: #b2ecff;
}

body[data-user-role="PLAYER"] h1,
body[data-user-role="PLAYER"] h2,
body[data-user-role="PLAYER"] h3,
body[data-user-role="PLAYER"] h4,
body[data-user-role="PLAYER"] h5,
body[data-user-role="PLAYER"] h6 {
    color: #f4fbff;
    font-family: 'Oxanium', 'Nova Flat', sans-serif;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.layout-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body[data-user-role="PLAYER"] .layout-wrapper {
    background: transparent;
    padding-bottom: calc(var(--player-footer-height) + var(--player-footer-gap));
}

main {
    flex: 1 0 auto; /* Allow shrinking but not below content size */
}

body[data-user-role="PLAYER"] main {
    padding-bottom: calc(1.5rem + var(--player-footer-gap));
}

body[data-user-role="PLAYER"] main.container,
body[data-user-role="PLAYER"] main.system-unavailable,
body[data-user-role="PLAYER"] main.container.system-unavailable {
    background: linear-gradient(155deg, rgba(6, 14, 26, 0.82), rgba(2, 8, 18, 0.94));
    border: 1px solid rgba(48, 163, 255, 0.28);
    border-radius: 1.5rem;
    box-shadow: 0 22px 55px rgba(12, 48, 96, 0.38);
    width: 100%;
    max-width: min(1380px, calc(100vw - 2rem));
    margin-left: auto;
    margin-right: auto;
    padding: 2.5rem clamp(1.25rem, 3.5vw, 3.5rem);
    backdrop-filter: blur(20px);
}

body[data-user-role="PLAYER"] main.container,
body[data-user-role="PLAYER"] main.system-unavailable,
body[data-user-role="PLAYER"] main.container.system-unavailable {
    margin-bottom: var(--player-footer-gap);
}

body[data-user-role="PLAYER"] main.container.system-unavailable {
    gap: 2.5rem;
}

main.system-unavailable,
main.container.system-unavailable {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 1rem;
    min-height: 50vh;
}

.header-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.site-header {
    width: 100%;
    padding: 1rem 0;
    background-color: inherit; /* Optional: define if needed */
    background-color: #181818; /* slightly lighter than the page background */
    border-bottom: 1px solid #333; /* subtle dividing line */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); /* optional for depth */
}

body[data-user-role="PLAYER"] .site-header {
    background: rgba(5, 13, 26, 0.72);
    border-bottom: 1px solid rgba(58, 175, 255, 0.35);
    box-shadow: 0 12px 32px rgba(12, 49, 94, 0.45);
    backdrop-filter: blur(16px);
}

.header-grid {
  position: relative;
  width: 100%;
  padding: 0 1rem;
}

.logo {
  position: absolute;
  top: 50%;
  left: 1rem;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
}

.logo img {
  height: 90px;
  width: auto;
  display: block;
}

.nav-bar {
  grid-column: 2;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

body[data-user-role="PLAYER"] .nav-bar {
  gap: clamp(1rem, 2.5vw, 2rem);
}

body[data-user-role="PLAYER"] .nav-bar a {
  position: relative;
  padding: 0.4rem 1.1rem;
  border: 1px solid rgba(82, 202, 255, 0.35);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(8, 29, 52, 0.7), rgba(9, 15, 30, 0.85));
  box-shadow: 0 10px 24px rgba(15, 76, 138, 0.35);
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  color: #9fe5ff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

body[data-user-role="PLAYER"] .nav-bar a::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(95, 233, 255, 0.45), rgba(12, 175, 255, 0));
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: -1;
}

body[data-user-role="PLAYER"] .nav-bar a:hover {
  border-color: rgba(119, 229, 255, 0.7);
  box-shadow: 0 14px 34px rgba(33, 135, 199, 0.55);
  transform: translateY(-1px);
}

body[data-user-role="PLAYER"] .nav-bar a:hover::after {
  opacity: 1;
}

body[data-user-role="PLAYER"] .nav-bar a.notify {
  animation: neonPulse 1.6s infinite;
  border-color: rgba(0, 255, 255, 0.9);
  color: #d3f8ff;
}

.breadcrumbs {
  grid-column: 2;
  display: flex;
  justify-content: center;
  margin: 0.25rem 0 0.6rem;
  font-size: 1.05rem;
  color: var(--muted-color, #9ea8b7);
}

body[data-user-role="PLAYER"] .breadcrumbs {
  color: rgba(140, 201, 232, 0.85);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: clamp(0.72rem, 1.9vw, 0.9rem);
}

body[data-user-role="PLAYER"] .breadcrumbs a {
  color: rgba(166, 231, 255, 0.9);
}

body[data-user-role="PLAYER"] .breadcrumbs .separator {
  color: rgba(62, 139, 186, 0.55);
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.breadcrumbs li {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.breadcrumbs a {
  color: inherit;
  text-decoration: none;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

.breadcrumbs .current {
  font-weight: 600;
  color: var(--contrast, #fff);
}

.breadcrumbs .separator {
  color: var(--muted-border-color, #3a3f4b);
}

@keyframes glow {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 153, 0, 0.7);
  }
  50% {
    box-shadow: 0 0 6px 3px rgba(255, 153, 0, 0.9);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 153, 0, 0.7);
  }
}

@keyframes neonPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 222, 255, 0.65);
  }
  50% {
    box-shadow: 0 0 16px 6px rgba(0, 222, 255, 0.9);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 222, 255, 0.65);
  }
}

.notify {
  animation: glow 1.5s infinite;
  border-color: #f90;
  border-radius: var(--border-radius);
}

.news-section {
  margin-top: 2.5rem;
  margin-left: 1rem;
  margin-right: 1rem;
}

.news-heading {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  margin-bottom: 0.5rem;
}

.news-article-page {
    padding-bottom: 60px;
}

.news-empty {
  margin-top: 1rem;
  color: var(--muted-color, #9ea8b7);
}

.news-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

@media (min-width: 992px) {
  .news-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.news-card {
  position: relative;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1.25rem;
  border: 1px solid var(--muted-border-color);
  border-radius: var(--border-radius);
  text-decoration: none;
  color: inherit;
  background: rgba(24, 24, 24, 0.85);
  transition: transform 0.2s ease, border-color 0.2s ease;
  min-height: 100%;
}

.news-card:hover {
  transform: translateY(-4px);
  border-color: #3af;
}

body[data-user-role="PLAYER"] .news-card,
body[data-user-role="PLAYER"] .news-card:hover {
  background: linear-gradient(155deg, rgba(7, 20, 36, 0.82), rgba(9, 16, 29, 0.92));
  border-color: rgba(68, 182, 255, 0.28);
  box-shadow: 0 18px 40px rgba(12, 70, 142, 0.35);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

body[data-user-role="PLAYER"] .news-card:hover {
  border-color: rgba(136, 233, 255, 0.68);
  box-shadow: 0 26px 60px rgba(24, 110, 188, 0.55);
  transform: translateY(-6px);
}

.news-card-content {
  flex: 1 1 auto;
}

.news-card-title {
  margin: 0;
  font-size: 1.1rem;
}

.news-card-description {
  margin: 0.5rem 0 0;
  color: var(--muted-color, #9ea8b7);
  font-size: 0.95rem;
  line-height: 1.5;
}

body[data-user-role="PLAYER"] .news-card-description {
  color: rgba(182, 226, 255, 0.8);
}

.news-card-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  min-width: 120px;
}

body[data-user-role="PLAYER"] .news-card-meta {
  color: rgba(141, 207, 240, 0.8);
}

.news-card-author {
  font-weight: 600;
}

.news-unread-badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background-color: #f05a68;
  color: #fff;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.news-card.unread::before {
  content: "";
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f05a68;
  box-shadow: 0 0 8px rgba(240, 90, 104, 0.7);
}

.dashboard-news {
  margin-top: 3rem;
}

.dashboard-news-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.news-view-all {
  font-size: 0.9rem;
  text-decoration: none;
}

.news-view-all:hover {
  text-decoration: underline;
}

.news-article-title {
  margin-bottom: 0.5rem;
}

.news-article-author {
  margin-top: 0;
  margin-bottom: 1.5rem;
  color: var(--muted-color, #9ea8b7);
}

.news-article-body {
  line-height: 1.7;
}

.news-article-back {
  margin-top: 2rem;
}

.news-article-back a {
  text-decoration: none;
}

.news-article-back a:hover {
  text-decoration: underline;
}

body[data-user-role="PLAYER"] :where(article, section, aside, .card, .panel, .message-thread, .message-list, .message-card, .registry-entry, .profile-card, .note-card, .account-card, .account-summary) {
  background: linear-gradient(165deg, rgba(5, 14, 27, 0.82), rgba(4, 10, 22, 0.94));
  border: 1px solid rgba(54, 162, 255, 0.26);
  border-radius: 1.25rem;
  box-shadow: 0 20px 52px rgba(8, 52, 116, 0.38);
  backdrop-filter: blur(16px);
}

body[data-user-role="PLAYER"] :where(article, section, aside, .card, .panel, .message-thread, .message-list, .message-card, .registry-entry, .profile-card, .note-card) > :where(header) {
  border-bottom-color: rgba(90, 200, 255, 0.18);
}

body[data-user-role="PLAYER"] table {
  width: 100%;
  background: rgba(4, 12, 24, 0.85);
  border: 1px solid rgba(60, 175, 255, 0.26);
  border-radius: 1.1rem;
  overflow: hidden;
  box-shadow: 0 18px 44px rgba(6, 60, 134, 0.38);
  color: #d8efff;
  border-collapse: separate;
  border-spacing: 0;
}

body[data-user-role="PLAYER"] thead {
  background: rgba(9, 34, 68, 0.9);
  color: #f5fbff;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

body[data-user-role="PLAYER"] table thead tr:first-child th:first-child {
  border-top-left-radius: 1.1rem;
}

body[data-user-role="PLAYER"] table thead tr:first-child th:last-child {
  border-top-right-radius: 1.1rem;
}

body[data-user-role="PLAYER"] table tbody tr:last-child td:first-child {
  border-bottom-left-radius: 1.1rem;
}

body[data-user-role="PLAYER"] table tbody tr:last-child td:last-child {
  border-bottom-right-radius: 1.1rem;
}

body[data-user-role="PLAYER"] tbody tr {
  border-bottom: 1px solid rgba(48, 150, 219, 0.18);
}

body[data-user-role="PLAYER"] tbody tr:nth-child(odd) {
  background: rgba(7, 21, 40, 0.72);
}

body[data-user-role="PLAYER"] tbody tr:hover {
  background: rgba(18, 60, 110, 0.6);
}

body[data-user-role="PLAYER"] :where(input, textarea, select) {
  background: rgba(4, 16, 32, 0.86);
  border: 1px solid rgba(54, 170, 255, 0.45);
  border-radius: 0.65rem;
  color: #cdeeff;
  box-shadow: inset 0 1px 2px rgba(6, 24, 46, 0.5);
  margin-top: auto;
  margin-bottom: auto;
}

body[data-user-role="PLAYER"] :where(input, textarea, select):focus {
  outline: none;
  border-color: rgba(136, 239, 255, 0.85);
  box-shadow: 0 0 0 3px rgba(32, 166, 255, 0.35);
}

body[data-user-role="PLAYER"] :where(input, textarea)::placeholder {
  color: rgba(144, 198, 232, 0.6);
}

body[data-user-role="PLAYER"] button,
body[data-user-role="PLAYER"] .button,
body[data-user-role="PLAYER"] [role="button"],
body[data-user-role="PLAYER"] input[type="submit"],
body[data-user-role="PLAYER"] input[type="button"],
body[data-user-role="PLAYER"] input[type="reset"] {
  background: linear-gradient(135deg, rgba(6, 62, 101, 0.95), rgba(0, 143, 179, 0.95));
  border: 1px solid rgba(126, 230, 255, 0.5);
  color: #e7fbff;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  border-radius: 999px;
  padding: 0.6rem 1.8rem;
  box-shadow: 0 16px 36px rgba(21, 147, 203, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  margin-top: auto;
  margin-bottom: auto;
}

body[data-user-role="PLAYER"] button:hover,
body[data-user-role="PLAYER"] .button:hover,
body[data-user-role="PLAYER"] [role="button"]:hover,
body[data-user-role="PLAYER"] input[type="submit"]:hover,
body[data-user-role="PLAYER"] input[type="button"]:hover,
body[data-user-role="PLAYER"] input[type="reset"]:hover {
  transform: translateY(-1px);
  border-color: rgba(173, 246, 255, 0.85);
  box-shadow: 0 22px 48px rgba(42, 176, 226, 0.55);
}
body {
  --glitch-offset-pos: 2px;
  --glitch-offset-neg: -2px;
  --glitch-alpha: 0.4;
  --glitch-offset-pos-alt: 3px;
  --glitch-offset-neg-alt: -3px;
  --glitch-alpha-alt: 0.5;
  --glitch-input-offset-pos: 1.54px;
  --glitch-input-offset-neg: -1.54px;
  --glitch-input-alpha: 0.35;
  --glitch-input-offset-pos-alt: 2.1px;
  --glitch-input-offset-neg-alt: -2.1px;
  --glitch-input-alpha-alt: 0.47;
  --glitch-grain-opacity: 0;
  --glitch-grain-size: max(320vmax, 5200px);
  --glitch-anim-duration: 220ms;
  --glitch-anim-play-state: paused;
}

body.glitch-mode {
  position: relative;
  overflow-x: hidden;
}

body.glitch-mode::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27640%27%20height%3D%27640%27%20viewBox%3D%270%200%20640%20640%27%20preserveAspectRatio%3D%27none%27%3E%0A%20%20%3Cfilter%20id%3D%27noise%27%3E%0A%20%20%20%20%3CfeTurbulence%20type%3D%27fractalNoise%27%20baseFrequency%3D%270.65%27%20numOctaves%3D%274%27%20seed%3D%2723%27%2F%3E%0A%20%20%3C%2Ffilter%3E%0A%20%20%3Crect%20width%3D%27100%25%27%20height%3D%27100%25%27%20filter%3D%27url(%23noise)%27%2F%3E%0A%3C%2Fsvg%3E");
  background-size: var(--glitch-grain-size) var(--glitch-grain-size);
  background-repeat: no-repeat;
  background-position: center;
  background-attachment: fixed;
  opacity: var(--glitch-grain-opacity);
  mix-blend-mode: screen;
  z-index: 2000;
}

body.glitch-mode :where(h1, h2, h3, h4, h5, h6, p, span, a, li, label, strong, em, small, button, td, th) {
  text-shadow: var(--glitch-offset-pos) 0 rgba(255, 0, 120, var(--glitch-alpha)),
    var(--glitch-offset-neg) 0 rgba(0, 220, 255, var(--glitch-alpha));
  animation: glitch-aberration var(--glitch-anim-duration) steps(2, end) infinite;
  animation-play-state: var(--glitch-anim-play-state);
  animation-fill-mode: both;
}

body.glitch-mode input,
body.glitch-mode textarea {
  text-shadow: var(--glitch-input-offset-pos) 0 rgba(255, 0, 120, var(--glitch-input-alpha)),
    var(--glitch-input-offset-neg) 0 rgba(0, 220, 255, var(--glitch-input-alpha));
  animation: glitch-aberration-input var(--glitch-anim-duration) steps(2, end) infinite;
  animation-play-state: var(--glitch-anim-play-state);
  animation-fill-mode: both;
}

@keyframes glitch-aberration {
  0%,
  100% {
    text-shadow: var(--glitch-offset-pos) 0 rgba(255, 0, 120, var(--glitch-alpha)),
      var(--glitch-offset-neg) 0 rgba(0, 220, 255, var(--glitch-alpha));
  }
  48%,
  52% {
    text-shadow: var(--glitch-offset-pos-alt) 0 rgba(255, 0, 120, var(--glitch-alpha-alt)),
      var(--glitch-offset-neg-alt) 0 rgba(0, 220, 255, var(--glitch-alpha-alt));
  }
}

@keyframes glitch-aberration-input {
  0%,
  100% {
    text-shadow: var(--glitch-input-offset-pos) 0 rgba(255, 0, 120, var(--glitch-input-alpha)),
      var(--glitch-input-offset-neg) 0 rgba(0, 220, 255, var(--glitch-input-alpha));
  }
  48%,
  52% {
    text-shadow: var(--glitch-input-offset-pos-alt) 0 rgba(255, 0, 120, var(--glitch-input-alpha-alt)),
      var(--glitch-input-offset-neg-alt) 0 rgba(0, 220, 255, var(--glitch-input-alpha-alt));
  }
}

.glitch-controls {
  margin-top: 2rem;
  padding: 1.25rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(13, 18, 29, 0.45);
  backdrop-filter: blur(4px);
}

.glitch-controls h2 {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.glitch-controls form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.glitch-controls .range-readout {
  font-weight: 600;
  text-align: right;
}

.glitch-controls .help-text {
  margin: 0.5rem 0 0;
  color: var(--muted-color, #9ea8b7);
  font-size: 0.9rem;
}

.glitch-controls .glitch-toggle {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.glitch-controls .glitch-toggle form {
  display: inline;
  margin: 0;
}


.gm-systems {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.gm-system-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    max-width: 720px;
    margin: 0 auto;
}

.gm-system-card {
    margin: 0;
}

.gm-system-button {
    width: 100%;
    padding: 1.5rem 1rem;
    border: none;
    border-radius: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #fff;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.1s ease, opacity 0.1s ease;
}

.gm-system-button.enabled {
    background: linear-gradient(135deg, #1b9a4b, #0f7a36);
    box-shadow: 0 6px 12px rgba(27, 154, 75, 0.35);
}

.gm-system-button.enabled:hover {
    transform: translateY(-1px);
    opacity: 0.95;
}

.gm-system-button.disabled {
    background: linear-gradient(135deg, #d84343, #b71c1c);
    box-shadow: 0 6px 12px rgba(216, 67, 67, 0.35);
}

.gm-system-button.disabled:hover {
    transform: translateY(-1px);
    opacity: 0.95;
}

.gm-system-button:focus {
    outline: 2px solid rgba(255, 255, 255, 0.7);
    outline-offset: 3px;
}

.button.secondary {
  margin-top: auto;
  margin-bottom: auto;
}
