:root {
  --bg-900: #030611;
  --bg-800: #0b1224;
  --bg-700: #131a32;
  --accent: #00d4ff;
  --accent-2: #8c61ff;
  --accent-3: #ffba08;
  --text-high: #f6f7fb;
  --text-mid: #b8bfd8;
  --text-low: #7c84a6;
  --danger: #ff5c5c;
  --success: #36e2b4;
  --radius-lg: 32px;
  --radius-md: 18px;
  --radius-sm: 10px;
  --shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
  font-family: "Segoe UI", "Inter", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 10% 20%, rgba(0, 212, 255, 0.18) 0, transparent 25%),
    radial-gradient(circle at 90% 10%, rgba(140, 97, 255, 0.22) 0, transparent 30%),
    radial-gradient(circle at 50% 110%, rgba(255, 186, 8, 0.2) 0, transparent 40%),
    var(--bg-900);
  color: var(--text-high);
  padding: 0 1.5rem 4rem;
}

.app-shell {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.sidebar {
  position: sticky;
  top: 1.5rem;
  min-width: 230px;
  max-width: 260px;
  background: rgba(8, 10, 26, 0.85);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 1.5rem;
  color: var(--text-low);
  transition: border-color 0.2s ease, transform 0.15s ease;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  color: var(--text-high);
}

.sidebar__brand i {
  font-size: 1.4rem;
  color: var(--accent);
}

.sidebar__brand strong {
  display: block;
  font-size: 1.1rem;
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sidebar__link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border: none;
  background: transparent;
  color: var(--text-mid);
  text-align: left;
  padding: 0.65rem 0.8rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.sidebar__link[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.sidebar__link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-high);
}

.sidebar__link.active {
  background: linear-gradient(120deg, rgba(0, 212, 255, 0.2), rgba(140, 97, 255, 0.2));
  border: 1px solid rgba(0, 212, 255, 0.35);
  color: var(--text-high);
  transform: translateX(4px);
}

.notification-badge {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  transform: translateY(-50%);
  background: linear-gradient(135deg, #ff3838, #ff5c5c);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 1.25rem;
  height: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  padding: 0 0.25rem;
  box-shadow: 0 2px 6px rgba(255, 56, 56, 0.4);
}

.sidebar__link {
  position: relative;
}

.sidebar__dropdown {
  display: flex;
  flex-direction: column;
}

.sidebar__submenu {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  margin-left: 1rem;
}

.sidebar__dropdown.open .sidebar__submenu {
  max-height: 200px;
  opacity: 1;
  margin-top: 0.25rem;
}

.sidebar__dropdown.open .sidebar__link i.fa-chevron-down {
  transform: rotate(180deg);
}

.sidebar__link i.fa-chevron-down {
  transition: transform 0.3s ease;
}

.sidebar__sublink {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border: none;
  background: transparent;
  color: var(--text-mid);
  text-align: left;
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.15s ease, color 0.15s ease;
  margin: 0.15rem 0;
}

.sidebar__sublink:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-high);
}

.sidebar__sublink.active {
  background: rgba(0, 212, 255, 0.15);
  color: var(--accent);
  border-left: 2px solid var(--accent);
  padding-left: 0.7rem;
}

.sidebar__footer {
  margin-top: auto;
  font-size: 0.8rem;
  color: var(--text-low);
}

.app-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.app-panel {
  background: transparent;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: flex-start;
}

.panel-header .subtitle {
  margin-bottom: 0;
}

.hero {
  margin: 2rem auto 3rem;
  max-width: 1200px;
  padding: 3rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(3, 19, 45, 0.92), rgba(7, 12, 30, 0.92));
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  position: relative;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(0, 212, 255, 0.15), transparent 50%);
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
}

.eyebrow {
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 0.8rem;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 3.6rem);
  margin: 0 0 1rem;
}

.subtitle {
  color: var(--text-mid);
  margin: 0 0 1.5rem;
  line-height: 1.6;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.with-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.with-icon i {
  color: currentColor;
  font-size: 0.95rem;
}

.hero__hint {
  color: var(--text-low);
  font-size: 0.85rem;
}

.hero__hint code {
  background: rgba(255, 255, 255, 0.05);
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-sm);
}

.hero__panel {
  position: relative;
  z-index: 1;
  padding: 2rem;
  border-radius: var(--radius-md);
  background: rgba(7, 14, 30, 0.8);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero__panel dl {
  margin: 0;
  display: grid;
  gap: 1.5rem;
}

.hero__panel dt {
  color: var(--text-low);
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.hero__panel dd {
  margin: 0.3rem 0 0;
  font-size: 1.6rem;
  font-weight: 600;
}

.glow {
  position: absolute;
  inset: 10% 15%;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.45), transparent 60%);
  filter: blur(40px);
  z-index: -1;
}

main {
  max-width: 1200px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.card {
  background: rgba(8, 10, 26, 0.9);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.card--status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.card--dev details {
  color: var(--text-mid);
}

.card--dev input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-high);
  margin: 0.5rem 0 0.75rem;
}

.card--dev .small {
  font-size: 0.8rem;
  color: var(--text-low);
}

.session-meta {
  text-align: right;
  color: var(--text-low);
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-items: flex-end;
}

.session-meta .with-icon {
  justify-content: flex-end;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-header h2 {
  margin: 0.1rem 0;
}

.pill {
  padding: 0.4rem 1rem;
  border-radius: 999px;
  background: rgba(0, 212, 255, 0.15);
  color: var(--accent);
  font-weight: 600;
  border: 1px solid rgba(0, 212, 255, 0.3);
}

.pill--danger {
  background: rgba(255, 99, 71, 0.12);
  border-color: rgba(255, 99, 71, 0.4);
  color: #ff6357;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.summary-card {
  padding: 1.5rem;
  border-radius: var(--radius-md);
  background: var(--bg-800);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.summary-card--clickable,
.summary-card--interactive {
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.summary-card--clickable:hover,
.summary-card--interactive:hover,
.summary-card--interactive:focus {
  border-color: rgba(0, 212, 255, 0.35);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.35);
  transform: translateY(-2px);
}

.summary-card--clickable:focus-visible,
.summary-card--interactive:focus-visible {
  outline: 2px solid rgba(0, 212, 255, 0.6);
  outline-offset: 4px;
  border-color: rgba(0, 212, 255, 0.5);
}

.summary-card .label {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.7rem;
  color: var(--text-low);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.summary-card h3 {
  margin: 0.5rem 0 0.3rem;
  font-size: 1.8rem;
}

.summary-card .muted {
  color: var(--text-low);
  font-size: 0.85rem;
}

.summary-pack-actions {
  margin: 0.4rem 0 0.6rem;
}

.summary-pack-actions .btn {
  width: 100%;
}

.card--notifications {
  margin-top: 1.5rem;
}

.match-feed {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.match-feed li {
  padding: 0.9rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.match-feed li:last-child {
  border-bottom: none;
}

.match-feed__header {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-weight: 600;
}

.match-feed__meta {
  margin: 0.3rem 0;
  color: var(--text-low);
  font-size: 0.85rem;
}

.match-feed__reward {
  margin: 0;
  color: var(--accent);
  font-size: 0.85rem;
}

.card--market,
.card--roleta {
  margin-top: 1.5rem;
}

.card--admin {
  margin-top: 1.5rem;
  padding: 1.5rem;
  border-radius: var(--radius-md);
  background: var(--bg-800);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.admin-groups {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 920px) {
  .admin-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.admin-group {
  padding: 1rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.admin-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.admin-btn {
  flex: 1 1 45%;
  min-width: 160px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 212, 255, 0.45);
  background: rgba(0, 212, 255, 0.08);
  color: var(--text-high);
  padding: 0.65rem 0.75rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-btn:hover {
  background: rgba(0, 212, 255, 0.2);
  border-color: rgba(0, 212, 255, 0.9);
}

.admin-btn--danger {
  border-color: rgba(255, 99, 71, 0.5);
  background: rgba(255, 99, 71, 0.08);
  color: #ff8a7a;
}

.admin-btn--danger:hover {
  background: rgba(255, 99, 71, 0.18);
  border-color: rgba(255, 99, 71, 0.8);
}

#admin-locked-message {
  margin-bottom: 1rem;
}

.admin-feedback {
  margin-top: 1rem;
  min-height: 1.2rem;
  white-space: pre-line;
}

.admin-feedback.error {
  color: #ff9c90;
}

.market-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.market-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin: 0;
}

/* players grid: up to 5 cards per row */
.players-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
}

@media (max-width: 1200px) {
  .players-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .players-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .players-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .players-grid { grid-template-columns: 1fr; }
}

/* market player card styling (small card used in players grid) */
.market-player-card {
  padding: 1rem;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.035);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 110px;
}
.market-player-card .player-header {
  display:flex; justify-content:space-between; align-items:center; gap:0.5rem; margin-bottom:0.6rem;
}
.market-player-card .player-body { flex:1; }
.market-player-card .player-name { font-weight:700; margin:0 0 0.25rem; }
.market-player-card .player-meta { margin:0; color:var(--text-low); font-size:0.9rem; }
.market-player-card .player-footer { display:flex; justify-content:space-between; align-items:center; gap:0.5rem; margin-top:0.6rem; }
.market-player-card .player-status { color:var(--accent); font-weight:700; }

/* improve contrast for trade select */
#trade-offered-player, #trade-offered-player option {
  background: rgba(7,16,36,0.98);
  color: var(--text-high);
  border: 1px solid rgba(255,255,255,0.06);
}

/* hover / click affordance for player cards */
.market-player-card {
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  cursor: pointer;
}
.market-player-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 36px rgba(0,0,0,0.45);
  border-color: rgba(0,212,255,0.12);
}


.market-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(140px, 1fr) minmax(160px, 1fr);
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.market-row__info p {
  margin: 0.2rem 0 0;
  color: var(--text-low);
  font-size: 0.85rem;
}

.market-row__price {
  font-weight: 700;
  color: var(--accent);
  text-align: right;
}

.market-row__seller {
  text-align: right;
  color: var(--text-mid);
  font-size: 0.9rem;
}

.market-row__seller small {
  display: block;
  color: var(--text-low);
}


.chat-button {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #030611;
  padding: 0.85rem 1.1rem;
  border-radius: 999px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 75;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.chat-button:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 20px 35px rgba(0, 0, 0, 0.4);
}

.chat-button:active {
  transform: translateY(0);
}

.chat-button:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 3px;
}

.chat-panel__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 70;
}

.chat-panel__overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.chat-panel__overlay--disabled {
  display: none !important;
}

.chat-panel {
  position: fixed;
  bottom: 6rem;
  right: 1.5rem;
  width: min(420px, calc(100% - 2rem));
  height: 520px;
  border-radius: 1rem;
  background: rgba(6, 10, 24, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.55);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(20px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  z-index: 90;
}

.chat-panel.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.chat-panel--disabled {
  display: none !important;
}

.chat-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.chat-panel__header strong {
  font-size: 1.1rem;
}

.chat-panel__close {
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-high);
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.chat-panel__close:hover {
  background: rgba(255, 255, 255, 0.15);
}

.chat-panel__frame {
  flex: 1;
  border: none;
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.35);
}

.chat-panel__fallback {
  font-size: 0.85rem;
  color: var(--text-low);
  text-align: center;
}

.chat-panel__fallback a {
  color: var(--accent);
  font-weight: 600;
}

.chat-panel__embed.hidden {
  display: none;
}

.chat-panel__conversation {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chat-panel__conversation.hidden {
  display: none;
}

.chat-panel__messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.25rem 0.5rem 0.25rem 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-panel__messages::-webkit-scrollbar {
  width: 6px;
}

.chat-panel__messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
}

.chat-panel__empty {
  font-size: 0.9rem;
  color: var(--text-low);
  margin: auto;
  text-align: center;
}

.chat-message {
  padding: 0.75rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.chat-message--self {
  background: rgba(61, 186, 255, 0.08);
  border-color: rgba(61, 186, 255, 0.25);
  align-self: flex-end;
}

.chat-message--system {
  background: rgba(255, 255, 255, 0.04);
  border-style: dashed;
}


.chat-message__header {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--text-low);
  font-size: 0.8rem;
  align-items: baseline;
}

.chat-message__header time {
  font-size: 0.8rem;
  color: var(--text-low);
}

.chat-message__team {
  display: inline-block;
  margin-left: 0.4rem;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
}

.chat-message strong {
  color: var(--text-high);
  font-size: 0.9rem;
}

.chat-message p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-high);
  line-height: 1.4;
  word-wrap: break-word;
  white-space: pre-wrap;
}

.chat-panel__form {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.chat-panel__form input {
  flex: 1;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text-high);
  padding: 0.65rem 0.9rem;
  font-size: 0.95rem;
}

.chat-panel__form input:disabled {
  opacity: 0.5;
}

.chat-panel__form--disabled {
  opacity: 0.7;
}

.chat-panel__hint {
  font-size: 0.75rem;
  color: var(--text-low);
  text-align: center;
}

.bench-list {
  width: 100%;
}

.ranking-list {
  margin: 1.8rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: ranking;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.ranking-list li {
  counter-increment: ranking;
  padding: 1rem 1.2rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.ranking-list li::before {
  content: counter(ranking)".";
  font-weight: 700;
  margin-right: 0.4rem;
  color: var(--accent);
}

.ranking-meta {
  color: var(--text-low);
  font-size: 0.85rem;
}

.development-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.development-card {
  padding: 1.2rem;
  border-radius: var(--radius-md);
  background: rgba(5, 12, 30, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.development-card header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.progress-bar {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  border-radius: inherit;
}

.development-select {
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-high);
  padding: 0.5rem 0.75rem;
}

.roleta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 1rem 0;
}

.roleta-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  justify-content: space-between;
}

.roulette-visual {
  position: relative;
  width: min(320px, 80vw);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Case opening styles */
.case-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(680px, 86vw);
}
.case-window {
  position: relative;
  width: 100%;
  height: 160px;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(6,10,24,0.9), rgba(6,10,24,0.7));
  border: 1px solid rgba(255,255,255,0.03);
  display: flex;
  align-items: center;
}
.case-track {
  display: flex;
  align-items: center;
  gap: 10px;
  will-change: transform;
  padding: 0 40px; /* give breathing room */
}
.case-item {
  flex: 0 0 auto;
  width: 140px;
  height: 120px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(0,0,0,0.2));
  border: 1px solid rgba(255,255,255,0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px;
  color: var(--text-high);
  font-weight: 700;
  text-align: center;
  box-shadow: 0 8px 18px rgba(0,0,0,0.5);
}
.case-item .emoji { font-size: 1.4rem; display:block; margin-bottom:6px }
.case-item .label { font-size: 0.85rem; line-height:1.1 }
.case-center-marker {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translateX(-50%) translateY(-50%);
  width: 6px;
  height: 66%;
  background: linear-gradient(180deg, #ffd166, #ffb703);
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(255,181,3,0.18);
  z-index: 40;
  pointer-events: none;
}
.case-highlight {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translateX(-50%) translateY(-50%);
  width: 160px;
  height: 140px;
  border-radius: 12px;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.02), 0 18px 40px rgba(0,0,0,0.55);
  pointer-events: none;
  z-index: 30;
}

.case-result {
  margin-top: 1rem;
}

.roulette-wheel {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 6px solid rgba(255, 255, 255, 0.08);
  background: radial-gradient(circle at center, rgba(3, 6, 18, 0.9) 40%, transparent 40%), conic-gradient(var(--roulette-gradient, var(--accent), var(--accent-2)));
  position: relative;
  transition: transform 8s cubic-bezier(0.18, 0.66, 0.22, 1); /* mais tempo e curva mais suave */
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.45), 0 10px 30px rgba(0, 0, 0, 0.35);
}

.roulette-wheel.spinning {
  filter: drop-shadow(0 0 26px rgba(0, 212, 255, 0.45));
  animation: wheel-glow 1.6s infinite ease-in-out;
}

.roulette-pointer {
  position: absolute;
  top: -16px;
  width: 0;
  height: 0;
  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
  border-top: 26px solid var(--accent-3);
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.45));
  z-index: 3;
  transform-origin: 50% 50%;
}


@keyframes wheel-glow {
  0% { box-shadow: inset 0 0 22px rgba(0,0,0,0.45), 0 0 18px rgba(0,212,255,0.2); }
  50% { box-shadow: inset 0 0 28px rgba(0,0,0,0.45), 0 0 36px rgba(0,212,255,0.35); }
  100% { box-shadow: inset 0 0 22px rgba(0,0,0,0.45), 0 0 18px rgba(0,212,255,0.2); }
}

@keyframes pointer-shake {
  0% { transform: rotate(0deg); }
  30% { transform: rotate(-6deg); }
  60% { transform: rotate(4deg); }
  100% { transform: rotate(0deg); }
}

.roulette-wheel.spinning ~ .roleta-controls .roleta-actions .btn,
.roulette-wheel.spinning + .roleta-controls .roleta-actions .btn {
  opacity: 0.9;
}

.roulette-wheel.spinning ~ .roleta-visual .roulette-pointer,
.roulette-wheel.spinning + .roulette-pointer,
.roulette-wheel.spinning .roulette-pointer {
  animation: pointer-shake 0.9s ease-in-out infinite;
}

.roulette-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.roulette-labels span {
  position: absolute;
  left: 50%;
  top: 50%;
  transform-origin: 0 0;
  transform: rotate(var(--rotate, 0deg)) translate(0, -45%);
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-high);
  font-weight: 600;
  width: 120px;
}

.roulette-labels span small {
  display: block;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.7);
}

.roulette-center {
  position: absolute;
  width: 30%;
  height: 30%;
  border-radius: 50%;
  background: linear-gradient(135deg, #00d4ff, #8c61ff);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #030611;
  font-weight: 700;
  letter-spacing: 0.08em;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.35);
}

.roulette-pointer {
  position: absolute;
  top: -12px;
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 20px solid var(--accent-3);
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.4));
  z-index: 2;
}

.roleta-controls {
  flex: 1 1 260px;
}

.roleta-result {
  padding: 1rem;
  border-radius: var(--radius-md);
  background: rgba(34, 170, 34, 0.12);
  border: 1px solid rgba(34, 170, 34, 0.35);
}

.roleta-result.error {
  background: rgba(255, 92, 92, 0.12);
  border-color: rgba(255, 92, 92, 0.4);
}

.roleta-prizes {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
}

.roleta-prizes li {
  padding: 0.9rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.03);
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.event-card {
  padding: 1.2rem;
  border-radius: var(--radius-md);
  background: rgba(8, 10, 26, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.event-card .tag {
  display: inline-flex;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(0, 212, 255, 0.15);
  color: var(--accent);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.event-card footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
}

.cup-admin-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.6rem;
}

.cup-admin-actions .btn {
  flex: 1 1 auto;
  min-width: 120px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 1rem 0;
  font-size: 0.9rem;
}

.form-field input,
.form-field select,
.form-select {
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-high);
  padding: 0.6rem 0.75rem;
  font-family: inherit;
  font-size: inherit;
}

.form-select {
  cursor: pointer;
  background: rgba(8, 10, 26, 0.95);
}

.form-select option {
  background: rgba(8, 10, 26, 1);
  color: var(--text-high);
  padding: 0.5rem;
}

.form-select:hover {
  background: rgba(8, 10, 26, 1);
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem 1rem;
  padding: 0.5rem 0 1rem;
}

.filter-grid .form-field {
  margin: 0;
}

.filter-actions {
  display: flex;
  align-items: flex-end;
  gap: 0.6rem;
}

.filter-actions .btn {
  flex: 1;
}

#admin-modal-fields .form-field {
  margin: 0.5rem 0;
}

#admin-modal-fields input,
#admin-modal-fields textarea,
#admin-modal-fields select {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-high);
  padding: 0.55rem 0.75rem;
  font-size: 0.95rem;
}

#admin-modal-fields textarea {
  min-height: 90px;
  resize: vertical;
}

#admin-modal-note {
  margin-top: 0.5rem;
}

.lineup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
}

.player-card {
  padding: 1.2rem;
  border-radius: var(--radius-md);
  background: linear-gradient(160deg, rgba(8, 22, 55, 0.9), rgba(5, 10, 30, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  position: relative;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.15s ease;
}

.player-card:hover {
  border-color: rgba(0, 212, 255, 0.4);
  transform: translateY(-2px);
}

.player-card header {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  color: var(--text-mid);
}

.player-body {
  min-height: 56px;
}

.player-name {
  font-size: 1.1rem;
}

.player-meta {
  margin: 0.2rem 0 0;
  color: var(--text-low);
  font-size: 0.85rem;
}

.player-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-low);
}

.player-card.injured {
  border-color: rgba(255, 92, 92, 0.6);
}

.player-card.injured::after {
  content: "Lesionado";
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 92, 92, 0.18);
  color: var(--danger);
  border: 1px solid rgba(255, 92, 92, 0.4);
}

.bench-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}

.bench-list .player-card {
  cursor: pointer;
}

.bench-list .player-footer {
  justify-content: space-between;
}

.injury-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.injury-card {
  padding: 1rem 1.2rem;
  border-radius: var(--radius-md);
  background: rgba(255, 92, 92, 0.12);
  border: 1px solid rgba(255, 92, 92, 0.3);
  min-width: 220px;
}

.injury-card strong {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--danger);
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 0.9rem 1.6rem;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn i {
  font-size: 1rem;
}

.btn--sm {
  padding: 0.55rem 1rem;
  font-size: 0.85rem;
}

.btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.btn--primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #02040c;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 212, 255, 0.35);
}

.btn--primary:hover:not(:disabled) {
  transform: translateY(-2px);
}

.btn--ghost {
  background: transparent;
  color: var(--text-high);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn--danger {
  background: linear-gradient(120deg, #ff5c5c, #ff3838);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(255, 92, 92, 0.35);
}

.btn--danger:hover:not(:disabled) {
  transform: translateY(-2px);
  background: linear-gradient(120deg, #ff3838, #ff1c1c);
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.modal__dialog {
  position: relative;
  background: rgba(7, 14, 30, 0.95);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  width: min(420px, 90vw);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal__close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  background: transparent;
  border: none;
  color: var(--text-low);
  font-size: 1.2rem;
  cursor: pointer;
}

.modal__coins {
  margin: 0;
  font-weight: 600;
  color: var(--accent);
}

.modal__cards {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.modal__cards li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  font-size: 0.9rem;
}

.modal__cards span {
  color: var(--text-low);
  font-size: 0.8rem;
}

.modal__ok {
  align-self: flex-end;
}

.modal__actions {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 0.8rem;
}

.modal__actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.modal__actions .btn {
  flex: 1;
  min-width: 120px;
  padding: 0.625rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.modal__actions .btn:only-child {
  width: 100%;
}

.transactions-modal__status {
  margin: 0.2rem 0 0;
  color: var(--danger);
  font-size: 0.9rem;
}

.transactions-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  max-height: 360px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.transactions-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.transactions-list li:last-child {
  border-bottom: none;
}

.transaction__info {
  flex: 1;
  min-width: 0;
}

.transaction__info strong {
  display: block;
  font-size: 0.95rem;
}

.transaction__meta {
  margin: 0.2rem 0 0;
  color: var(--text-low);
  font-size: 0.8rem;
}

.transaction__amount {
  font-weight: 700;
  white-space: nowrap;
}

.transaction__amount--positive {
  color: var(--success);
}

.transaction__amount--negative {
  color: var(--danger);
}

.modal__dialog--wide {
  width: min(900px, 92vw);
  max-width: 900px;
}

.match-preview-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.match-preview-chance {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0;
}

.match-preview-teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2rem;
  align-items: start;
}

.match-preview-team {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.match-preview-team h4 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--text-high);
}

.match-preview-team .muted {
  margin: 0;
  font-size: 0.85rem;
}

.match-preview-vs {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent-2);
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 2rem;
}

.match-preview-players {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.match-preview-player {
  display: grid;
  grid-template-columns: 50px 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.6rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

.match-preview-player-position {
  font-weight: 700;
  color: var(--accent-3);
  text-align: center;
  font-size: 0.8rem;
}

.match-preview-player-name {
  color: var(--text-high);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-preview-player-overall {
  color: var(--text-low);
  font-size: 0.85rem;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .modal__dialog--wide {
    width: 95vw;
    padding: 1.5rem;
  }

  .match-preview-teams {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .match-preview-vs {
    order: 1;
    padding-top: 0;
    font-size: 1.2rem;
  }

  .match-preview-team:first-child {
    order: 0;
  }

  .match-preview-team:last-child {
    order: 2;
  }
}

/* ===== Market Submenu (Dropdown) ===== */
.market-submenu {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
}

.market-submenu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  color: var(--text-mid);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.95rem;
}

.market-submenu-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text-high);
}

.market-submenu-item.active {
  background: rgba(0, 212, 255, 0.1);
  border-color: var(--accent);
  color: var(--accent);
}

.market-submenu-item i {
  font-size: 1rem;
}

.market-tab-content {
  display: none;
}

.market-tab-content.active {
  display: block;
}

.market-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.market-pagination-info {
  font-size: 0.9rem;
  color: var(--text-mid);
}

.player-footer {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-items: flex-start;
}

/* ===== Transfers Panel ===== */
.transfers-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.transfer-offer {
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: grid;
  grid-template-columns: 1fr 2fr auto;
  gap: 1.5rem;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s;
  margin-bottom: 1rem;
}

.transfer-offer:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.transfer-player {
  padding-left: 1rem;
  border-left: 4px solid var(--accent);
}

.transfer-player strong {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.transfer-player .muted {
  font-size: 0.9rem;
}

.transfer-details {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.transfer-details p {
  margin: 0;
  font-size: 0.95rem;
}

.transfer-actions {
  display: flex;
  gap: 0.75rem;
}

@media (max-width: 768px) {
  .transfer-offer {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .transfer-actions {
    justify-content: stretch;
  }

  .transfer-actions button {
    flex: 1;
  }
}

@media (min-width: 520px) {
  .modal__actions {
    flex-direction: row;
    justify-content: flex-end;
  }
  .modal__actions .btn {
    width: auto;
    min-width: 140px;
  }
}

.player-action-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

@media (min-width: 500px) {
  .player-action-buttons {
    flex-direction: row;
  }
  .player-action-buttons .btn {
    flex: 1;
  }
}

.hidden {
  display: none !important;
}

#refresh-btn {
  align-self: flex-start;
}

@media (max-width: 960px) {
  body {
    padding: 0 1rem 3rem;
  }
  .app-shell {
    flex-direction: column;
    gap: 1.5rem;
  }
  .sidebar {
    position: static;
    width: 100%;
    max-width: none;
  }
  .sidebar__nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .sidebar__link {
    flex: 1 1 calc(50% - 0.5rem);
  }
  .hero {
    padding: 2rem;
  }
  .roleta-layout {
    flex-direction: column;
  }
  .chat-button {
    bottom: 1rem;
    right: 1rem;
  }
  .chat-panel {
    bottom: 6rem;
    right: 1rem;
    width: min(420px, calc(100% - 2rem));
  }
}

@media (max-width: 640px) {
  .sidebar__nav {
    flex-wrap: nowrap;
    overflow-x: auto;
  }
  .sidebar__link {
    flex: 0 0 auto;
    white-space: nowrap;
  }
  .panel-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .hero {
    grid-template-columns: 1fr;
  }
  .filter-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
  .market-row {
    grid-template-columns: 1fr;
  }
  .ranking-list li {
    flex-direction: column;
  }
  .chat-button {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }
  .chat-panel {
    left: 1rem;
    right: 1rem;
    width: auto;
    height: min(70vh, 480px);
    bottom: 7rem;
  }
}

/* Tela de loading inicial */
.loading-fullscreen {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: radial-gradient(circle at 50% 50%, rgba(0, 212, 255, 0.15) 0, transparent 50%),
    radial-gradient(circle at 30% 70%, rgba(140, 97, 255, 0.18) 0, transparent 40%),
    var(--bg-900) !important;
  z-index: 9999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 !important;
}

.loading-fullscreen.hidden {
  display: none !important;
}

.loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Animated modals and panels: subtle fade/scale for show/hide */
.modal__overlay {
  opacity: 0;
  transition: opacity 0.22s ease;
}
.modal__dialog {
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.modal.modal--visible .modal__overlay {
  opacity: 1;
}
.modal.modal--visible .modal__dialog {
  opacity: 1;
  transform: none;
}
.modal.modal--hiding .modal__overlay {
  opacity: 0;
}
.modal.modal--hiding .modal__dialog {
  opacity: 0;
  transform: translateY(8px) scale(0.98);
}

/* Panels transitions */
.app-panel {
  opacity: 0;
  transform: translateY(6px) scale(0.995);
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.app-panel.panel--visible {
  opacity: 1;
  transform: none;
}
.app-panel.panel--hiding {
  opacity: 0;
  transform: translateY(6px) scale(0.995);
}

.loading-logo {
  width: 160px;
  height: 160px;
  object-fit: contain;
  filter: drop-shadow(0 0 40px rgba(0, 212, 255, 0.4));
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
    filter: drop-shadow(0 0 40px rgba(0, 212, 255, 0.4));
  }
  50% {
    opacity: 0.8;
    transform: scale(1.08);
    filter: drop-shadow(0 0 60px rgba(0, 212, 255, 0.6));
  }
}

.loading-spinner {
  width: 44px;
  height: 44px;
  border: 5px solid rgba(255, 255, 255, 0.1);
  border-top-color: #00d9ff;
  border-right-color: #8c61ff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.25rem;
  font-weight: 500;
  text-align: center;
  letter-spacing: 0.05em;
  animation: textPulse 2s ease-in-out infinite;
}

@keyframes textPulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

@media (max-width: 768px) {
  body {
    padding: 0 1rem 2rem;
  }

  .app-shell {
    flex-direction: column;
  }

  .sidebar {
    position: static;
    width: 100%;
    max-width: none;
    flex-direction: column;
  }

  .hero {
    padding: 2rem;
  }

  .card--status {
    flex-direction: column;
    align-items: flex-start;
  }

  .session-meta {
    text-align: left;
  }
}
