
#new-pvp-modal .modal-content {

  max-width: 1400px;
  width: 96%;
  height: auto;
  max-height: 96vh;          
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;

  padding: 24px;
  background-color: var(--bg-color-dark);
  border: 1px solid var(--primal-color);
  box-shadow: 0 0 25px rgba(0, 230, 210, 0.4);
}


#new-pvp-modal .modal-content > * { min-height: 0; }


#new-pvp-lobby {
  text-align: center;
  padding: 30px;
}
#new-pvp-lobby h2 {
  font-size: 2.2em;
  color: var(--primal-color);
  text-shadow: 0 0 10px var(--primal-color);
}
#new-pvp-lobby-rp-display {
  font-size: 1.4em;
  margin: 20px 0;
}
#new-pvp-my-rp { color: var(--primary-color); font-weight: 700; }
#new-pvp-queue-status {
  font-size: 1.1em; color: var(--secondary-color);
  margin: 14px 0; min-height: 1.4em;
}
#new-pvp-match-start-btn,
#new-pvp-match-cancel-btn {
  width: 70%; max-width: 420px;
  padding: 16px;
  font-size: 1.2em; font-weight: 800;
  border-radius: 10px;
}
#new-pvp-match-start-btn {
  background-color: var(--primal-color);
  color: var(--bg-color-dark);
  text-shadow: 0 1px 1px rgba(0,0,0,0.35);
}
#new-pvp-match-cancel-btn { background-color: var(--fail-color); color: #fff; }


#new-pvp-arena {
  display: none;            
  width: 100%;
  background: radial-gradient(circle at center, rgba(0,0,0,0.85) 10%, rgba(10,10,15,0.9) 100%);
  border: 2px solid rgba(0, 230, 210, 0.25);
  box-shadow: 0 0 60px rgba(0, 230, 210, 0.25) inset, 0 0 25px rgba(0, 0, 0, 0.5);
  padding: 28px 18px;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}

#new-pvp-arena-title {
  text-align: center;
  font-size: 1.6em;
  color: var(--secondary-color);
  margin-bottom: 16px;
}
#new-pvp-arena-timer {
  text-align: center;
  font-size: 2.8em;
  font-weight: 900;
  color: var(--fail-color);
  text-shadow: 0 0 10px rgba(255, 59, 48, 0.7);
  margin-bottom: 18px;
  line-height: 1;
}

.new-pvp-arena-container {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 120px 1fr;  
  align-items: stretch;                 
  gap: 20px;
  min-height: 0;
}

.new-pvp-player-panel {
  backdrop-filter: blur(12px);
  background: rgba(20, 20, 25, 0.6);
  border: 1px solid rgba(0, 230, 210, 0.3);
  box-shadow: 0 0 16px rgba(0, 230, 210, 0.15);
  border-radius: 12px;
  padding: 18px;
  transition: all 0.25s ease;
  min-height: 0;
}
.new-pvp-player-panel:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 22px rgba(0, 230, 210, 0.28);
}

.new-pvp-player-name {
  font-size: 1.5em;
  font-weight: 800;
  text-align: center;
  margin-bottom: 14px;
  text-shadow: 0 0 8px rgba(255,255,255,0.25);
  line-height: 1.2;
}
.new-pvp-player-name.my-name { color: var(--success-color); }
.new-pvp-player-name.opponent-name { color: var(--fail-color); }

.pvp-vs-text {
  grid-column: 2;
  text-align: center;
  font-size: 3.8em;
  font-weight: 900;
  color: #00e6d2;
  text-shadow: 0 0 18px rgba(0,230,210,0.8), 0 0 36px rgba(0,230,210,0.35);
  letter-spacing: 1px;
  align-self: start;
  user-select: none;
  margin-top: 4px;
}

.new-pvp-resource-bar {
  width: 100%;
  height: 34px;
  background-color: rgba(0, 0, 0, .3);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  border: 1px solid #000;
  margin-bottom: 8px;
}
.new-pvp-bar-inner {
  height: 100%;
  width: 100%;
  transition: width 0.3s ease-out;
}
#new-pvp-my-hp-bar { background: linear-gradient(to right, #28b485, #7ed56f); }
#new-pvp-opponent-hp-bar { background: linear-gradient(to right, #c0392b, #e74c3c); }

.new-pvp-bar-text {
  position: absolute; inset: 0;
  display: flex; justify-content: center; align-items: center;
  font-weight: 800; color: #fff; text-shadow: 1px 1px 2px #000;
}

.new-pvp-resource-bar.shield-bar { margin-top: -5px; height: 24px; }
#new-pvp-my-shield-bar, #new-pvp-opponent-shield-bar {
  background: linear-gradient(to right, #af52de, #c774e8);
}
.shield-bar .new-pvp-bar-text { font-size: 0.9em; }

.new-pvp-buff-display {
  display: flex; flex-wrap: wrap; gap: 5px;
  justify-content: center;
  min-height: 30px; margin-top: 12px; padding: 6px;
  border-radius: 6px;
  background-color: rgba(0,0,0,0.28);
}
.new-pvp-buff-display .buff-icon {
  padding: 4px 8px; font-size: 0.9em; font-weight: 600;
  background-color: var(--surface-color); color: var(--text-color);
  border-radius: 4px; box-shadow: none;
}
.new-pvp-buff-display .buff-icon.awakening,
.new-pvp-buff-display .buff-icon.awakening_earring { background-color: var(--gold-color); color: #000; }
.new-pvp-buff-display .buff-icon.fury_attack { background-color: #FF4D4D; color: #fff; }
.new-pvp-buff-display .buff-icon.predator_state { background-color: #CF2222; color: #fff; }
.new-pvp-buff-display .buff-icon.necklace_invincible { background-color: #fff; color: #000; border: 1px solid #000; }
.new-pvp-buff-display .buff-icon.necklace_cooldown { background-color: #555; color: #aaa; }

.pvp-gear-section {
  display: flex; flex-direction: column; gap: 12px;
  padding: 12px 0; margin: 12px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.pvp-equip-slots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.pvp-equip-slots-grid .slot {
  width: 100%; aspect-ratio: 1 / 1;
  border: 3px dashed var(--border-color);
  border-radius: 12px; padding: 5px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.2);
}
.pvp-equip-slots-grid .slot .inventory-item {
  width: 100%; height: 100%; border: none; background: none; cursor: default;
}
.pvp-equip-slots-grid .slot .item-image img { padding: 8px; }
.pvp-equip-slots-grid .slot .item-info { display: none; }
.pvp-equip-slots-grid .slot .item-enhancement-level { font-size: 0.9em; top: 4px; right: 4px; }
.pvp-equip-slots-grid .slot .item-refinement-level { font-size: 0.8em; top: 5px; left: 5px; }

.pvp-artifact-sockets-grid {
  display: flex; justify-content: center; gap: 14px; margin-top: 8px;
}
.pvp-artifact-sockets-grid .artifact-socket {
  width: 60px; height: 60px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; position: relative;
  transition: all .25s; border: 2px solid #111;
  background: radial-gradient(ellipse at center, #555 0%, #222 100%);
  box-shadow: inset 0 0 5px rgba(0,0,0,0.8);
}
.pvp-artifact-sockets-grid .artifact-socket.unlocked { box-shadow: 0 0 10px var(--legendary-color); }
.pvp-artifact-sockets-grid .artifact-socket img {
  width: 100%; height: 100%; object-fit: cover;
}

.new-pvp-stats-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px;
  background: rgba(255,255,255,0.05);
  border-radius: 10px; padding: 12px;
  border: 1px solid rgba(255,255,255,0.08);
}

.new-pvp-stats-grid .new-pvp-stat-line,
.new-pvp-stats-grid .stat-line {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.98em; line-height: 1.35; white-space: nowrap;
}
.new-pvp-stats-grid .new-pvp-stat-line span:first-child,
.new-pvp-stats-grid .stat-line span:first-child { color: var(--text-muted); }
.new-pvp-stats-grid .new-pvp-stat-line strong,
.new-pvp-stats-grid .stat-line strong { color: var(--text-color); font-weight: 800; }

.new-pvp-stats-grid .primal-color { color: var(--primal-color); }
.new-pvp-stats-grid .fail-color { color: var(--fail-color); }
.new-pvp-stats-grid .gold-color { color: var(--gold-color); }
.new-pvp-stats-grid .damage-color { color: #3498db; }
.new-pvp-stats-grid .shield-color { color: var(--epic-color); }
.new-pvp-stats-grid .dodge-color { color: var(--success-color); }
.new-pvp-stats-grid .playtime-color { color: var(--secondary-color); }

#new-pvp-combat-log {
  grid-column: 2;                 
  display: block;
  height: 260px; max-height: 260px;
  overflow-y: auto;              
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;

  margin-top: 12px;
  padding: 14px;

  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  box-shadow: inset 0 0 8px rgba(0,230,210,0.2);

  color: #ccc;
  font-size: 0.95em;
  line-height: 1.55;
}
#new-pvp-combat-log p { margin-bottom: 4px; color: var(--text-muted); }
#new-pvp-combat-log p:empty { display: none; }
#new-pvp-combat-log strong { color: var(--text-color); font-weight: 800; }

#new-pvp-forfeit-btn {
	display: none;
  grid-column: 2;
  width: 100%;
  margin-top: 18px;
  padding: 12px;
  background: linear-gradient(90deg, #ff3b30, #c0392b);
  border: none; border-radius: 8px;
  color: #fff; font-weight: 800;
  text-shadow: 0 1px 2px #000;
  transition: all 0.25s;
}
#new-pvp-forfeit-btn:hover {
  background: linear-gradient(90deg, #ff4d4d, #e74c3c);
  transform: scale(1.02);
}


#new-pvp-result { display: none; text-align: center; padding: 32px 18px; }
#new-pvp-result-title { font-size: 3.2em; font-weight: 900; margin-bottom: 16px; }
#new-pvp-result-title.victory { color: var(--success-color); text-shadow: 0 0 14px var(--success-color); }
#new-pvp-result-title.defeat { color: var(--fail-color); text-shadow: 0 0 14px var(--fail-color); }
#new-pvp-result-body { font-size: 1.4em; line-height: 1.6; margin: 18px 0; }
.rp-change-value { font-weight: 900; font-size: 1.1em; }
.rp-gain { color: var(--success-color); }
.rp-loss { color: var(--fail-color); }
#new-pvp-result-close-btn {
  width: 60%; max-width: 320px; padding: 14px; font-size: 1.1em;
}


#new-pvp-modal .modal-content::-webkit-scrollbar,
#new-pvp-combat-log::-webkit-scrollbar { width: 8px; }
#new-pvp-modal .modal-content::-webkit-scrollbar-thumb,
#new-pvp-combat-log::-webkit-scrollbar-thumb {
  background: #555; border-radius: 4px;
}
#new-pvp-modal .modal-content::-webkit-scrollbar-track,
#new-pvp-combat-log::-webkit-scrollbar-track { background: transparent; }


@media (max-width: 1024px) {
  #new-pvp-arena { padding: 22px 12px; }

  .new-pvp-arena-container {
    grid-template-columns: 1fr 96px 1fr;
    gap: 16px;
  }
  .pvp-vs-text { font-size: 3.2em; }
  #new-pvp-combat-log { height: 220px; max-height: 220px; }
}

@media (max-width: 820px) {
  #new-pvp-modal .modal-content {
    max-height: 96vh;
    width: 98%;
    padding: 16px;
  }

  .new-pvp-arena-container {
    grid-template-columns: 1fr;     
    gap: 14px;
  }

  .pvp-vs-text,
  #new-pvp-combat-log,
  #new-pvp-forfeit-btn { grid-column: 1; }
  #new-pvp-arena-timer { font-size: 2.4em; margin-bottom: 12px; }

  .pvp-vs-text { font-size: 2.6em; margin: 4px 0 2px; }
  #new-pvp-combat-log { height: 200px; max-height: 200px; }
  .new-pvp-player-name { font-size: 1.35em; margin-bottom: 10px; }

  .pvp-equip-slots-grid .slot { width: 100%; height: auto; }
  .pvp-artifact-sockets-grid .artifact-socket { width: 52px; height: 52px; }

  .new-pvp-stats-grid {
    grid-template-columns: 1fr;   
    gap: 8px;
  }

  #new-pvp-match-start-btn,
  #new-pvp-match-cancel-btn { width: 85%; }
}


@media (max-width: 480px) {
  .pvp-vs-text { font-size: 2.2em; }
  #new-pvp-combat-log { height: 180px; max-height: 180px; }
  .new-pvp-player-panel { padding: 14px; }
}


#new-pvp-arena .new-pvp-player-name.my-name { color: var(--success-color); }
#new-pvp-arena .new-pvp-player-name.opponent-name { color: var(--fail-color); }
