/* GLOBAL THEME UPDATE */
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  scroll-behavior: smooth;
  background-color: #111;
  color: #fff;
}

section {
  scroll-margin-top: 100px;
}

:root {
  --qpk-yellow: #ffd93d;
  --qpk-orange: #ff9f1c;
  --qpk-red: #ff4d6d;
  --qpk-blue: #4cc9f0;
  --qpk-purple: #9d4edd;
  --qpk-green: #80ed99;

  --qpk-soft-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  --qpk-hard-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);

  --qpk-common: #b7e7b3;
  --qpk-rare: #4cc9f0;
  --qpk-epic: #9d4edd;
  --qpk-legendary: #ffd93d;
}

/* SUBTLE GRID BACKGROUND */
.grid-bg {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
}

.grid-bg-dark {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}

section {
  scroll-margin-top: 80px;
}

/* NAVBAR */
.navbar {
  backdrop-filter: blur(10px);
  background: rgba(0, 0, 0, 0.75) !important;
}

.link-noStyle {
  text-decoration: none;
}

/* HERO */
.hero {
  background: url("../images/QPKO-BG-3.png") center/cover no-repeat;
  background-attachment: scroll;
  /* hyper-casual avoids parallax heaviness */
  padding: 140px 20px;
  border-bottom-left-radius: 40px;
  border-bottom-right-radius: 40px;
  box-shadow: var(--qpk-hard-shadow);
}

.hero::before {
  background: linear-gradient(rgba(255, 255, 255, 0.6),
      rgba(255, 255, 255, 0.85));
}

.hero h1 {
  color: #ff4d6d;
  font-weight: 900;
  text-shadow: none;
}

.hero p {
  color: #444;
  font-size: 1.3rem;
}

.hero h1,
.hero p,
.hero a {
  position: relative;
  z-index: 2;
}

.heroText {
  font-size: large;
  font-weight: bold;
  padding: 5px;
  border-radius: 5px;
  color: #ffffff !important;
}

/* ABOUT GAME SECTION */
#about-game {
  background: linear-gradient(180deg, #fff, #f7f7f7);
  border-radius: 40px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.about-title-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
}

/* Starburst Impact Icon */
.starburst-icon {
  width: 55px;
  height: 55px;
  background: radial-gradient(circle, #ff9f1c, #ff4d6d);
  border-radius: 50%;
  position: relative;
  box-shadow: 0 6px 14px rgba(255, 77, 109, 0.25);
}

.starburst-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('data:image/svg+xml;utf8,<svg fill="white" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 2l2 5 5 2-5 2-2 5-2-5-5-2 5-2z"/></svg>') center/60% no-repeat;
  opacity: 0.9;
}

.about-text {
  font-size: 1.2rem;
  color: #444;
  line-height: 1.8;
  margin-bottom: 20px;
}

.about-text strong {
  color: #ff4d6d;
}

.highlight {
  color: #ff9f1c;
  font-weight: 700;
}

.navbar-brand {
  width: 30%;
}

/* TRAILER BUTTON */

.trailer-btn {
  background: linear-gradient(135deg, var(--qpk-orange), var(--qpk-red));
  font-size: 1.3rem;
  color: #fff;
  border-radius: 50px;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.trailer-btn,
.btn-warning,
.btn-primary {
  border-radius: 40px;
  padding: 14px 32px;
  font-weight: 800;
  letter-spacing: 0.5px;
  box-shadow: var(--qpk-soft-shadow);
  border: none;
}

.btn-warning {
  background: var(--qpk-yellow);
  color: #333;
}

.btn-primary {
  background: var(--qpk-blue);
  color: #fff;
}

.trailer-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 0 30px rgba(255, 0, 0, 0.9);
}

/* HEALTH BAR WRAPPER */
.healthbar-wrapper {
  position: fixed;
  top: 70px;
  /* below navbar */
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
  z-index: 999;
  pointer-events: none;
}

/* HEALTH BAR BASE */
.healthbar {
  width: 30%;
  height: 30px;
  background: #222;
  border: 3px solid #000;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 0 10px rgba(255, 0, 0, 0.4);
}

/* HEALTH FILL */
.health-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #db4010, #ffcc00);
  transition: width 0.25s ease-out;
}

/* RIGHT SIDE HEALTH DRAINS OPPOSITE */
.health-right .health-fill {
  transform-origin: right;
  animation: health-drain-right 6s linear infinite;
}

/* MINI VS BETWEEN BARS */
.vs-mini {
  font-size: 1.4rem;
  font-weight: 900;
  color: #ff4444;
  text-shadow: 0 0 10px #ff0000;
  animation: vs-mini-pulse 1.5s infinite ease-in-out;
}

/* SECTION TITLES */
.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--qpk-blue);
  text-shadow: 0px 4px 10px #95e2ff;
}

/* HIGHLIGHT IMAGES */
.highlight-img,
.mockup-img {
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

/* FEATURE CARDS */
.feature-card {
  background: #fff;
  border-radius: 24px;
  padding: 32px;
  box-shadow: var(--qpk-soft-shadow);
  border: none;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--qpk-hard-shadow);
}

.feature-card h3,
.feature-card h4 {
  color: var(--qpk-blue);
}

/* DEVICE FRAME MOCKUP */
.mockup-img {
  width: 280px;
  border-radius: 30px;
  border: 10px solid #000;
  background: #000;
}

/* Showcase */
#showcase {
  border-radius: 40px;
}

/* EXTRA HIGHLIGHTS */

#extra-highlights {
  /* background: #f5f5f5;   */
  background: linear-gradient(180deg, #fafafa, #f0f0f0);
  color: #222;
  border-radius: 40px;
}

#extra-highlights h3 {
  font-weight: 700;
}

#extra-highlights p {
  font-size: 1.1rem;
}

/* PUNCH IMPACT EFFECT */
.pointer {
  cursor: pointer;
}

.punch-impact {
  position: relative;
  overflow: visible;
}

.punch-impact::after {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  background: radial-gradient(rgba(255, 230, 0, 0.6), rgba(255, 0, 0, 0) 70%);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.2);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.25s ease-out,
    opacity 0.25s ease-out;
}

.punch-impact:hover::after {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

/* SIGNUP SECTION */
.signup-section {
  background: linear-gradient(180deg, #fff, #f7f7f7);
  color: #333;
  border-top-left-radius: 40px;
  border-top-right-radius: 40px;
  box-shadow: var(--qpk-soft-shadow);
}

.signup-section input {
  border-radius: 30px;
  border: 2px solid #ddd;
}

/* FOOTER */
footer {
  background: #fff;
  color: #666;
  padding: 20px;
  border-top: 2px solid #eee;
}

/* SPARK PARTICLES (SUBTLE ANIMATION) */
/* KO SPARKS */
.ko-spark {
  position: fixed;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  animation: ko-spark-anim 0.8s ease-out forwards;
}

.spark {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #ffcc00;
  border-radius: 50%;
  opacity: 0.8;
  animation: spark-move 4s linear infinite;
}

/* VS BANNER */
.vs-banner-container {
  display: flex;
  justify-content: center;
  margin: 80px 0;
  position: relative;
}

.vs-banner {
  padding: 18px 50px;
  border-radius: 50px;
  background: linear-gradient(135deg, var(--qpk-red), var(--qpk-orange));
  box-shadow: var(--qpk-hard-shadow);
}

.vs-text {
  font-size: 3rem;
  font-weight: 900;
  color: #fff;
  text-shadow: none;
}

/* CHARACTER SELECT SECTION */
#character-select {
  position: relative;
  padding-top: 80px;
  padding-bottom: 80px;
  background: #f7f7f7;
  border-radius: 40px;
}

/* LEFT SIDE: SKEWED CHARACTER TILES */
.character-list {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.char-tile {
  position: relative;
  width: 100%;
  height: 150px;
  background: #ffffff;
  border-radius: 24px;
  overflow: hidden;

  /* skew container */
  /* transform: skewX(-10deg); */

  /* soft hyper-casual shadow */
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
  cursor: pointer;

  display: flex;
  align-items: center;
}

/* Hover effect */
.char-tile:hover {
  /* transform: skewX(-10deg) scale(1.03); */
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

/* Character image */
.char-tile img {
  width: 160px;
  height: 100%;
  object-fit: cover;

  /* cancel skew */
  /* transform: skewX(10deg); */
  border-radius: 20px;
}

/* Character name */
.char-name {
  position: absolute;
  right: 30px;
  top: 50%;
  /* transform: translateY(-50%) skewX(10deg); */

  font-size: 1.8rem;
  font-weight: 800;
  color: #ff4d6d;
  /* hyper-casual red */
}

/* RIGHT SIDE: SPOTLIGHT */
.character-spotlight {
  text-align: center;
  padding: 20px;
}

.spotlight-img {
  width: 75%;
  max-width: 420px;
  border-radius: 30px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.spotlight-img {
  animation: spotlight-idle 3s ease-in-out infinite;
}

.idle {
  animation: spotlight-idle 3s ease-in-out infinite;
}

.spotlight-name {
  font-size: 2.4rem;
  font-weight: 900;
  color: #ff4d6d;
  margin-top: 20px;
}

.spotlight-desc {
  font-size: 1.2rem;
  color: #555;
  max-width: 420px;
  margin: 10px auto 0 auto;
}

.spotlight-rarity {
  margin-top: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  padding: 6px 14px;
  border-radius: 20px;
  display: inline-block;
}

.spotlight-rarity.common {
  background: var(--qpk-common);
}

.spotlight-rarity.rare {
  background: var(--qpk-rare);
}

.spotlight-rarity.epic {
  background: var(--qpk-epic);
}

.spotlight-rarity.legendary {
  background: var(--qpk-legendary);
}

/* LOCKED CHARACTER TILE */
.char-tile.locked {
  filter: grayscale(1) brightness(0.7);
  position: relative;
  pointer-events: none;
}

.char-tile.locked::before {
  /* content: "🔒"; */
  position: absolute;
  right: 20px;
  top: 50%;
  /* transform: translateY(-50%) skewX(10deg); */
  font-size: 2rem;
  opacity: 0.8;
}

.char-tile.locked img {
  opacity: 0.4;
}

/* RARITY STYLES */
.char-tile.common {
  border: 4px solid var(--qpk-common);
  box-shadow: 0 8px 20px rgba(180, 180, 180, 0.2);
}

.char-tile.rare {
  border: 4px solid var(--qpk-rare);
  box-shadow: 0 8px 20px rgba(76, 201, 240, 0.3);
}

.char-tile.epic {
  border: 4px solid var(--qpk-epic) box-shadow: 0 8px 20px rgba(157, 78, 221, 0.3);
}

.char-tile.legendary {
  border: 4px solid var(--qpk-legendary);
  ;
  box-shadow: 0 8px 20px rgba(255, 217, 61, 0.4);
}

/* GRID BACKGROUND (softened for hyper-casual) */
#character-select.grid-bg {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
}

@keyframes ko-spark-anim {
  0% {
    transform: scale(1) translate(0, 0);
    opacity: 1;
  }

  100% {
    transform: scale(0.2) translate(var(--dx), var(--dy));
    opacity: 0;
  }
}

/* Pulse animation */
@keyframes vs-pulse {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 40px rgba(255, 0, 0, 0.6);
  }

  50% {
    transform: scale(1.08);
    box-shadow: 0 0 60px rgba(255, 0, 0, 0.9);
  }
}

/* Flicker animation */
@keyframes vs-flicker {

  0%,
  100% {
    opacity: 1;
  }

  45% {
    opacity: 0.85;
  }

  50% {
    opacity: 0.4;
  }

  55% {
    opacity: 0.85;
  }
}

@keyframes spark-move {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }

  100% {
    transform: translateY(-200px) scale(0.2);
    opacity: 0;
  }
}

/* VS PULSE */
@keyframes vs-mini-pulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.2);
    opacity: 0.7;
  }
}

/* KO FLASH WHEN HEALTH HITS ZERO */
.health-fill.ko-flash {
  animation: ko-flash 0.4s ease-out;
}

@keyframes ko-flash {
  0% {
    filter: brightness(3);
  }

  100% {
    filter: brightness(1);
  }
}

@keyframes spotlight-idle {
  0% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-8px) scale(1.02);
  }

  100% {
    transform: translateY(0) scale(1);
  }
}