/* ========================================================
   POWERCAKE BUSTA - CLASH ROYALE NAVIGATION & SLIDER
======================================================== */
.app-wrapper {
  width: 100%;
  height: 100%;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  background: var(--bg-app);
}

.app-topbar {
  height: var(--topbar-h);
  flex-shrink: 0;
  background: var(--accent-emerald);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  z-index: 50;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-icon {
  font-size: 22px;
}
.brand-name {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
}
.brand-tag {
  background: #065f46;
  color: #a7f3d0;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.engine-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: #d1fae5;
  background: rgba(0, 0, 0, 0.15);
  padding: 4px 9px;
  border-radius: 999px;
}
.engine-badge.ready {
  color: #a7f3d0;
}

.btn-hub-link {
  color: #ffffff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.15);
  padding: 5px 11px;
  border-radius: 8px;
  transition: background 0.15s;
}
.btn-hub-link:hover {
  background: rgba(255, 255, 255, 0.25);
}

.cr-viewport {
  flex: 1;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.cr-slider {
  display: flex;
  width: 300%;
  height: 100%;
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.cr-slide {
  width: 33.33333%;
  flex: 0 0 33.33333%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px 16px calc(var(--nav-h) + 36px);
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}

.slide-content {
  max-width: 640px;
  margin: 0 auto;
}

.slide-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 16px;
}

.slide-header h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-dark);
}

.counter-badge {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-emerald);
}

/* Barra Inferiore Stile Clash Royale Flottante */
.cr-bottom-nav {
  position: fixed;
  bottom: 18px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  z-index: 100;
}

.cr-nav-track {
  pointer-events: auto;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
}

.cr-nav-item {
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 14px;
  border-radius: 999px;
  transition: all 0.18s ease;
  color: var(--text-muted);
}

.cr-nav-icon {
  font-size: 18px;
  transition: transform 0.18s ease;
}

.cr-nav-label {
  font-size: 11px;
  font-weight: 700;
}

.cr-nav-item.active {
  color: var(--accent-emerald);
}

.cr-nav-item.active .cr-nav-icon {
  transform: translateY(-2px) scale(1.1);
}

.cr-nav-item.active .cr-nav-label {
  color: var(--accent-emerald);
}

.cr-nav-item:active {
  transform: scale(0.95);
}
