/**
 * page_07_results.css - Results Page Layout & Theme Styles
 * Fully scaled via CSS Container Query Units (cqw / cqh) relative to #game-wrapper.
 */

/* ==========================================================================
   SECTION 1: CONTAINER & VIEWPORT LAYOUT
   Selectors: .results-container, .results-container.hidden
   
   Note: Container Query Units (cqw / cqh) scale dimensions, padding, margins,
   font sizes, borders, and shadows relative to the #game-wrapper parent element,
   ensuring proportional layout scaling regardless of global viewport dimensions.
   ========================================================================== */

.results-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 10;
  width: 100%;
  height: 100%;
  padding: 5cqh 5cqw;
  box-sizing: border-box;
  background-color: rgba(8, 5, 3, 0.96);
}

.results-container.hidden {
  display: none !important;
}

/* ==========================================================================
   SECTION 2: CONTENT WRAPPER
   Selectors: .results-content
   ========================================================================== */

.results-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  width: 85%;
  height: 100%;
  box-sizing: border-box;
}

/* ==========================================================================
   SECTION 3: HEADER & ANNOUNCEMENT TEXT
   Selectors: .results-header, .results-title, .results-title.defeat,
              .results-title.victory, .results-flavor-text
   
   Note: Theme variant states (.defeat vs .victory) alter font colors and text-shadow
   glows to visually convey match outcome state: .defeat applies a crimson red tone
   and shadow, while .victory applies a golden accent and aura.
   ========================================================================== */

.results-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-top: auto;
  margin-bottom: 4cqh;
}

.results-title {
  margin-bottom: 1.5cqh;
  font-family: 'MedievalSharp', 'Cinzel', serif;
  font-size: 9.5cqw;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.1;
  text-shadow: 0 0.5cqh 1.5cqh rgba(0, 0, 0, 0.8);
}

.results-title.defeat {
  color: #ff4d4d;
  text-shadow: 0 0 3.5cqw rgba(255, 77, 77, 0.35);
}

.results-title.victory {
  color: #f3d078;
  text-shadow: 0 0 3.5cqw rgba(243, 208, 120, 0.4);
}

.results-flavor-text {
  width: 82%;
  font-family: 'Cinzel', serif;
  font-size: 2.7cqw;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #e2b755;
  opacity: 0.9;
}

/* ==========================================================================
   SECTION 4: STATS CARD & LIST
   Selectors: .results-stats-card, .stats-list, .stat-row, .stat-label, .stat-value
   ========================================================================== */

.results-stats-card {
  width: 82%;
  padding: 2.5cqh 4cqw;
  margin-bottom: auto;
  box-sizing: border-box;
  background-color: rgba(18, 10, 6, 0.85);
  border: 0.35cqw solid var(--border-gold, #c89d38);
  border-radius: 2cqw;
  box-shadow: 0 1cqh 3cqh rgba(0, 0, 0, 0.7), inset 0 0 2cqw rgba(0, 0, 0, 0.5);
}

.stats-list {
  display: flex;
  flex-direction: column;
  gap: 1.2cqh;
}

.stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'Inter', sans-serif;
  font-size: 3cqw;
}

.stat-label {
  font-weight: 600;
  color: #e2b755;
}

.stat-value {
  font-family: monospace, 'Courier New', Courier;
  font-size: 3.3cqw;
  font-weight: 700;
  color: #ffffff;
}

/* ==========================================================================
   SECTION 5: ACTION FOOTER & INTERACTIVE BUTTONS
   Selectors: .results-actions, .btn-results-primary, .btn-results-primary:hover,
              .btn-results-primary:active
   
   Note: Interactive button states provide tactile dynamic feedback:
   - :hover boosts brightness (1.1) and expands outer gold glow shadow.
   - :active applies vertical translation (translateY(0.15cqh)) and dims
     brightness (0.95) to simulate a physical button depress.
   ========================================================================== */

.results-actions {
  width: 85%;
  padding-bottom: 1cqh;
  margin-top: 3cqh;
}

.btn-results-primary {
  width: 100%;
  min-height: 6.25cqh;
  font-family: 'Cinzel', serif;
  font-size: 3.3cqw;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #120a06;
  background: linear-gradient(180deg, #f3d078 0%, #c89d38 50%, #9e741e 100%);
  border: 0.25cqw solid #f3d078;
  border-radius: 1.5cqw;
  box-shadow: 0 0.5cqh 1.5cqh rgba(0, 0, 0, 0.6), inset 0 0.15cqw 0 rgba(255, 255, 255, 0.4);
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}

.btn-results-primary:hover {
  box-shadow: 0 0.75cqh 2cqh rgba(200, 157, 56, 0.3);
  filter: brightness(1.1);
}

.btn-results-primary:active {
  filter: brightness(0.95);
  transform: translateY(0.15cqh);
}