/* ═══════════════════════════════════════════════════════════════════════════════
   OLYMPUS RISING - CHARACTER SHEET UI
   Attributes, abilities, paths, and progression
   ═══════════════════════════════════════════════════════════════════════════════ */

.character-sheet {
  padding: 12px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
}

.cs-content {
  flex: 1;
  overflow-y: auto;
  min-height: 0; /* Allow flex child to shrink */
}

/* ─────────────────────────────────────────────────────────────────────────────────
   HEADER
   ───────────────────────────────────────────────────────────────────────────────── */

.cs-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: linear-gradient(135deg, rgba(30, 40, 60, 0.9), rgba(20, 30, 50, 0.95));
  border-radius: 12px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  margin-bottom: 16px;
}

.cs-identity {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cs-portrait {
  position: relative;
  width: 70px;
  height: 70px;
}

.cs-avatar {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, rgba(13, 31, 51, 0.95), rgba(20, 40, 65, 0.9));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid rgba(212, 175, 55, 0.6);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
}

.cs-god-symbol {
  font-size: 2rem;
}

.cs-portrait .god-portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.cs-portrait .cs-level {
  position: absolute;
  bottom: -5px;
  right: -5px;
  background: linear-gradient(135deg, #d4af37, #aa8a2e);
  color: #1a1a2e;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 2px 8px;
  border-radius: 10px;
  z-index: 1;
}

.cs-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cs-name {
  margin: 0;
  font-size: 1.4rem;
  color: #fff;
}

.cs-lineage {
  margin: 0;
  font-size: 0.85rem;
  opacity: 0.8;
}

.cs-path-badge {
  font-size: 0.75rem;
}

.path-chosen {
  padding: 4px 10px;
  background: rgba(46, 204, 113, 0.2);
  border: 1px solid rgba(46, 204, 113, 0.4);
  border-radius: 12px;
  color: #2ecc71;
}

.path-unchoosed {
  padding: 4px 10px;
  background: rgba(241, 196, 15, 0.2);
  border: 1px solid rgba(241, 196, 15, 0.4);
  border-radius: 12px;
  color: #f1c40f;
}

.cs-resources {
  display: flex;
  gap: 16px;
}

.cs-resource {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 16px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  min-width: 80px;
}

.cs-resource.available {
  background: rgba(46, 204, 113, 0.15);
  border: 1px solid rgba(46, 204, 113, 0.3);
  animation: resourcePulse 2s infinite;
}

@keyframes resourcePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.4); }
  50% { box-shadow: 0 0 15px 2px rgba(46, 204, 113, 0.2); }
}

.resource-icon {
  font-size: 1.5rem;
}

.resource-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
}

.resource-label {
  font-size: 0.65rem;
  opacity: 0.7;
  text-transform: uppercase;
}

/* ─────────────────────────────────────────────────────────────────────────────────
   TABS
   ───────────────────────────────────────────────────────────────────────────────── */

.cs-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.cs-tab {
  flex: 1;
  padding: 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.85rem;
}

.cs-tab:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.cs-tab.active {
  background: rgba(212, 175, 55, 0.2);
  border-color: rgba(212, 175, 55, 0.5);
  color: #d4af37;
}

/* ─────────────────────────────────────────────────────────────────────────────────
   ATTRIBUTES TAB
   ───────────────────────────────────────────────────────────────────────────────── */

.attributes-tab {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
}

@media (max-width: 768px) {
  .attributes-tab {
    grid-template-columns: 1fr;
  }
}

.attributes-panel {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  padding: 16px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.panel-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #d4af37;
}

.points-available {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(46, 204, 113, 0.15);
  border-radius: 20px;
  font-size: 0.85rem;
}

.points-icon {
  font-size: 1rem;
}

.attributes-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.attribute-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  border-left: 4px solid var(--attr-color, #666);
}

.attr-icon-wrap {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--attr-color), color-mix(in srgb, var(--attr-color) 60%, black));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  flex-shrink: 0;
}

.attr-icon-wrap .game-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.attr-icon-wrap .icon-fallback {
  font-size: 1.5rem;
}

.attr-icon {
  font-size: 1.5rem;
}

.attr-info {
  flex: 1;
}

.attr-header {
  display: flex;
  align-items: center;
  margin-bottom: 4px;
}

.attr-name {
  font-weight: 600;
  font-size: 1rem;
}

.attr-total {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  min-width: 50px;
  text-align: center;
}

.attr-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.7rem;
  opacity: 0.7;
}

.breakdown-base { color: #aaa; }
.breakdown-god { color: #d4af37; }
.breakdown-level { color: #3498db; }
.breakdown-alloc { color: #2ecc71; }
.breakdown-pending { color: #e74c3c; font-weight: 600; }

.attr-desc {
  margin: 4px 0 0;
  font-size: 0.75rem;
  opacity: 0.6;
}

.attr-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.attr-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s;
}

.attr-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.2);
  border-color: #d4af37;
}

.attr-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.attr-btn.plus:not(:disabled) {
  border-color: #2ecc71;
  color: #2ecc71;
}

.attr-btn.minus:not(:disabled) {
  border-color: #e74c3c;
  color: #e74c3c;
}

.pending-display {
  min-width: 30px;
  text-align: center;
  font-weight: 600;
  color: #e74c3c;
}

.allocate-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.allocate-actions .btn {
  flex: 1;
}

.allocation-warning {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px;
  background: rgba(231, 76, 60, 0.1);
  border-radius: 6px;
  font-size: 0.75rem;
  color: #e74c3c;
}

/* Derived Stats */
.derived-stats-panel {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  padding: 16px;
}

.derived-stats-panel h3 {
  margin: 0 0 16px;
  font-size: 1rem;
  color: #d4af37;
}

.derived-stats-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.derived-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
}

.ds-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.ds-icon .game-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.ds-icon .icon-fallback {
  font-size: 1rem;
}

.ds-label {
  flex: 1;
  font-size: 0.8rem;
  opacity: 0.8;
}

.ds-value {
  font-weight: 600;
  color: #2ecc71;
}

/* ─────────────────────────────────────────────────────────────────────────────────
   ABILITIES TAB
   ───────────────────────────────────────────────────────────────────────────────── */

.abilities-tab {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 20px; /* Extra space at bottom for scrolling */
}

.equipped-bar {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  padding: 14px;
}

.equipped-bar h3 {
  margin: 0 0 12px;
  font-size: 0.9rem;
  color: #d4af37;
}

.equipped-slots {
  display: flex;
  gap: 10px;
}

.eq-slot {
  flex: 1;
  padding: 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 2px dashed rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  cursor: pointer;
  transition: all 0.2s;
}

.eq-slot:hover {
  border-color: rgba(212, 175, 55, 0.5);
  background: rgba(212, 175, 55, 0.1);
}

.eq-slot.filled {
  border-style: solid;
  border-color: rgba(46, 204, 113, 0.5);
  background: rgba(46, 204, 113, 0.1);
}

.eq-icon {
  font-size: 1.8rem;
}

.eq-name {
  font-size: 0.7rem;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.eq-key {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 18px;
  height: 18px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 4px;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.eq-empty {
  font-size: 2rem;
  opacity: 0.3;
}

.eq-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  background: rgba(231, 76, 60, 0.8);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 0.7rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
}

.eq-slot:hover .eq-remove {
  opacity: 1;
}

/* Skill Points Bar */
.skill-points-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(52, 152, 219, 0.15);
  border-radius: 8px;
  font-size: 0.9rem;
}

.sp-icon {
  font-size: 1.2rem;
}

.sp-count {
  font-weight: 700;
  font-size: 1.1rem;
  color: #3498db;
}

.sp-hint {
  margin-left: auto;
  font-size: 0.75rem;
  opacity: 0.6;
}

/* Ability Tree */
.ability-tree {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: min-content; /* Ensure full content is rendered */
}

.ability-tier {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  padding: 14px;
}

.tier-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tier-name {
  font-weight: 600;
  color: #d4af37;
}

.tier-badge {
  font-size: 0.7rem;
  padding: 3px 8px;
  background: rgba(212, 175, 55, 0.2);
  border-radius: 10px;
  color: #d4af37;
}

.tier-abilities {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.ability-node {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.ability-node:hover {
  transform: scale(1.02);
  border-color: rgba(212, 175, 55, 0.5);
}

.ability-node.locked {
  opacity: 0.4;
  filter: grayscale(0.5);
}

.ability-node.available {
  border-color: rgba(241, 196, 15, 0.6);
  box-shadow: 0 0 10px rgba(241, 196, 15, 0.2);
}

.ability-node.unlocked {
  border-color: rgba(46, 204, 113, 0.5);
  background: rgba(46, 204, 113, 0.1);
}

.ability-node.equipped {
  border-color: rgba(52, 152, 219, 0.6);
  background: rgba(52, 152, 219, 0.15);
}

.node-icon-wrap {
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.node-type {
  position: absolute;
  top: -4px;
  left: -4px;
  font-size: 0.6rem;
  opacity: 0.5;
}

.node-icon {
  font-size: 1.5rem;
}

.node-level {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 16px;
  height: 16px;
  background: #2ecc71;
  border-radius: 50%;
  font-size: 0.6rem;
  font-weight: 700;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.node-info {
  flex: 1;
  min-width: 0;
}

.node-name {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.node-cost {
  font-size: 0.65rem;
  opacity: 0.7;
}

.unlock-indicator {
  width: 20px;
  height: 20px;
  background: #f1c40f;
  border-radius: 50%;
  color: #000;
  font-weight: 700;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: unlockPulse 1.5s infinite;
}

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

.equipped-indicator {
  font-size: 0.9rem;
}

/* ─────────────────────────────────────────────────────────────────────────────────
   PATH TAB - Multi-path Constellation Skill Tree (Skyrim-style)
   ───────────────────────────────────────────────────────────────────────────────── */

.path-tab.constellation-tree {
  padding: 16px;
  background: radial-gradient(ellipse at center top, rgba(13, 31, 51, 0.5) 0%, transparent 70%);
}

.path-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.path-title-section h3 {
  margin: 0 0 4px;
  font-size: 1.2rem;
  color: #d4af37;
}

.path-title-section p {
  margin: 0;
  font-size: 0.8rem;
  opacity: 0.7;
}

.skill-points-display {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(212, 175, 55, 0.05));
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 8px;
}

.skill-points-display .sp-available {
  font-size: 1.5rem;
  font-weight: 700;
  color: #d4af37;
}

.skill-points-display .sp-label {
  font-size: 0.75rem;
  opacity: 0.7;
}

/* Three paths in a row */
.paths-constellation {
  display: flex;
  flex-direction: row;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 10px;
  -webkit-overflow-scrolling: touch;
}

.path-constellation {
  flex: 1;
  min-width: 200px;
  max-width: 280px;
  background: linear-gradient(180deg, rgba(13, 31, 51, 0.8) 0%, rgba(5, 15, 30, 0.9) 100%);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 12px;
  padding: 12px;
  position: relative;
}

.path-constellation-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.path-icon-wrapper {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(212, 175, 55, 0.05));
  border: 2px solid rgba(212, 175, 55, 0.4);
  border-radius: 50%;
}

.path-name-info h4 {
  margin: 0;
  font-size: 1rem;
  color: #d4af37;
}

.path-name-info .path-archetype {
  font-size: 0.7rem;
  opacity: 0.6;
  text-transform: uppercase;
}

.path-progress {
  margin-left: auto;
  font-size: 0.8rem;
  color: rgba(212, 175, 55, 0.8);
}

/* Constellation area */
.constellation-area {
  position: relative;
  height: 280px;
}

.constellation-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.constellation-line {
  stroke: rgba(212, 175, 55, 0.2);
  stroke-width: 1.5;
  transition: all 0.3s ease;
}

.constellation-line.active {
  stroke: rgba(212, 175, 55, 0.6);
  filter: drop-shadow(0 0 3px rgba(212, 175, 55, 0.5));
}

.star-decoration {
  fill: rgba(255, 255, 255, 0.3);
}

/* Skill nodes */
.nodes-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.skill-node {
  position: absolute;
  transform: translate(-50%, -50%);
  cursor: pointer;
  text-align: center;
  transition: all 0.3s ease;
}

.node-inner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  margin: 0 auto;
}

.skill-node.locked .node-inner {
  background: rgba(50, 50, 60, 0.8);
  border: 2px solid rgba(100, 100, 110, 0.5);
  opacity: 0.5;
}

.skill-node.available .node-inner {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.3), rgba(150, 120, 40, 0.2));
  border: 2px solid rgba(212, 175, 55, 0.6);
  animation: nodeGlow 2s ease-in-out infinite;
}

.skill-node.unlocked .node-inner {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.6), rgba(180, 140, 40, 0.4));
  border: 2px solid #d4af37;
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
}

@keyframes nodeGlow {
  0%, 100% { box-shadow: 0 0 5px rgba(212, 175, 55, 0.3); }
  50% { box-shadow: 0 0 15px rgba(212, 175, 55, 0.6); }
}

.skill-node:hover .node-inner {
  transform: scale(1.15);
}

.skill-node.locked:hover .node-inner {
  transform: scale(1);
  cursor: not-allowed;
}

.node-name {
  display: block;
  font-size: 0.6rem;
  margin-top: 4px;
  max-width: 70px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.8;
}

.skill-node.unlocked .node-name {
  color: #d4af37;
  opacity: 1;
}

/* Legend */
.path-legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  opacity: 0.7;
}

.node-sample {
  width: 16px;
  height: 16px;
  border-radius: 50%;
}

.node-sample.locked {
  background: rgba(50, 50, 60, 0.8);
  border: 1px solid rgba(100, 100, 110, 0.5);
}

.node-sample.available {
  background: rgba(212, 175, 55, 0.3);
  border: 1px solid rgba(212, 175, 55, 0.6);
}

.node-sample.unlocked {
  background: rgba(212, 175, 55, 0.6);
  border: 1px solid #d4af37;
  box-shadow: 0 0 5px rgba(212, 175, 55, 0.5);
}

/* Path invested badge */
.path-invested {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 10px;
  font-size: 0.75rem;
  color: #d4af37;
}

/* Responsive */
@media (max-width: 700px) {
  .paths-constellation {
    flex-direction: column;
    align-items: center;
  }
  
  .path-constellation {
    max-width: 320px;
    width: 100%;
  }
}

/* Chosen Path - Legacy support */
.path-tab.chosen {
  text-align: center;
}

.chosen-path-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.path-title h3 {
  margin: 0;
  font-size: 1.5rem;
  color: #d4af37;
}

.path-title .path-archetype {
  font-size: 0.9rem;
}

.path-description {
  max-width: 500px;
  margin: 0 auto 24px;
  font-size: 1rem;
  line-height: 1.6;
}

.path-bonuses {
  max-width: 400px;
  margin: 0 auto 24px;
  text-align: left;
}

.path-bonuses h4 {
  margin: 0 0 12px;
  color: #d4af37;
}

.bonuses-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.path-bonus {
  padding: 10px 14px;
  background: rgba(46, 204, 113, 0.15);
  border-left: 3px solid #2ecc71;
  border-radius: 4px;
  font-size: 0.9rem;
}

.path-permanent-notice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  font-size: 0.85rem;
  opacity: 0.7;
}

/* ─────────────────────────────────────────────────────────────────────────────────
   SUMMARY TAB
   ───────────────────────────────────────────────────────────────────────────────── */

.summary-tab {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.summary-card {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.summary-card.power-card {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(100, 80, 40, 0.3));
  border: 1px solid rgba(212, 175, 55, 0.4);
}

.card-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  opacity: 0.7;
}

.power-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: #d4af37;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

@media (max-width: 600px) {
  .summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.summary-card .card-icon {
  font-size: 1.5rem;
}

.summary-card .card-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}

.summary-section {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  padding: 16px;
}

.summary-section h4 {
  margin: 0 0 14px;
  font-size: 0.95rem;
  color: #d4af37;
}

.stat-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stat-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stat-bar-row .stat-name {
  width: 80px;
  font-size: 0.8rem;
  text-transform: capitalize;
}

.stat-bar-bg {
  flex: 1;
  height: 12px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 6px;
  overflow: hidden;
}

.stat-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3498db, #2ecc71);
  border-radius: 6px;
  transition: width 0.5s ease;
}

.stat-bar-row .stat-val {
  width: 40px;
  text-align: right;
  font-weight: 600;
  font-size: 0.85rem;
}

.loadout-display {
  display: flex;
  gap: 10px;
}

.loadout-slot {
  flex: 1;
  padding: 12px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.loadout-slot.filled {
  background: rgba(46, 204, 113, 0.1);
}

.loadout-slot .slot-key {
  width: 24px;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
}

.loadout-slot .slot-ability {
  font-size: 0.8rem;
}

.loadout-slot .slot-empty {
  font-size: 0.8rem;
  opacity: 0.5;
}

/* ─────────────────────────────────────────────────────────────────────────────────
   MODALS
   ───────────────────────────────────────────────────────────────────────────────── */

.ability-modal .modal-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ability-modal-icon {
  font-size: 2.5rem;
}

.ability-modal-title h3 {
  margin: 0;
}

.ability-type {
  font-size: 0.8rem;
  opacity: 0.7;
}

.ability-description {
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 16px;
}

.ability-stat {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
}

.ability-level-info {
  margin-top: 16px;
  padding: 12px;
  background: rgba(46, 204, 113, 0.1);
  border-radius: 8px;
}

.upgrade-hint {
  display: block;
  font-size: 0.8rem;
  opacity: 0.7;
  margin-top: 4px;
}

.max-level {
  color: #d4af37;
  font-weight: 600;
}

.ability-requirements {
  margin-top: 16px;
  padding: 12px;
  background: rgba(231, 76, 60, 0.1);
  border-radius: 8px;
  font-size: 0.85rem;
  color: #e74c3c;
}

/* Equip modals */
.slot-selection {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.slot-option {
  flex: 1;
  padding: 16px;
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}

.slot-option:hover {
  border-color: #d4af37;
  background: rgba(212, 175, 55, 0.1);
}

.slot-option .slot-num {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.slot-option .slot-current {
  font-size: 0.8rem;
  color: #2ecc71;
}

.slot-option .slot-empty {
  font-size: 0.8rem;
  opacity: 0.5;
}

.ability-selection {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
}

.ability-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.ability-option:hover {
  border-color: #d4af37;
  background: rgba(212, 175, 55, 0.1);
}

.ability-option .ab-icon {
  font-size: 1.5rem;
}

.ability-option .ab-name {
  font-weight: 600;
}

.ability-option .ab-meta {
  font-size: 0.75rem;
  opacity: 0.7;
}

.no-abilities {
  text-align: center;
  opacity: 0.6;
  padding: 20px;
}


/* ═══════════════════════════════════════════════════════════════════════════════
   SPRINT 3 ENHANCEMENTS - Character Sheet & Stat Allocation
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Enhanced attribute row hover */
.attribute-row {
  transition: all 0.3s ease;
  border-radius: 8px;
  padding: 1rem;
}

.attribute-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Highlight row with pending changes */
.attribute-row.has-pending {
  background: rgba(39, 174, 96, 0.1);
  border-left: 3px solid #27ae60;
}

/* Stat increase animation */
.attribute-row.stat-increased {
  animation: stat-increase-flash 0.5s ease;
}

@keyframes stat-increase-flash {
  0% { background-color: transparent; }
  30% { background-color: rgba(39, 174, 96, 0.3); }
  100% { background-color: transparent; }
}

/* Total number animation when increased */
.attr-total.increased {
  animation: number-pop 0.3s ease;
  color: #27ae60 !important;
}

@keyframes number-pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.4); }
  100% { transform: scale(1); }
}

/* Points available indicator */
#points-available.has-points {
  animation: points-available-pulse 2s ease infinite;
  background: rgba(39, 174, 96, 0.15);
  border-radius: 8px;
  padding: 8px 12px;
}

@keyframes points-available-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(39, 174, 96, 0); }
  50% { box-shadow: 0 0 15px rgba(39, 174, 96, 0.4); }
}

/* Enhanced +/- buttons */
.attr-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.attr-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  font-size: 1.3rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.attr-btn.plus {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  color: white;
  box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
}

.attr-btn.plus:hover:not(:disabled) {
  transform: scale(1.15);
  box-shadow: 0 4px 15px rgba(39, 174, 96, 0.5);
}

.attr-btn.plus:active:not(:disabled) {
  transform: scale(0.95);
}

.attr-btn.minus {
  background: linear-gradient(135deg, #c0392b, #e74c3c);
  color: white;
  box-shadow: 0 2px 8px rgba(192, 57, 43, 0.3);
}

.attr-btn.minus:hover:not(:disabled) {
  transform: scale(1.15);
  box-shadow: 0 4px 15px rgba(192, 57, 43, 0.5);
}

.attr-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Pending display */
.pending-display {
  min-width: 45px;
  text-align: center;
  font-weight: bold;
  color: #27ae60;
  font-size: 1.1rem;
}

/* Confirm/Reset buttons */
.allocate-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.allocate-actions .btn {
  padding: 12px 24px;
  font-size: 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

#confirm-allocate-btn {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  border: none;
  color: white;
  animation: confirm-pulse 1.5s ease infinite;
}

@keyframes confirm-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(39, 174, 96, 0); }
  50% { box-shadow: 0 0 0 8px rgba(39, 174, 96, 0.2); }
}

#confirm-allocate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(39, 174, 96, 0.4);
}

#reset-allocate-btn {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.8);
}

#reset-allocate-btn:hover {
  background: rgba(231, 76, 60, 0.2);
  border-color: #e74c3c;
  color: #e74c3c;
}

/* Allocation warning styling */
.allocation-warning {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 12px;
  background: rgba(243, 156, 18, 0.1);
  border: 1px solid rgba(243, 156, 18, 0.3);
  border-radius: 8px;
  font-size: 0.85rem;
  color: #f39c12;
}

/* Derived stats improvements */
.derived-stat {
  transition: all 0.3s ease;
}

.derived-stat:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.05);
}

/* Attribute breakdown styling */
.attr-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.attr-breakdown span {
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
}

.breakdown-god { color: #9b59b6; }
.breakdown-level { color: #3498db; }
.breakdown-alloc { color: #27ae60; }
.breakdown-pending { color: #f1c40f; animation: pending-blink 1s ease infinite; }

@keyframes pending-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

