/**
 * Roguelike Mode - Void Runs Styling
 */

/* Roguelike Modal */
.roguelike-content {
  max-width: 700px;
  max-height: 85vh;
  overflow-y: auto;
}

.roguelike-content h2 {
  text-align: center;
  color: var(--accent-purple, #9b59b6);
  text-shadow: 0 0 20px rgba(155, 89, 182, 0.5);
  margin-bottom: 5px;
}

.roguelike-subtitle {
  text-align: center;
  color: var(--text-muted, #888);
  margin-bottom: 20px;
}

/* Tabs */
.roguelike-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color, #333);
  padding-bottom: 10px;
}

.roguelike-tab {
  flex: 1;
  padding: 10px 15px;
  background: var(--bg-panel, #1a1a2e);
  border: 1px solid var(--border-color, #333);
  border-radius: 6px;
  color: var(--text-color, #fff);
  cursor: pointer;
  transition: all 0.2s ease;
}

.roguelike-tab:hover {
  background: var(--bg-panel-hover, #252545);
  border-color: var(--accent-purple, #9b59b6);
}

.roguelike-tab.active {
  background: linear-gradient(135deg, rgba(155, 89, 182, 0.2), rgba(142, 68, 173, 0.1));
  border-color: var(--accent-purple, #9b59b6);
  color: var(--accent-purple, #9b59b6);
}

/* Void Currency Display */
.void-currency {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px;
  background: linear-gradient(135deg, rgba(155, 89, 182, 0.15), rgba(142, 68, 173, 0.05));
  border: 1px solid var(--accent-purple, #9b59b6);
  border-radius: 8px;
  margin-bottom: 20px;
}

.void-currency.large {
  padding: 20px;
  margin-bottom: 25px;
}

.void-icon {
  font-size: 28px;
  animation: void-swirl 3s ease-in-out infinite;
}

.void-amount {
  font-size: 24px;
  font-weight: bold;
  color: var(--accent-purple, #9b59b6);
  text-shadow: 0 0 10px rgba(155, 89, 182, 0.5);
}

.void-currency.large .void-amount {
  font-size: 32px;
}

.void-label {
  font-size: 14px;
  color: var(--text-muted, #888);
}

@keyframes void-swirl {
  0%, 100% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.1); }
}

/* Difficulty Selection */
.difficulty-selection {
  margin-bottom: 20px;
}

.difficulty-selection h3 {
  text-align: center;
  margin-bottom: 15px;
  color: var(--text-color, #fff);
}

.difficulty-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.difficulty-card {
  background: var(--bg-panel, #1a1a2e);
  border: 2px solid var(--border-color, #333);
  border-radius: 10px;
  padding: 15px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.difficulty-card:hover:not(.locked) {
  transform: translateY(-3px);
  box-shadow: 0 5px 20px rgba(155, 89, 182, 0.3);
}

.difficulty-card.selected {
  border-color: var(--accent-purple, #9b59b6);
  background: linear-gradient(135deg, rgba(155, 89, 182, 0.2), rgba(142, 68, 173, 0.1));
  box-shadow: 0 0 20px rgba(155, 89, 182, 0.3);
}

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

.difficulty-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.difficulty-name {
  font-weight: bold;
  color: var(--accent-purple, #9b59b6);
  margin-bottom: 5px;
}

.difficulty-desc {
  font-size: 12px;
  color: var(--text-muted, #888);
  margin-bottom: 10px;
}

.difficulty-mods {
  display: flex;
  justify-content: center;
  gap: 15px;
  font-size: 11px;
  color: var(--text-color, #fff);
}

.difficulty-mods span {
  padding: 3px 8px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
}

.lock-icon {
  font-size: 24px;
  opacity: 0.6;
}

/* Run Actions */
.run-actions {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}

.start-run-btn,
.daily-run-btn {
  flex: 1;
  padding: 15px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

.start-run-btn {
  background: linear-gradient(135deg, #9b59b6, #8e44ad);
  color: white;
}

.start-run-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(155, 89, 182, 0.5);
}

.daily-run-btn {
  background: linear-gradient(135deg, #f39c12, #e67e22);
  color: white;
}

.daily-run-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(243, 156, 18, 0.5);
}

/* Run Info */
.run-info {
  background: var(--bg-panel, #1a1a2e);
  border: 1px solid var(--border-color, #333);
  border-radius: 8px;
  padding: 15px;
}

.run-info h4 {
  color: var(--accent-cyan, #00d4ff);
  margin-bottom: 10px;
}

.run-info ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.run-info li {
  padding: 6px 0;
  color: var(--text-muted, #888);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.run-info li::before {
  content: '▸';
  color: var(--accent-purple, #9b59b6);
}

/* Active Run Display */
.active-run {
  padding: 10px;
}

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

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

.floor-number {
  font-size: 24px;
  font-weight: bold;
  color: var(--accent-purple, #9b59b6);
}

.floor-name {
  font-size: 14px;
  color: var(--text-muted, #888);
}

.run-timer {
  font-size: 20px;
  font-family: monospace;
  color: var(--accent-cyan, #00d4ff);
  padding: 8px 15px;
  background: rgba(0, 212, 255, 0.1);
  border-radius: 6px;
  border: 1px solid rgba(0, 212, 255, 0.3);
}

/* Floor Progress */
.floor-progress {
  margin-bottom: 20px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 8px;
  color: var(--text-color, #fff);
}

.progress-bar-container {
  height: 20px;
  background: var(--bg-panel, #1a1a2e);
  border: 1px solid var(--border-color, #333);
  border-radius: 10px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #9b59b6, #8e44ad, #a855f7);
  border-radius: 10px;
  transition: width 0.3s ease;
  box-shadow: 0 0 10px rgba(155, 89, 182, 0.5);
}

/* Modifiers Display */
.modifiers-display {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 20px;
}

.blessings-section,
.curses-section {
  background: var(--bg-panel, #1a1a2e);
  border-radius: 8px;
  padding: 12px;
}

.blessings-section {
  border: 1px solid rgba(0, 255, 136, 0.3);
}

.curses-section {
  border: 1px solid rgba(255, 71, 87, 0.3);
}

.blessings-section h4 {
  color: #00ff88;
  margin-bottom: 10px;
  font-size: 14px;
}

.curses-section h4 {
  color: #ff4757;
  margin-bottom: 10px;
  font-size: 14px;
}

.modifier-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.modifier-item {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
}

.modifier-item.blessing {
  background: rgba(0, 255, 136, 0.15);
  border: 1px solid rgba(0, 255, 136, 0.3);
  color: #00ff88;
}

.modifier-item.curse {
  background: rgba(255, 71, 87, 0.15);
  border: 1px solid rgba(255, 71, 87, 0.3);
  color: #ff4757;
}

.mod-icon {
  font-size: 14px;
}

.no-mods {
  color: var(--text-muted, #888);
  font-style: italic;
  font-size: 12px;
}

/* Relics Display */
.relics-display {
  background: var(--bg-panel, #1a1a2e);
  border: 1px solid var(--border-color, #333);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 20px;
}

.relics-display h4 {
  color: var(--accent-yellow, #ffd700);
  margin-bottom: 10px;
  font-size: 14px;
}

.relics-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.relic-item {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.relic-item:hover {
  transform: scale(1.15);
}

.relic-item.common {
  background: linear-gradient(135deg, rgba(128, 128, 128, 0.3), rgba(100, 100, 100, 0.2));
  border: 2px solid #808080;
}

.relic-item.uncommon {
  background: linear-gradient(135deg, rgba(0, 255, 136, 0.2), rgba(0, 200, 100, 0.1));
  border: 2px solid #00ff88;
}

.relic-item.rare {
  background: linear-gradient(135deg, rgba(0, 191, 255, 0.2), rgba(0, 150, 200, 0.1));
  border: 2px solid #00bfff;
}

.relic-item.epic {
  background: linear-gradient(135deg, rgba(155, 89, 182, 0.3), rgba(142, 68, 173, 0.2));
  border: 2px solid #9b59b6;
}

.relic-item.legendary {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 180, 0, 0.2));
  border: 2px solid #ffd700;
  animation: legendary-glow 2s ease-in-out infinite;
}

@keyframes legendary-glow {
  0%, 100% { box-shadow: 0 0 10px rgba(255, 215, 0, 0.5); }
  50% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.8); }
}

.no-relics {
  color: var(--text-muted, #888);
  font-style: italic;
  font-size: 12px;
}

/* Run Stats */
.run-stats {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 20px;
  padding: 15px;
  background: var(--bg-panel, #1a1a2e);
  border-radius: 8px;
}

.run-stats .stat {
  text-align: center;
}

.run-stats .stat-value {
  font-size: 24px;
  font-weight: bold;
  color: var(--accent-purple, #9b59b6);
}

.run-stats .stat-label {
  font-size: 12px;
  color: var(--text-muted, #888);
  text-transform: uppercase;
}

/* Run Controls */
.run-controls {
  display: flex;
  justify-content: center;
}

.abandon-run-btn {
  padding: 12px 30px;
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  border: none;
  border-radius: 6px;
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
}

.abandon-run-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
}

/* Meta Upgrades Grid */
.meta-upgrades-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.meta-upgrade-card {
  background: var(--bg-panel, #1a1a2e);
  border: 2px solid var(--border-color, #333);
  border-radius: 10px;
  padding: 15px;
  text-align: center;
  transition: all 0.2s ease;
}

.meta-upgrade-card:hover:not(.maxed) {
  border-color: var(--accent-purple, #9b59b6);
}

.meta-upgrade-card.affordable {
  border-color: rgba(155, 89, 182, 0.5);
  box-shadow: 0 0 15px rgba(155, 89, 182, 0.2);
}

.meta-upgrade-card.maxed {
  opacity: 0.7;
  background: linear-gradient(135deg, rgba(155, 89, 182, 0.1), transparent);
}

.meta-upgrade-card .upgrade-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.meta-upgrade-card .upgrade-name {
  font-weight: bold;
  color: var(--accent-purple, #9b59b6);
  margin-bottom: 5px;
}

.meta-upgrade-card .upgrade-level {
  font-size: 12px;
  color: var(--text-muted, #888);
  margin-bottom: 8px;
}

.meta-upgrade-card .upgrade-desc {
  font-size: 12px;
  color: var(--text-color, #ccc);
  margin-bottom: 10px;
}

.meta-upgrade-card .upgrade-effect {
  font-size: 13px;
  color: #00ff88;
  margin-bottom: 10px;
}

.buy-upgrade-btn {
  width: 100%;
  padding: 10px;
  background: linear-gradient(135deg, #9b59b6, #8e44ad);
  border: none;
  border-radius: 6px;
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
}

.buy-upgrade-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 3px 10px rgba(155, 89, 182, 0.4);
}

.buy-upgrade-btn:disabled {
  background: #555;
  cursor: not-allowed;
  opacity: 0.6;
}

.maxed-label {
  padding: 10px;
  color: var(--accent-purple, #9b59b6);
  font-weight: bold;
  letter-spacing: 2px;
}

/* Statistics Tab */
.roguelike-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-bottom: 20px;
}

.roguelike-stats .stat-card {
  background: var(--bg-panel, #1a1a2e);
  border: 1px solid var(--border-color, #333);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
}

.roguelike-stats .stat-card.full-width {
  grid-column: span 2;
}

.roguelike-stats .stat-value {
  font-size: 28px;
  font-weight: bold;
  color: var(--accent-purple, #9b59b6);
  margin-bottom: 5px;
}

.roguelike-stats .stat-label {
  font-size: 12px;
  color: var(--text-muted, #888);
  text-transform: uppercase;
}

/* Achievements Preview */
.achievements-preview {
  background: var(--bg-panel, #1a1a2e);
  border: 1px solid var(--border-color, #333);
  border-radius: 8px;
  padding: 15px;
}

.achievements-preview h4 {
  color: var(--accent-yellow, #ffd700);
  margin-bottom: 12px;
}

.unlocked-difficulties {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.unlocked-diff {
  padding: 6px 12px;
  background: rgba(155, 89, 182, 0.15);
  border: 1px solid var(--accent-purple, #9b59b6);
  border-radius: 4px;
  font-size: 13px;
  color: var(--accent-purple, #9b59b6);
}

/* Run Summary Modal */
.run-summary-modal {
  z-index: 1001;
}

.run-summary-content {
  max-width: 400px;
  text-align: center;
}

.run-summary-content h2 {
  color: var(--accent-purple, #9b59b6);
  margin-bottom: 20px;
  text-shadow: 0 0 20px rgba(155, 89, 182, 0.5);
}

.summary-stats {
  display: flex;
  justify-content: center;
  gap: 25px;
  margin-bottom: 25px;
}

.summary-stat {
  text-align: center;
}

.summary-stat .value {
  font-size: 28px;
  font-weight: bold;
  color: var(--accent-cyan, #00d4ff);
  display: block;
}

.summary-stat .label {
  font-size: 12px;
  color: var(--text-muted, #888);
  text-transform: uppercase;
}

.summary-rewards {
  background: linear-gradient(135deg, rgba(155, 89, 182, 0.2), rgba(142, 68, 173, 0.1));
  border: 1px solid var(--accent-purple, #9b59b6);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
}

.summary-rewards h3 {
  margin-bottom: 15px;
  color: var(--accent-yellow, #ffd700);
}

.reward-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.reward-item .reward-icon {
  font-size: 24px;
}

.reward-item .reward-value {
  font-size: 20px;
  font-weight: bold;
  color: var(--accent-purple, #9b59b6);
}

.close-summary-btn {
  padding: 12px 40px;
  background: linear-gradient(135deg, #9b59b6, #8e44ad);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
}

.close-summary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(155, 89, 182, 0.5);
}

/* Responsive */
@media (max-width: 600px) {
  .difficulty-grid {
    grid-template-columns: 1fr;
  }

  .meta-upgrades-grid {
    grid-template-columns: 1fr;
  }

  .modifiers-display {
    grid-template-columns: 1fr;
  }

  .roguelike-stats {
    grid-template-columns: 1fr;
  }

  .roguelike-stats .stat-card.full-width {
    grid-column: span 1;
  }

  .run-actions {
    flex-direction: column;
  }
}
