* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Nunito', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

.brawl-root {
  min-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.brawl-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: #1565d8;
  overflow: hidden;
}

.skull-pattern {
  position: absolute;
  inset: 0;
  background-image: url('assets/bg-skulls.jpg');
  background-size: cover;
  background-position: center;
}

.notif-bar {
  position: relative;
  z-index: 10;
  width: 100%;
  background: rgba(10, 50, 140, 0.92);
  color: #fff;
  text-align: center;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  border-bottom: 2px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  animation: fadeSlide 0.5s ease;
}

@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.fire-icon {
  font-size: 16px;
}

.header {
  position: relative;
  z-index: 10;
  padding: 28px 0 12px;
  display: flex;
  justify-content: center;
}

.logo {
  width: 220px;
  filter: drop-shadow(0 4px 24px rgba(0,0,0,0.5));
  animation: logoPop 0.6s cubic-bezier(0.34,1.56,0.64,1) both;
}

@keyframes logoPop {
  from { opacity: 0; transform: scale(0.7); }
  to { opacity: 1; transform: scale(1); }
}

.stats-box {
  position: relative;
  z-index: 10;
  background: rgba(30, 80, 200, 0.55);
  backdrop-filter: blur(10px);
  border: 1.5px solid rgba(255,255,255,0.18);
  border-radius: 16px;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 10px auto 20px;
}

.live-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,80,80,0.15);
  border: 1px solid rgba(255,80,80,0.4);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 900;
  color: #ff5555;
  letter-spacing: 1px;
}

.live-dot {
  width: 8px;
  height: 8px;
  background: #ff4444;
  border-radius: 50%;
  animation: pulse 1.2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.4); }
}

.stats-label {
  font-size: 11px;
  font-weight: 800;
  color: rgba(255,255,255,0.6);
  letter-spacing: 1px;
}

.stats-divider {
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,0.2);
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stat-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.stat-number {
  font-size: 20px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
}

.stat-sub {
  font-size: 10px;
  font-weight: 800;
  color: rgba(255,255,255,0.55);
  letter-spacing: 1px;
}

.rewards-section {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 900px;
  padding: 0 20px 40px;
}

.section-title {
  text-align: center;
  font-family: 'Lilita One', cursive;
  font-size: 28px;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4), 0 0 40px rgba(255,220,80,0.3);
  letter-spacing: 2px;
  margin-bottom: 24px;
  background: rgba(30, 70, 180, 0.55);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255,255,255,0.15);
  border-radius: 14px;
  padding: 16px 32px;
}

.rewards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.reward-card {
  background: linear-gradient(160deg, #6a2fd8 0%, #4a1ab8 40%, #5532d4 100%);
  border-radius: 18px;
  border: 2px solid rgba(255,255,255,0.15);
  padding: 16px 12px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  box-shadow: 0 6px 32px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.reward-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,0.08) 0%, transparent 60%);
  border-radius: 18px;
  pointer-events: none;
}

.reward-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 20px rgba(150,80,255,0.3);
}

.card-title {
  font-family: 'Lilita One', cursive;
  font-size: 13px;
  color: #fff;
  text-align: center;
  letter-spacing: 1px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
  min-height: 32px;
  display: flex;
  align-items: center;
}

.card-img-wrap {
  position: relative;
  width: 130px;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sunburst-bg {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background-image: url('assets/sunburst.jpg');
  background-size: cover;
  background-position: center;
  will-change: transform;
  transform: translateZ(0);
  animation: spinSlow 20s linear infinite;
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.card-img {
  position: relative;
  z-index: 2;
  width: 90px;
  height: 90px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.5));
  transform: translateZ(0);
}

.card-price {
  display: flex;
  align-items: center;
  gap: 8px;
}

.price-old {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  text-decoration: line-through;
  font-weight: 700;
}

.price-free {
  font-size: 13px;
  color: #7df05a;
  font-weight: 900;
  text-shadow: 0 0 8px rgba(100,255,50,0.4);
}

.claim-btn {
  width: 100%;
  background: linear-gradient(to bottom, #4dc8f5 0%, #1a9ed4 50%, #0f7ab0 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 12px 0;
  font-family: 'Lilita One', cursive;
  font-size: 16px;
  letter-spacing: 2px;
  cursor: pointer;
  box-shadow: 0 4px 0 rgba(0,0,0,0.3), 0 6px 16px rgba(0,0,0,0.3);
  transition: transform 0.1s, box-shadow 0.1s;
  position: relative;
  overflow: hidden;
}

.claim-btn::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 50%;
  background: rgba(255,255,255,0.12);
  border-radius: 12px 12px 0 0;
}

.claim-btn:hover {
  background: linear-gradient(to bottom, #5dd8ff 0%, #2ab4e8 50%, #1590cc 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 0 rgba(0,0,0,0.3), 0 8px 20px rgba(0,0,0,0.3);
}

.claim-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 rgba(0,0,0,0.3);
}

.footer {
  position: relative;
  z-index: 10;
  width: 100%;
  background: rgba(15, 20, 40, 0.95);
  padding: 30px 60px 20px;
  margin-top: auto;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.footer-download p,
.footer-social p {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
}

.stores-img {
  height: 50px;
  object-fit: contain;
}

.footer-social {
  text-align: right;
}

.social-links {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.social-links a {
  color: rgba(255,255,255,0.7);
  font-size: 18px;
  text-decoration: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.social-links a:hover {
  background: rgba(255,255,255,0.25);
  color: #fff;
}

.footer-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 20px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-links a {
  color: rgba(255,255,255,0.55);
  font-size: 12px;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #fff;
}

.footer-supercell {
  display: flex;
  align-items: flex-end;
  gap: 16px;
}

.footer-supercell p {
  color: rgba(255,255,255,0.5);
  font-size: 11px;
  text-align: right;
  line-height: 1.6;
}

.supercell-logo {
  font-family: 'Lilita One', cursive;
  font-size: 22px;
  color: #d4a843;
  line-height: 1;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
  letter-spacing: 2px;
  border: 2px solid #d4a843;
  padding: 4px 8px;
  border-radius: 4px;
}

.gm-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 10, 40, 0.82);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
  padding: 16px;
  overflow-y: auto;
}

.gm-overlay.active {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.gm-box {
  background: radial-gradient(ellipse at 50% 0%, #3a8a3a 0%, #1f5c1f 60%, #163d16 100%);
  border: 3px solid #5ec85e;
  border-radius: 22px;
  padding: 36px 24px 26px;
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  position: relative;
  box-shadow: 0 0 0 5px rgba(80,200,80,0.12), 0 24px 60px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.08);
  animation: modalPop 0.3s cubic-bezier(0.34,1.56,0.64,1) both;
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.82); }
  to { opacity: 1; transform: scale(1); }
}

.gm-corner {
  position: absolute;
  width: 10px;
  height: 10px;
  background: #7de87d;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(100,255,100,0.5);
}
.gm-corner.tl { top: 12px; left: 12px; }
.gm-corner.tr { top: 12px; right: 12px; }
.gm-corner.bl { bottom: 12px; left: 12px; }
.gm-corner.br { bottom: 12px; right: 12px; }

.gm-back {
  position: absolute;
  top: 10px;
  left: 28px;
  background: rgba(0,0,0,0.35);
  border: 2px solid rgba(255,255,255,0.2);
  color: #fff;
  font-size: 20px;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background 0.15s;
}
.gm-back:hover { background: rgba(0,0,0,0.55); }

.gm-title {
  font-family: 'Lilita One', cursive;
  font-size: 22px;
  color: #ffe84d;
  text-shadow: 0 2px 0 rgba(0,0,0,0.5), 0 0 20px rgba(255,220,50,0.3);
  letter-spacing: 1.5px;
  text-align: center;
  margin-top: 4px;
}

.gm-input-row {
  width: 100%;
  background: rgba(0,0,0,0.4);
  border: 2.5px solid rgba(255,255,255,0.25);
  border-radius: 14px;
  display: flex;
  align-items: center;
  padding: 12px 14px;
  gap: 8px;
  transition: border-color 0.2s;
}
.gm-input-row:focus-within { border-color: #ffe84d; }
.gm-input-row.gm-input-error { border-color: #ff5555; animation: shake 0.35s ease; }

@keyframes shake {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}

.gm-hash {
  color: rgba(255,255,255,0.6);
  font-size: 18px;
  font-weight: 900;
}

.gm-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 3px;
}
.gm-input::placeholder { color: rgba(255,255,255,0.3); letter-spacing: 1px; }

.gm-info {
  width: 22px;
  height: 22px;
  background: #4488ff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  flex-shrink: 0;
}

.gm-go-btn {
  width: 100%;
  background: linear-gradient(to bottom, #ffdd55 0%, #f5a800 50%, #e09200 100%);
  color: #5a2e00;
  border: none;
  border-radius: 16px;
  padding: 15px 0;
  font-family: 'Lilita One', cursive;
  font-size: 20px;
  letter-spacing: 2px;
  cursor: pointer;
  box-shadow: 0 5px 0 #a06000, 0 8px 20px rgba(0,0,0,0.4);
  transition: transform 0.1s, box-shadow 0.1s;
  position: relative;
}
.gm-go-btn::after {
  content: '';
  position: absolute;
  top: 2px; left: 8px; right: 8px; height: 40%;
  background: rgba(255,255,255,0.18);
  border-radius: 12px;
}
.gm-go-btn:hover { transform: translateY(-2px); box-shadow: 0 7px 0 #a06000, 0 10px 24px rgba(0,0,0,0.5); }
.gm-go-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #a06000; }

.gm-note {
  text-align: center;
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  line-height: 1.5;
  max-width: 280px;
}

.gm-step-hidden {
  display: none !important;
}

#step-tag,
#step-searching,
#step-profile,
#step-generating {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.gm-search-anim {
  width: 100px;
  height: 100px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gm-search-img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(100,255,100,0.4));
}

.spin-slow {
  animation: spinAnim 1.5s linear infinite;
}
@keyframes spinAnim {
  to { transform: rotate(360deg); }
}

.gm-loader-bar {
  width: 100%;
  height: 10px;
  background: rgba(0,0,0,0.4);
  border-radius: 10px;
  overflow: hidden;
}

.gm-loader-fill {
  height: 100%;
  background: linear-gradient(to right, #5de85d, #a8ff78);
  border-radius: 10px;
  box-shadow: 0 0 8px rgba(80,255,80,0.5);
  transition: width 0.3s ease;
}

.gm-confirm-btn {
  width: 100%;
  background: linear-gradient(to bottom, #ffdd55 0%, #f5a800 50%, #e09200 100%);
  color: #5a2e00;
  border: none;
  border-radius: 16px;
  padding: 16px 0;
  font-family: 'Lilita One', cursive;
  font-size: 18px;
  letter-spacing: 1.5px;
  cursor: pointer;
  box-shadow: 0 5px 0 #a06000, 0 8px 20px rgba(0,0,0,0.4);
  transition: transform 0.1s, box-shadow 0.1s;
  margin-top: 4px;
  flex-shrink: 0;
}
.gm-confirm-btn:hover { transform: translateY(-2px); box-shadow: 0 7px 0 #a06000; }
.gm-confirm-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #a06000; }

.gm-profile {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 55vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(80,200,80,0.3) transparent;
}

.prof-header {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(0,0,0,0.25);
  border-radius: 14px;
  padding: 12px 14px;
}

.prof-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #f5a623, #c47d00);
  border: 3px solid #ffc840;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(255,200,60,0.3);
}

.prof-info { flex: 1; min-width: 0; }

.prof-name {
  font-family: 'Lilita One', cursive;
  font-size: 17px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prof-tag {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  font-weight: 700;
  letter-spacing: 1px;
}

.prof-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.prof-stat-box {
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.prof-stat-icon { font-size: 20px; flex-shrink: 0; }

.prof-stat-val {
  font-family: 'Lilita One', cursive;
  font-size: 17px;
  color: #fff;
  line-height: 1;
}

.prof-stat-lbl {
  font-size: 9px;
  color: rgba(255,255,255,0.45);
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.prof-brawlers-title {
  text-align: center;
  font-family: 'Lilita One', cursive;
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  letter-spacing: 2px;
}

.prof-brawlers { display: flex; flex-direction: column; gap: 8px; }

.prof-brawler-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 10px 12px;
}

.pb-avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.pb-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.pb-info { flex: 1; min-width: 0; }

.pb-name {
  font-family: 'Lilita One', cursive;
  font-size: 14px;
  letter-spacing: 0.5px;
}

.pb-stats {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 2px;
  flex-wrap: wrap;
}

.pb-lbl {
  font-size: 9px;
  color: rgba(255,255,255,0.45);
  font-weight: 800;
  letter-spacing: 0.5px;
}

.pb-val {
  font-size: 13px;
  color: #fff;
  font-weight: 900;
}

.gen-glow {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(80,255,80,0.35) 0%, transparent 70%);
  animation: glowPulse 1.2s ease-in-out infinite alternate;
}

@keyframes glowPulse {
  from { transform: scale(0.9); opacity: 0.5; }
  to { transform: scale(1.15); opacity: 1; }
}

.gen-img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 0 14px rgba(80,255,80,0.5));
  animation: genBounce 0.8s ease-in-out infinite alternate;
}

@keyframes genBounce {
  from { transform: translateY(0); }
  to { transform: translateY(-8px); }
}

.gen-reward-name {
  font-family: 'Lilita One', cursive;
  font-size: 18px;
  color: #fff;
  letter-spacing: 1px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.gen-bar-wrap {
  width: 100%;
  height: 14px;
  background: rgba(0,0,0,0.45);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
}

.gen-bar-fill {
  height: 100%;
  background: linear-gradient(to right, #3acc3a, #7fff7f);
  border-radius: 20px;
  box-shadow: 0 0 10px rgba(80,255,80,0.5);
  transition: width 0.2s linear;
}

.gen-status-row {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-size: 11px;
  font-weight: 800;
}

.gen-pct { color: #7fff7f; }
.gen-proc { color: rgba(255,255,255,0.5); display: flex; align-items: center; gap: 4px; }

.gen-sub {
  font-size: 11px;
  font-weight: 800;
  color: rgba(255,255,255,0.55);
  letter-spacing: 1px;
  text-align: center;
}

.gen-for-tag {
  font-family: 'Nunito', sans-serif;
  font-size: 13px;
  font-weight: 800;
  color: rgba(255,255,255,0.75);
  letter-spacing: 1px;
  text-align: center;
  margin-top: -6px;
}

.gen-dot-live {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #5de85d;
  border-radius: 50%;
  margin-right: 4px;
  animation: pulse 1.2s infinite;
  vertical-align: middle;
}

@media (max-width: 700px) {
  .rewards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .stats-box {
    flex-wrap: wrap;
    justify-content: center;
    padding: 12px 16px;
  }
  .footer {
    padding: 24px 20px 16px;
  }
  .footer-top {
    flex-direction: column;
    gap: 20px;
  }
  .footer-social {
    text-align: left;
  }
  .social-links {
    justify-content: flex-start;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 20px;
  }
  .section-title {
    font-size: 20px;
  }
}

@media (max-width: 420px) {
  .rewards-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .logo {
    width: 160px;
  }
}
