/*
 * Rust-France / Matrix - Design V2
 * Global visual refresh for the site content while intentionally excluding the header.
 * Loaded by layout/footer.php after legacy styles; runtime scopes keep every site header untouched.
 */

body {
  --rfv2-bg: #0b1117;
  --rfv2-surface: rgba(18, 26, 34, .90);
  --rfv2-surface-strong: #131c24;
  --rfv2-surface-soft: rgba(255,255,255,.035);
  --rfv2-surface-hover: rgba(255,255,255,.065);
  --rfv2-border: rgba(255,255,255,.085);
  --rfv2-border-strong: rgba(255,255,255,.16);
  --rfv2-text: #eef4f8;
  --rfv2-muted: #94a4b2;
  --rfv2-muted-2: #71808e;
  --rfv2-accent: #38bdf8;
  --rfv2-accent-2: #f59e0b;
  --rfv2-success: #22c55e;
  --rfv2-warning: #f59e0b;
  --rfv2-danger: #ef4444;
  --rfv2-info: #38bdf8;
  --rfv2-purple: #a78bfa;
  --rfv2-radius-xs: 9px;
  --rfv2-radius-sm: 12px;
  --rfv2-radius: 16px;
  --rfv2-radius-lg: 22px;
  --rfv2-shadow-sm: 0 8px 24px rgba(0,0,0,.18);
  --rfv2-shadow: 0 18px 50px rgba(0,0,0,.28);
  --rfv2-shadow-xl: 0 28px 80px rgba(0,0,0,.38);
  --rfv2-transition: 180ms cubic-bezier(.2,.7,.2,1);
  background-color: var(--rfv2-bg);
}

/* IMPORTANT: all generic selectors are scoped to non-header content roots. */
.rfv2-scope {
  color: var(--rfv2-text);
}

.rfv2-scope ::selection {
  color: #fff;
  background: rgba(56,189,248,.35);
}

.rfv2-scope :focus-visible {
  outline: 2px solid rgba(56,189,248,.78) !important;
  outline-offset: 3px;
}

/* -------------------------------------------------------------------------- */
/* PAGE RHYTHM / TYPOGRAPHY                                                    */
/* -------------------------------------------------------------------------- */
.rfv2-scope:is(main, .content, .page-content),
.rfv2-scope :where(main, .content, .page-content) {
  position: relative;
}

.rfv2-scope:is(main, .content, .page-content) > .container,
.rfv2-scope:is(main, .content, .page-content).container,
.rfv2-scope :where(main, .content, .page-content) > .container,
.rfv2-scope :where(main, .content, .page-content).container {
  padding-top: clamp(1rem, 1.8vw, 1.75rem);
  padding-bottom: clamp(2rem, 3vw, 3.5rem);
}

.rfv2-scope :where(h1,h2,h3,h4,h5,h6) {
  color: var(--rfv2-text);
  text-wrap: balance;
}

.rfv2-scope :where(h1,h2) {
  letter-spacing: -.025em;
}

.rfv2-scope :where(p, .text-muted, .text-secondary, .form-text) {
  line-height: 1.65;
}

.rfv2-scope .text-muted,
.rfv2-scope .text-secondary,
.rfv2-scope .form-text {
  color: var(--rfv2-muted) !important;
}

.rfv2-scope hr {
  border-color: var(--rfv2-border) !important;
  opacity: 1;
}

/* -------------------------------------------------------------------------- */
/* GENERIC PANELS / CARDS                                                      */
/* -------------------------------------------------------------------------- */
.rfv2-scope :where(.card, .adm-card, .professional-panel, .matrix-page-shell, .rf-player-panel, .rf-profile-side-card) {
  border-color: var(--rfv2-border) !important;
  box-shadow: var(--rfv2-shadow-sm);
}

.rfv2-scope .card:not(.rf-reward-card):not(.rf-game-card):not(.scratch-card):not(.chest-card) {
  background:
    linear-gradient(145deg, rgba(255,255,255,.025), rgba(255,255,255,.008)),
    var(--rfv2-surface) !important;
  border: 1px solid var(--rfv2-border) !important;
  border-radius: var(--rfv2-radius) !important;
  overflow: hidden;
}

.rfv2-scope .card-header {
  padding: .95rem 1.1rem;
  color: var(--rfv2-text) !important;
  background: rgba(255,255,255,.025) !important;
  border-bottom: 1px solid var(--rfv2-border) !important;
  font-weight: 750;
}

.rfv2-scope .card-body {
  padding: 1.1rem;
}

.rfv2-scope .card-footer {
  padding: .9rem 1.1rem;
  background: rgba(255,255,255,.018) !important;
  border-top: 1px solid var(--rfv2-border) !important;
}

.rfv2-scope a.card,
.rfv2-scope .card[role="button"],
.rfv2-scope .clickable-card {
  transition: transform var(--rfv2-transition), border-color var(--rfv2-transition), box-shadow var(--rfv2-transition);
}

@media (hover:hover) {
  .rfv2-scope a.card:hover,
  .rfv2-scope .card[role="button"]:hover,
  .rfv2-scope .clickable-card:hover {
    transform: translateY(-3px);
    border-color: rgba(56,189,248,.22) !important;
    box-shadow: var(--rfv2-shadow);
  }
}

/* Existing hero systems: bring their geometry into the same family without
   erasing page-specific colours/background artwork. */
.rfv2-scope :where(.matrix-page-hero, .rf-player-hero, .rf-notification-hero, .pro-page-hero, .hero-section, .page-hero) {
  border-radius: var(--rfv2-radius-lg) !important;
  border-color: var(--rfv2-border) !important;
  box-shadow: var(--rfv2-shadow) !important;
}


/* -------------------------------------------------------------------------- */
/* EXISTING MATRIX / PLAYER COMPONENT HARMONISATION                           */
/* -------------------------------------------------------------------------- */
.rfv2-scope :where(
  .matrix-stat-card,
  .pro-stat-card,
  .wipe-summary-card,
  .lb-summary-card,
  .clan-stat-card,
  .profile-stat-card,
  .rf-player-stat-card,
  .rf-reward-summary-card,
  .pro-stat-tile
) {
  border-color: var(--rfv2-border) !important;
  border-radius: var(--rfv2-radius) !important;
  box-shadow: var(--rfv2-shadow-sm) !important;
  transition: transform var(--rfv2-transition), border-color var(--rfv2-transition), box-shadow var(--rfv2-transition);
}

@media (hover:hover) {
  .rfv2-scope :where(
    .matrix-stat-card,
    .pro-stat-card,
    .wipe-summary-card,
    .lb-summary-card,
    .clan-stat-card,
    .profile-stat-card,
    .rf-player-stat-card,
    .rf-reward-summary-card,
    .pro-stat-tile
  ):hover {
    transform: translateY(-2px);
    border-color: rgba(56,189,248,.18) !important;
    box-shadow: var(--rfv2-shadow) !important;
  }
}

.rfv2-scope :where(
  .matrix-quick-pill,
  .matrix-status-pill,
  .rf-player-chip,
  .rf-reward-badge,
  .rf-notification-filter,
  .adm-pill
) {
  border-radius: 999px !important;
  border-color: var(--rfv2-border) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}

.rfv2-scope :where(.rf-player-btn, .rf-player-btn-outline, .rf-claim-all-btn, .action-btn) {
  min-height: 42px;
  border-radius: 11px !important;
  transition: transform var(--rfv2-transition), box-shadow var(--rfv2-transition), border-color var(--rfv2-transition), background-color var(--rfv2-transition) !important;
}

@media (hover:hover) {
  .rfv2-scope :where(.rf-player-btn, .rf-player-btn-outline, .rf-claim-all-btn, .action-btn):hover {
    transform: translateY(-1px) !important;
  }
}

.rfv2-scope :where(.profile-header, .public-profile-shell, .rf-reward-toolbar) {
  border-radius: var(--rfv2-radius-lg) !important;
  border-color: var(--rfv2-border) !important;
  box-shadow: var(--rfv2-shadow) !important;
}

.rfv2-scope .breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: .2rem;
  margin-bottom: 1rem;
  padding: .55rem .72rem;
  border: 1px solid rgba(255,255,255,.065);
  border-radius: 10px;
  background: rgba(255,255,255,.018);
}

.rfv2-scope .breadcrumb-item,
.rfv2-scope .breadcrumb-item a {
  color: var(--rfv2-muted) !important;
  text-decoration: none;
}

.rfv2-scope .breadcrumb-item.active {
  color: #dce7ee !important;
}

.rfv2-scope .progress {
  height: 9px;
  overflow: hidden;
  background: rgba(255,255,255,.055) !important;
  border: 1px solid rgba(255,255,255,.045);
  border-radius: 999px !important;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.25);
}

.rfv2-scope .progress-bar {
  border-radius: inherit;
  transition: width .35s ease;
}

.rfv2-scope :where(.avatar, .player-avatar, .profile-avatar, .rounded-circle) {
  box-shadow: 0 0 0 1px rgba(255,255,255,.055);
}

/* -------------------------------------------------------------------------- */
/* BUTTON SYSTEM                                                               */
/* -------------------------------------------------------------------------- */
.rfv2-scope .btn {
  min-height: 40px;
  padding: .55rem .9rem;
  border-radius: 11px !important;
  border-width: 1px;
  font-weight: 700;
  letter-spacing: .005em;
  box-shadow: none;
  transition:
    transform var(--rfv2-transition),
    box-shadow var(--rfv2-transition),
    background-color var(--rfv2-transition),
    border-color var(--rfv2-transition),
    color var(--rfv2-transition);
}

.rfv2-scope .btn-sm {
  min-height: 34px;
  padding: .4rem .7rem;
  border-radius: 9px !important;
  font-size: .82rem;
}

.rfv2-scope .btn-lg {
  min-height: 48px;
  padding: .72rem 1.15rem;
  border-radius: 13px !important;
}

.rfv2-scope .btn-primary {
  color: #06111a !important;
  background: linear-gradient(135deg, #67d2ff, #38bdf8) !important;
  border-color: rgba(103,210,255,.65) !important;
  box-shadow: 0 9px 24px rgba(56,189,248,.16);
}

.rfv2-scope .btn-secondary {
  color: #e9eff4 !important;
  background: rgba(255,255,255,.075) !important;
  border-color: rgba(255,255,255,.12) !important;
}

.rfv2-scope .btn-warning {
  color: #160d02 !important;
  background: linear-gradient(135deg, #fbbf24, #f59e0b) !important;
  border-color: rgba(251,191,36,.65) !important;
  box-shadow: 0 9px 24px rgba(245,158,11,.14);
}

.rfv2-scope .btn-success {
  color: #04140a !important;
  background: linear-gradient(135deg, #4ade80, #22c55e) !important;
  border-color: rgba(74,222,128,.6) !important;
}

.rfv2-scope .btn-danger {
  color: #fff !important;
  background: linear-gradient(135deg, #f25f5f, #dc3545) !important;
  border-color: rgba(242,95,95,.58) !important;
}

.rfv2-scope :where(.btn-outline-light, .btn-outline-secondary) {
  color: #dce6ed !important;
  background: rgba(255,255,255,.025) !important;
  border-color: rgba(255,255,255,.13) !important;
}

.rfv2-scope .btn-outline-primary {
  color: #78d8ff !important;
  background: rgba(56,189,248,.035) !important;
  border-color: rgba(56,189,248,.3) !important;
}

.rfv2-scope .btn-outline-danger {
  color: #ff8c8c !important;
  background: rgba(239,68,68,.035) !important;
  border-color: rgba(239,68,68,.28) !important;
}

@media (hover:hover) {
  .rfv2-scope .btn:not(:disabled):not(.disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(0,0,0,.22);
  }
}

.rfv2-scope .btn:active:not(:disabled) {
  transform: translateY(0) scale(.985);
}

.rfv2-scope .btn:disabled,
.rfv2-scope .btn.disabled {
  opacity: .48;
  box-shadow: none !important;
  cursor: not-allowed;
}

.rfv2-scope :where(.btn, .rf-player-btn, .rf-player-btn-outline, .action-btn) > i:first-child {
  opacity: .92;
}

/* -------------------------------------------------------------------------- */
/* FORMS                                                                       */
/* -------------------------------------------------------------------------- */
.rfv2-scope .form-label {
  margin-bottom: .42rem;
  color: #d9e3ea !important;
  font-size: .84rem;
  font-weight: 750;
}

.rfv2-scope :where(.form-control, .form-select) {
  min-height: 44px;
  color: var(--rfv2-text) !important;
  background-color: rgba(7,13,19,.72) !important;
  border: 1px solid rgba(255,255,255,.105) !important;
  border-radius: 11px !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.018);
  transition: border-color var(--rfv2-transition), box-shadow var(--rfv2-transition), background-color var(--rfv2-transition);
}

.rfv2-scope textarea.form-control {
  min-height: 108px;
  line-height: 1.55;
}

.rfv2-scope :where(.form-control, .form-select)::placeholder {
  color: #667786 !important;
  opacity: 1;
}

.rfv2-scope :where(.form-control, .form-select):hover:not(:disabled) {
  border-color: rgba(255,255,255,.17) !important;
}

.rfv2-scope :where(.form-control, .form-select):focus {
  background-color: rgba(8,15,22,.92) !important;
  border-color: rgba(56,189,248,.66) !important;
  box-shadow: 0 0 0 .22rem rgba(56,189,248,.115) !important;
}

.rfv2-scope .input-group-text {
  color: var(--rfv2-muted) !important;
  background: rgba(255,255,255,.045) !important;
  border-color: rgba(255,255,255,.105) !important;
}

.rfv2-scope .form-check-input {
  background-color: rgba(7,13,19,.78);
  border-color: rgba(255,255,255,.22);
  box-shadow: none;
}

.rfv2-scope .form-check-input:checked {
  background-color: #38bdf8;
  border-color: #38bdf8;
}

.rfv2-scope .form-check-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 .2rem rgba(56,189,248,.12);
}

.rfv2-scope fieldset {
  border-color: var(--rfv2-border);
}

/* -------------------------------------------------------------------------- */
/* TABLES                                                                      */
/* -------------------------------------------------------------------------- */
.rfv2-scope .table-responsive {
  border: 1px solid var(--rfv2-border) !important;
  border-radius: var(--rfv2-radius) !important;
  background: rgba(10,16,22,.58);
  box-shadow: var(--rfv2-shadow-sm);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.2) transparent;
}

.rfv2-scope .table {
  --bs-table-bg: transparent;
  --bs-table-color: #dce5ec;
  --bs-table-border-color: rgba(255,255,255,.07);
  --bs-table-striped-bg: rgba(255,255,255,.018);
  --bs-table-striped-color: #dce5ec;
  --bs-table-hover-bg: rgba(56,189,248,.055);
  --bs-table-hover-color: #fff;
  margin-bottom: 0;
  color: #dce5ec !important;
  vertical-align: middle;
}

.rfv2-scope .table > :not(caption) > * > * {
  padding: .82rem .9rem;
  border-bottom-color: rgba(255,255,255,.065) !important;
}

.rfv2-scope .table thead th {
  position: relative;
  color: #9fb1bf !important;
  background: rgba(255,255,255,.032) !important;
  font-size: .73rem;
  font-weight: 850;
  letter-spacing: .055em;
  text-transform: uppercase;
  white-space: nowrap;
}

.rfv2-scope .table tbody tr {
  transition: background-color var(--rfv2-transition);
}

.rfv2-scope .table tbody tr:last-child > * {
  border-bottom-width: 0;
}

.rfv2-scope .table code,
.rfv2-scope .table .font-monospace {
  font-variant-numeric: tabular-nums;
}

/* -------------------------------------------------------------------------- */
/* LIST GROUPS / TABS / PAGINATION                                             */
/* -------------------------------------------------------------------------- */
.rfv2-scope .list-group {
  border-radius: var(--rfv2-radius) !important;
  overflow: hidden;
  box-shadow: var(--rfv2-shadow-sm);
}

.rfv2-scope .list-group-item {
  color: #dce5ec !important;
  background: rgba(18,26,34,.86) !important;
  border-color: var(--rfv2-border) !important;
  padding: .88rem 1rem;
  transition: background-color var(--rfv2-transition), border-color var(--rfv2-transition);
}

.rfv2-scope a.list-group-item:hover,
.rfv2-scope button.list-group-item:hover {
  background: rgba(255,255,255,.055) !important;
}

.rfv2-scope :where(.nav-tabs, .nav-pills) {
  gap: .35rem;
  border-bottom-color: var(--rfv2-border) !important;
}

.rfv2-scope :where(.nav-tabs, .nav-pills) .nav-link {
  color: var(--rfv2-muted) !important;
  border: 1px solid transparent !important;
  border-radius: 10px !important;
  font-weight: 700;
  transition: color var(--rfv2-transition), background-color var(--rfv2-transition), border-color var(--rfv2-transition);
}

.rfv2-scope :where(.nav-tabs, .nav-pills) .nav-link:hover {
  color: #fff !important;
  background: rgba(255,255,255,.035) !important;
}

.rfv2-scope :where(.nav-tabs, .nav-pills) .nav-link.active {
  color: #dff6ff !important;
  background: rgba(56,189,248,.095) !important;
  border-color: rgba(56,189,248,.22) !important;
}

.rfv2-scope .pagination {
  gap: .3rem;
}

.rfv2-scope .page-link {
  min-width: 38px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #cbd8e1 !important;
  background: rgba(255,255,255,.035) !important;
  border: 1px solid rgba(255,255,255,.09) !important;
  border-radius: 9px !important;
  font-weight: 700;
}

.rfv2-scope .page-link:hover {
  color: #fff !important;
  background: rgba(255,255,255,.07) !important;
  border-color: rgba(255,255,255,.16) !important;
}

.rfv2-scope .page-item.active .page-link {
  color: #06111a !important;
  background: #38bdf8 !important;
  border-color: #38bdf8 !important;
}

.rfv2-scope .page-item.disabled .page-link {
  color: #5f6c76 !important;
  opacity: .55;
}

/* -------------------------------------------------------------------------- */
/* ALERTS / BADGES / TOASTS                                                    */
/* -------------------------------------------------------------------------- */
.rfv2-scope .alert {
  position: relative;
  padding: .9rem 1rem;
  border-width: 1px !important;
  border-radius: 12px !important;
  box-shadow: var(--rfv2-shadow-sm);
}

.rfv2-scope .alert-success {
  color: #baf6cf !important;
  background: rgba(34,197,94,.09) !important;
  border-color: rgba(34,197,94,.24) !important;
}

.rfv2-scope .alert-danger {
  color: #ffc2c2 !important;
  background: rgba(239,68,68,.09) !important;
  border-color: rgba(239,68,68,.24) !important;
}

.rfv2-scope .alert-warning {
  color: #ffe1a0 !important;
  background: rgba(245,158,11,.09) !important;
  border-color: rgba(245,158,11,.24) !important;
}

.rfv2-scope .alert-info {
  color: #bcecff !important;
  background: rgba(56,189,248,.09) !important;
  border-color: rgba(56,189,248,.24) !important;
}

.rfv2-scope .badge:not(.notification-count-badge) {
  border-radius: 999px;
  padding: .38em .62em;
  font-weight: 750;
  letter-spacing: .015em;
}

.rfv2-scope .toast {
  color: var(--rfv2-text);
  background: rgba(13,20,27,.96) !important;
  border: 1px solid var(--rfv2-border-strong) !important;
  border-radius: 14px !important;
  box-shadow: var(--rfv2-shadow-xl);
  backdrop-filter: blur(18px);
}

.rfv2-scope .toast-header {
  color: var(--rfv2-text) !important;
  background: rgba(255,255,255,.035) !important;
  border-bottom-color: var(--rfv2-border) !important;
}

/* -------------------------------------------------------------------------- */
/* MODALS / DROPDOWNS OUTSIDE HEADER / ACCORDIONS                             */
/* -------------------------------------------------------------------------- */
.rfv2-scope .modal-content {
  color: var(--rfv2-text);
  background: rgba(15,23,30,.97) !important;
  border: 1px solid var(--rfv2-border-strong) !important;
  border-radius: var(--rfv2-radius-lg) !important;
  box-shadow: var(--rfv2-shadow-xl) !important;
  overflow: hidden;
}

.rfv2-scope :where(.modal-header, .modal-footer) {
  border-color: var(--rfv2-border) !important;
}

.rfv2-scope .modal-header {
  background: rgba(255,255,255,.018);
}

.rfv2-scope .dropdown-menu {
  padding: .45rem;
  color: var(--rfv2-text);
  background: rgba(13,20,27,.98) !important;
  border: 1px solid var(--rfv2-border-strong) !important;
  border-radius: 12px !important;
  box-shadow: var(--rfv2-shadow) !important;
}

.rfv2-scope .dropdown-item {
  color: #cbd8e1 !important;
  border-radius: 8px;
  padding: .55rem .7rem;
  transition: background-color var(--rfv2-transition), color var(--rfv2-transition);
}

.rfv2-scope .dropdown-item:hover,
.rfv2-scope .dropdown-item:focus {
  color: #fff !important;
  background: rgba(255,255,255,.06) !important;
}

.rfv2-scope .accordion-item {
  color: var(--rfv2-text);
  background: rgba(18,26,34,.86) !important;
  border-color: var(--rfv2-border) !important;
}

.rfv2-scope .accordion-button {
  color: var(--rfv2-text) !important;
  background: rgba(255,255,255,.025) !important;
  box-shadow: none !important;
}

.rfv2-scope .accordion-button:not(.collapsed) {
  color: #dff6ff !important;
  background: rgba(56,189,248,.065) !important;
}

/* -------------------------------------------------------------------------- */
/* ADMIN / LEGACY GENERIC COMPONENTS                                          */
/* -------------------------------------------------------------------------- */
.rfv2-scope .adm-card {
  border-radius: var(--rfv2-radius) !important;
  background:
    linear-gradient(145deg, rgba(255,255,255,.025), rgba(255,255,255,.008)),
    rgba(18,26,34,.91) !important;
}

.rfv2-scope .adm-card-body {
  padding: 1rem 1.05rem;
}

.rfv2-scope .adm-section-title {
  color: #dfe8ee !important;
  letter-spacing: -.012em;
}

.rfv2-scope .adm-pill {
  border: 1px solid var(--rfv2-border) !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,.035) !important;
}

/* -------------------------------------------------------------------------- */
/* EMPTY / LOADING STATES                                                      */
/* -------------------------------------------------------------------------- */
.rfv2-scope :where(.rf-empty-state, .empty-state, .no-results, .no-data) {
  min-height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  color: var(--rfv2-muted) !important;
  background: rgba(255,255,255,.018);
  border: 1px dashed rgba(255,255,255,.105);
  border-radius: var(--rfv2-radius);
}

.rfv2-scope .spinner-border,
.rfv2-scope .spinner-grow {
  color: var(--rfv2-accent);
}

/* -------------------------------------------------------------------------- */
/* FOOTER                                                                      */
/* -------------------------------------------------------------------------- */
footer.footer.rfv2-scope {
  position: relative;
  margin-top: clamp(2rem, 4vw, 4rem);
  border-top: 1px solid rgba(255,255,255,.075);
  background:
    radial-gradient(circle at 50% 0%, rgba(56,189,248,.055), transparent 32rem),
    #0a1016 !important;
  overflow: hidden;
}

footer.footer.rfv2-scope > .text-body {
  background: transparent !important;
}

footer.footer.rfv2-scope > .text-body:first-child {
  padding-top: 3.4rem !important;
  padding-bottom: 3rem !important;
}

footer.footer.rfv2-scope > .text-body:last-child {
  border-top: 1px solid rgba(255,255,255,.055);
  background: rgba(255,255,255,.015) !important;
}

footer.footer.rfv2-scope h3 {
  margin-bottom: .85rem;
  color: #eef6fa !important;
  font-size: 1rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

footer.footer.rfv2-scope p,
footer.footer.rfv2-scope a,
footer.footer.rfv2-scope .text-body-secondary {
  color: #8fa0ae !important;
}

footer.footer.rfv2-scope .links a {
  display: inline-block;
  padding: .25rem .4rem;
  border-radius: 7px;
  transition: color var(--rfv2-transition), background-color var(--rfv2-transition);
}

footer.footer.rfv2-scope .links a:hover {
  color: #eaf7ff !important;
  background: rgba(255,255,255,.035);
}

footer.footer.rfv2-scope .social-links a {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #aab8c3 !important;
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  font-size: 1.05rem;
  transition: transform var(--rfv2-transition), color var(--rfv2-transition), border-color var(--rfv2-transition), background-color var(--rfv2-transition);
}

@media (hover:hover) {
  footer.footer.rfv2-scope .social-links a:hover {
    transform: translateY(-3px);
    color: #dff6ff !important;
    background: rgba(56,189,248,.065);
    border-color: rgba(56,189,248,.23);
  }
}

/* -------------------------------------------------------------------------- */
/* SCROLLBARS                                                                  */
/* -------------------------------------------------------------------------- */
.rfv2-scope * {
  scrollbar-width: thin;
  scrollbar-color: rgba(148,164,178,.32) transparent;
}

.rfv2-scope *::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

.rfv2-scope *::-webkit-scrollbar-track {
  background: transparent;
}

.rfv2-scope *::-webkit-scrollbar-thumb {
  background: rgba(148,164,178,.28);
  border: 2px solid transparent;
  background-clip: padding-box;
  border-radius: 999px;
}

.rfv2-scope *::-webkit-scrollbar-thumb:hover {
  background: rgba(148,164,178,.45);
  border: 2px solid transparent;
  background-clip: padding-box;
}

/* -------------------------------------------------------------------------- */
/* RESPONSIVE                                                                  */
/* -------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
  .rfv2-scope :where(.matrix-page-hero, .rf-player-hero, .rf-notification-hero, .pro-page-hero, .hero-section, .page-hero) {
    border-radius: 18px !important;
  }

  .rfv2-scope .table > :not(caption) > * > * {
    padding: .72rem .75rem;
  }
}

@media (max-width: 767.98px) {
  .rfv2-scope:is(main, .content, .page-content) > .container,
  .rfv2-scope:is(main, .content, .page-content).container,
  .rfv2-scope :where(main, .content, .page-content) > .container,
  .rfv2-scope :where(main, .content, .page-content).container {
    --bs-gutter-x: 1.25rem;
  }

  .rfv2-scope .card-body {
    padding: .95rem;
  }

  .rfv2-scope .btn-lg {
    min-height: 46px;
  }

  footer.footer.rfv2-scope {
    text-align: center;
  }

  footer.footer.rfv2-scope .about p {
    max-width: 36rem;
    margin-inline: auto;
  }
}

/* Keep motion comfortable while preserving the site identity. */
@media (prefers-reduced-motion: reduce) {
  .rfv2-scope *,
  .rfv2-scope *::before,
  .rfv2-scope *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ========================================================================== */
/* Matrix V3 — AJAX loading, skeletons and recoverable error states            */
/* Header is deliberately excluded from every selector below.                  */
/* ========================================================================== */
.rfv2-scope .matrix-v3-loading:not(header),
.rfv2-scope.matrix-v3-loading:not(header) {
    position: relative;
    min-height: 96px;
    pointer-events: none;
}

.rfv2-scope .matrix-v3-loading:not(header)::after,
.rfv2-scope.matrix-v3-loading:not(header)::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 20;
    border-radius: inherit;
    background: linear-gradient(105deg, rgba(8,13,19,.20) 20%, rgba(255,255,255,.075) 40%, rgba(8,13,19,.20) 60%);
    background-size: 220% 100%;
    animation: matrix-v3-shimmer 1.25s linear infinite;
    pointer-events: none;
}

.rfv2-scope .matrix-v3-skeleton {
    width: 100%;
    padding: 1.25rem;
}

.rfv2-scope .matrix-v3-skeleton span,
.rfv2-scope .matrix-v3-skeleton-avatar {
    display: block;
    position: relative;
    overflow: hidden;
    background: rgba(255,255,255,.075);
    border: 1px solid rgba(255,255,255,.055);
}

.rfv2-scope .matrix-v3-skeleton span::after,
.rfv2-scope .matrix-v3-skeleton-avatar::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent);
    animation: matrix-v3-skeleton-sweep 1.2s ease-in-out infinite;
}

.rfv2-scope .matrix-v3-skeleton-profile {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 1rem 1.25rem;
    align-items: center;
}

.rfv2-scope .matrix-v3-skeleton-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    grid-row: span 2;
}

.rfv2-scope .matrix-v3-skeleton-lines {
    display: grid;
    gap: .65rem;
}
.rfv2-scope .matrix-v3-skeleton-lines span { height: 14px; border-radius: 999px; }
.rfv2-scope .matrix-v3-skeleton-lines span:nth-child(1) { width: min(330px, 70%); height: 22px; }
.rfv2-scope .matrix-v3-skeleton-lines span:nth-child(2) { width: min(460px, 88%); }
.rfv2-scope .matrix-v3-skeleton-lines span:nth-child(3) { width: min(250px, 55%); }

.rfv2-scope .matrix-v3-skeleton-grid {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: .85rem;
}
.rfv2-scope .matrix-v3-skeleton-grid span { height: 92px; border-radius: 14px; }

.rfv2-scope .matrix-v3-skeleton-table,
.rfv2-scope .matrix-v3-skeleton-cards {
    display: grid;
    gap: .7rem;
}
.rfv2-scope .matrix-v3-skeleton-table span { height: 46px; border-radius: 9px; }
.rfv2-scope .matrix-v3-skeleton-cards { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.rfv2-scope .matrix-v3-skeleton-cards span { height: 120px; border-radius: 14px; }

.rfv2-scope .matrix-v3-error-panel,
.rfv2-scope.matrix-v3-error-panel {
    width: min(680px, calc(100% - 2rem));
    margin: 1.25rem auto;
    padding: 1.25rem;
    text-align: center;
    border: 1px solid rgba(248,113,113,.24);
    border-radius: 16px;
    background: rgba(127,29,29,.12);
    box-shadow: 0 16px 38px rgba(0,0,0,.18);
}
.rfv2-scope .matrix-v3-error-panel > i { font-size: 1.65rem; margin-bottom: .65rem; opacity: .92; }
.rfv2-scope .matrix-v3-error-panel strong { display: block; margin-bottom: .35rem; font-size: 1.05rem; }
.rfv2-scope .matrix-v3-error-panel p { margin: 0 0 .9rem; color: var(--rfv2-muted, #a9b4bf); }

.matrix-v3-notice-stack {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1095;
    display: grid;
    gap: .65rem;
    width: min(390px, calc(100vw - 2rem));
}
.matrix-v3-notice {
    position: relative;
    display: grid;
    gap: .2rem;
    padding: .85rem 2.4rem .85rem 1rem;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 13px;
    background: rgba(12,18,25,.97);
    box-shadow: 0 14px 38px rgba(0,0,0,.34);
    color: #edf4f8;
}
.matrix-v3-notice.is-error { border-color: rgba(248,113,113,.38); }
.matrix-v3-notice.is-success { border-color: rgba(74,222,128,.30); }
.matrix-v3-notice.is-warning { border-color: rgba(250,204,21,.30); }
.matrix-v3-notice span { color: #aebac5; }
.matrix-v3-notice-close {
    position: absolute;
    top: .45rem;
    right: .55rem;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 1.35rem;
    opacity: .7;
}

@keyframes matrix-v3-shimmer { to { background-position: -220% 0; } }
@keyframes matrix-v3-skeleton-sweep { to { transform: translateX(100%); } }

@media (max-width: 640px) {
    .rfv2-scope .matrix-v3-skeleton-profile { grid-template-columns: 64px 1fr; }
    .rfv2-scope .matrix-v3-skeleton-avatar { width: 64px; height: 64px; }
    .rfv2-scope .matrix-v3-skeleton-grid { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .rfv2-scope .matrix-v3-loading:not(header)::after,
    .rfv2-scope.matrix-v3-loading:not(header)::after,
    .rfv2-scope .matrix-v3-skeleton span::after,
    .rfv2-scope .matrix-v3-skeleton-avatar::after { animation: none; }
}
