/* ═══════════════════════════════════════════════════════════════════════
   PRIME ROYALE - PVE SYSTEM STYLES
   Complete stylesheet for all PvE components
   ═══════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════════
   PVE MAIN MENU STYLES
   ═══════════════════════════════════════════════════════════════════════ */

.pve-main-menu {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, #0f172a 0%, #020617 100%);
  overflow-y: auto;
  z-index: 1000;
  padding: 20px;
}

.pve-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.pve-title h1 {
  font-size: 36px;
  font-weight: 900;
  color: #fbbf24;
  text-shadow: 0 0 20px rgba(251, 191, 36, 0.5);
  margin: 0;
}

.pve-subtitle {
  font-size: 14px;
  color: #94a3b8;
  margin: 5px 0 0 0;
}

.pve-close-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  color: white;
  font-size: 24px;
  cursor: pointer;
  transition: 0.3s;
}

.pve-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

/* GAS System */
.pve-gas-container {
  display: flex;
  gap: 15px;
  align-items: center;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
  padding: 20px;
  border-radius: 15px;
  border: 2px solid rgba(59, 130, 246, 0.3);
  margin-bottom: 30px;
}

.gas-display {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 15px;
}

.gas-icon {
  font-size: 48px;
}

.gas-info {
  display: flex;
  flex-direction: column;
}

.gas-amount {
  font-size: 32px;
  font-weight: 900;
  color: #3b82f6;
  line-height: 1;
}

.gas-label {
  font-size: 12px;
  color: #94a3b8;
  letter-spacing: 1px;
}

.gas-regen {
  margin-left: auto;
  text-align: right;
}

.gas-timer {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: #60a5fa;
}

.gas-next {
  display: block;
  font-size: 12px;
  color: #94a3b8;
}

.gas-full {
  font-size: 18px;
  font-weight: 700;
  color: #10b981;
}

.gas-refill-btn {
  background: linear-gradient(135deg, #a855f7, #9333ea);
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  color: white;
  font-weight: 700;
  cursor: pointer;
  transition: 0.3s;
}

.gas-refill-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(168, 85, 247, 0.4);
}

/* Stats Grid */
.pve-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-bottom: 40px;
}

.stat-card {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: 0.3s;
}

.stat-card:hover {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(139, 92, 246, 0.5);
  transform: translateY(-5px);
}

.stat-icon {
  font-size: 36px;
  margin-bottom: 10px;
}

.stat-value {
  font-size: 28px;
  font-weight: 900;
  color: white;
  line-height: 1;
}

.stat-label {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 5px;
}

/* Sector Selection */
.sector-selection h2 {
  font-size: 24px;
  font-weight: 900;
  color: white;
  margin-bottom: 20px;
  text-align: center;
}

.sector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.sector-card {
  background: rgba(30, 41, 59, 0.6);
  border: 2px solid;
  border-radius: 15px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.sector-card.unlocked:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.sector-card.selected {
  box-shadow: 0 0 40px currentColor;
}

.sector-card.locked {
  cursor: not-allowed;
  opacity: 0.5;
}

.lock-overlay {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 48px;
  opacity: 0.5;
}

.sector-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.sector-number {
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 1px;
}

.sector-progress {
  font-size: 12px;
  font-weight: 700;
  color: #fbbf24;
}

.sector-name {
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 10px;
}

.sector-theme {
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 10px;
}

.unlock-requirement {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid #ef4444;
  padding: 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #fca5a5;
  margin-bottom: 10px;
}

.sector-description {
  font-size: 13px;
  color: #cbd5e1;
  line-height: 1.6;
}

/* Action Button */
.pve-action-area {
  position: sticky;
  bottom: 0;
  background: linear-gradient(0deg, #020617 70%, transparent);
  padding: 20px 0;
}

.btn-start-sector {
  width: 100%;
  background: linear-gradient(135deg, #fbbf24, #d97706);
  border: none;
  padding: 20px;
  border-radius: 12px;
  color: #000;
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
  transition: 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-start-sector:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 10px 40px rgba(251, 191, 36, 0.6);
}

.btn-start-sector:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-warning {
  color: #ef4444;
  font-size: 14px;
}

/* ═══════════════════════════════════════════════════════════════════════
   SAGA MAP STYLES
   ═══════════════════════════════════════════════════════════════════════ */

.saga-map {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, #0f172a 0%, #020617 100%);
  overflow-y: auto;
  z-index: 1000;
}

.map-header {
  position: sticky;
  top: 0;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  padding: 20px;
  border-bottom: 2px solid rgba(251, 191, 36, 0.3);
  z-index: 100;
}

.map-header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.map-back-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  transition: 0.3s;
}

.map-back-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(-5px);
}

.map-title {
  text-align: center;
}

.map-title h1 {
  font-size: 32px;
  font-weight: 900;
  color: #fbbf24;
  margin: 0;
}

.map-subtitle {
  font-size: 14px;
  color: #94a3b8;
  margin-top: 5px;
}

.map-progress {
  text-align: right;
}

.progress-text {
  font-size: 14px;
  color: #cbd5e1;
  margin-bottom: 5px;
}

.progress-bar-container {
  width: 200px;
  height: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #fbbf24, #10b981);
  transition: width 0.5s;
}

/* ═══════════════════════════════════════════════════════════════════════
   SAGA MAP - NODE CONTAINER & POSITIONING
   ═══════════════════════════════════════════════════════════════════════ */

.saga-path-container {
  position: relative;
  width: 100%;
  min-height: 600px;
  margin: 20px 0;
}

.saga-path-lines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.saga-nodes {
  position: relative;  /* CRITICAL: Enables percentage positioning! */
  width: 100%;
  height: 100%;
  min-height: 600px;
  z-index: 1;
}

.saga-node {
  position: absolute;  /* CRITICAL: Enables left/top positioning! */
  width: 80px;
  height: 80px;
  transform: translate(-50%, -50%);  /* Center on position */
  cursor: pointer;
  transition: all 0.3s;
  z-index: 10;
}

.saga-node:hover {
  transform: translate(-50%, -50%) scale(1.1);
  z-index: 20;
}

.saga-node.locked {
  opacity: 0.5;
  cursor: not-allowed;
}

.saga-node.locked:hover {
  transform: translate(-50%, -50%);
}

.saga-node.perfect {
  filter: drop-shadow(0 0 10px #10b981);
}

.node-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 3px solid #fbbf24;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 5px;
  transition: all 0.3s;
}

.saga-node.unlocked .node-icon {
  background: linear-gradient(135deg, #3b82f6, #1e40af);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.5);
}

.node-icon.boss {
  border-color: #ef4444;
  font-size: 32px;
}

.node-icon.puzzle {
  border-color: #a855f7;
}

.node-icon.stresstest {
  border-color: #dc2626;
}

.node-id {
  text-align: center;
  font-size: 11px;
  color: #cbd5e1;
  font-weight: 700;
  margin-top: 2px;
}

.node-stars {
  display: flex;
  justify-content: center;
  gap: 2px;
  margin-top: 3px;
}

.star {
  font-size: 10px;
  opacity: 0.3;
}

.star.earned {
  opacity: 1;
}

.boss-name {
  position: absolute;
  bottom: -25px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 10px;
  color: #ef4444;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.difficulty-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(30, 41, 59, 0.95);
  border: 2px solid #fbbf24;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 900;
  color: white;
}

.difficulty-badge.diff-2 { border-color: #f59e0b; color: #f59e0b; }
.difficulty-badge.diff-3 { border-color: #ef4444; color: #ef4444; }
.difficulty-badge.diff-4 { border-color: #dc2626; color: #dc2626; }
.difficulty-badge.diff-5 { border-color: #991b1b; color: #991b1b; }

/* Saga Footer */
.saga-footer {
  padding: 20px;
  border-top: 2px solid rgba(251, 191, 36, 0.3);
  background: rgba(15, 23, 42, 0.8);
}

.sector-completion {
  max-width: 800px;
  margin: 0 auto;
}

.completion-bar {
  width: 100%;
  height: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  margin-bottom: 10px;
}

.completion-fill {
  height: 100%;
  transition: width 0.5s;
}

.completion-text {
  text-align: center;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 700;
}

/* Saga Header */
.saga-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 2px solid rgba(251, 191, 36, 0.3);
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(10px);
}

.saga-back-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  font-weight: 700;
  transition: 0.3s;
}

.saga-back-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(-5px);
}

.saga-title {
  text-align: center;
  flex: 1;
}

.saga-title h1 {
  font-size: 32px;
  font-weight: 900;
  margin: 0;
}

.saga-subtitle {
  font-size: 14px;
  color: #94a3b8;
  margin-top: 5px;
}

.saga-gas {
  font-size: 16px;
  font-weight: 700;
  color: #fbbf24;
}

.saga-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  font-size: 24px;
  color: #fbbf24;
}

/* Map Container */
.map-container {
  max-width: 800px;
  margin: 40px auto;
  padding: 0 20px 40px;
  position: relative;
}

/* Path Line */
.path-line {
  position: absolute;
  top: 0;
  left: 50%;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, 
    rgba(251, 191, 36, 0.3) 0%,
    rgba(251, 191, 36, 0.1) 100%
  );
  transform: translateX(-50%);
  z-index: 0;
}

/* Node Row */
.node-row {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 40px;
  position: relative;
  z-index: 1;
}

.node-row.zigzag-left {
  justify-content: flex-start;
  padding-left: 10%;
}

.node-row.zigzag-right {
  justify-content: flex-end;
  padding-right: 10%;
}

/* Node Card */
.node-card {
  background: rgba(30, 41, 59, 0.8);
  border: 3px solid;
  border-radius: 20px;
  padding: 20px;
  width: 280px;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  backdrop-filter: blur(10px);
}

.node-card.unlocked:hover {
  transform: scale(1.05);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.node-card.locked {
  opacity: 0.5;
  cursor: not-allowed;
}

.node-card.completed {
  box-shadow: 0 10px 40px currentColor;
}

/* Node Header */
.node-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.node-id {
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 1px;
}

.node-stars {
  display: flex;
  gap: 3px;
}

.star {
  font-size: 16px;
  filter: drop-shadow(0 0 5px currentColor);
}

.star.earned {
  color: #fbbf24;
}

.star.unearned {
  color: #475569;
}

/* Node Content */
.node-type-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.node-name {
  font-size: 18px;
  font-weight: 900;
  color: white;
  margin-bottom: 8px;
}

.node-difficulty {
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.difficulty-bars {
  display: flex;
  gap: 2px;
}

.difficulty-bar {
  width: 3px;
  height: 12px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
}

.difficulty-bar.filled {
  background: currentColor;
}

.node-info {
  font-size: 13px;
  color: #cbd5e1;
  line-height: 1.5;
}

/* Node States */
.node-status-badge {
  position: absolute;
  top: -10px;
  right: -10px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 5px 20px rgba(16, 185, 129, 0.5);
}

.node-lock-icon {
  font-size: 48px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.3;
}

/* ═══════════════════════════════════════════════════════════════════════
   PRE-BATTLE SCREEN STYLES
   ═══════════════════════════════════════════════════════════════════════ */

.pre-battle-screen {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, #0f172a 0%, #020617 100%);
  overflow-y: auto;
  z-index: 1000;
  padding: 20px;
}

.pre-battle-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.pre-battle-back-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  transition: 0.3s;
}

.pre-battle-back-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.pre-battle-title h1 {
  font-size: 32px;
  font-weight: 900;
  color: #fbbf24;
  margin: 0;
}

.pre-battle-subtitle {
  font-size: 14px;
  color: #94a3b8;
  margin-top: 5px;
}

/* Main Content */
.pre-battle-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  max-width: 1400px;
  margin: 0 auto;
}

/* Left Column */
.pre-battle-left {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Node Info */
.node-info-section {
  background: rgba(30, 41, 59, 0.6);
  border: 2px solid rgba(251, 191, 36, 0.3);
  border-radius: 15px;
  padding: 25px;
}

.node-info-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.node-info-type {
  display: inline-block;
  padding: 6px 15px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.node-info-difficulty {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
}

.node-info-title {
  font-size: 28px;
  font-weight: 900;
  color: white;
  margin-bottom: 10px;
}

.node-info-description {
  font-size: 14px;
  color: #cbd5e1;
  line-height: 1.6;
  margin-bottom: 20px;
}

/* Star Conditions */
.star-conditions {
  background: rgba(30, 41, 59, 0.6);
  border: 2px solid rgba(251, 191, 36, 0.3);
  border-radius: 15px;
  padding: 25px;
}

.star-conditions h3 {
  font-size: 20px;
  font-weight: 900;
  color: #fbbf24;
  margin-bottom: 15px;
}

.star-condition {
  display: flex;
  align-items: start;
  gap: 15px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  margin-bottom: 10px;
}

.condition-star {
  font-size: 24px;
  color: #fbbf24;
  filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.5));
}

.condition-text {
  flex: 1;
}

.condition-title {
  font-size: 14px;
  font-weight: 700;
  color: white;
  margin-bottom: 3px;
}

.condition-description {
  font-size: 12px;
  color: #94a3b8;
}

/* Rewards */
.rewards-section {
  background: rgba(30, 41, 59, 0.6);
  border: 2px solid rgba(139, 92, 246, 0.3);
  border-radius: 15px;
  padding: 25px;
}

.rewards-section h3 {
  font-size: 20px;
  font-weight: 900;
  color: #a855f7;
  margin-bottom: 15px;
}

.reward-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.reward-item:last-child {
  border-bottom: none;
}

.reward-label {
  font-size: 14px;
  color: #cbd5e1;
}

.reward-value {
  font-size: 16px;
  font-weight: 700;
  color: #fbbf24;
}

/* Right Column */
.pre-battle-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Team Preview */
.team-preview-section {
  background: rgba(30, 41, 59, 0.6);
  border: 2px solid rgba(239, 68, 68, 0.3);
  border-radius: 15px;
  padding: 25px;
}

.team-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.team-preview-header h3 {
  font-size: 20px;
  font-weight: 900;
  color: #ef4444;
  margin: 0;
}

.toggle-enemy-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  padding: 8px 15px;
  border-radius: 6px;
  color: white;
  font-size: 12px;
  cursor: pointer;
  transition: 0.3s;
}

.toggle-enemy-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.team-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.preview-card {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 15px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.preview-card-icon {
  font-size: 32px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

.preview-card-info {
  flex: 1;
}

.preview-card-name {
  font-size: 16px;
  font-weight: 700;
  color: white;
}

.preview-card-stats {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 3px;
}

/* Warnings */
.warning-section {
  background: rgba(239, 68, 68, 0.2);
  border: 2px solid #ef4444;
  border-radius: 15px;
  padding: 20px;
}

.warning-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.warning-icon {
  font-size: 24px;
}

.warning-header h4 {
  font-size: 16px;
  font-weight: 900;
  color: #fca5a5;
  margin: 0;
}

.warning-text {
  font-size: 14px;
  color: #fecaca;
  line-height: 1.5;
}

/* Action Buttons */
.pre-battle-actions {
  position: sticky;
  bottom: 0;
  background: linear-gradient(0deg, #020617 70%, transparent);
  padding: 20px 0;
  padding-bottom: max(env(safe-area-inset-bottom, 20px), 24px);
  display: flex;
  gap: 15px;
}

.btn-change-deck {
  flex: 1;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  padding: 15px;
  border-radius: 10px;
  color: white;
  font-weight: 700;
  cursor: pointer;
  transition: 0.3s;
}

.btn-change-deck:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn-start-battle {
  flex: 2;
  background: linear-gradient(135deg, #10b981, #059669);
  border: none;
  padding: 15px;
  border-radius: 10px;
  color: white;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
  transition: 0.3s;
}

.btn-start-battle:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 10px 40px rgba(16, 185, 129, 0.6);
}

.btn-start-battle:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #475569;
}

/* ═══════════════════════════════════════════════════════════════════════
   BATTLE RESULT SCREEN STYLES
   ═══════════════════════════════════════════════════════════════════════ */

.battle-result-screen {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, #0f172a 0%, #020617 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.result-content {
  max-width: 600px;
  width: 100%;
  text-align: center;
}

/* Result Icon */
.result-icon {
  font-size: 120px;
  margin-bottom: 30px;
  animation: resultIntro 0.5s;
  filter: drop-shadow(0 0 40px currentColor);
}

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

.result-icon.victory {
  color: #10b981;
  animation: glow 2s infinite;
}

.result-icon.defeat {
  color: #ef4444;
}

@keyframes glow {
  0%, 100% { filter: drop-shadow(0 0 20px currentColor); }
  50% { filter: drop-shadow(0 0 40px currentColor); }
}

/* Result Title */
.result-title {
  font-size: 48px;
  font-weight: 900;
  margin-bottom: 20px;
  text-shadow: 0 0 30px currentColor;
}

.result-title.victory {
  color: #10b981;
}

.result-title.defeat {
  color: #ef4444;
}

/* Stars Display */
.stars-display {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 40px;
}

.star-item {
  font-size: 64px;
  animation: starBurst 0.6s ease-out;
}

.star-item.earned {
  color: #fbbf24;
  filter: drop-shadow(0 0 20px #fbbf24);
}

.star-item.unearned {
  color: #475569;
}

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

/* Stats Grid */
.result-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-bottom: 30px;
}

.result-stat {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 20px;
}

.stat-label {
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 5px;
}

.stat-value {
  font-size: 28px;
  font-weight: 900;
  color: white;
}

/* Rewards Display */
.rewards-display {
  background: rgba(139, 92, 246, 0.2);
  border: 2px solid #a855f7;
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 30px;
  animation: slideUp 0.4s 0.8s backwards;
}

@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.rewards-display h3 {
  font-size: 20px;
  font-weight: 900;
  color: #a855f7;
  margin-bottom: 15px;
}

.reward-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.reward-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.reward-label {
  font-size: 14px;
  color: #cbd5e1;
}

.reward-value {
  font-size: 18px;
  font-weight: 700;
  color: #fbbf24;
}

.new-stars-badge {
  display: inline-block;
  background: linear-gradient(135deg, #fbbf24, #d97706);
  color: #000;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 900;
  margin-left: 10px;
}

/* Unlock Notifications */
.unlock-notification {
  background: rgba(16, 185, 129, 0.2);
  border: 2px solid #10b981;
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 30px;
  animation: slideUp 0.4s 1.2s backwards;
}

.unlock-notification h4 {
  font-size: 16px;
  font-weight: 900;
  color: #10b981;
  margin-bottom: 10px;
}

.unlock-text {
  font-size: 14px;
  color: #6ee7b7;
}

/* Action Buttons */
.result-actions {
  display: flex;
  gap: 15px;
}

.btn-retry {
  flex: 1;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  padding: 15px;
  border-radius: 10px;
  color: white;
  font-weight: 700;
  cursor: pointer;
  transition: 0.3s;
}

.btn-retry:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn-continue {
  flex: 2;
  background: linear-gradient(135deg, #fbbf24, #d97706);
  border: none;
  padding: 15px;
  border-radius: 10px;
  color: #000;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
  transition: 0.3s;
}

.btn-continue:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 40px rgba(251, 191, 36, 0.6);
}

/* Defeat specific */
.defeat-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(239, 68, 68, 0.1);
  pointer-events: none;
}

.gas-lost {
  background: rgba(239, 68, 68, 0.2);
  border: 2px solid #ef4444;
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 30px;
}

.gas-lost h4 {
  font-size: 16px;
  font-weight: 900;
  color: #fca5a5;
  margin-bottom: 10px;
}

.gas-lost-text {
  font-size: 14px;
  color: #fecaca;
}

/* Victory specific */
.victory-particles {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  overflow: hidden;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 10px;
  height: 10px;
  background: #fbbf24;
  border-radius: 50%;
  animation: particleFloat 3s infinite;
}

@keyframes particleFloat {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(-100vh) rotate(360deg); opacity: 0; }
}

/* ═══════════════════════════════════════════════════════════════════════
   MULTI-WAVE BATTLE STYLES
   ═══════════════════════════════════════════════════════════════════════ */

/* Wave Transition Screen */
.wave-transition {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.3s;
}

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

.wave-transition-content {
  max-width: 600px;
  width: 90%;
  text-align: center;
}

.wave-header {
  margin-bottom: 40px;
}

.wave-complete-icon {
  font-size: 80px;
  color: #10b981;
  margin-bottom: 20px;
  animation: scaleIn 0.5s;
}

@keyframes scaleIn {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

.wave-header h2 {
  font-size: 36px;
  font-weight: 900;
  color: white;
  margin: 0;
}

.wave-warning {
  display: flex;
  gap: 20px;
  align-items: center;
  background: rgba(239, 68, 68, 0.2);
  border: 2px solid #ef4444;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 40px;
}

.warning-icon {
  font-size: 48px;
}

.warning-text {
  text-align: left;
}

.warning-title {
  font-size: 16px;
  font-weight: 900;
  color: #fca5a5;
  margin-bottom: 5px;
}

.warning-desc {
  font-size: 13px;
  color: #cbd5e1;
}

.wave-next {
  margin-bottom: 40px;
}

.wave-next h3 {
  font-size: 20px;
  font-weight: 900;
  color: #fbbf24;
  margin-bottom: 20px;
}

.wave-progress-bar {
  height: 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 10px;
}

.wave-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #fbbf24, #d97706);
  transition: width 0.5s;
}

.wave-count {
  font-size: 14px;
  font-weight: 700;
  color: #94a3b8;
}

.wave-countdown {
  animation: pulse 1s infinite;
}

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

.countdown-number {
  font-size: 80px;
  font-weight: 900;
  color: #fbbf24;
  text-shadow: 0 0 30px rgba(251, 191, 36, 0.8);
}

.countdown-label {
  font-size: 14px;
  color: #94a3b8;
  margin-top: 10px;
}

/* Wave Indicator HUD (during battle) */
.wave-indicator-hud {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(15, 23, 42, 0.9);
  border: 2px solid rgba(251, 191, 36, 0.5);
  border-radius: 12px;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  backdrop-filter: blur(10px);
  z-index: 100;
}

.wave-icon {
  font-size: 32px;
}

.wave-info {
  text-align: left;
}

.wave-current {
  font-size: 16px;
  font-weight: 900;
  color: #fbbf24;
  line-height: 1;
}

.wave-total {
  font-size: 12px;
  color: #94a3b8;
}

.wave-bar {
  display: flex;
  gap: 8px;
}

.wave-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition: all 0.3s;
}

.wave-dot.completed {
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
}

.wave-dot.active {
  background: #fbbf24;
  box-shadow: 0 0 10px #fbbf24;
  animation: dotPulse 1s infinite;
}

@keyframes dotPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.3); }
}

.wave-dot.pending {
  background: rgba(255, 255, 255, 0.1);
}

/* ═══════════════════════════════════════════════════════════════════════
   RESPONSIVE STYLES
   ═══════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .pve-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .sector-grid {
    grid-template-columns: 1fr;
  }
  
  .pre-battle-content {
    grid-template-columns: 1fr;
  }
  
  .result-stats {
    grid-template-columns: 1fr;
  }
  
  .map-header-content {
    flex-direction: column;
    gap: 15px;
  }
  
  .map-progress {
    text-align: center;
  }
  
  .progress-bar-container {
    margin: 0 auto;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   END OF PVE STYLES
   ═══════════════════════════════════════════════════════════════════════ */
