

:root {
  --rpc-bg: #0d100f;
  --rpc-card: #151a17;
  --rpc-card-hover: #1c231f;
  --rpc-border: rgba(255, 255, 255, 0.08);
  --rpc-border-glow: rgba(164, 237, 187, 0.3);
  --rpc-accent: #a4edbb;
  --rpc-accent-hover: #c1f7d1;
  --rpc-purple: #8b5cf6;
  --rpc-cyan: #2dd4bf;
  --rpc-red: #ef4444;
  --rpc-text: #f0f2ef;
  --rpc-text-muted: #8f9c94;
  --rpc-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --rpc-pixel-font: 'Minecraft', 'Press Start 2P', monospace, sans-serif;
}


.pixelated {
  image-rendering: -moz-crisp-edges;
  image-rendering: -webkit-crisp-edges;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}


.checkerboard {
  background-color: #101711;
  background-image:
    linear-gradient(45deg, #151a17 25%, transparent 25%),
    linear-gradient(-45deg, #151a17 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #151a17 75%),
    linear-gradient(-45deg, transparent 75%, #151a17 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
}

body.rpc-page {
  background-color: var(--rpc-bg);
  background-image: none;
  color: var(--rpc-text);
  font-family: var(--rpc-font);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow-x: hidden;
}


.rpc-navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 2rem;
  background: rgba(13, 16, 15, 0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--rpc-border);
}

.rpc-nav-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: #fff;
}

.rpc-nav-brand img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.rpc-nav-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.rpc-nav-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(6, 182, 212, 0.2));
  color: #34d399;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.rpc-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}


.rpc-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  text-decoration: none;
}

.rpc-btn-primary {
  background: #a4edbb;
  color: #102719;
  box-shadow: none;
  border: none;
  font-weight: 700;
}

.rpc-btn-primary:hover {
  background: #c1f7d1;
  box-shadow: none;
  transform: translateY(-1px);
}

.rpc-btn-secondary {
  background: #151a17;
  color: #ccd5ce;
  border-color: var(--rpc-border);
}

.rpc-btn-secondary:hover {
  background: #1c231f;
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.rpc-btn-outline {
  background: #151a17;
  color: var(--rpc-accent);
  border-color: rgba(164, 237, 187, 0.3);
}

.rpc-btn-outline:hover {
  background: rgba(164, 237, 187, 0.08);
  border-color: var(--rpc-accent);
}

.rpc-pack-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #151a17;
  border: 1px solid var(--rpc-border);
  padding: 0.45rem 0.9rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.rpc-pack-pill:hover {
  background: #1c231f;
  border-color: var(--rpc-border-glow);
}

.rpc-pill-count {
  background: var(--rpc-accent);
  color: #102719;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
}


.rpc-hero {
  max-width: 1300px;
  margin: 2.5rem auto 1.5rem auto;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.rpc-hero h1 {
  font-size: clamp(32px, 4vw, 54px);
  font-weight: 800;
  margin: 0 0 0.5rem 0;
  color: #fff;
  letter-spacing: -2px;
}

.rpc-hero p {
  color: var(--rpc-text-muted);
  font-size: 1.05rem;
  max-width: 650px;
  margin: 0 0 1.5rem 0;
  line-height: 1.6;
}


.rpc-controls-bar {
  max-width: 1300px;
  margin: 0 auto 1.5rem auto;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.rpc-search-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.rpc-search-wrapper {
  position: relative;
  flex: 1;
  min-width: 280px;
}

.rpc-search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--rpc-text-muted);
  pointer-events: none;
}

.rpc-search-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  background: #101711;
  border: 1px solid var(--rpc-border);
  border-radius: 10px;
  color: #f0f2ef;
  font-size: 0.95rem;
  outline: none;
  transition: all 0.2s;
}

.rpc-search-input:focus {
  border-color: var(--rpc-accent);
  box-shadow: 0 0 0 1px var(--rpc-accent);
}

.rpc-clear-search {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--rpc-text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  display: none;
}

.rpc-clear-search:hover {
  color: #fff;
}


/* ===== PRESETY Z WGRANYCH PACZEK ===== */
.rpc-presets-section {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.75rem 0.9rem;
  background: #151a17;
  border: 1px solid var(--rpc-border);
  border-radius: 12px;
}

.rpc-presets-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.rpc-presets-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.rpc-presets-hint {
  font-size: 0.72rem;
  color: var(--rpc-text-muted);
}

.rpc-presets-scroll {
  display: flex;
  align-items: stretch;
  gap: 0.55rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.rpc-preset-chip {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.75rem 0.45rem 0.5rem;
  background: #101711;
  border: 1px solid var(--rpc-border);
  border-radius: 8px;
  color: #ccd5ce;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
  text-align: left;
}

.rpc-preset-chip:hover {
  background: #1c231f;
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
  transform: translateY(-1px);
}

.rpc-preset-chip.active {
  background: rgba(164, 237, 187, 0.1);
  border-color: var(--rpc-accent);
  color: #d1f6dc;
  box-shadow: none;
}

.rpc-preset-chip.locked {
  opacity: 0.65;
  border-style: dashed;
}

.rpc-preset-chip.locked:hover {
  opacity: 0.95;
  border-color: #f59e0b;
}

.rpc-preset-chip-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.rpc-preset-chip-icon.fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.05);
}

.rpc-preset-chip-body {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  line-height: 1.15;
}

.rpc-preset-chip-name {
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.rpc-preset-chip-meta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.68rem;
  color: var(--rpc-text-muted);
}

.rpc-preset-chip-res {
  font-size: 0.62rem;
  font-weight: 800;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--rpc-accent);
}

.rpc-preset-chip.locked .rpc-preset-chip-res {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

.rpc-card-source-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: rgba(59, 130, 246, 0.85);
  color: #fff;
  letter-spacing: 0.02em;
  z-index: 2;
  backdrop-filter: blur(4px);
}

.rpc-card.preset-missing {
  opacity: 0.55;
}

.rpc-card.preset-missing .rpc-card-source-badge {
  background: rgba(107, 114, 128, 0.8);
}

.rpc-card-presets-count {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--rpc-accent);
  background: rgba(16, 185, 129, 0.1);
  padding: 0.15rem 0.45rem;
  border-radius: 9999px;
  margin-bottom: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.rpc-card-actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  width: 100%;
}

.rpc-card-btn-preset {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.35);
  color: #93c5fd;
}

.rpc-card-btn-preset:hover {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #fff;
}

/* Wzory w bocznym pasku edytora pikseli */
.rpc-editor-presets-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 190px;
  overflow-y: auto;
  padding-right: 0.2rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.rpc-editor-preset-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--rpc-border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
}

.rpc-editor-preset-item:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateX(2px);
}

.rpc-editor-preset-item.active {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--rpc-accent);
}

.rpc-editor-preset-img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
}

.rpc-editor-preset-info {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  overflow: hidden;
}

.rpc-editor-preset-name {
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rpc-editor-preset-meta {
  font-size: 0.62rem;
  color: var(--rpc-text-muted);
}

/* Modal szybkiego wyboru wzorów (Preset Picker Window) */
.rpc-preset-picker-window {
  width: 820px;
  max-width: 95vw;
  max-height: 85vh;
  background: #0f111a;
  border: 1px solid var(--rpc-border);
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: rpcModalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.rpc-preset-picker-body {
  padding: 1.25rem 1.5rem 1.75rem 1.5rem;
  overflow-y: auto;
}

.rpc-preset-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1rem;
}

.rpc-picker-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--rpc-border);
  border-radius: 14px;
  padding: 1rem 0.85rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  transition: all 0.2s;
}

.rpc-picker-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.rpc-picker-card.active-in-pack {
  border-color: rgba(16, 185, 129, 0.5);
  background: rgba(16, 185, 129, 0.06);
}

.rpc-picker-img-wrap {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.rpc-picker-img-wrap img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.4));
}

.rpc-picker-name {
  font-size: 0.84rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.15rem;
}

.rpc-picker-res-badge {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--rpc-accent);
  margin-bottom: 0.75rem;
}

.rpc-picker-actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  width: 100%;
}

.rpc-picker-btn {
  width: 100%;
  padding: 0.45rem 0;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: all 0.15s;
}

.rpc-picker-btn.primary {
  background: var(--rpc-accent);
  color: #090a0f;
}

.rpc-picker-btn.primary:hover {
  background: #34d399;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.35);
}

.rpc-picker-btn.secondary {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--rpc-border);
  color: #e5e7eb;
}

.rpc-picker-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.rpc-picker-card.locked {
  border-style: dashed;
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.02);
}

.rpc-picker-card.locked:hover {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.05);
}

.rpc-picker-res-badge.locked {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.rpc-picker-btn.locked {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

.rpc-picker-btn.locked:hover {
  background: #f59e0b;
  border-color: #f59e0b;
  color: #090a0f;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}

.rpc-editor-preset-item.locked {
  border-style: dashed;
  border-color: rgba(245, 158, 11, 0.3);
  opacity: 0.8;
}

.rpc-editor-preset-item.locked:hover {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.08);
  opacity: 1;
}

/* Modal potwierdzenia pobrania paczki */
.rpc-confirm-window {
  width: 540px;
  max-width: 95vw;
  background: #0d100f;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: rpcModalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.rpc-confirm-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.35rem 1.5rem 1rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #151a17;
}

.rpc-confirm-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(164, 237, 187, 0.12);
  border: 1px solid rgba(164, 237, 187, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.rpc-confirm-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
}

.rpc-confirm-subtitle {
  font-size: 0.78rem;
  color: var(--rpc-text-muted);
  margin-top: 0.15rem;
}

.rpc-confirm-body {
  padding: 1.35rem 1.5rem;
}

.rpc-confirm-notice {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--rpc-border);
  border-radius: 12px;
  padding: 1rem 1.15rem;
  font-size: 0.84rem;
  line-height: 1.5;
  color: #d1d5db;
}

.rpc-confirm-notice.warning {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.06);
}

.rpc-confirm-notice.info {
  border-color: rgba(99, 102, 241, 0.4);
  background: rgba(99, 102, 241, 0.06);
}

.rpc-confirm-notice.success {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.06);
}

.rpc-confirm-actions {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.5rem 1.35rem 1.5rem;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid var(--rpc-border);
}

.rpc-confirm-btn {
  flex: 1;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.15s;
}

.rpc-confirm-btn.primary {
  background: var(--rpc-accent);
  color: #102719;
  font-weight: 700;
}

.rpc-confirm-btn.primary:hover {
  background: #c1f7d1;
  box-shadow: none;
}

.rpc-confirm-btn.secondary {
  background: #151a17;
  border-color: var(--rpc-border);
  color: #ccd5ce;
}

.rpc-confirm-btn.secondary:hover {
  background: #1c231f;
  color: #fff;
}

.rpc-category-tabs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.4rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.rpc-category-tab {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--rpc-border);
  color: #d1d5db;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.rpc-category-tab:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.rpc-category-tab.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(6, 182, 212, 0.15));
  border-color: rgba(16, 185, 129, 0.5);
  color: #34d399;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.2);
}


.rpc-grid-container {
  max-width: 1300px;
  margin: 0 auto 3rem auto;
  padding: 0 1.5rem;
}

.rpc-grid-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--rpc-text-muted);
}

.rpc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.15rem;
}


.rpc-card {
  background: #151a17;
  border: 1px solid var(--rpc-border);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  transition: all 0.22s ease;
}

.rpc-card:hover {
  background: #19221c;
  border-color: rgba(164, 237, 187, 0.35);
  transform: translateY(-2px);
  box-shadow: none;
}

.rpc-card.modified {
  border-color: rgba(164, 237, 187, 0.45);
  box-shadow: none;
}

.rpc-card-badge {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  font-size: 0.65rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  background: rgba(164, 237, 187, 0.15);
  color: #a4edbb;
  border: 1px solid rgba(164, 237, 187, 0.3);
}

.rpc-card-img-wrap {
  width: 96px;
  height: 96px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85rem;
  background: #101711;
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

.rpc-card-img-wrap img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
  transition: transform 0.2s ease;
}

.rpc-card:hover .rpc-card-img-wrap img {
  transform: scale(1.12);
}

.rpc-card-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  margin: 0 0 0.2rem 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.rpc-card-subtitle {
  font-size: 0.72rem;
  color: var(--rpc-text-muted);
  margin-bottom: 0.85rem;
}

.rpc-card-btn {
  width: 100%;
  padding: 0.5rem 0;
  background: #101711;
  border: 1px solid var(--rpc-border);
  border-radius: 8px;
  color: #ccd5ce;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.2s;
}

.rpc-card-btn:hover {
  background: var(--rpc-accent);
  color: #102719;
  border-color: var(--rpc-accent);
  font-weight: 700;
}

.rpc-card-reset-btn {
  background: none;
  border: none;
  color: var(--rpc-red);
  font-size: 0.72rem;
  cursor: pointer;
  margin-top: 0.4rem;
  text-decoration: underline;
  opacity: 0.8;
}

.rpc-card-reset-btn:hover {
  opacity: 1;
}


.rpc-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.rpc-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.rpc-editor-window {
  background: #0d100f;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  width: 100%;
  max-width: 960px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.9);
}

.rpc-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #151a17;
}

.rpc-editor-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.rpc-editor-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0;
  color: #fff;
}

.rpc-editor-close {
  background: none;
  border: none;
  color: var(--rpc-text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  transition: all 0.2s;
}

.rpc-editor-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}


.rpc-editor-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}


.rpc-tools-sidebar {
  width: 72px;
  background: #101711;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 0;
  gap: 0.6rem;
}

.rpc-tool-btn {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #151a17;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #ccd5ce;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}

.rpc-tool-btn:hover {
  background: #1c231f;
  color: #fff;
}

.rpc-tool-btn.active {
  background: var(--rpc-accent);
  color: #102719;
  border-color: var(--rpc-accent);
  box-shadow: none;
}

.rpc-tool-divider {
  width: 32px;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 0.3rem 0;
}


.rpc-canvas-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #090b0a;
  padding: 1.5rem;
  position: relative;
  /* Płótno przesuwamy transformacją (pan), więc scena tylko przycina */
  overflow: hidden;
  touch-action: none;
  user-select: none;
}

/* Kursor "łapki" gdy trzymana jest spacja / trwa przeciąganie widoku */
.rpc-canvas-stage.pan-ready,
.rpc-canvas-stage.pan-ready canvas {
  cursor: grab;
}

.rpc-canvas-stage.panning,
.rpc-canvas-stage.panning canvas {
  cursor: grabbing;
}

.rpc-canvas-viewport {
  position: relative;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  transform-origin: center center;
  transition: transform 0.08s ease-out;
  will-change: transform;
  flex-shrink: 0;
  max-width: 100%;
  max-height: 100%;
}

/* W trakcie przeciągania animacja powodowałaby gumowanie widoku */
.rpc-canvas-viewport.rpc-no-transition {
  transition: none;
}

#rpcDrawingCanvas,
#rpcGridCanvas,
.rpc-canvas-viewport canvas {
  display: block;
  cursor: crosshair;
  image-rendering: -moz-crisp-edges !important;
  image-rendering: -webkit-crisp-edges !important;
  image-rendering: pixelated !important;
  image-rendering: crisp-edges !important;
}

#rpcGridCanvas {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
}

.rpc-canvas-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  /* Powiększone płótno nie może zasłonić paska zoomu */
  position: relative;
  z-index: 2;
}

.rpc-zoom-toolbar {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--rpc-border);
  border-radius: 8px;
  padding: 0.2rem 0.4rem;
}

.rpc-zoom-btn {
  background: transparent;
  border: none;
  color: var(--rpc-text-muted);
  font-size: 0.82rem;
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  line-height: 1;
}

.rpc-zoom-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transform: scale(1.1);
}

.rpc-zoom-btn:active {
  transform: scale(0.95);
}

.rpc-zoom-level {
  font-family: monospace, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--rpc-accent);
  min-width: 44px;
  text-align: center;
  cursor: pointer;
  padding: 0.2rem 0.35rem;
  border-radius: 4px;
  user-select: none;
}

.rpc-zoom-level:hover {
  background: rgba(16, 185, 129, 0.12);
}

.rpc-zoom-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--rpc-border);
  border-radius: 8px;
  padding: 0.3rem 0.75rem;
  font-size: 0.8rem;
  color: var(--rpc-text-muted);
}


.rpc-properties-sidebar {
  width: 260px;
  background: rgba(0, 0, 0, 0.25);
  border-left: 1px solid var(--rpc-border);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  overflow-y: auto;
}

.rpc-section-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--rpc-text-muted);
  margin: 0 0 0.5rem 0;
}


.rpc-color-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.rpc-color-preview {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.rpc-color-preview input[type="color"] {
  position: absolute;
  top: -10px;
  left: -10px;
  width: 64px;
  height: 64px;
  opacity: 0;
  cursor: pointer;
}

.rpc-hex-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--rpc-border);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  color: #fff;
  font-family: monospace;
  font-size: 0.85rem;
}


.rpc-swatches-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.4rem;
}

.rpc-swatch {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: transform 0.15s;
}

.rpc-swatch:hover {
  transform: scale(1.15);
  border-color: #fff;
}


.rpc-recolor-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--rpc-border);
  border-radius: 10px;
  padding: 0.75rem;
}

.rpc-slider-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  margin-bottom: 0.35rem;
  color: #d1d5db;
}

.rpc-range-slider {
  width: 100%;
  accent-color: var(--rpc-accent);
  cursor: pointer;
}


.rpc-previews-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.rpc-preview-box {
  background: #12151f;
  border: 1px solid var(--rpc-border);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
}

.rpc-preview-box span {
  font-size: 0.65rem;
  color: var(--rpc-text-muted);
  margin-top: 0.25rem;
}


.rpc-editor-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--rpc-border);
  background: rgba(255, 255, 255, 0.02);
}


.rpc-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.rpc-drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

.rpc-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 440px;
  height: 100vh;
  background: #0d0f16;
  border-left: 1px solid var(--rpc-border);
  z-index: 1001;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -12px 0 36px rgba(0, 0, 0, 0.7);
}

.rpc-drawer.active {
  transform: translateX(0);
}

.rpc-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--rpc-border);
}

.rpc-drawer-body {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.rpc-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.rpc-form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #d1d5db;
}

.rpc-form-input, .rpc-form-select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--rpc-border);
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  color: #fff;
  font-size: 0.9rem;
  outline: none;
}

.rpc-form-input:focus, .rpc-form-select:focus {
  border-color: var(--rpc-accent);
}

.rpc-drawer-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.rpc-drawer-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--rpc-border);
  border-radius: 10px;
  padding: 0.55rem 0.85rem;
}

.rpc-drawer-item-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.rpc-drawer-item-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.rpc-drawer-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--rpc-border);
  background: rgba(0, 0, 0, 0.3);
}


@media (max-width: 768px) {
  .rpc-navbar {
    padding: 0.75rem 1rem;
  }
  .rpc-nav-title {
    font-size: 1rem;
  }
  .rpc-hero h1 {
    font-size: 1.7rem;
  }
  .rpc-editor-body {
    flex-direction: column;
  }
  .rpc-tools-sidebar {
    width: 100%;
    flex-direction: row;
    height: 52px;
    padding: 0 0.5rem;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--rpc-border);
  }
  .rpc-properties-sidebar {
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--rpc-border);
  }
}


.rpc-btn-discord {
  background: #5865F2;
  color: #fff;
  box-shadow: 0 4px 14px rgba(88, 101, 242, 0.35);
  font-weight: 700;
}
.rpc-btn-discord:hover {
  background: #4752c4;
  box-shadow: 0 6px 20px rgba(88, 101, 242, 0.5);
  transform: translateY(-1px);
}

.rpc-btn-discord-lg {
  background: #5865F2;
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
  padding: 0.9rem 1.8rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  box-shadow: 0 8px 24px rgba(88, 101, 242, 0.4);
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  width: 100%;
  box-sizing: border-box;
}
.rpc-btn-discord-lg:hover {
  background: #4752c4;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(88, 101, 242, 0.55);
}

.rpc-user-chip {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--rpc-border);
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.85rem;
}

.rpc-user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 9999px;
  object-fit: cover;
  border: 1px solid #10b981;
}

.rpc-user-name {
  font-weight: 700;
  color: #fff;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rpc-btn-logout {
  background: none;
  border: none;
  color: var(--rpc-text-muted);
  cursor: pointer;
  font-size: 0.95rem;
  padding: 0.2rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}
.rpc-btn-logout:hover {
  color: #ef4444;
}


.rpc-login-window {
  background: #0e111a;
  border: 1px solid rgba(88, 101, 242, 0.35);
  border-radius: 20px;
  padding: 2.25rem 2rem;
  max-width: 480px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.85), 0 0 32px rgba(88, 101, 242, 0.2);
  position: relative;
}

.rpc-login-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: rgba(88, 101, 242, 0.15);
  border: 1px solid rgba(88, 101, 242, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: #5865F2;
  box-shadow: 0 0 24px rgba(88, 101, 242, 0.3);
}

.rpc-login-window h2 {
  font-size: 1.5rem;
  font-weight: 900;
  margin: 0 0 0.5rem 0;
  color: #fff;
}

.rpc-login-window p {
  color: var(--rpc-text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0 0 1.5rem 0;
}

.rpc-login-features {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: 100%;
  margin-bottom: 1.75rem;
  text-align: left;
}

.rpc-login-feat {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--rpc-border);
  padding: 0.6rem 0.85rem;
  border-radius: 10px;
  font-size: 0.85rem;
  color: #e5e7eb;
}

.rpc-login-close {
  background: none;
  border: none;
  color: var(--rpc-text-muted);
  font-size: 0.82rem;
  margin-top: 1rem;
  cursor: pointer;
  text-decoration: underline;
}
.rpc-login-close:hover {
  color: #fff;
}


.rpc-cooldown-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--rpc-border);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
  transition: all 0.2s;
}

.rpc-cooldown-card.active-cooldown {
  background: rgba(239, 68, 68, 0.06);
  border-color: rgba(239, 68, 68, 0.35);
}

.rpc-cooldown-card.ready-cooldown {
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(16, 185, 129, 0.3);
}

.rpc-cooldown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 700;
}

.rpc-cooldown-timer {
  font-family: monospace;
  font-size: 0.95rem;
  font-weight: 800;
  color: #f87171;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.rpc-cooldown-desc {
  font-size: 0.74rem;
  color: var(--rpc-text-muted);
  line-height: 1.4;
}


/* Wybór rozdzielczości tekstury (limit zależny od rangi) */
.rpc-res-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
  margin-bottom: 0.45rem;
}

.rpc-res-btn {
  padding: 0.45rem 0.2rem;
  border-radius: 8px;
  border: 1px solid var(--rpc-border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--rpc-text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}

.rpc-res-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.rpc-res-btn.active {
  background: var(--rpc-accent);
  border-color: var(--rpc-accent);
  color: #090a0f;
}

.rpc-res-btn.locked {
  opacity: 0.55;
  cursor: pointer;
}

.rpc-res-btn.locked:hover {
  border-color: rgba(245, 158, 11, 0.5);
  color: #fbbf24;
}

.rpc-res-badge {
  display: block;
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  margin-top: 0.1rem;
}

.rpc-res-badge.vip { color: #a5b4fc; }
.rpc-res-badge.svip { color: #fbbf24; }

.rpc-res-hint {
  font-size: 0.65rem;
  color: var(--rpc-text-muted);
  line-height: 1.4;
}

/* Okno zachęty do zakupu rangi */
.rpc-upsell-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(6px);
  z-index: 4000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.rpc-upsell-overlay.active { display: flex; }

.rpc-upsell-box {
  background: #0c0d14;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 18px;
  padding: 1.75rem;
  max-width: 400px;
  width: 100%;
  text-align: center;
}

.rpc-upsell-icon { font-size: 2.4rem; margin-bottom: 0.6rem; }

.rpc-upsell-title {
  font-size: 1.1rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 0.45rem;
}

.rpc-upsell-desc {
  font-size: 0.82rem;
  color: var(--rpc-text-muted);
  line-height: 1.55;
  margin-bottom: 1.25rem;
}

.rpc-upsell-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.rpc-upsell-btn {
  flex: 1 1 140px;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid var(--rpc-border);
  background: transparent;
  color: var(--rpc-text-muted);
  text-decoration: none;
  transition: all 0.15s;
}

.rpc-upsell-btn:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }

.rpc-upsell-btn.primary {
  background: #f59e0b;
  border-color: #f59e0b;
  color: #0a0a0a;
}

.rpc-upsell-btn.primary:hover { background: #fbbf24; color: #0a0a0a; }

/* Baner limitu (1 paczka na 3 dni) widoczny bezpośrednio na stronie */
.rpc-limit-banner {
  max-width: 1240px;
  margin: 0 auto 1.25rem;
  padding: 0.9rem 1.15rem;
  border-radius: 14px;
  border: 1px solid var(--rpc-border);
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
  transition: all 0.25s;
}

.rpc-limit-banner.locked {
  background: rgba(239, 68, 68, 0.07);
  border-color: rgba(239, 68, 68, 0.35);
}

.rpc-limit-banner.ready {
  background: rgba(16, 185, 129, 0.07);
  border-color: rgba(16, 185, 129, 0.3);
}

.rpc-limit-banner.guest {
  background: rgba(245, 158, 11, 0.07);
  border-color: rgba(245, 158, 11, 0.32);
}

.rpc-limit-banner-icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
}

.rpc-limit-banner-text {
  flex: 1 1 260px;
  min-width: 0;
}

.rpc-limit-banner-title {
  font-size: 0.92rem;
  font-weight: 800;
  margin-bottom: 0.15rem;
}

.rpc-limit-banner-desc {
  font-size: 0.78rem;
  color: var(--rpc-text-muted);
  line-height: 1.45;
}

.rpc-limit-banner-timer {
  font-family: monospace;
  font-size: 1rem;
  font-weight: 800;
  color: #f87171;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.28);
  border-radius: 9999px;
  padding: 0.35rem 0.85rem;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Podświetlenie banera po nieudanej próbie pobrania */
.rpc-limit-banner.pulse {
  animation: rpcLimitPulse 1.1s ease-out 2;
}

@keyframes rpcLimitPulse {
  0%   { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.45); }
  70%  { box-shadow: 0 0 0 14px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

@media (max-width: 640px) {
  .rpc-limit-banner {
    margin-left: 1rem;
    margin-right: 1rem;
  }
}


.rpc-maintenance-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(9, 10, 15, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.rpc-maintenance-box {
  background: rgba(18, 20, 29, 0.92);
  border: 1px solid rgba(239, 68, 68, 0.4);
  box-shadow: 0 0 50px rgba(239, 68, 68, 0.2), 0 25px 60px -15px rgba(0, 0, 0, 0.9);
  border-radius: 24px;
  max-width: 520px;
  width: 100%;
  padding: 2.75rem 2rem;
  text-align: center;
  animation: rpcModalIn 0.3s ease;
}

.rpc-maintenance-icon {
  width: 76px;
  height: 76px;
  margin: 0 auto 1.5rem auto;
  border-radius: 20px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  box-shadow: 0 0 35px rgba(239, 68, 68, 0.25);
  animation: pulse 2.5s infinite;
}

.rpc-maintenance-box h2 {
  font-size: 1.5rem;
  font-weight: 900;
  color: #fff;
  margin: 0 0 0.65rem 0;
  letter-spacing: -0.02em;
}

.rpc-maintenance-box p {
  font-size: 0.88rem;
  color: var(--rpc-text-muted);
  line-height: 1.5;
  margin: 0 0 1.5rem 0;
}

.rpc-maintenance-info {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--rpc-border);
  padding: 1rem 1.25rem;
  border-radius: 14px;
  font-size: 0.82rem;
  color: #d1d5db;
  text-align: left;
}


.rpc-admin-banner {
  background: linear-gradient(90deg, #dc2626, #b91c1c);
  color: #fff;
  padding: 0.6rem 1.25rem;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  position: sticky;
  top: 0;
  z-index: 10000;
  box-shadow: 0 4px 20px rgba(220, 38, 38, 0.4);
}
@media (max-width: 768px) {
  .rpc-navbar { flex-wrap: wrap; gap: 10px; }
  .rpc-navbar .rpc-btn { min-height: 44px; }
  .rpc-user-chip { max-width: 100%; }
  .rpc-category-tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: thin; }
  .rpc-category-tab { min-height: 44px; flex-shrink: 0; }
  .rpc-modal-overlay { padding: 8px; align-items: flex-start; overflow-y: auto; overscroll-behavior: contain; }
  .rpc-editor-window { width: 100%; max-width: 100%; max-height: calc(100dvh - 16px); overflow-y: auto; }
  .rpc-editor-header { position: sticky; top: 0; z-index: 4; background: #111813; padding: 12px; }
  .rpc-editor-title-wrap { min-width: 0; }
  .rpc-editor-title { font-size: 15px; overflow-wrap: anywhere; }
  #rpcEditorSubtitle { max-width: 240px; overflow-wrap: anywhere; }
  .rpc-editor-close { min-width: 44px; min-height: 44px; flex-shrink: 0; }
  .rpc-tools-sidebar { min-height: 60px; gap: 6px; flex-shrink: 0; }
  .rpc-tool-btn { min-width: 44px; min-height: 44px; flex-shrink: 0; }
  .rpc-canvas-stage { min-height: 310px; padding: 16px 8px; flex: none; }
  .rpc-canvas-controls { width: 100%; gap: 8px; }
  .rpc-zoom-btn { min-width: 44px; min-height: 44px; }
  .rpc-properties-sidebar { padding: 14px; }
  .rpc-previews-row { gap: 10px; flex-wrap: wrap; }
  .rpc-preview-box { flex: 1; min-width: 100px; }
  .rpc-editor-footer { position: sticky; bottom: 0; background: #111813; padding: 12px; z-index: 3; display: flex; flex-wrap: wrap; gap: 8px; }
  .rpc-editor-footer .rpc-btn { min-height: 44px; flex: 1; white-space: nowrap; }
}
.rpc-export-mobile { display: none; }
@media (max-width: 768px) {
  .rpc-nav-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); width: 100%; gap: 8px; }
  .rpc-nav-actions>a { order: 1; }
  #rpcAuthContainer { order: 2; min-width: 0; }
  .rpc-pack-pill { order: 3; justify-content: center; white-space: nowrap; }
  #rpcExportZipBtn { order: 4; justify-content: center; white-space: nowrap; padding-inline: 8px; font-size: 12px; }
  .rpc-nav-actions>a { justify-content: center; padding: 8px; }
  .rpc-nav-actions .rpc-btn svg { flex-shrink: 0; }
  .rpc-export-label { display: none; }
  .rpc-export-mobile { display: inline; }
  .rpc-user-chip { border-radius: 10px; padding: 7px; gap: 5px; min-height: 44px; }
  .rpc-user-name { max-width: 75px; font-size: 11px; }
  .rpc-btn-logout { min-width: 28px; min-height: 32px; }
}
