/* power_within.css - Page Specific Styles */

.power-within-page {
  --power-orange: #f97316;
  --power-dark: #c2410c;
  --power-gold: #fbbf24;
  --power-bg: #ffffff;
  background-color: var(--power-bg);
}

/* Standardize layout padding and top spacing */
.power-within-page .page-wrapper {
  padding-top: var(--nav-height) !important;
}

.power-within-page .layout-container {
  padding-top: 1rem !important; /* Standardized Space */
}

.power-within-page .page-title {
  margin-top: 0 !important;
}

/* Sidebar Theme Overrides - MATCHING SAMPLE.HTML DESIGN SYSTEM */
body.power-within-page .sidebar-widget h3 {
  border-bottom-color: var(--power-gold);
  color: var(--power-dark);
}

body.power-within-page .sidebar-nav-list a.active {
  background: #fff7ed;
  color: var(--power-orange);
  border-left-color: var(--power-orange);
}

/* Pulsing Core Animation */
.power-core-container {
  position: relative;
  height: 300px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 3rem 0;
  flex-direction: column;
}

.power-core {
  width: 60px;
  height: 60px;
  background: var(--power-orange);
  border-radius: 50%;
  position: absolute;
  box-shadow: 0 0 60px var(--power-orange);
  animation: core-pulse 2s infinite ease-in-out;
}

.power-core-inner {
  width: 30px;
  height: 30px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  z-index: 2;
  box-shadow: 0 0 20px #fff;
  animation: core-flicker 0.1s infinite alternate;
}

.power-title-text {
  position: relative;
  z-index: 3;
  margin-top: 140px;
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--power-dark);
  letter-spacing: 0.2em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  font-family: 'Zen Maru Gothic', sans-serif;
}

@keyframes core-pulse {
  0% { transform: scale(1); opacity: 0.8; box-shadow: 0 0 40px var(--power-orange); }
  50% { transform: scale(1.5); opacity: 1; box-shadow: 0 0 80px var(--power-gold); }
  100% { transform: scale(1); opacity: 0.8; box-shadow: 0 0 40px var(--power-orange); }
}

@keyframes core-flicker {
  0% { opacity: 0.8; transform: scale(0.9); }
  100% { opacity: 1; transform: scale(1.1); }
}

/* Quote Card */
.power-quote-card {
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  border-left: 6px solid var(--power-orange);
  padding: 2.5rem;
  margin: 3rem 0;
  border-radius: 8px;
  position: relative;
  box-shadow: 0 4px 15px rgba(249, 115, 22, 0.05);
}

.power-quote-card .quote-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: #431407;
  line-height: 1.8;
  margin-bottom: 1rem;
}

.power-quote-card .quote-author {
  text-align: right;
  font-style: italic;
  color: var(--power-dark);
  font-weight: 600;
}

/* Catch Chance Game */
.chance-game-section {
  background: #1e1b4b;
  color: #fff;
  padding: 3rem 2rem;
  border-radius: 24px;
  text-align: center;
  margin: 5rem 0;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(30, 27, 75, 0.2);
}

.chance-game-section h3 {
  color: var(--power-gold);
  margin-bottom: 1.5rem;
}

.chance-answer {
  background: rgba(255, 255, 255, 0.1);
  padding: 1.5rem;
  border-radius: 12px;
  margin: 1.5rem 0;
  font-weight: bold;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.chance-game-container {
  height: 250px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 20px;
  position: relative;
  margin: 2.5rem 0;
  cursor: crosshair;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.game-instruction {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(255, 255, 255, 0.4);
  pointer-events: none;
  font-size: 1rem;
  line-height: 1.6;
}

.chance-orb {
  position: absolute;
  top: 50%;
  left: -60px;
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, #fff, var(--power-gold));
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.8rem;
  color: var(--power-orange);
  box-shadow: 0 0 30px var(--power-gold);
  cursor: pointer;
  animation: move-chance 4s linear infinite;
  z-index: 10;
}

.chance-orb.caught {
  animation-play-state: paused;
  transform: scale(2.5);
  box-shadow: 0 0 60px #fff;
  filter: brightness(1.5);
}

@keyframes move-chance {
  0% { left: -70px; }
  100% { left: 110%; }
}

.success-message {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  background: rgba(255, 255, 255, 0.98);
  color: var(--power-dark);
  padding: 2.5rem;
  border-radius: 20px;
  font-weight: 900;
  z-index: 20;
  transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
}

.success-message.show {
  transform: translate(-50%, -50%) scale(1);
}

.firework-particle {
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--power-gold);
  border-radius: 50%;
  pointer-events: none;
}

.final-message {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--power-orange);
  margin-top: 4rem;
  padding: 3rem 2rem;
  border: 4px double var(--power-orange);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(5px);
}

/* Determination Button */
.determination-btn {
  background: linear-gradient(45deg, #f97316, #ef4444, #f59e0b);
  background-size: 200% 200%;
  color: white !important;
  padding: 1.8rem 4rem;
  font-size: 1.6rem !important;
  font-weight: 900 !important;
  border: none;
  border-radius: 60px;
  cursor: pointer;
  box-shadow: 0 10px 40px rgba(249, 115, 22, 0.4);
  animation: gradient-flow 3s ease infinite, pulse-btn 2s infinite;
  display: inline-block;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.determination-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 15px 60px rgba(249, 115, 22, 0.6);
}

@keyframes pulse-btn {
  0% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.7); }
  70% { box-shadow: 0 0 0 25px rgba(249, 115, 22, 0); }
  100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0); }
}

@keyframes gradient-flow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Whiteout Overlay */
.whiteout-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 2s ease-in;
}

.whiteout-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.whiteout-msg {
  font-family: "Zen Maru Gothic", sans-serif;
  font-size: 4rem;
  font-weight: 900;
  color: var(--power-orange);
  transform: scale(0.6);
  opacity: 0;
  transition: all 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) 1s;
}

.whiteout-overlay.active .whiteout-msg {
  transform: scale(1.2);
  opacity: 1;
}

/* Fixed Background Core */
.fixed-power-bg {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.5);
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    rgba(251, 191, 36, 0.2) 0%,
    rgba(249, 115, 22, 0.05) 40%,
    transparent 70%
  );
  pointer-events: none;
  z-index: -1;
  border-radius: 50%;
  transition: transform 0.1s ease-out;
  mix-blend-mode: multiply;
}

@media (max-width: 768px) {
  .chance-game-section { padding: 2rem 1rem; }
  .whiteout-msg { font-size: 2.5rem; }
  .determination-btn { padding: 1.2rem 2.5rem; font-size: 1.3rem !important; }
}
