/* Mining-Theme CSS für PB-DodoMiner */

:root {
  /* Mining Farbschema - Sehr Dunkel mit Blau-Akzent */
  --mine-dark: #0a0a0a;        /* Fast Schwarz */
  --mine-darker: #050505;       /* Tiefschwarz */
  --mine-slate: #1a1a1a;       /* Dunkles Grau */
  --mine-gray: #2d2d2d;        /* Mittleres Dunkelgrau */
  --mine-steel: #3a3a3a;       /* Stahl-Grau */
  --mine-silver: #5a5a5a;      /* Silber-Grau */
  --mine-light-gray: #7a7a7a;  /* Helles Grau */
  --mine-accent: #2a4e7c;      /* Dunkles Blau - Akzent */
  --mine-accent-light: #3a5f8d; /* Etwas helleres Blau */
  --mine-gold: #ffd700;        /* Reines Gold */
  --mine-gold-dark: #d4af37;   /* Gedämpftes Gold */
  --mine-danger: #dc3545;      /* Gefahr Rot */
  --mine-light: #c0c0c0;       /* Helles Grau */
  
  /* Kompatibilität mit altem Code */
  --ark-dark: var(--mine-slate);
  --ark-darker: var(--mine-darker);
  --ark-blue: var(--mine-accent);
  --ark-orange: var(--mine-accent-light);
  --ark-green: #27ae60;
  --ark-gold: var(--mine-gold);
  --ark-red: var(--mine-danger);
  --ark-text: var(--mine-light);
  --ark-text-muted: #6a6a6a;
  --ark-border: #2a2a2a;
}

/* Base Styles - Mining Theme */
html {
  height: 100%;
}

body, 
body.ark-bg {
  background: #050505 url('/static/images/cave-background.jpg') center center / cover no-repeat fixed !important;
  color: var(--mine-light);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(5, 5, 5, 0.75), rgba(10, 10, 10, 0.7));
  pointer-events: none;
  z-index: 0;
}

.container,
.navbar,
.ark-card {
  position: relative;
  z-index: 1;
}

/* Modal/Popup Fixes */
.modal {
  position: fixed !important;
  z-index: 10000 !important;
}

.modal-backdrop {
  position: fixed !important;
  z-index: 9998 !important;
}

.modal-dialog {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  margin: 0 !important;
  z-index: 10001 !important;
}

/* ark-bg Klasse entfernt - wird nicht mehr benötigt da body das Hintergrundbild hat */

/* Überschriften */
h1, h2, h3, h4, h5, h6 {
  color: var(--mine-gold);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

/* Navigation */
.ark-navbar {
  background: linear-gradient(90deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%) !important;
  border-bottom: 2px solid var(--mine-gold-dark);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
  z-index: 9000 !important;
  position: relative;
}

.navbar-brand {
  font-weight: bold;
  font-size: 1.5rem;
  color: var(--mine-gold) !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.nav-link {
  color: var(--mine-gold-dark) !important;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--mine-gold) !important;
}

/* Dropdown Menu Fixes - Higher z-index */
.dropdown-menu, .ark-dropdown {
  background: var(--ark-dark) !important;
  border: 1px solid var(--ark-border);
  box-shadow: 0 4px 15px rgb(0 0 0 / 70%);
  z-index: 99999 !important;
  position: absolute !important;
}

.navbar .dropdown-menu {
  z-index: 99999 !important;
}

.dropdown-item, .ark-dropdown .dropdown-item {
  color: var(--ark-text) !important;
  background: transparent !important;
}

.dropdown-item-text {
  color: var(--mine-gold) !important;
  font-weight: bold;
}

.dropdown-item:hover, .ark-dropdown .dropdown-item:hover {
  background: var(--mine-gold-dark) !important;
  color: #0a0a0a !important;
}

/* Cards */
.ark-card {
  background: 
    linear-gradient(145deg, rgba(15, 15, 15, 0.98), rgba(5, 5, 5, 0.98));
  border: 2px solid var(--mine-gold-dark);
  border-radius: 10px;
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.9),
    0 0 15px rgba(255, 215, 0, 0.1),
    inset 0 0 20px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.ark-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--mine-gold), transparent);
  animation: shimmer 4s infinite;
  opacity: 0.7;
}

.ark-card-header {
  background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
  color: var(--mine-gold);
  border-bottom: 2px solid var(--mine-gold-dark);
  font-weight: bold;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
  padding: 1rem 1.25rem;
}

/* Buttons */
.btn-ark-primary {
  background: linear-gradient(135deg, var(--mine-gold-dark) 0%, var(--mine-gold) 100%);
  border: 2px solid var(--mine-gold-dark);
  color: #0a0a0a;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
}

.btn-ark-primary:hover {
  background: linear-gradient(135deg, var(--mine-gold) 0%, var(--mine-gold-dark) 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(255, 215, 0, 0.5);
  border-color: var(--mine-gold);
  color: #0a0a0a;
}

.btn-ark-success, .btn-success {
  background: linear-gradient(135deg, var(--ark-green) 0%, #0c6 100%);
  border: 2px solid var(--ark-green);
  color: white;
  font-weight: bold;
}

.btn-ark-success:hover, .btn-success:hover {
  background: linear-gradient(135deg, #0c6 0%, var(--ark-green) 100%);
  color: white;
  transform: translateY(-2px);
}

.btn-ark-warning {
  background: linear-gradient(135deg, var(--ark-gold) 0%, #c90 100%);
  border: none;
  color: var(--ark-dark);
  font-weight: bold;
}

.btn-ark-danger {
  background: linear-gradient(135deg, var(--ark-red) 0%, #c00 100%);
  border: none;
  color: white;
  font-weight: bold;
}

.btn-mining {
  background: linear-gradient(135deg, var(--mine-gold) 0%, var(--mine-gold-dark) 100%);
  border: 2px solid var(--mine-gold-dark);
  color: #0a0a0a;
  font-weight: bold;
  font-size: 1.2rem;
  padding: 15px 30px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.btn-mining:hover {
  background: linear-gradient(135deg, var(--mine-gold-dark) 0%, var(--mine-gold) 100%);
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
  color: #0a0a0a;
}

.btn-mining:disabled {
  background: #666;
  transform: none;
  box-shadow: none;
  cursor: not-allowed;
}

/* Forms */
.form-control {
  background: rgb(255 255 255 / 10%);
  border: 1px solid var(--ark-border);
  color: var(--ark-text);
  border-radius: 5px;
}

.form-control:focus {
  background: rgb(255 255 255 / 10%);
  border-color: var(--mine-gold);
  color: var(--mine-light);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

.form-control::placeholder {
  color: var(--ark-text-muted);
}

.form-label {
  color: var(--ark-text);
  font-weight: 500;
}

/* Dodo Miner Display */
.dodo-display {
  text-align: center;
  padding: 30px;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.05) 0%, transparent 70%);
  border: 1px solid var(--mine-gold-dark);
  border-radius: 15px;
  margin: 20px 0;
}

.dodo-image {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 3px solid var(--mine-gold);
  box-shadow: 
    0 0 30px rgba(255, 215, 0, 0.2),
    inset 0 0 20px rgba(0, 0, 0, 0.8);
  background: radial-gradient(circle, #1a1a1a 0%, #050505 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: var(--mine-gold);
  margin: 0 auto 20px;
  position: relative;
  overflow: hidden;
}

/* Dodo Bild Styling */
.dodo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

/* Mining Animation für Dodo */
.dodo-img.mining {
  animation: dodo-mining 2s infinite;
}

@keyframes dodo-mining {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-10px) rotate(-5deg); }
  50% { transform: translateY(0) rotate(0deg) scale(1.05); }
  75% { transform: translateY(-5px) rotate(5deg); }
}

/* Status-Effekte für Dodo */
.dodo-img.injured {
  filter: grayscale(0.5) sepia(0.3);
  opacity: 0.8;
}

.dodo-img.poisoned {
  filter: hue-rotate(90deg) saturate(1.5);
  animation: poison-pulse 2s infinite;
}

@keyframes poison-pulse {
  0%, 100% { filter: hue-rotate(90deg) saturate(1.5) brightness(1); }
  50% { filter: hue-rotate(90deg) saturate(2) brightness(1.2); }
}

@keyframes shimmer {
  0%, 100% { opacity: 0.3; transform: translateX(-100%); }
  50% { opacity: 0.8; transform: translateX(100%); }
}

.dodo-status {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 10px;
}

.dodo-mining {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }

  100% {
    transform: scale(1);
  }
}

/* Equipment Slots */
.equipment-slots {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-top: 20px;
}

.equipment-slot {
  background: rgb(255 255 255 / 5%);
  border: 2px dashed var(--mine-gold-dark) !important;
  border-top: 2px dashed var(--mine-gold-dark) !important;
  border-right: 2px dashed var(--mine-gold-dark) !important;
  border-bottom: 2px dashed var(--mine-gold-dark) !important;
  border-left: 2px dashed var(--mine-gold-dark) !important;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.equipment-slot.filled {
  border: 2px solid var(--mine-gold);
  background: rgba(255, 215, 0, 0.05);
}

.equipment-slot:hover {
  border-color: var(--mine-gold);
  background: rgba(255, 215, 0, 0.08);
}

/* Equipment Slot Icons - Transparenz wenn leer */
.equipment-slot img {
  opacity: 0.3;
  transition: opacity 0.3s ease;
}

.equipment-slot.filled img {
  opacity: 1;
}

/* Equipment Slot Text - Grau wenn leer */
.equipment-slot .empty-text {
  color: #888;
  font-weight: normal;
}

/* Equipment mit Qualitätsfarben */
.equipment-slot .durability-bar {
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  margin-top: 4px;
  overflow: hidden;
}

.equipment-slot .durability-fill {
  height: 100%;
  transition: width 0.3s ease;
}

/* Qualitäts-Farben für Ausrüstung */
.equipment-slot .quality-grey { color: #808080; }
.equipment-slot .quality-green { color: #00ff00; }
.equipment-slot .quality-blue { color: #0099ff; }

.equipment-slot .durability-fill.quality-grey { background: #808080; }
.equipment-slot .durability-fill.quality-green { background: #00ff00; }
.equipment-slot .durability-fill.quality-blue { background: #0099ff; }

/* ARK-Style Qualitäts-Farben für Shop und Inventar */
.text-secondary { color: #808080 !important; } /* Grau - Stufe 1 */
.text-success { color: #00ff00 !important; }   /* Grün - Stufe 2 */
.text-primary { color: #0099ff !important; }   /* Blau - Stufe 3 */
.text-warning { color: #ffaa00 !important; }   /* Orange - für Legendär */
.text-danger { color: #ff0000 !important; }    /* Rot - für Episch */

/* Shop-Item Qualitäts-Glow Effekte */
.shop-item-card h6.text-secondary { text-shadow: 0 0 5px #808080; }
.shop-item-card h6.text-success { text-shadow: 0 0 10px #00ff00; }
.shop-item-card h6.text-primary { text-shadow: 0 0 15px #0099ff; }

/* Mining Areas */
.mining-area {
  background: linear-gradient(135deg, rgb(255 255 255 / 5%) 0%, rgb(255 255 255 / 2%) 100%);
  border: 1px solid var(--mine-gold-dark);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 15px;
  transition: all 0.3s ease;
}

.mining-area:hover {
  border-color: var(--mine-gold);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 215, 0, 0.15);
}

.mining-timer {
  font-size: 2rem;
  font-weight: bold;
  color: var(--mine-gold);
  text-align: center;
  margin: 20px 0;
}

/* Progress Bars */
.progress {
  background: rgb(255 255 255 / 10%);
  border: 1px solid var(--mine-gold-dark);
  border-radius: 10px;
  height: 20px;
}

.progress-bar {
  background: linear-gradient(90deg, var(--mine-gold-dark) 0%, var(--mine-gold) 100%);
  border-radius: 10px;
}

/* Resources Display */
.resource-item {
  background: rgb(255 255 255 / 5%);
  border: 1px solid var(--mine-gold-dark);
  border-radius: 8px;
  padding: 15px;
  margin: 10px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.resource-rarity-1 {
  border-left: 4px solid #888;
}

.resource-rarity-2 {
  border-left: 4px solid var(--mine-silver);
}

.resource-rarity-3 {
  border-left: 4px solid var(--ark-green);
}

.resource-rarity-4 {
  border-left: 4px solid var(--ark-orange);
}

.resource-rarity-5 {
  border-left: 4px solid var(--ark-gold);
}

/* Text Rarity Colors */
.text-rarity-1 {
  color: #888 !important;
}

.text-rarity-2 {
  color: var(--mine-silver) !important;
}

.text-rarity-3 {
  color: var(--ark-green) !important;
}

.text-rarity-4 {
  color: var(--ark-orange) !important;
}

.text-rarity-5 {
  color: var(--ark-gold) !important;
}

/* Tables */
.table-dark {
  --bs-table-bg: rgb(255 255 255 / 2%);
  --bs-table-border-color: var(--ark-border);
}

/* Cave-specific backgrounds for Dodo Display Box */
.dodo-display {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
}

.dodo-display.cave-a {
  background: 
    linear-gradient(145deg, rgba(15, 15, 15, 0.65), rgba(5, 5, 5, 0.65)),
    url('/static/images/cave-a.jpg') center center / cover no-repeat !important;
}

.dodo-display.cave-b {
  background: 
    linear-gradient(145deg, rgba(15, 15, 15, 0.65), rgba(5, 5, 5, 0.65)),
    url('/static/images/cave-b.jpg') center center / cover no-repeat !important;
}

.dodo-display.cave-c {
  background: 
    linear-gradient(145deg, rgba(15, 15, 15, 0.65), rgba(5, 5, 5, 0.65)),
    url('/static/images/cave-c.jpg') center center / cover no-repeat !important;
}

.dodo-display.cave-d {
  background: 
    linear-gradient(145deg, rgba(15, 15, 15, 0.65), rgba(5, 5, 5, 0.65)),
    url('/static/images/cave-d.jpg') center center / cover no-repeat !important;
}

/* Main Content - Flex Grow für Sticky Footer */
main {
  flex: 1 0 auto;
  padding-bottom: 20px;
}

/* Footer - Sticky am unteren Rand */
.ark-footer {
  background: var(--ark-darker);
  border-top: 1px solid var(--ark-border);
  padding: 20px 0;
  color: var(--ark-text-muted);
  margin-top: auto;
  flex-shrink: 0;
}

/* Responsive */
@media (width <= 768px) {
  .equipment-slots {
    grid-template-columns: 1fr;
  }

  .dodo-image {
    width: 150px;
    height: 150px;
    font-size: 3rem;
  }
}
