/*
 * Gaming Utilities - Glow effects, glassmorphism, animations
 */

/* ========================================
   Glow Effects
   ======================================== */
.glow-cyan   { box-shadow: var(--glow-cyan); }
.glow-purple { box-shadow: var(--glow-purple); }
.glow-green  { box-shadow: var(--glow-green); }
.glow-red    { box-shadow: var(--glow-red); }

.text-glow-cyan   { text-shadow: 0 0 10px rgba(0, 229, 255, 0.5); }
.text-glow-purple { text-shadow: 0 0 10px rgba(187, 134, 252, 0.5); }

/* ========================================
   Glass Morphism
   ======================================== */
.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
}

.glass-card {
  background: rgba(33, 38, 45, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(48, 54, 61, 0.6);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* ========================================
   Animated Status Indicators
   ======================================== */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.5rem;
  vertical-align: middle;
}
.status-dot-online {
  background: var(--accent-green);
  box-shadow: 0 0 8px rgba(57, 211, 83, 0.6);
  animation: pulse-green 2s ease-in-out infinite;
}
.status-dot-offline {
  background: var(--accent-red);
  box-shadow: 0 0 8px rgba(248, 81, 73, 0.6);
}
.status-dot-warning {
  background: var(--accent-yellow);
  box-shadow: 0 0 8px rgba(227, 179, 65, 0.6);
  animation: pulse-yellow 2s ease-in-out infinite;
}

@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 4px rgba(57, 211, 83, 0.4); }
  50% { box-shadow: 0 0 12px rgba(57, 211, 83, 0.8); }
}
@keyframes pulse-yellow {
  0%, 100% { box-shadow: 0 0 4px rgba(227, 179, 65, 0.4); }
  50% { box-shadow: 0 0 12px rgba(227, 179, 65, 0.8); }
}

/* ========================================
   Hover Animations
   ======================================== */
.hover-lift {
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}
.hover-lift:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.hover-glow-cyan:hover {
  box-shadow: 0 0 25px rgba(0, 229, 255, 0.2);
}
.hover-glow-purple:hover {
  box-shadow: 0 0 25px rgba(187, 134, 252, 0.2);
}

/* ========================================
   Fade In Animation
   ======================================== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in {
  animation: fadeIn 0.4s ease forwards;
}

/* Content sections fade in */
section.content {
  animation: fadeIn 0.3s ease;
}

/* ========================================
   Loading Spinner
   ======================================== */
.spinner-gaming {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-default);
  border-top: 3px solid var(--accent-cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ========================================
   Toast Notifications (Global)
   ======================================== */
#global-toast,
#cp-toast {
  z-index: 9999;
}
#global-toast .alert,
#cp-toast .alert {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-default) !important;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
  color: var(--text-primary) !important;
  backdrop-filter: blur(12px);
}
#global-toast .alert-success {
  border-left: 4px solid var(--accent-green) !important;
}
#global-toast .alert-danger {
  border-left: 4px solid var(--accent-red) !important;
}

/* ========================================
   Login Page Styles
   ======================================== */
.login-page {
  background: var(--bg-body) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1rem;
}

.login-box {
  width: 100%;
  max-width: 420px;
}

.login-logo {
  text-align: center;
  margin-bottom: 1.5rem;
}
.login-logo a {
  color: var(--text-primary);
  font-size: 1.75rem;
  font-weight: 700;
}

.login-box-body {
  background: rgba(33, 38, 45, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4), 0 0 80px rgba(0, 229, 255, 0.05);
}

.login-box-msg {
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.social-auth-links {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-default);
}
.social-auth-links p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ========================================
   Gradient Background for Login
   ======================================== */
.login-bg-gradient {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(0, 229, 255, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(187, 134, 252, 0.08) 0%, transparent 50%),
    var(--bg-body);
}

/* ========================================
   Outline Buttons
   ======================================== */
.btn-outline-cyan {
  color: var(--accent-cyan);
  border: 1px solid var(--accent-cyan);
  background: transparent;
  border-radius: var(--radius-md);
  padding: 0.35rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.btn-outline-cyan:hover,
.btn-outline-cyan:focus {
  background: rgba(0, 229, 255, 0.1);
  color: #fff;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.2);
  text-decoration: none;
}
.btn-outline-cyan:active {
  background: rgba(0, 229, 255, 0.2);
}

.btn-outline-green {
  color: var(--accent-green);
  border: 1px solid var(--accent-green);
  background: transparent;
  border-radius: var(--radius-md);
  padding: 0.35rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.btn-outline-green:hover,
.btn-outline-green:focus {
  background: rgba(57, 211, 83, 0.1);
  color: #fff;
  border-color: var(--accent-green);
  box-shadow: 0 0 12px rgba(57, 211, 83, 0.2);
  text-decoration: none;
}

.btn-outline-red {
  color: var(--accent-red);
  border: 1px solid var(--accent-red);
  background: transparent;
  border-radius: var(--radius-md);
  padding: 0.35rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.btn-outline-red:hover,
.btn-outline-red:focus {
  background: rgba(248, 81, 73, 0.1);
  color: #fff;
  border-color: var(--accent-red);
  box-shadow: 0 0 12px rgba(248, 81, 73, 0.2);
  text-decoration: none;
}

.btn-outline-yellow {
  color: var(--accent-yellow);
  border: 1px solid var(--accent-yellow);
  background: transparent;
  border-radius: var(--radius-md);
  padding: 0.35rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.btn-outline-yellow:hover,
.btn-outline-yellow:focus {
  background: rgba(227, 179, 65, 0.1);
  color: #fff;
  border-color: var(--accent-yellow);
  box-shadow: 0 0 12px rgba(227, 179, 65, 0.2);
  text-decoration: none;
}

/* Cancel and other quiet actions, one look everywhere (it lived in the tickets page only) */
.btn-outline-muted {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-md, 8px);
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(48, 54, 61, 0.3);
  border: 1px solid rgba(48, 54, 61, 0.5);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}
.btn-outline-muted:hover {
  color: var(--text-primary);
  background: rgba(48, 54, 61, 0.5);
  border-color: rgba(48, 54, 61, 0.8);
}

/* Icon-only buttons name themselves in a tooltip, which touch screens never show: there the
   label is printed next to the icon */
.btn-icon-label { display: none; }
@media (hover: none) {
  .btn-icon-label { display: inline; }
}

.btn-outline-purple {
  color: var(--accent-purple);
  border: 1px solid var(--accent-purple);
  background: transparent;
  border-radius: var(--radius-md);
  padding: 0.35rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.btn-outline-purple:hover,
.btn-outline-purple:focus {
  background: rgba(187, 134, 252, 0.1);
  color: #fff;
  border-color: var(--accent-purple);
  box-shadow: 0 0 12px rgba(187, 134, 252, 0.2);
  text-decoration: none;
}

.btn-outline-blue {
  color: var(--accent-blue);
  border: 1px solid var(--accent-blue);
  background: transparent;
  border-radius: var(--radius-md);
  padding: 0.35rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.btn-outline-blue:hover,
.btn-outline-blue:focus {
  background: rgba(88, 166, 255, 0.1);
  color: #fff;
  border-color: var(--accent-blue);
  box-shadow: 0 0 12px rgba(88, 166, 255, 0.2);
  text-decoration: none;
}

/* ========================================
   Server Card Styles
   ======================================== */
.server-card {
  background: rgba(33, 38, 45, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(48, 54, 61, 0.6);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

/* Game banner (Steam CDN header image) */
.server-card-banner {
  margin: -1.25rem -1.25rem 0.85rem -1.25rem;
  position: relative;
  aspect-ratio: 460 / 215;
  overflow: hidden;
}
.server-card-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.server-card-banner-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(transparent, rgba(33, 38, 45, 0.95));
  pointer-events: none;
}
.server-card:hover {
  border-color: rgba(0, 229, 255, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), 0 0 20px rgba(0, 229, 255, 0.05);
  transform: translateY(-2px);
}
.server-card.status-online {
  border-left: 3px solid var(--accent-green);
}
.server-card.status-offline {
  border-left: 3px solid var(--accent-red);
}
.server-card.status-warning {
  border-left: 3px solid var(--accent-yellow);
}
.server-card.status-installing {
  border-left: 3px solid var(--accent-purple);
}
.server-card.server-card-focus {
  border-color: rgba(0, 229, 255, 0.85);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), 0 0 24px rgba(0, 229, 255, 0.45);
}

.server-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.server-card-header .game-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  object-fit: contain;
  background: rgba(0, 0, 0, 0.2);
  padding: 4px;
}
.server-card-header .server-info {
  flex: 1;
  min-width: 0;
}
.server-card-header .server-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.server-desc {
  cursor: default;
}
.server-desc:hover {
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}
.server-name-sep {
  color: var(--text-muted);
  margin: 0 2px;
  font-weight: 400;
}
.server-qname {
  color: var(--text-secondary);
  font-weight: 400;
}
.server-desc-input {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: inherit;
  font-weight: inherit;
  padding: 0 4px;
  border-radius: 3px;
  width: 100%;
  max-width: 200px;
  outline: none;
}
.server-desc-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 2px rgba(0, 150, 255, 0.15);
}
.server-card-header .server-address-wrap {
  margin-top: 0.2rem;
}
.server-card-header .server-address-copy {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent-cyan);
  cursor: pointer;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 229, 255, 0.06);
  border: 1px solid rgba(0, 229, 255, 0.15);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  letter-spacing: 0.02em;
}
.server-card-header .server-address-copy:hover {
  background: rgba(0, 229, 255, 0.12);
  border-color: rgba(0, 229, 255, 0.35);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.15);
  color: #fff;
}
.server-card-header .server-address-copy .fa {
  font-size: 0.75rem;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}
.server-card-header .server-address-copy:hover .fa {
  opacity: 1;
}
.server-card-header .server-address-copy.copied {
  background: rgba(57, 211, 83, 0.12);
  border-color: rgba(57, 211, 83, 0.35);
  color: var(--accent-green);
}
.server-card-header .server-address-copy.copied .fa {
  opacity: 1;
}
.server-card-header .server-addr-port {
  font-size: 0.85rem;
  margin-left: 4px;
  background: rgba(0, 229, 255, 0.04);
  border: 1px solid rgba(0, 229, 255, 0.12);
}
.server-card-header .server-addr-part {
  font-size: 0.72rem;
  padding: 0.15rem 0.35rem;
  margin-left: 4px;
  opacity: 0.5;
  background: rgba(0, 229, 255, 0.03);
  border: 1px solid rgba(0, 229, 255, 0.08);
}
.server-card-header .server-addr-part:hover {
  opacity: 1;
}

/* Slot Usage Bar */
.server-slot-bar {
  margin-bottom: 0.75rem;
  padding: 0.5rem 0.65rem;
  background: rgba(22, 27, 34, 0.4);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(48, 54, 61, 0.3);
}
.slot-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}
.slot-bar-header .fa {
  margin-right: 0.25rem;
  font-size: 0.7rem;
}
.slot-bar-count {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.8rem;
}
.slot-bar-track {
  height: 5px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
}
.slot-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease, background 0.3s ease;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
}

.server-card-stats {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}
.server-stat {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.server-stat .fa {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.server-stat .stat-value {
  color: var(--text-primary);
  font-weight: 500;
}

/* Mod/Modpack info row on card */
.server-mod-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
  padding: 0.45rem 0;
}

.mod-game-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.mod-game-label .fa {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-right: 0.2rem;
}

.mod-loader-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.55rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid;
  letter-spacing: 0.02em;
}

.mod-loader-badge .fa {
  font-size: 0.68rem;
}

.mod-pack-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.55rem;
  background: rgba(139, 92, 246, 0.1);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 500;
}

.mod-pack-badge .fa {
  font-size: 0.68rem;
}

.mod-version-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.55rem;
  background: rgba(46, 204, 113, 0.08);
  color: var(--accent-green);
  border: 1px solid rgba(46, 204, 113, 0.2);
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 500;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.mod-version-badge .fa {
  font-size: 0.68rem;
}

.game-icon.modpack-icon {
  border-radius: var(--radius-sm);
  object-fit: cover;
}

/* Config file chips on card */
.server-config-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.6rem;
  padding: 0.5rem 0;
}

.config-chips-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-right: 0.2rem;
  font-weight: 500;
}

.config-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  background: rgba(0, 229, 255, 0.06);
  border: 1px solid rgba(0, 229, 255, 0.18);
  border-radius: 20px;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  text-decoration: none;
  transition: all 0.15s ease;
  cursor: pointer;
}

.config-chip:hover {
  background: rgba(0, 229, 255, 0.14);
  border-color: rgba(0, 229, 255, 0.4);
  color: var(--accent-cyan);
  text-decoration: none;
}

.config-chip .fa {
  font-size: 0.7rem;
  opacity: 0.7;
}

/* FTP Access Info Grid */
.ftp-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  width: 100%;
  margin-top: 6px;
}

.ftp-info-item {
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(48, 54, 61, 0.3);
  border-radius: var(--radius-sm, 6px);
  padding: 6px 10px;
}

.ftp-info-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 2px;
}

.ftp-info-value {
  font-size: 0.82rem;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  word-break: break-all;
}

.ftp-info-value .fa {
  opacity: 0.3;
  font-size: 0.7rem;
  flex-shrink: 0;
  transition: opacity 0.15s ease, color 0.15s ease;
}

.ftp-info-value:hover .fa {
  opacity: 0.8;
}

.ftp-info-value .fa-copy:hover {
  color: var(--accent-cyan);
  opacity: 1;
}

.ftp-info-value .ftp-toggle-pass:hover {
  color: var(--accent-cyan);
  opacity: 1;
}

.ftp-copied-hint {
  font-size: 0.65rem;
  color: var(--accent-green, #3fb950);
  font-family: inherit;
  margin-left: 2px;
}

/* Auto-Restart Toggle */
.server-autorestart-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(48, 54, 61, 0.3);
}
.ar-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  user-select: none;
}
.ar-toggle-input {
  display: none;
}
.ar-toggle-slider {
  position: relative;
  width: 32px;
  height: 18px;
  background: rgba(248, 81, 73, 0.25);
  border: 1px solid rgba(248, 81, 73, 0.4);
  border-radius: 9px;
  transition: background 0.2s, border-color 0.2s;
  flex-shrink: 0;
}
.ar-toggle-slider::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  background: #f85149;
  border-radius: 50%;
  transition: transform 0.2s, background 0.2s;
}
.ar-toggle-input:checked + .ar-toggle-slider {
  background: rgba(63, 185, 80, 0.25);
  border-color: rgba(63, 185, 80, 0.4);
}
.ar-toggle-input:checked + .ar-toggle-slider::after {
  transform: translateX(14px);
  background: #3fb950;
}
.ar-toggle-input:disabled + .ar-toggle-slider {
  opacity: 0.5;
  cursor: wait;
}
.ar-toggle-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 500;
}
.ar-toggle-tooltip {
  color: var(--text-muted);
  font-size: 0.78rem;
  cursor: help;
}

.server-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(48, 54, 61, 0.5);
}

/* Cloud Billing Bar */
.server-billing-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.6rem;
  padding: 0.5rem 0.65rem;
  background: rgba(0, 229, 255, 0.04);
  border: 1px solid rgba(0, 229, 255, 0.12);
  border-radius: var(--radius-sm, 4px);
}
.billing-info-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
  align-items: center;
  min-width: 0;
}
.billing-chip {
  font-size: 0.78rem;
  color: var(--text-secondary, #adb5bd);
  white-space: nowrap;
}
.billing-chip .fa {
  color: var(--accent-cyan, #00e5ff);
  margin-right: 0.2rem;
  font-size: 0.7rem;
}
.billing-chip-warn {
  color: var(--accent-yellow, #ffc107);
}
.billing-chip-warn .fa {
  color: var(--accent-yellow, #ffc107);
}
.billing-chip-renew-on {
  color: var(--accent-green, #39d353);
  background: rgba(57, 211, 83, 0.08);
  border-color: rgba(57, 211, 83, 0.2);
}
.billing-chip-renew-off {
  color: #ff6b6b;
  background: rgba(255, 107, 107, 0.08);
  border-color: rgba(255, 107, 107, 0.2);
}
.billing-link {
  flex-shrink: 0;
  color: var(--accent-cyan, #00e5ff);
  font-size: 0.8rem;
  opacity: 0.7;
  transition: opacity 0.15s ease;
  text-decoration: none;
}
.billing-link:hover {
  opacity: 1;
  color: var(--accent-cyan, #00e5ff);
  text-decoration: none;
}

/* On-Hold / Installing Card */
.server-card.status-installing .install-progress {
  margin-top: 0.75rem;
}
.install-progress-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
}
.install-progress-bar .fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-cyan));
  transition: width 0.6s ease;
}

/* ========================================
   Misc AdminLTE Overrides
   ======================================== */

/* Notification menu items (dropdown) */
.dropdown-menu > li.user-header,
.dropdown-menu > li.user-footer,
.dropdown-menu > li.user-body {
  background: transparent;
}

.menu > li > a {
  color: var(--text-primary);
  padding: 0.5rem 1rem;
  display: block;
}
.menu > li > a:hover {
  background: var(--bg-surface-hover);
}
.menu > li > a .fa.danger { color: var(--accent-red); }
.menu > li > a .fa.warning { color: var(--accent-yellow); }

/* Small box (AdminLTE widget) */
.small-box {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
}
.small-box .inner h3 { color: var(--text-primary); }
.small-box .inner p { color: var(--text-secondary); }
.small-box .icon { color: rgba(0, 229, 255, 0.15); }
.small-box .small-box-footer {
  background: var(--bg-surface);
  color: var(--text-secondary);
  border-top: 1px solid var(--border-default);
}

/* Description block */
.description-block {
  border-right-color: var(--border-default);
}
.description-header {
  color: var(--text-primary);
}
.description-text {
  color: var(--text-muted);
}

/* ========================================
   Game Order Grid — Nitrado-style
   ======================================== */

/* Search bar */
.game-search-bar {
  width: 100%;
  padding: 0.65rem 0.75rem 0.65rem 2.25rem;
  font-size: 0.9rem;
  color: var(--text-primary, #e6edf3);
  background: rgba(22, 27, 34, 0.6);
  border: 1px solid rgba(48, 54, 61, 0.6);
  border-radius: var(--radius-md, 8px);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.game-search-bar:focus {
  border-color: var(--accent-cyan, #00e5ff);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.1), 0 0 20px rgba(0, 229, 255, 0.06);
}
.game-search-bar::placeholder {
  color: var(--text-muted, #6c757d);
}

/* Game grid */
.game-order-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

/* Individual game card */
.game-order-card {
  background: rgba(22, 27, 34, 0.85);
  border: 1px solid rgba(48, 54, 61, 0.5);
  border-radius: var(--radius-lg, 12px);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.game-order-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.0) 0%, rgba(187, 134, 252, 0.0) 100%);
  transition: background 0.4s ease;
  z-index: 0;
  pointer-events: none;
}
.game-order-card:hover::before {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.05) 0%, rgba(187, 134, 252, 0.05) 100%);
}
.game-order-card:hover {
  border-color: rgba(0, 229, 255, 0.5);
  transform: translateY(-4px);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.5),
    0 0 30px rgba(0, 229, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.game-order-card.selected {
  border-color: var(--accent-cyan, #00e5ff);
  box-shadow:
    0 0 0 2px rgba(0, 229, 255, 0.25),
    0 12px 40px rgba(0, 229, 255, 0.15),
    0 0 50px rgba(0, 229, 255, 0.08);
}
.game-order-card.selected::after {
  content: '\f00c';
  font-family: FontAwesome;
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  background: var(--accent-cyan, #00e5ff);
  color: #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 900;
  z-index: 2;
  box-shadow: 0 2px 12px rgba(0, 229, 255, 0.5);
}

/* Game card image — bigger, more dramatic */
.game-order-card-img {
  width: 100%;
  aspect-ratio: 460 / 215;
  overflow: hidden;
  position: relative;
  background: rgba(0, 0, 0, 0.3);
}
.game-order-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), filter 0.3s ease;
}
.game-order-card:hover .game-order-card-img img {
  transform: scale(1.08);
  filter: brightness(1.15) saturate(1.1);
}
.game-order-card-img::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to top, rgba(22, 27, 34, 0.95) 0%, transparent 100%);
  pointer-events: none;
}

/* Local game icon (for non-Steam games like Minecraft) */
.game-order-card-icon {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.06) 0%, rgba(187, 134, 252, 0.06) 100%);
  padding: 1rem;
}
.game-order-card-icon img {
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
}
.game-order-card:hover .game-order-card-icon img {
  transform: scale(1.12);
}

/* Fallback icon when no Steam image */
.game-order-card-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.08) 0%, rgba(187, 134, 252, 0.08) 100%);
  font-size: 3rem;
  color: var(--accent-cyan, #00e5ff);
  opacity: 0.5;
}

/* Game card body (name + price) — more spacious */
.game-order-card-body {
  padding: 1rem 1.25rem 1.25rem;
  position: relative;
  z-index: 1;
}
.game-order-card-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary, #e6edf3);
  margin-bottom: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Price styling — looks cheap and attractive */
.game-order-card-price {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
}
.game-price-label {
  font-size: 0.6rem;
  color: var(--text-muted, #6c757d);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.65;
}
.game-price-value {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--accent-green, #00e676);
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  text-shadow:
    0 0 20px rgba(0, 230, 118, 0.45),
    0 0 40px rgba(0, 230, 118, 0.15);
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.game-price-period {
  font-size: 0.6rem;
  color: var(--text-muted, #6c757d);
  opacity: 0.55;
  letter-spacing: 0.03em;
}

/* Game card meta (shorten, slots) */
.game-order-card-meta {
  font-size: 0.75rem;
  color: var(--text-muted, #6c757d);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ========================================
   Order Configuration Panel
   ======================================== */
.order-config-panel {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 992px) {
  .order-config-panel {
    grid-template-columns: 1fr;
  }
}

/* Order summary sticky card */
.order-summary-card {
  position: sticky;
  top: 80px;
}

/* Summary rows */
.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(48, 54, 61, 0.3);
}
.summary-row:last-of-type {
  border-bottom: none;
}
.summary-label {
  font-size: 0.8rem;
  color: var(--text-muted, #6c757d);
  font-weight: 500;
}
.summary-value {
  font-size: 0.85rem;
  color: var(--text-primary, #e6edf3);
  font-weight: 600;
  text-align: right;
}
.summary-specs {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.75rem;
}

/* Summary price */
.summary-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 229, 255, 0.3), transparent);
  margin: 1rem 0;
}
.summary-price-row {
  text-align: center;
  padding: 0.5rem 0;
}
.summary-price {
  font-size: 2rem;
  font-weight: 900;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  color: var(--accent-green, #00e676);
  text-shadow: 0 0 20px rgba(0, 230, 118, 0.3);
  line-height: 1;
}
.summary-price-period {
  font-size: 0.8rem;
  color: var(--text-muted, #6c757d);
  margin-top: 0.25rem;
}

/* Order button */
.btn-order {
  display: block;
  width: 100%;
  padding: 0.85rem 1.5rem;
  margin-top: 1rem;
  font-size: 1rem;
  font-weight: 700;
  color: #000;
  background: linear-gradient(135deg, var(--accent-green, #00e676) 0%, #00c853 100%);
  border: none;
  border-radius: var(--radius-md, 8px);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: relative;
  overflow: hidden;
}
.btn-order::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}
.btn-order:hover::before {
  left: 100%;
}
.btn-order:hover {
  box-shadow:
    0 4px 20px rgba(0, 230, 118, 0.4),
    0 0 40px rgba(0, 230, 118, 0.15);
  transform: translateY(-1px);
}
.btn-order:active {
  transform: translateY(0);
}
.btn-order:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
.btn-order .fa {
  margin-right: 0.4rem;
}

/* Free 48-hour trial: the button under the order button, the badges, the chips in the lists */
.btn-trial {
  display: block;
  width: 100%;
  padding: 0.7rem 1.25rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--accent-green, #00e676);
  background: rgba(0, 230, 118, 0.08);
  border: 1px solid rgba(0, 230, 118, 0.55);
  border-radius: var(--radius-md, 8px);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.btn-trial:hover {
  background: rgba(0, 230, 118, 0.16);
  box-shadow: 0 0 24px rgba(0, 230, 118, 0.18);
}
.btn-trial .fa {
  margin-right: 0.4rem;
}
.game-trial-chip,
.pkg-trial-badge,
.trial-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 700;
  color: #000;
  background: var(--accent-green, #00e676);
  border-radius: 10px;
  white-space: nowrap;
}
.game-trial-chip {
  margin-top: 0.35rem;
  padding: 2px 8px;
  font-size: 0.68rem;
}
.pkg-trial-badge {
  padding: 2px 8px;
  font-size: 0.65rem;
  text-transform: uppercase;
}
.trial-chip {
  padding: 2px 9px;
  font-size: 0.75rem;
}
.trial-chip.trial-chip-ending {
  background: #e3b341;
}

/* Above a button that concludes a paid contract (userpanel_cloud.php, cloudLegalLineHtml()):
   the express request to start at once and the line with the terms and the withdrawal policy */
.bj-start-consent {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  margin: 0 0 0.75rem 0;
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
  color: var(--text-secondary, #8b949e);
  cursor: pointer;
}
.bj-start-consent input[type="checkbox"] {
  flex-shrink: 0;
  margin: 0.15rem 0 0 0;
  width: 16px;
  height: 16px;
  accent-color: var(--accent-cyan, #00e5ff);
  cursor: pointer;
}
.bj-legal-line {
  margin: 0 0 1rem 0;
  font-size: 0.8rem;
  line-height: 1.4;
  text-align: center;
  color: var(--text-muted, #6c757d);
}
.bj-legal-line a {
  color: var(--accent-cyan, #00e5ff);
  text-decoration: underline;
}
.bj-legal-line a:hover {
  color: var(--text-primary, #fff);
}

/* ========================================
   Location Picker Grid
   ======================================== */
.location-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}

.location-tile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: rgba(22, 27, 34, 0.5);
  border: 1px solid rgba(48, 54, 61, 0.4);
  border-radius: var(--radius-md, 8px);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.location-tile::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0) 0%, rgba(0, 229, 255, 0) 100%);
  transition: background 0.3s ease;
  pointer-events: none;
}
.location-tile:hover {
  border-color: rgba(0, 229, 255, 0.3);
  background: rgba(22, 27, 34, 0.7);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
.location-tile:hover::before {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.04) 0%, rgba(0, 229, 255, 0.01) 100%);
}
.location-tile.selected {
  border-color: var(--accent-cyan, #00e5ff);
  background: rgba(0, 229, 255, 0.06);
  box-shadow:
    0 0 0 2px rgba(0, 229, 255, 0.15),
    0 4px 20px rgba(0, 229, 255, 0.1);
}
.location-tile.selected::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--accent-cyan, #00e5ff);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
}

.location-tile-flag {
  font-size: 1.75rem;
  line-height: 1;
  flex-shrink: 0;
}

.location-tile-info {
  flex: 1;
  min-width: 0;
}
.location-tile-country {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-primary, #e6edf3);
}
.location-tile-city {
  font-size: 0.75rem;
  color: var(--text-muted, #6c757d);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.location-tile-right {
  text-align: right;
  flex-shrink: 0;
}
.location-tile-latency {
  font-size: 0.75rem;
  font-weight: 600;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  margin-bottom: 0.15rem;
}
.location-tile-price {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary, #adb5bd);
}

/* Latency colors */
.latency-good {
  color: var(--accent-green, #00e676) !important;
  text-shadow: 0 0 8px rgba(0, 230, 118, 0.3);
}
.latency-medium {
  color: var(--accent-yellow, #ffc107) !important;
  text-shadow: 0 0 8px rgba(255, 193, 7, 0.3);
}
.latency-poor {
  color: var(--accent-red, #ff4444) !important;
  text-shadow: 0 0 8px rgba(255, 68, 68, 0.3);
}

/* Package tiles — vertical card layout */
.package-tile {
  padding: 1.2rem;
  border-radius: 12px;
  background: rgba(22, 27, 34, 0.6);
  border: 1px solid rgba(48, 54, 61, 0.5);
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.4rem;
}
.package-tile .location-tile-flag {
  font-size: 2.2rem !important;
  margin-bottom: 0.3rem;
}
.package-tile .location-tile-info {
  width: 100%;
  text-align: center;
}
.package-tile .location-tile-country {
  font-size: 1.05rem !important;
}
.package-tile .location-tile-right {
  text-align: center;
  width: 100%;
  margin-top: 0.5rem;
  padding-top: 0.6rem;
  border-top: 1px solid rgba(48, 54, 61, 0.3);
}
.package-tile .location-tile-price {
  font-size: 1.3rem !important;
  color: var(--accent-green, #00e676) !important;
}
/* Package grid: 1-3 columns depending on count */
#location-grid {
  gap: 1.25rem;
}

/* ========================================
   Config Form Elements
   ======================================== */
.config-form-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.config-form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary, #adb5bd);
  margin-bottom: 0.4rem;
}
.config-form-group label .fa {
  color: var(--accent-cyan, #00e5ff);
  margin-right: 0.3rem;
  font-size: 0.75rem;
}

.config-input,
.config-select {
  width: 100%;
  padding: 0.55rem 0.75rem;
  font-size: 0.875rem;
  color: var(--text-primary, #e6edf3);
  background: rgba(22, 27, 34, 0.6);
  border: 1px solid rgba(48, 54, 61, 0.6);
  border-radius: var(--radius-sm, 6px);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}
.config-input:focus,
.config-select:focus {
  border-color: var(--accent-cyan, #00e5ff);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.1);
}
.config-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236c757d' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
  cursor: pointer;
}
.config-select option {
  background: #161b22;
  color: #e6edf3;
}

.config-hint {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.72rem;
  color: var(--text-muted, #6c757d);
}

/* Dice/random button */
.btn-dice {
  padding: 0.55rem 0.85rem;
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: var(--radius-sm, 6px);
  color: var(--accent-cyan, #00e5ff);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
}
.btn-dice:hover {
  background: rgba(0, 229, 255, 0.15);
  border-color: rgba(0, 229, 255, 0.5);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.2);
}
.btn-dice:active {
  transform: rotate(180deg);
}

/* ========================================
   Modpack Picker Grid
   ======================================== */
.modpack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.75rem;
}
.modpack-card {
  background: var(--glass-bg, rgba(255,255,255,0.05));
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 0.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}
.modpack-card:hover {
  border-color: rgba(187, 134, 252, 0.4);
  background: rgba(187, 134, 252, 0.08);
  transform: translateY(-2px);
}
.modpack-card.selected {
  border-color: var(--accent-purple, #bb86fc);
  background: rgba(187, 134, 252, 0.12);
  box-shadow: 0 0 16px rgba(187, 134, 252, 0.25);
}
.modpack-card-img {
  width: 80px;
  height: 80px;
  margin: 0.25rem auto 0.5rem;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(0,0,0,0.2);
}
.modpack-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.modpack-card-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--text-muted, #6c757d);
}
.modpack-card-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary, #e0e0e0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 0.25rem;
}
/* Vanilla / Modded primary type cards */
.mc-type-primary {
  min-width: 140px;
}
.mc-type-primary .modpack-card-img {
  width: 100%;
  height: 90px;
  margin: 0 auto 0.5rem;
}
.mc-type-primary .modpack-card-fallback {
  border-radius: 8px;
}
.mc-type-primary .modpack-card-name {
  font-size: 1rem;
  font-weight: 700;
}
.mc-type-primary.selected {
  border-color: var(--accent-cyan, #00e5ff);
  background: rgba(0, 229, 255, 0.08);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.2);
}
.mc-type-primary:hover {
  border-color: rgba(0, 229, 255, 0.4);
  background: rgba(0, 229, 255, 0.06);
}

@media (max-width: 600px) {
  .modpack-grid {
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 0.5rem;
  }
  .modpack-card-img {
    width: 60px;
    height: 60px;
  }
}

/* ========================================
   Reinstall Flow (Cloud Detail Page)
   ======================================== */

/* Panel */
.ri-panel {
  position: relative;
  overflow: hidden;
}
.ri-panel::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(187, 134, 252, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

/* Header */
.ri-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.ri-header-left {}
.ri-title {
  margin: 0 0 0.25rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary, #e6edf3);
}
.ri-title .fa {
  margin-right: 0.4rem;
}
.ri-subtitle {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted, #6c757d);
}

/* Current modpack badge */
.ri-current-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  background: rgba(187, 134, 252, 0.06);
  border: 1px solid rgba(187, 134, 252, 0.2);
  border-radius: var(--radius-md, 8px);
}
.ri-current-img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
}
.ri-current-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-purple, #bb86fc);
  font-weight: 600;
}
.ri-current-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-primary, #e6edf3);
}
.ri-current-version {
  font-size: 0.75rem;
  color: var(--text-muted, #6c757d);
}

/* Search */
.ri-search-wrap {
  margin-bottom: 1rem;
}

/* Step system */
.ri-step {
  animation: fadeIn 0.35s ease;
}
.ri-step-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(48, 54, 61, 0.4);
}
.ri-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-purple, #bb86fc), var(--accent-cyan, #00e5ff));
  color: #000;
  font-weight: 800;
  font-size: 0.8rem;
  flex-shrink: 0;
}
.ri-step-label {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary, #e6edf3);
}
.ri-step-back {
  margin-left: auto;
  background: none;
  border: 1px solid rgba(48, 54, 61, 0.5);
  color: var(--text-muted, #6c757d);
  border-radius: var(--radius-md, 8px);
  padding: 0.3rem 0.75rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.ri-step-back:hover {
  border-color: var(--accent-cyan, #00e5ff);
  color: var(--accent-cyan, #00e5ff);
  background: rgba(0, 229, 255, 0.05);
}

/* Modpack grid enhancements */
.ri-modpack-grid {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}
.ri-mp-card {
  position: relative;
}
.ri-mp-desc {
  font-size: 0.65rem;
  color: var(--text-muted, #6c757d);
  margin-top: 0.15rem;
  line-height: 1.3;
  padding: 0 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ri-mp-source {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.3rem;
}
.ri-mp-source .fa {
  font-size: 0.55rem;
}
.ri-mp-current-tag {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 0.55rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--accent-purple, #bb86fc);
  color: #000;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

/* Version panel */
.ri-version-panel {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 768px) {
  .ri-version-panel {
    grid-template-columns: 1fr;
  }
}

/* Selected modpack preview */
.ri-preview-card {
  text-align: center;
  padding: 1rem;
  background: rgba(22, 27, 34, 0.5);
  border: 1px solid rgba(48, 54, 61, 0.4);
  border-radius: var(--radius-lg, 12px);
  min-width: 140px;
}
.ri-preview-img {
  width: 80px;
  height: 80px;
  border-radius: 10px;
  object-fit: cover;
  margin-bottom: 0.5rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}
.ri-preview-fallback {
  width: 80px;
  height: 80px;
  border-radius: 10px;
  background: rgba(187, 134, 252, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.5rem;
  font-size: 2rem;
  color: var(--accent-purple, #bb86fc);
}
.ri-preview-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary, #e6edf3);
}

/* Version cards */
.ri-version-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.ri-version-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(22, 27, 34, 0.4);
  border: 1px solid rgba(48, 54, 61, 0.4);
  border-radius: var(--radius-md, 8px);
  cursor: pointer;
  transition: all 0.2s ease;
}
.ri-version-card:hover {
  border-color: rgba(187, 134, 252, 0.4);
  background: rgba(187, 134, 252, 0.06);
  transform: translateX(4px);
}
.ri-version-card.selected {
  border-color: var(--accent-purple, #bb86fc);
  background: rgba(187, 134, 252, 0.1);
  box-shadow: 0 0 16px rgba(187, 134, 252, 0.15);
}
.ri-version-card.ri-version-current {
  border-left: 3px solid var(--accent-purple, #bb86fc);
}
.ri-version-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.ri-version-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary, #e6edf3);
}
.ri-version-mc {
  font-size: 0.75rem;
  color: var(--text-muted, #6c757d);
  background: rgba(0, 0, 0, 0.2);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}
.ri-version-badges {
  display: flex;
  gap: 0.4rem;
}
.ri-badge {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}
.ri-badge-current {
  background: rgba(187, 134, 252, 0.15);
  color: var(--accent-purple, #bb86fc);
  border: 1px solid rgba(187, 134, 252, 0.3);
}
.ri-badge-latest {
  background: rgba(0, 230, 118, 0.12);
  color: var(--accent-green, #00e676);
  border: 1px solid rgba(0, 230, 118, 0.3);
}

/* Install confirmation */
.ri-confirm-wrap {
  text-align: center;
  max-width: 500px;
  margin: 0 auto;
}
.ri-confirm-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: center;
  padding: 1rem;
  background: rgba(22, 27, 34, 0.5);
  border: 1px solid rgba(48, 54, 61, 0.4);
  border-radius: var(--radius-lg, 12px);
  margin-bottom: 1rem;
}
.ri-confirm-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-purple, #bb86fc), var(--accent-cyan, #00e5ff));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #000;
  flex-shrink: 0;
}
.ri-confirm-details {
  text-align: left;
}
.ri-confirm-mp {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary, #e6edf3);
}
.ri-confirm-ver {
  font-size: 0.85rem;
  color: var(--text-muted, #6c757d);
}
.ri-confirm-warning {
  font-size: 0.8rem;
  color: var(--accent-cyan, #00e5ff);
  background: rgba(0, 229, 255, 0.06);
  border: 1px solid rgba(0, 229, 255, 0.15);
  border-radius: var(--radius-md, 8px);
  padding: 0.6rem 1rem;
  margin-bottom: 0.75rem;
}
.ri-confirm-warning-danger {
  font-size: 0.8rem;
  color: var(--accent-red, #f85149);
  background: rgba(248, 81, 73, 0.06);
  border: 1px solid rgba(248, 81, 73, 0.15);
  border-radius: var(--radius-md, 8px);
  padding: 0.6rem 1rem;
  margin-bottom: 1rem;
}

/* Install button */
.ri-install-btn {
  display: block;
  width: 100%;
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: #000;
  background: linear-gradient(135deg, var(--accent-purple, #bb86fc) 0%, #9c64ff 100%);
  border: none;
  border-radius: var(--radius-md, 8px);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: relative;
  overflow: hidden;
  margin-bottom: 0.5rem;
}
.ri-install-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}
.ri-install-btn:hover::before {
  left: 100%;
}
.ri-install-btn:hover {
  box-shadow:
    0 4px 20px rgba(187, 134, 252, 0.4),
    0 0 40px rgba(187, 134, 252, 0.15);
  transform: translateY(-1px);
}
.ri-install-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}
.ri-back-link {
  display: inline-block;
  background: none;
  border: none;
  color: var(--text-muted, #6c757d);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0.4rem 0;
  transition: color 0.2s ease;
}
.ri-back-link:hover {
  color: var(--accent-cyan, #00e5ff);
}

/* Progress panel */
.ri-progress-panel {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: rgba(22, 27, 34, 0.5);
  border: 1px solid rgba(48, 54, 61, 0.4);
  border-radius: var(--radius-lg, 12px);
}
.ri-progress-steps {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1rem;
}
.ri-prog-step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted, #6c757d);
  transition: all 0.3s ease;
}
.ri-prog-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(48, 54, 61, 0.6);
  border: 2px solid rgba(48, 54, 61, 0.8);
  flex-shrink: 0;
  transition: all 0.3s ease;
}
.ri-prog-step.ri-prog-active .ri-prog-dot {
  background: var(--accent-purple, #bb86fc);
  border-color: var(--accent-purple, #bb86fc);
  box-shadow: 0 0 8px rgba(187, 134, 252, 0.5);
  animation: pulse-purple 1.5s ease-in-out infinite;
}
.ri-prog-step.ri-prog-active .ri-prog-label {
  color: var(--text-primary, #e6edf3);
}
.ri-prog-step.ri-prog-done .ri-prog-dot {
  background: var(--accent-green, #00e676);
  border-color: var(--accent-green, #00e676);
  box-shadow: 0 0 8px rgba(0, 230, 118, 0.4);
  animation: none;
}
.ri-prog-step.ri-prog-done .ri-prog-label {
  color: var(--accent-green, #00e676);
}
.ri-prog-step.ri-prog-done .ri-prog-label::after {
  content: ' \2713';
}
.ri-prog-step.ri-prog-error .ri-prog-dot {
  background: var(--accent-red, #f85149);
  border-color: var(--accent-red, #f85149);
  box-shadow: 0 0 8px rgba(248, 81, 73, 0.4);
  animation: none;
}
.ri-prog-step.ri-prog-error .ri-prog-label {
  color: var(--accent-red, #f85149);
}

@keyframes pulse-purple {
  0%, 100% { box-shadow: 0 0 4px rgba(187, 134, 252, 0.3); }
  50% { box-shadow: 0 0 12px rgba(187, 134, 252, 0.7); }
}

/* Progress bar */
.ri-progress-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}
.ri-progress-fill {
  height: 100%;
  width: 0;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent-purple, #bb86fc), var(--accent-cyan, #00e5ff));
  transition: width 0.8s ease;
}
.ri-progress-status {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-secondary, #adb5bd);
}

/* Success banner */
.ri-success-banner {
  text-align: center;
  padding: 1.5rem;
  margin-top: 1rem;
  animation: fadeIn 0.5s ease;
}
.ri-success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-green, #00e676), #00c853);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #000;
  margin-bottom: 0.75rem;
  box-shadow: 0 0 30px rgba(0, 230, 118, 0.4);
}
.ri-success-text {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-green, #00e676);
}
.ri-success-sub {
  font-size: 0.8rem;
  color: var(--text-muted, #6c757d);
  margin-top: 0.25rem;
}

/* Responsive */
@media (max-width: 768px) {
  .ri-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .ri-modpack-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  }
}

/* ========================================
   Server Control Panel (Cloud Detail)
   ======================================== */
.sc-panel {
  padding: 1.25rem 1.5rem;
}
.sc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.sc-title {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary, #e6edf3);
}
.sc-title .fa {
  margin-right: 0.35rem;
}

/* Status indicator */
.sc-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.sc-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: all 0.3s ease;
}
.sc-dot-checking {
  background: var(--accent-yellow, #e3b341);
  box-shadow: 0 0 8px rgba(227, 179, 65, 0.5);
  animation: pulse-yellow 1.5s ease-in-out infinite;
}
.sc-dot-running {
  background: var(--accent-green, #00e676);
  box-shadow: 0 0 8px rgba(0, 230, 118, 0.6);
  animation: pulse-green 2s ease-in-out infinite;
}
.sc-dot-stopped {
  background: var(--accent-red, #f85149);
  box-shadow: 0 0 8px rgba(248, 81, 73, 0.5);
  animation: none;
}
.sc-status-text {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary, #adb5bd);
}

/* Control buttons */
.sc-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.sc-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid;
  border-radius: var(--radius-md, 8px);
  cursor: pointer;
  transition: all 0.25s ease;
  background: transparent;
}
.sc-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}
.sc-btn-start {
  color: var(--accent-green, #00e676);
  border-color: var(--accent-green, #00e676);
}
.sc-btn-start:not(:disabled):hover {
  background: rgba(0, 230, 118, 0.1);
  box-shadow: 0 0 16px rgba(0, 230, 118, 0.2);
  transform: translateY(-1px);
}
/* Restart interrupts the game: the caution colour, as on the server cards */
.sc-btn-restart {
  color: var(--accent-yellow, #e3b341);
  border-color: var(--accent-yellow, #e3b341);
}
.sc-btn-restart:not(:disabled):hover {
  background: rgba(227, 179, 65, 0.1);
  box-shadow: 0 0 16px rgba(227, 179, 65, 0.2);
  transform: translateY(-1px);
}
.sc-btn-stop {
  color: var(--accent-red, #f85149);
  border-color: var(--accent-red, #f85149);
}
.sc-btn-stop:not(:disabled):hover {
  background: rgba(248, 81, 73, 0.1);
  box-shadow: 0 0 16px rgba(248, 81, 73, 0.2);
  transform: translateY(-1px);
}

/* Feedback bar */
.sc-feedback {
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md, 8px);
  background: rgba(22, 27, 34, 0.5);
  border: 1px solid rgba(48, 54, 61, 0.4);
  font-size: 0.85rem;
  color: var(--text-secondary, #adb5bd);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

@media (max-width: 768px) {
  .sc-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .sc-actions {
    width: 100%;
  }
  .sc-btn {
    flex: 1;
    justify-content: center;
  }
}

/* ── Player Management Panel ── */
.pm-player-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.75rem;
}
.pm-player-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  transition: border-color 0.2s, background 0.2s;
}
.pm-player-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
}
.pm-player-card.pm-player-banned {
  border-color: rgba(244, 67, 54, 0.15);
  background: rgba(244, 67, 54, 0.04);
}
.pm-player-head {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  image-rendering: pixelated;
  background: rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}
.pm-player-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.pm-player-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary, #e6edf3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pm-player-role {
  font-size: 0.75rem;
  color: var(--accent-green, #4caf50);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.pm-player-actions {
  margin-left: auto;
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}
.pm-action-btn {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary, #8b949e);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  padding: 0;
}
.pm-action-btn:hover {
  transform: translateY(-1px);
}
.pm-btn-op:hover {
  background: rgba(76, 175, 80, 0.2);
  border-color: rgba(76, 175, 80, 0.3);
  color: var(--accent-green, #4caf50);
}
.pm-btn-deop:hover {
  background: rgba(255, 152, 0, 0.2);
  border-color: rgba(255, 152, 0, 0.3);
  color: #ff9800;
}
.pm-btn-ban:hover {
  background: rgba(244, 67, 54, 0.2);
  border-color: rgba(244, 67, 54, 0.3);
  color: #f44336;
}
.pm-btn-kick:hover {
  background: rgba(255, 152, 0, 0.2);
  border-color: rgba(255, 152, 0, 0.3);
  color: #ff9800;
}
.pm-btn-pardon:hover {
  background: rgba(76, 175, 80, 0.2);
  border-color: rgba(76, 175, 80, 0.3);
  color: var(--accent-green, #4caf50);
}

/* Toast notification */
.pm-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(30, 30, 30, 0.95);
  color: var(--accent-green, #4caf50);
  border: 1px solid rgba(76, 175, 80, 0.3);
  padding: 0.6rem 1.5rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
.pm-toast-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 768px) {
  .pm-player-grid {
    grid-template-columns: 1fr;
  }
  .pm-player-card {
    padding: 0.6rem 0.75rem;
  }
}

/* ========================================
   Server Updating Badge
   ======================================== */
.server-updating-badge {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.5rem 0.85rem;
  margin: 0.5rem 0;
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: var(--radius-sm, 6px);
  color: var(--accent-cyan, #00e5ff);
  font-size: 0.82rem;
  font-weight: 600;
  animation: updating-pulse 2s ease-in-out infinite;
}
.server-updating-badge .fa {
  font-size: 0.9rem;
}
/* A cloud server whose game did not get installed: what went wrong, how to try again */
.server-install-error {
  padding: 0.5rem 0.85rem;
  margin: 0.5rem 0;
  background: rgba(248, 81, 73, 0.08);
  border: 1px solid rgba(248, 81, 73, 0.35);
  border-radius: var(--radius-sm, 6px);
  color: var(--accent-red, #f85149);
  font-size: 0.82rem;
  line-height: 1.4;
}
.update-progress-text {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.update-progress-bar {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
}
.update-progress-fill {
  height: 100%;
  width: 0;
  border-radius: 2px;
  background: var(--accent-cyan, #00e5ff);
  transition: width 0.6s ease;
  box-shadow: 0 0 6px rgba(0, 229, 255, 0.3);
}
@keyframes updating-pulse {
  0%, 100% {
    border-color: rgba(0, 229, 255, 0.2);
    box-shadow: none;
  }
  50% {
    border-color: rgba(0, 229, 255, 0.45);
    box-shadow: 0 0 12px rgba(0, 229, 255, 0.12);
  }
}

/* ========================================
 * GAME SWITCH SECTION
 * ======================================== */

.gs-panel {
  position: relative;
}

.gs-game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.gs-game-card {
  position: relative;
}
.gs-game-card.gs-current {
  opacity: 0.6;
  pointer-events: none;
  cursor: default !important;
}
.gs-game-card.gs-current::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg, 12px);
  border: 2px solid rgba(0, 229, 255, 0.3);
  pointer-events: none;
}

.gs-current-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 229, 255, 0.15);
  color: var(--accent-cyan, #00e5ff);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(0, 229, 255, 0.3);
  z-index: 2;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Confirmation panel */
.gs-confirm-panel {
  padding: 0.5rem 0;
}

.gs-switch-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 1.25rem;
  background: rgba(22, 27, 34, 0.6);
  border: 1px solid rgba(48, 54, 61, 0.5);
  border-radius: var(--radius-lg, 12px);
  margin: 1rem 0;
}
.gs-from, .gs-to {
  text-align: center;
}
.gs-from-label {
  font-size: 0.7rem;
  color: var(--text-muted, #6c757d);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}
.gs-from-name, .gs-to-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary, #e6edf3);
}
.gs-arrow-icon {
  font-size: 1.5rem;
  color: var(--accent-cyan, #00e5ff);
  flex-shrink: 0;
}
.gs-confirm-img {
  width: 184px;
  height: 69px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  border: 1px solid rgba(48, 54, 61, 0.5);
}
.gs-confirm-fallback {
  width: 184px;
  height: 69px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(48, 54, 61, 0.3);
  border-radius: 8px;
  margin-bottom: 0.5rem;
  color: var(--text-muted, #6c757d);
  font-size: 1.5rem;
}

/* Warning box */
.gs-warning {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: rgba(248, 81, 73, 0.08);
  border: 1px solid rgba(248, 81, 73, 0.2);
  border-radius: var(--radius-md, 8px);
  color: var(--text-secondary, #b1bac4);
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 1rem 0;
}
.gs-warning > i {
  color: var(--accent-orange, #f0883e);
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Minecraft options */
.gs-mc-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary, #e6edf3);
  margin-bottom: 0.5rem;
}
.gs-mc-selector {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.gs-mc-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: rgba(22, 27, 34, 0.6);
  border: 1px solid rgba(48, 54, 61, 0.5);
  border-radius: var(--radius-md, 8px);
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-secondary, #b1bac4);
  transition: all 0.2s ease;
}
.gs-mc-option:hover {
  border-color: rgba(0, 229, 255, 0.3);
}
.gs-mc-option input[type="radio"] {
  display: none;
}
.gs-mc-option-selected {
  border-color: var(--accent-cyan, #00e5ff);
  background: rgba(0, 229, 255, 0.06);
  color: var(--text-primary, #e6edf3);
}

/* Live progress bar (larger, more visible) */
.gs-progress-bar-large {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 0.75rem;
}
.gs-progress-fill-large {
  height: 100%;
  width: 0;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent-cyan, #00e5ff), var(--accent-purple, #bb86fc));
  transition: width 0.8s ease;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
}

/* Live progress text */
.gs-live-text {
  font-size: 0.85rem;
  color: var(--text-secondary, #b1bac4);
  margin-top: 0.5rem;
  padding: 0.4rem 0.6rem;
  background: rgba(22, 27, 34, 0.5);
  border-radius: var(--radius-sm, 6px);
  font-family: 'SFMono-Regular', Consolas, monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Installation console log (terminal style) */
.install-console {
  margin-top: 1.2rem;
  border-radius: var(--radius-md, 8px);
  overflow: hidden;
  border: 1px solid rgba(139, 148, 158, 0.15);
}
.install-console-header {
  background: rgba(13, 17, 23, 0.95);
  color: var(--text-secondary, #8b949e);
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(139, 148, 158, 0.12);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.install-console-header i {
  color: var(--accent-green, #00e676);
  font-size: 0.8rem;
}
.install-console-output {
  background: rgba(13, 17, 23, 0.9);
  color: #c9d1d9;
  padding: 0.75rem;
  margin: 0;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.75rem;
  line-height: 1.5;
  max-height: 300px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 148, 158, 0.3) transparent;
}
.install-console-output::-webkit-scrollbar {
  width: 6px;
}
.install-console-output::-webkit-scrollbar-track {
  background: transparent;
}
.install-console-output::-webkit-scrollbar-thumb {
  background: rgba(139, 148, 158, 0.3);
  border-radius: 3px;
}
.install-console-output::-webkit-scrollbar-thumb:hover {
  background: rgba(139, 148, 158, 0.5);
}

/* ── Game Update Modal ── */
.gu-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10001;
  backdrop-filter: blur(2px);
  align-items: center;
  justify-content: center;
}
.gu-modal {
  max-width: 460px;
  width: 90%;
  background: var(--bg-card, #21262d);
  border: 1px solid var(--border-default, #30363d);
  border-radius: var(--radius-lg, 12px);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  transition: max-width 0.3s ease;
}
.gu-modal.gu-modal-wide {
  max-width: 640px;
}
.gu-header {
  padding: 1.25rem 1.5rem 0.75rem;
  border-bottom: 1px solid rgba(48, 54, 61, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.gu-header h4 {
  color: var(--text-primary, #e6edf3);
  margin: 0;
  font-size: 1rem;
}
.gu-header h4 i {
  color: var(--accent-cyan, #00e5ff);
  margin-right: 0.5rem;
}
.gu-close-btn {
  background: none;
  border: none;
  color: var(--text-muted, #6e7681);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0.25rem;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}
.gu-close-btn:hover {
  color: var(--text-primary, #e6edf3);
  background: rgba(139, 148, 158, 0.1);
}
.gu-body {
  padding: 1.25rem 1.5rem;
}
.gu-loading {
  text-align: center;
  padding: 2rem 0;
  color: var(--text-secondary, #8b949e);
  font-size: 0.85rem;
}
.gu-loading i.fa-spinner {
  font-size: 1.5rem;
  color: var(--accent-cyan, #00e5ff);
  display: block;
  margin-bottom: 0.5rem;
}
.gu-label {
  display: block;
  color: var(--text-secondary, #8b949e);
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
}
.gu-select {
  width: 100%;
  padding: 0.55rem 2.25rem 0.55rem 0.75rem;
  font-size: 0.9rem;
  color: var(--text-primary, #e6edf3);
  background: rgba(22, 27, 34, 0.6);
  border: 1px solid rgba(48, 54, 61, 0.6);
  border-radius: var(--radius-sm, 6px);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
  margin-bottom: 0.75rem;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b949e' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
}
.gu-select:focus {
  border-color: var(--accent-cyan, #00e5ff);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.1);
}
.gu-select:hover {
  border-color: rgba(139, 148, 158, 0.4);
}
.gu-select option {
  background: #161b22;
  color: #e6edf3;
  padding: 0.4rem 0.5rem;
  font-size: 0.9rem;
}
.gu-input {
  width: 100%;
  padding: 0.55rem 0.75rem;
  font-size: 0.9rem;
  color: var(--text-primary, #e6edf3);
  background: rgba(22, 27, 34, 0.6);
  border: 1px solid rgba(48, 54, 61, 0.6);
  border-radius: var(--radius-sm, 6px);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
  box-sizing: border-box;
}
.gu-input:focus {
  border-color: var(--accent-cyan, #00e5ff);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.1);
}
.gu-input::placeholder {
  color: var(--text-muted, #6e7681);
}
.gu-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary, #8b949e);
  font-size: 0.85rem;
  cursor: pointer;
  margin-bottom: 1rem;
}
.gu-checkbox-label input[type="checkbox"] {
  accent-color: var(--accent-cyan, #00e5ff);
  width: 1rem;
  height: 1rem;
}
.gu-warning {
  background: rgba(227, 179, 65, 0.1);
  border: 1px solid rgba(227, 179, 65, 0.25);
  border-radius: var(--radius-sm, 6px);
  padding: 0.75rem;
  margin-bottom: 0.25rem;
}
.gu-warning p {
  color: #e3b341;
  font-size: 0.8rem;
  margin: 0;
  line-height: 1.5;
}
.gu-warning i {
  margin-right: 0.35rem;
}
.gu-footer {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  justify-content: flex-end;
  border-top: 1px solid rgba(48, 54, 61, 0.3);
}
.gu-btn {
  cursor: pointer;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-sm, 6px);
  font-size: 0.85rem;
  font-family: inherit;
  transition: background 0.2s, border-color 0.2s, opacity 0.2s;
}
.gu-btn:disabled {
  opacity: 0.5;
  cursor: default;
}
.gu-btn-cancel {
  background: rgba(48, 54, 61, 0.4);
  border: 1px solid rgba(48, 54, 61, 0.6);
  color: var(--text-secondary, #8b949e);
}
.gu-btn-cancel:hover {
  background: rgba(48, 54, 61, 0.6);
  color: var(--text-primary, #e6edf3);
}
.gu-btn-primary {
  background: rgba(0, 150, 255, 0.2);
  border: 1px solid rgba(0, 150, 255, 0.4);
  color: var(--accent-cyan, #00e5ff);
  font-weight: 600;
}
.gu-btn-primary:hover:not(:disabled) {
  background: rgba(0, 150, 255, 0.3);
  border-color: rgba(0, 150, 255, 0.6);
}

/* Responsive */
@media (max-width: 768px) {
  .gs-game-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
  }
  .gs-switch-arrow {
    flex-direction: column;
    gap: 0.75rem;
  }
  .gs-arrow-icon {
    transform: rotate(90deg);
  }
  .gs-confirm-img {
    width: 140px;
    height: 53px;
  }
  .gs-mc-selector {
    flex-direction: column;
  }
}
