/* ===== SEASON PASS MODAL - TELEGRAM MOBILE OPTIMIZED ===== */

/* Season Pass specific styling for modal-content */


/* Progress Section - Compact */


/* Pass Selection Tabs - Mobile optimized */


/* Pass Cards Container - Display both cards */


/* Season Pass Card - Compact */


/* Pass Benefits - Compact list */


/* Action Section - Single button */


/* Rewards Grid - Compact mobile layout */


/* Timer Section - Compact */


/* Scrollbar Styling */


/* ===== SEASON PASS MOBILE OPTIMIZATION (max-width: 480px) ===== */


/* ===== SEASON PASS TABLET OPTIMIZATION (481px - 768px) ===== */


/* Ad-Free Pass Styles */
.ad-free-pass-card {
  position: relative;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  border: 2px solid #9f7aea !important;
}

.ad-free-pass-card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #667eea, #764ba2, #f093fb);
  border-radius: 12px;
  z-index: -1;
  opacity: 0.5;
  filter: blur(10px);
}

.shop-item-features {
  padding: 8px 0;
  margin: 8px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.feature-item {
  font-size: 13px;
  padding: 4px 0;
  color: rgba(255,255,255,0.9);
}

.ad-free-badge {
  display: inline-block;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  font-weight: bold;
}

.ad-free-task {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%) !important;
  border: 1px solid rgba(102, 126, 234, 0.3) !important;
}


* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #1a1a1a;
  --bg-secondary: #2d2d2d;
  --bg-tertiary: #3a3a3a;
  --text-primary: #ffffff;
  --text-secondary: #b0b0b0;
  --accent-primary: #4a9eff;
  --accent-secondary: #6c5ce7;
  --success: #00b894;
  --warning: #fdcb6e;
  --error: #e17055;
  --common: #9e9e9e; /* grau */
  --uncommon: #4caf50; /* grün */
  --rare: #2196f3; /* blau */
  --epic: #9c27b0; /* lila */
  --legendary: #ffeb3b; /* gelb */
  --mythic: #f44336; /* rot */
  --border: #404040;
  --hard: #e17055; /* orange-rot */
  --harder: #d63031; /* dunkleres rot */
  --extreme: #b71c1c; /* tiefes blutrot */
  --hell: #6f0000; /* fast schwarzrot */
  --shadow: rgba(0, 0, 0, 0.3);
}

html {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-user-select: none;
  user-select: none;
  min-height: 100%;
  height: 100%;
}

body.modal-open {
  overflow: hidden;
}


/* ===== WITHDRAWAL HISTORY CARD STYLES ===== */


.status-icon {
  font-size: 12px;
}

.status-text {
  text-transform: capitalize;
}


.tx-info {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}

.tx-label {
  color: #a0aec0;
  font-weight: 600;
  min-width: 50px;
}

.tx-id {
  color: #667eea;
  font-family: 'Courier New', monospace;
  word-break: break-all;
  font-size: 10px;
}


.btn-tx-view {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 8px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-tx-view:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

.btn-tx-view i {
  font-size: 10px;
}

@media (max-width: 480px) {
  

  

  

  

  

  

  

  .tx-info {
    font-size: 10px;
  }

  .tx-label {
    min-width: 45px;
    font-size: 10px;
  }

  .tx-id {
    font-size: 9px;
  }

  .btn-tx-view {
    padding: 5px 6px;
    font-size: 10px;
  }

  .btn-tx-view i {
    font-size: 9px;
  }
}

.date-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.date-cell .date {
  font-size: 13px;
  font-weight: 500;
}

.date-cell .time {
  font-size: 11px;
  color: #999;
}

.txid-copy-btn {
  background: rgba(102, 126, 234, 0.2);
  border: 1px solid var(--accent-primary);
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s;
}

.txid-copy-btn:hover {
  background: rgba(102, 126, 234, 0.3);
  transform: scale(1.1);
}

.txid-copy-btn.copied {
  background: #2ecc40;
  border-color: #2ecc40;
}

body {
  overflow-x: hidden;
  padding-bottom: 80px;
}

.notification-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-hover);
  z-index: 1001;
  max-width: 300px;
  display: none;
}

.notification-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.notification-message {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* Universal Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  place-items: center;
  place-content: center;
  z-index: 10000;
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  overflow: auto;
  box-sizing: border-box;
  -webkit-touch-callout: none;
  touch-action: none;
  padding: 20px;
}

.modal-overlay.show {
  display: grid !important;
}

.modal-overlay.active {
  display: grid !important;
}


.modal-content {
  background: var(--bg-secondary);
  border-radius: 16px;
  max-width: 90vw;
  width: 400px;
  max-height: 90vh;
  min-height: auto;
  overflow-y: auto;
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.modal-content.item-modal {
  max-width: 450px;
}
.modal-content.energy-modal {
  max-width: 450px;
}

.modal-content.market-modal {
  max-width: 500px;
  max-height: 85vh;
}

.modal-content.listings-modal {
  max-width: 550px;
  max-height: 85vh;
}

/* ===== MODAL RESPONSIVE OPTIMIZATION ===== */
@media (max-width: 480px) {
  .modal-overlay {
    padding: 12px;
    align-items: flex-end;
  }

  .modal-content {
    max-width: 100%;
    width: 100%;
    max-height: 90vh;
    border-radius: 16px 16px 0 0;
  }

  .modal-content.item-modal {
    max-width: 100%;
  }

  .modal-content.energy-modal {
    max-width: 100%;
  }

  .modal-content.market-modal {
    max-width: 100%;
    max-height: 90vh;
  }

  .modal-content.listings-modal {
    max-width: 100%;
    max-height: 90vh;
  }

  .modal-header {
    padding: 16px 16px 12px;
  }

  .modal-header h3 {
    font-size: 16px;
  }

  .modal-body {
    padding: 12px 16px;
  }

  .modal-footer {
    padding: 12px 16px;
    gap: 8px;
  }

  .modal-btn {
    padding: 10px 12px;
    font-size: 13px;
  }
}

@media (min-width: 481px) and (max-width: 768px) {
  .modal-content {
    max-width: 95%;
    max-height: 85vh;
  }

  .modal-content.market-modal {
    max-width: 95%;
  }

  .modal-content.listings-modal {
    max-width: 95%;
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.modal-body {
  padding: 20px 24px;
}

.modal-body p {
  line-height: 1.6;
  color: var(--text-secondary);
}

.modal-footer {
  display: flex;
  gap: 12px;
  padding: 16px 24px 20px;
  justify-content: center;
}

.modal-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
}

.modal-btn-primary {
  background: var(--accent-primary);
  color: white;
}

.modal-btn-primary:hover {
  background: #3a8ee6;
}

.modal-btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.modal-btn-secondary:hover {
  background: var(--bg-primary);
}

/* Item Details Modal */
.item-details-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.item-details-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.item-details-icon {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  flex-shrink: 0;
  overflow: hidden;
}

.item-details-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.item-details-info {
  flex: 1;
}

.item-details-name {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.item-details-rarity {
  font-size: 14px;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 6px;
}

.item-details-rarity.common {
  color: var(--common);
}
.item-details-rarity.uncommon {
  color: var(--uncommon);
}
.item-details-rarity.rare {
  color: var(--rare);
}
.item-details-rarity.epic {
  color: var(--epic);
}
.item-details-rarity.legendary {
  color: var(--legendary);
}
.item-details-rarity.mythic {
  color: var(--mythic);
}

.item-details-set {
  font-size: 12px;
  color: var(--text-secondary);
  font-style: italic;
}

.item-details-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.item-details-price {
  background: var(--bg-tertiary);
  padding: 16px;
  border-radius: 8px;
  text-align: center;
}

.suggested-price-label {
  color: var(--text-secondary);
  font-size: 14px;
}

.suggested-price-value {
  color: var(--accent-primary);
  font-weight: 700;
  font-size: 16px;
  margin-left: 8px;
}

.claim-rewards-btn {
  background: var(--accent-primary);
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
}
.claim-rewards-btn:hover {
  background: var(--accent-secondary);
}

/* Market Listing Modal */
.market-step {
  display: none;
}

.market-step.active {
  display: block;
}

.market-item-listing-cost {
  font-size: 0.8em;
  color: #ffd700;
  margin-top: 4px;
  font-weight: bold;
}

.listing-cost-info {
  margin-top: 10px;
  padding: 8px;
  background: rgba(255, 215, 0, 0.1);
  border-radius: 4px;
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.listing-cost-label {
  font-size: 0.9em;
  color: #ffd700;
  margin-bottom: 4px;
}

.listing-cost-value {
  font-weight: bold;
  color: #fff;
}

.cashback-info {
  font-size: 0.8em;
  color: #ccc;
  margin-top: 4px;
}

.listing-cashback-info {
  font-size: 0.75em;
  color: #90ee90;
  margin-top: 2px;
}

/* Confirmation modal enhancements */
.rarity-common {
  color: var(--common);
}
.rarity-uncommon {
  color: var(--uncommon);
}
.rarity-rare {
  color: var(--rare);
}
.rarity-epic {
  color: var(--epic);
}
.rarity-legendary {
  color: var(--legendary);
}
.rarity-mythic {
  color: var(--mythic);
}

/* Market Filters in Modals - Modern Design */
.market-filters {
  background: linear-gradient(135deg, rgba(42, 42, 58, 0.6) 0%, rgba(30, 30, 46, 0.6) 100%);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 20px;
  border: 1px solid rgba(74, 74, 90, 0.5);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.market-item-list {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 20px;
}

/* Market Item Card in Modals - Modern Design */
.market-item-card {
  background: linear-gradient(135deg, rgba(42, 42, 58, 0.8) 0%, rgba(30, 30, 46, 0.8) 100%);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.market-item-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
  transition: left 0.5s ease;
}

.market-item-card:hover::before {
  left: 100%;
}

.market-item-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  border-color: var(--accent-primary);
}

.market-item-card.common {
  border-color: var(--common);
}
.market-item-card.uncommon {
  border-color: var(--uncommon);
}
.market-item-card.rare {
  border-color: var(--rare);
}
.market-item-card.epic {
  border-color: var(--epic);
}
.market-item-card.legendary {
  border-color: var(--legendary);
}
.market-item-card.mythic {
  border-color: var(--mythic);
}

.market-item-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Market Item Icon Container */
.market-item-icon-container,
.selected-item-icon-container {
  position: relative;
  display: inline-block;
}

.market-item-icon {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  overflow: hidden;
}

.market-item-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 4px;
}

.market-item-info {
  flex: 1;
}

.market-item-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.market-item-rarity {
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 4px;
}

.market-item-rarity.common {
  color: var(--common);
}
.market-item-rarity.uncommon {
  color: var(--uncommon);
}
.market-item-rarity.rare {
  color: var(--rare);
}
.market-item-rarity.epic {
  color: var(--epic);
}
.market-item-rarity.legendary {
  color: var(--legendary);
}
.market-item-rarity.mythic {
  color: var(--mythic);
}

.market-item-price {
  font-size: 14px;
  color: var(--accent-primary);
  font-weight: 600;
}

#global-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.95); /* Dark semi-transparent background */
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999999; /* Very high z-index to overlay ALL content */
  pointer-events: all; /* Block all interactions with underlying elements */
  touch-action: none; /* Disable touch interactions */
}

/* Center the loading content */
#global-loading-overlay .loading-content {
  text-align: center;
  color: #fff;
  font-size: 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 40px;
  background: rgba(34, 34, 34, 0.95);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  min-width: 280px;
}

/* Spinner animation */
#global-loading-overlay .spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #8774e1; /* Match Telegram theme color */
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 10px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Disable interactions when loading */
body.loading {
  overflow: hidden;
  pointer-events: none;
  touch-action: none;
}

/* Allow interactions only on the loading overlay */
body.loading #global-loading-overlay {
  pointer-events: all;
}

/* Ensure loading status text is visible */
#loading-status {
  font-weight: bold;
}

/* Withdrawal Modal Styles */


.info-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.info-row:last-child {
  border-bottom: none;
}

.info-label {
  color: var(--text-secondary);
  font-size: 14px;
}

.info-value {
  color: var(--accent-primary);
  font-weight: 600;
  font-size: 14px;
}


.quick-btn {
  flex: 1;
  padding: 8px;
  background: rgba(102, 126, 234, 0.2);
  border: 1px solid var(--accent-primary);
  border-radius: 6px;
  color: var(--accent-primary);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.quick-btn:hover {
  background: rgba(102, 126, 234, 0.3);
}


/* After market styles in styles.css */
#gems-section {
  display: none;
}
#gems-section.active {
  display: block;
}
.gems-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  padding: 16px 12px;
  max-width: 100%;
}

@media (max-width: 480px) {
  .gems-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 12px 8px;
  }
}

@media (min-width: 481px) and (max-width: 768px) {
  .gems-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  padding: 16px 12px;
  max-width: 100%;
}

@media (max-width: 480px) {
  .shop-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 12px 8px;
  }
}

@media (min-width: 481px) and (max-width: 768px) {
  .shop-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
}

@media (min-width: 769px) {
  .shop-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
  }
}

.shop-item-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid var(--border-color);
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.shop-item-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.1) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.shop-item-card:hover::before {
  opacity: 1;
}

.shop-item-card.common {
  border-color: var(--common-color);
  box-shadow: 0 4px 12px rgba(158, 158, 158, 0.2);
}
.shop-item-card.uncommon {
  border-color: var(--uncommon-color);
  box-shadow: 0 4px 12px rgba(30, 255, 0, 0.2);
}
.shop-item-card.rare {
  border-color: var(--rare-color);
  box-shadow: 0 4px 12px rgba(0, 112, 255, 0.2);
}
.shop-item-card.epic {
  border-color: var(--epic-color);
  box-shadow: 0 4px 12px rgba(163, 53, 238, 0.2);
}
.shop-item-card.legendary {
  border-color: var(--legendary-color);
  box-shadow: 0 4px 12px rgba(255, 128, 0, 0.2);
}
.shop-item-card.mythic {
  border-color: var(--mythic-color);
  box-shadow: 0 4px 12px rgba(255, 0, 0, 0.2);
}

.shop-item-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.shop-item-card:active {
  transform: translateY(-2px) scale(1.01);
}

.shop-item-icon {
  font-size: 40px;
  text-align: center;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  border-radius: 12px;
  margin: 0 auto 8px;
  transition: transform 0.3s ease;
  position: relative;
}

.shop-item-card:hover .shop-item-icon {
  transform: scale(1.1) rotateZ(5deg);
}

.shop-item-icon img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

@media (max-width: 480px) {
  .shop-item-icon {
    font-size: 32px;
    height: 56px;
  }
}

.shop-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 60px;
}

.shop-item-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.3;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

.shop-item-description {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.4;
  opacity: 0.9;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

.shop-item-price {
  font-size: 14px;
  color: var(--accent-primary);
  font-weight: 700;
  margin-top: auto;
  padding: 6px 10px;
  background: rgba(102, 126, 234, 0.15);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

@media (max-width: 480px) {
  .shop-item-name {
    font-size: 13px;
  }
  
  .shop-item-description {
    font-size: 10px;
  }
  
  .shop-item-price {
    font-size: 13px;
    padding: 5px 8px;
  }
}

.item-rarity {
  font-size: 10px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: inline-block;
  margin: 4px auto;
}

.item-rarity.common {
  background: linear-gradient(135deg, var(--common-color), #b8b8b8);
  color: white;
}
.item-rarity.uncommon {
  background: linear-gradient(135deg, var(--uncommon-color), #2bff00);
  color: white;
}
.item-rarity.rare {
  background: linear-gradient(135deg, var(--rare-color), #0080ff);
  color: white;
}
.item-rarity.epic {
  background: linear-gradient(135deg, var(--epic-color), #b535ee);
  color: white;
}
.item-rarity.legendary {
  background: linear-gradient(135deg, var(--legendary-color), #ff9900);
  color: white;
}
.item-rarity.mythic {
  background: linear-gradient(135deg, var(--mythic-color), #cc0000);
  color: white;
  animation: mythicGlow 2s ease-in-out infinite;
}

@keyframes mythicGlow {
  0%, 100% {
    box-shadow: 0 2px 6px rgba(255, 0, 0, 0.5);
  }
  50% {
    box-shadow: 0 2px 12px rgba(255, 0, 0, 0.8), 0 0 20px rgba(255, 0, 0, 0.4);
  }
}

.buy-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.buy-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.buy-btn:hover::before {
  width: 300px;
  height: 300px;
}

.buy-btn:hover {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
  transform: translateY(-2px);
}

.buy-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.buy-btn:disabled {
  background: linear-gradient(135deg, #555 0%, #777 100%);
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
}

@media (max-width: 480px) {
  .buy-btn {
    padding: 8px 12px;
    font-size: 12px;
  }
}

.no-items {
  color: var(--text-secondary);
  text-align: center;
  padding: 40px 20px;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  margin: 20px;
  border: 2px dashed rgba(255, 255, 255, 0.1);
}

.no-items::before {
  content: '🛒';
  display: block;
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

/* Store Section Headers */
.store-section h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  margin: 16px 0 20px;
  padding: 12px 20px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.store-section h2::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.store-section h2:hover::before {
  left: 100%;
}

@media (max-width: 480px) {
  .store-section h2 {
    font-size: 18px;
    margin: 12px 0 16px;
    padding: 10px 16px;
  }
}

/* Tasks Container Styling */


/* ===== MY SALES MODAL - MODERN DESIGN ===== */
.reward-card {
  background: linear-gradient(135deg, rgba(42, 42, 58, 0.95) 0%, rgba(30, 30, 46, 0.95) 100%);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  border: 2px solid var(--border);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: visible;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.reward-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.15), transparent);
  transition: left 0.5s ease;
}

.reward-card:hover::before {
  left: 100%;
}

.reward-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  border-color: var(--accent-primary);
}

.reward-card.common {
  border-color: var(--common);
  box-shadow: 0 4px 16px rgba(158, 158, 158, 0.1);
}

.reward-card.uncommon {
  border-color: var(--uncommon);
  box-shadow: 0 4px 16px rgba(76, 175, 80, 0.15);
}

.reward-card.rare {
  border-color: var(--rare);
  box-shadow: 0 4px 16px rgba(33, 150, 243, 0.2);
}

.reward-card.epic {
  border-color: var(--epic);
  box-shadow: 0 4px 16px rgba(156, 39, 176, 0.25);
}

.reward-card.legendary {
  border-color: var(--legendary);
  box-shadow: 0 4px 16px rgba(255, 235, 59, 0.3);
}

.reward-card.mythic {
  border-color: var(--mythic);
  box-shadow: 0 4px 16px rgba(244, 67, 54, 0.35);
  animation: mythicPulse 2s infinite;
}

@keyframes mythicPulse {
  0%, 100% {
    box-shadow: 0 4px 16px rgba(244, 67, 54, 0.35), 0 0 20px rgba(244, 67, 54, 0.2);
  }
  50% {
    box-shadow: 0 4px 16px rgba(244, 67, 54, 0.5), 0 0 30px rgba(244, 67, 54, 0.4);
  }
}

/* My Sales Container */
#my-sales-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 60vh;
  overflow-y: auto;
  padding: 4px;
}

/* Fix content overflow in reward cards */
.reward-card .item-details-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  min-width: 0;
}

.reward-card .item-details-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  width: 100%;
  min-width: 0;
}

.reward-card .item-details-icon {
  width: 70px;
  height: 70px;
  min-width: 70px;
  border-radius: 12px;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  flex-shrink: 0;
  overflow: hidden;
}

.reward-card .item-details-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.reward-card .item-details-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.reward-card .item-details-name {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-primary);
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

.reward-card .item-details-rarity {
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 6px;
  display: inline-block;
}

.reward-card .item-details-set {
  font-size: 12px;
  color: var(--text-secondary);
  font-style: italic;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.reward-card .item-details-stats {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  min-width: 0;
}

.reward-card .item-details-price {
  background: rgba(42, 42, 58, 0.6);
  padding: 12px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.reward-card .suggested-price-label {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
}

.reward-card .suggested-price-value {
  color: var(--accent-primary);
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  word-break: break-word;
}

.reward-card .gold-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* My Sales Modal Specific Styles */
.my-sales-modal {
  max-width: 600px;
}

/* My Sales Pagination */
#sales-page-info {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

#sales-prev-page,
#sales-next-page {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
}

#sales-prev-page:hover:not(:disabled),
#sales-next-page:hover:not(:disabled) {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

#sales-prev-page:disabled,
#sales-next-page:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Sort Filter for Sales */
#sales-sort-filter {
  padding: 10px 36px 10px 12px;
  border-radius: 10px;
  border: 2px solid rgba(102, 126, 234, 0.2);
  background: rgba(30, 30, 46, 0.8);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="rgba(102, 126, 234, 0.6)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>');
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
}

#sales-sort-filter:hover,
#sales-sort-filter:focus {
  border-color: var(--accent-primary);
  background-color: rgba(30, 30, 46, 0.95);
  outline: none;
}

/* Responsive Adjustments for My Sales */
@media (max-width: 480px) {
  .reward-card {
    padding: 14px;
  }
  
  .my-sales-modal {
    max-width: 95%;
  }
  
  #my-sales-container {
    max-height: 58vh;
  }
  
  .reward-card .item-details-header {
    gap: 10px;
    flex-wrap: nowrap;
  }
  
  .reward-card .item-details-icon {
    width: 55px;
    height: 55px;
    min-width: 55px;
    font-size: 26px;
  }
  
  .reward-card .item-details-info {
    flex: 1;
    min-width: 0;
  }
  
  .reward-card .item-details-name {
    font-size: 14px;
    line-height: 1.2;
    margin-bottom: 4px;
  }
  
  .reward-card .item-details-rarity {
    font-size: 10px;
    margin-bottom: 3px;
  }
  
  .reward-card .item-details-set {
    font-size: 10px;
    line-height: 1.2;
  }
  
  .reward-card .item-details-stats {
    gap: 8px;
  }
  
  .reward-card .item-details-price {
    padding: 8px 10px;
    gap: 4px;
  }
  
  .reward-card .suggested-price-label {
    font-size: 11px;
  }
  
  .reward-card .suggested-price-value {
    font-size: 13px;
    gap: 4px;
    line-height: 1.3;
  }
  
  .reward-card .gold-icon {
    width: 16px;
    height: 16px;
  }
}

/* Shop Loading Skeleton */
.shop-loading-skeleton {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  padding: 16px 12px;
}

.shop-skeleton-card {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.05) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 16px;
  padding: 14px;
  min-height: 200px;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@media (max-width: 480px) {
  .shop-loading-skeleton {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 12px 8px;
  }
}

/* Shop Item Hover Effects Enhancement */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.shop-item-card.new-item {
  animation: pulse 0.6s ease-in-out;
}

/* Gems Package Special Styling */
.gems-container .shop-item-card {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
  border: 2px solid rgba(102, 126, 234, 0.4);
}

.gems-container .shop-item-card:hover {
  border-color: rgba(102, 126, 234, 0.8);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

.gems-container .shop-item-icon {
  font-size: 48px;
  background: radial-gradient(circle, rgba(102, 126, 234, 0.3) 0%, transparent 70%);
}

@media (max-width: 480px) {
  .gems-container .shop-item-icon {
    font-size: 40px;
  }
}

.selected-item-preview {
  margin-bottom: 20px;
}

.selected-item-card {
  background: var(--bg-tertiary);
  border-radius: 12px;
  padding: 16px;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
}

.selected-item-card.common {
  border-color: var(--common);
}
.selected-item-card.uncommon {
  border-color: var(--uncommon);
}
.selected-item-card.rare {
  border-color: var(--rare);
}
.selected-item-card.epic {
  border-color: var(--epic);
}
.selected-item-card.legendary {
  border-color: var(--legendary);
}
.selected-item-card.mythic {
  border-color: var(--mythic);
}

.selected-item-icon {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  overflow: hidden;
}

.selected-item-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 4px;
}

.selected-item-name {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}

.selected-item-rarity {
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 600;
}

.selected-item-rarity.common {
  color: var(--common);
}
.selected-item-rarity.uncommon {
  color: var(--uncommon);
}
.selected-item-rarity.rare {
  color: var(--rare);
}
.selected-item-rarity.epic {
  color: var(--epic);
}
.selected-item-rarity.legendary {
  color: var(--legendary);
}
.selected-item-rarity.mythic {
  color: var(--mythic);
}

.price-input-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.suggested-price-display {
  background: var(--bg-tertiary);
  padding: 12px;
  border-radius: 8px;
  text-align: center;
}

.price-input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.price-input-group label {
  font-weight: 600;
  color: var(--text-primary);
}

.price-input {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 16px;
}

.price-input:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.listing-info {
  background: var(--bg-tertiary);
  padding: 16px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.5;
}

.listing-info p {
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.listing-info p:last-child {
  margin-bottom: 0;
}

/* My Listings Modal */
/* My Listings Card - Modern Design */
.my-listing-card {
  background: linear-gradient(135deg, rgba(42, 42, 58, 0.8) 0%, rgba(30, 30, 46, 0.8) 100%);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 16px;
  border: 2px solid var(--border);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.my-listing-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
  transition: left 0.5s ease;
}

.my-listing-card:hover::before {
  left: 100%;
}

.my-listing-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.my-listing-card.common {
  border-color: var(--common);
}
.my-listing-card.uncommon {
  border-color: var(--uncommon);
}
.my-listing-card.rare {
  border-color: var(--rare);
}
.my-listing-card.epic {
  border-color: var(--epic);
}
.my-listing-card.legendary {
  border-color: var(--legendary);
}
.my-listing-card.mythic {
  border-color: var(--mythic);
}

.listing-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.listing-icon {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  overflow: hidden;
}

.listing-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 4px;
}

.listing-info {
  flex: 1;
}

.listing-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.listing-rarity {
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 4px;
}

.listing-rarity.common {
  color: var(--common);
}
.listing-rarity.uncommon {
  color: var(--uncommon);
}
.listing-rarity.rare {
  color: var(--rare);
}
.listing-rarity.epic {
  color: var(--epic);
}
.listing-rarity.legendary {
  color: var(--legendary);
}
.listing-rarity.mythic {
  color: var(--mythic);
}

.listing-price {
  font-size: 14px;
  color: var(--accent-primary);
  font-weight: 600;
}

.listing-status {
  margin-bottom: 12px;
}

.status-live {
  color: var(--success);
  font-weight: 600;
}

.status-pending {
  color: var(--warning);
  font-weight: 600;
}

/* Listing Actions - Modern Button Design */
.listing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.listing-btn {
  padding: 10px 16px;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

.listing-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.listing-btn:active::before {
  width: 300px;
  height: 300px;
}

.watch-ad-btn {
  background: linear-gradient(135deg, #00bf8f 0%, #00a085 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(0, 191, 143, 0.3);
}

.watch-ad-btn:hover {
  background: linear-gradient(135deg, #00d9a3 0%, #00bf8f 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 191, 143, 0.4);
}

.speed-up-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.speed-up-btn:hover {
  background: linear-gradient(135deg, #7a8ef5 0%, #8a5cb3 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.cancel-btn {
  background: linear-gradient(135deg, #ee5a6f 0%, #e74c3c 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(238, 90, 111, 0.3);
}

.cancel-btn:hover {
  background: linear-gradient(135deg, #ff6b81 0%, #ee5a6f 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(238, 90, 111, 0.4);
}

.listing-btn:active {
  transform: translateY(0);
}

/* No Listings / Empty State - Modern Design */
.no-listings {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-secondary);
  padding: 60px 20px;
  background: linear-gradient(135deg, rgba(42, 42, 58, 0.3) 0%, rgba(30, 30, 46, 0.3) 100%);
  border-radius: 16px;
  border: 2px dashed rgba(74, 74, 90, 0.5);
  min-height: 200px;
}

.no-listings::before {
  content: '📦';
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.6;
}

.no-listings-text {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.no-listings-subtext {
  font-size: 14px;
  color: var(--text-tertiary);
}

.active-boosts-section {
  margin-bottom: 20px;
}
.active-boosts-section h3 {
  font-size: 1.2em;
  margin-bottom: 10px;
}
.boosts-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.boost-card {
  background: var(--bg-secondary);
  border-radius: 8px;
  padding: 10px;
  flex: 1 1 calc(50% - 10px);
  min-width: 150px;
}
.boost-header {
  display: flex;
  align-items: center;
  gap: 10px;
}
.boost-icon {
  font-size: 1.5em;
}
.boost-info {
  flex: 1;
}
.boost-name {
  font-weight: bold;
}
.boost-effect {
  color: var(--text-secondary);
  font-size: 0.9em;
}
.boost-expiry {
  margin-top: 5px;
  font-size: 0.8em;
  color: var(--accent-primary);
}
.no-boosts {
  color: var(--text-secondary);
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
  z-index: 1000;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.header-content {
  display: flex;
  justify-content: center; /* statt space-between */
  align-items: center;
  max-width: 480px;
  margin: 0 auto;
}

.currency-info {
  display: flex;
  gap: 16px;
  flex-wrap: nowrap;
  justify-content: center;
}

.currency-item {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-tertiary);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  min-width: 0;
  flex-shrink: 1;
  max-width: 120px; /* kannst du anpassen */
  overflow: hidden;
}

.currency-item span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.currency-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.currency-icon img {
  width: 16px;
  height: 16px;
}

.user-level {
  background: var(--accent-secondary);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
}

/* Main Content */
.main-content {
  margin-top: 70px;
  padding: 0 16px 90px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Home Tab */
.welcome-card {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.9), rgba(118, 75, 162, 0.9));
  border-radius: 20px;
  padding: 32px 24px;
  margin: 16px 0;
  text-align: center;
  box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
  position: relative;
  overflow: hidden;
  animation: fadeInDown 0.6s ease-out;
}

.welcome-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: rotate-glow 20s linear infinite;
}

.welcome-title {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 8px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
  position: relative;
  z-index: 1;
}

.profile-name {
  font-size: 18px;
  font-weight: 600;
  margin: 8px 0;
  opacity: 0.95;
  position: relative;
  z-index: 1;
}

.welcome-subtitle {
  opacity: 0.9;
  font-size: 16px;
  position: relative;
  z-index: 1;
  margin-top: 4px;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 24px 0;
  animation: fadeIn 0.8s ease-out 0.2s both;
}

.stat-card {
  background: var(--bg-secondary);
  border-radius: 16px;
  padding: 20px 16px;
  text-align: center;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.2);
  border-color: var(--accent-primary);
}

.stat-card:hover::before {
  transform: scaleX(1);
}

.stat-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--accent-primary);
  margin-bottom: 6px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Home Tab Stat Cards - Center values properly */
.stats-grid .stat-value {
  text-align: center;
  width: 100%;
}

/* Equipment System */
.equipment-section {
  background: var(--bg-secondary);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
}

.equipment-grid-new {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 300px;
  margin: 0 auto;
}

.equipment-slot {
  aspect-ratio: 1;
  background: var(--bg-tertiary);
  border: 2px dashed var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  min-height: 80px;
  overflow: hidden;
}

.equipment-slot:hover {
  border-color: var(--accent-primary);
  background: rgba(74, 158, 255, 0.1);
}

.equipment-slot.equipped {
  border: 2px solid var(--accent-primary);
  background: var(--bg-secondary);
}

.equipment-slot.equipped.legendary {
  border-color: var(--legendary);
  box-shadow: 0 0 15px rgba(255, 152, 0, 0.3);
}

.equipment-slot.equipped.epic {
  border-color: var(--epic);
  box-shadow: 0 0 15px rgba(156, 39, 176, 0.3);
}

.equipment-slot.equipped.rare {
  border-color: var(--rare);
  box-shadow: 0 0 15px rgba(33, 150, 243, 0.3);
}

.equipment-slot.equipped.uncommon {
  border-color: var(--uncommon);
  box-shadow: 0 0 15px rgba(76, 175, 80, 0.3);
}

.equipment-slot-empty {
  visibility: hidden;
}

.slot-icon {
  font-size: 24px;
  margin-bottom: 4px;
  opacity: 0.6;
}

.slot-label {
  font-size: 10px;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.2;
}

.equipped-item {
  font-size: 20px;
  margin-bottom: 2px;
  width: 100%;
  height: 60%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.equipped-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 4px;
}

.equipped-name {
  font-size: 9px;
  color: var(--text-primary);
  text-align: center;
  font-weight: 600;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.equipment-stats {
  background: var(--bg-tertiary);
  border-radius: 12px;
  padding: 16px;
  margin-top: 16px;
}

.stats-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.stat-name {
  color: var(--text-secondary);
  font-size: 14px;
}

.stat-value-display {
  color: var(--accent-primary);
  font-weight: 600;
  font-size: 14px;
}

.set-bonus {
  background: linear-gradient(135deg, var(--epic), var(--legendary));
  border-radius: 8px;
  padding: 12px;
  margin-top: 12px;
  text-align: center;
}

.set-bonus-title {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
}

.set-bonus-desc {
  font-size: 11px;
  opacity: 0.9;
}

/* Inventory Filters Section */
.inventory-filters-section {
  background: var(--bg-secondary);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.filter-chips-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.filter-chip-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-chip-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding-left: 4px;
}

.filter-chip-select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234a9eff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.filter-chip-select:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-primary);
}

.filter-chip-select:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.1);
}

.filter-chip-select option {
  background: var(--bg-primary);
  color: var(--text-primary);
  padding: 8px;
}

.inventory-action-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.inventory-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.inventory-action-btn .btn-icon {
  font-size: 20px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.inventory-action-btn-sell {
  background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
  color: white;
}

.inventory-action-btn-sell:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(243, 156, 18, 0.4);
}

.inventory-action-btn-sell:active {
  transform: translateY(0);
}

.inventory-action-btn-merge {
  background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
  color: white;
}

.inventory-action-btn-merge:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(155, 89, 182, 0.4);
}

.inventory-action-btn-merge:active {
  transform: translateY(0);
}

/* Legacy action button support */
.action-btn {
  background: var(--accent-primary);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
}

.action-btn:hover {
  background: #3a8ee6;
}

/* Market Actions - Modern Grid Design */
.market-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
  padding: 0;
}

.market-actions .action-btn {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
  border: 2px solid rgba(102, 126, 234, 0.3);
  color: var(--text-primary);
  padding: 14px 16px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  text-align: center;
}

.market-actions .action-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.2), transparent);
  transition: left 0.5s ease;
}

.market-actions .action-btn:hover::before {
  left: 100%;
}

.market-actions .action-btn:hover {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.25) 0%, rgba(118, 75, 162, 0.25) 100%);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.market-actions .action-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

@media (max-width: 480px) {
  .market-actions {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .market-actions .action-btn {
    padding: 12px 10px;
    font-size: 13px;
  }
}

/* New Inventory Item Cards */
.inventory-items-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  padding: 4px;
}

.inventory-item-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  border-radius: 16px;
  padding: 16px;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

/* Quantity Badge */
.quantity-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.95) 0%, rgba(41, 128, 185, 0.95) 100%);
  color: white;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  z-index: 10;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.inventory-item-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.inventory-item-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
  border-color: var(--accent-primary);
}

.inventory-item-card:hover::before {
  opacity: 1;
}

.inventory-item-card:active {
  transform: translateY(-2px) scale(1.01);
}

.inventory-item-card.common {
  border-color: var(--common);
}
.inventory-item-card.uncommon {
  border-color: var(--uncommon);
}
.inventory-item-card.rare {
  border-color: var(--rare);
}
.inventory-item-card.epic {
  border-color: var(--epic);
}
.inventory-item-card.legendary {
  border-color: var(--legendary);
}
.inventory-item-card.mythic {
  border-color: var(--mythic);
}

/* Inventory Card Content Styling */
.inventory-item-card .item-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.inventory-item-card .item-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.inventory-card-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.inventory-card-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 4px;
  word-wrap: break-word;
}

.inventory-card-rarity {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-block;
  align-self: center;
  margin-bottom: 4px;
}

.inventory-card-rarity.common {
  color: var(--common);
  background: rgba(158, 158, 158, 0.15);
}
.inventory-card-rarity.uncommon {
  color: var(--uncommon);
  background: rgba(30, 255, 0, 0.15);
}
.inventory-card-rarity.rare {
  color: var(--rare);
  background: rgba(0, 112, 221, 0.15);
}
.inventory-card-rarity.epic {
  color: var(--epic);
  background: rgba(163, 53, 238, 0.15);
}
.inventory-card-rarity.legendary {
  color: var(--legendary);
  background: rgba(255, 128, 0, 0.15);
}
.inventory-card-rarity.mythic {
  color: var(--mythic);
  background: rgba(255, 40, 40, 0.15);
}

.inventory-card-set {
  font-size: 11px;
  color: var(--accent-primary);
  font-weight: 600;
  opacity: 0.8;
  margin-bottom: 4px;
}

.inventory-card-stats-compact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 8px 0;
  padding: 8px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

.stat-compact {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.stat-compact-icon {
  font-size: 14px;
}

.stat-compact-value {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}

.inventory-card-price {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
  color: #f39c12;
  margin-top: 4px;
  padding: 6px;
  background: rgba(243, 156, 18, 0.1);
  border-radius: 6px;
}

.inventory-card-price .gold-icon-small {
  width: 16px;
  height: 16px;
}

/* Mobile Responsiveness for Inventory */
@media (max-width: 480px) {
  .inventory-items-container {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
  }

  .inventory-item-card {
    padding: 12px;
  }

  .inventory-item-card .item-icon {
    width: 70px;
    height: 70px;
    margin-bottom: 8px;
  }

  .inventory-card-name {
    font-size: 13px;
  }

  .inventory-card-stats-compact {
    gap: 4px;
    padding: 6px;
  }

  .stat-compact-icon {
    font-size: 12px;
  }

  .stat-compact-value {
    font-size: 11px;
  }

  .filter-chips-container {
    grid-template-columns: 1fr;
  }

  .inventory-action-buttons {
    gap: 8px;
  }

  .inventory-action-btn {
    padding: 12px 16px;
    font-size: 14px;
  }

  .inventory-filters-section {
    padding: 12px;
  }
}

/* Extra small devices optimization */
@media (max-width: 360px) {
  .inventory-items-container {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
  }

  .inventory-item-card {
    padding: 10px;
  }

  .inventory-item-card .item-icon {
    width: 60px;
    height: 60px;
  }

  .inventory-card-name {
    font-size: 12px;
  }

  .inventory-card-rarity {
    font-size: 10px;
    padding: 2px 6px;
  }

  .inventory-card-set {
    font-size: 10px;
  }

  .filter-chip-select {
    font-size: 13px;
    padding: 8px 10px;
    padding-right: 32px;
  }

  .filter-chip-label {
    font-size: 11px;
  }

  .inventory-action-btn {
    padding: 10px 12px;
    font-size: 13px;
  }

  .inventory-action-btn .btn-icon {
    font-size: 18px;
  }
}


.click-for-details {
  text-align: center;
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 8px;
  opacity: 0.7;
  font-style: italic;
}


.item-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.item-header .item-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
  overflow: hidden;
}

.item-header .item-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.item-info {
  flex: 1;
}

.item-name {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.item-rarity {
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 4px;
}

.item-rarity.common {
  color: var(--common);
}
.item-rarity.uncommon {
  color: var(--uncommon);
}
.item-rarity.rare {
  color: var(--rare);
}
.item-rarity.epic {
  color: var(--epic);
}
.item-rarity.legendary {
  color: var(--legendary);
}
.item-rarity.mythic {
  color: var(--mythic);
}

.item-set {
  font-size: 11px;
  color: var(--text-secondary);
  font-style: italic;
}

.item-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.stat-row {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-tertiary);
  padding: 8px 10px;
  border-radius: 6px;
}

.stat-icon {
  font-size: 14px;
  width: 16px;
  text-align: center;
}

.stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  flex: 1;
}

.stat-value {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-primary);
}

.stat-value.negative {
  color: var(--error);
}

.no-items {
  text-align: center;
  color: var(--text-secondary);
  font-style: italic;
  padding: 40px 20px;
}

.refresh-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.info-button {
  background-color: #eee;
  border: none;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  font-weight: bold;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

.info-button:hover {
  background-color: #ddd;
}


/* Airdrop Buy Button */
.buy-tickets-btn {
  width: 100%;
  background: var(--accent-primary);
  color: white;
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.buy-tickets-btn:hover {
  background: var(--accent-secondary);
}

.buy-tickets-btn:disabled {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  cursor: not-allowed;
}

/* Expeditions */
.expedition-card {
  background: linear-gradient(135deg, rgba(45, 55, 72, 0.95), rgba(30, 40, 55, 0.95));
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 20px;
  border: 1px solid rgba(102, 126, 234, 0.2);
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.expedition-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(102, 126, 234, 0.25), 0 0 0 1px rgba(102, 126, 234, 0.3) inset;
  border-color: rgba(102, 126, 234, 0.4);
}

.expedition-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
  box-shadow: 0 2px 10px rgba(102, 126, 234, 0.5);
}

.expedition-card::after {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
  pointer-events: none;
  transition: opacity 0.4s ease;
  opacity: 0;
}

.expedition-card:hover::after {
  opacity: 1;
}

.expedition-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  gap: 12px;
}

.expedition-info {
  flex: 1;
}

.expedition-info h3 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 6px;
  background: linear-gradient(135deg, #fff, #a0aec0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.3px;
}

.expedition-duration {
  color: rgba(160, 174, 192, 0.9);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.expedition-duration::before {
  content: "⏱️";
  font-size: 14px;
}

.expedition-difficulty {
  padding: 8px 16px;
  border-radius: 25px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
  transition: all 0.3s ease;
}

.expedition-difficulty:hover {
  transform: scale(1.05);
}

.difficulty-easy {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4), 0 0 20px rgba(16, 185, 129, 0.2);
}

.difficulty-medium {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4), 0 0 20px rgba(245, 158, 11, 0.2);
}

.difficulty-hard {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4), 0 0 20px rgba(239, 68, 68, 0.2);
}

.difficulty-harder {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: white;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4), 0 0 20px rgba(139, 92, 246, 0.2);
}

.difficulty-extreme {
  background: linear-gradient(135deg, #ec4899, #db2777);
  color: white;
  box-shadow: 0 4px 15px rgba(236, 72, 153, 0.4), 0 0 20px rgba(236, 72, 153, 0.2);
}

.difficulty-hell {
  background: linear-gradient(135deg, #1f2937, #111827);
  color: #ff0000;
  box-shadow: 0 4px 15px rgba(255, 0, 0, 0.5), 0 0 25px rgba(255, 0, 0, 0.3);
  border-color: rgba(255, 0, 0, 0.3);
  animation: hellPulse 2s ease-in-out infinite;
}

@keyframes hellPulse {
  0%, 100% {
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.5), 0 0 25px rgba(255, 0, 0, 0.3);
  }
  50% {
    box-shadow: 0 4px 20px rgba(255, 0, 0, 0.7), 0 0 35px rgba(255, 0, 0, 0.5);
  }
}

.expedition-rewards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 20px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.expedition-badges {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

/* XP Badge styling */
.expedition-xp-badge {
  padding: 6px 14px;
  border-radius: 25px;
  font-size: 12px;
  font-weight: 700;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: white;
  border: 1px solid rgba(99, 102, 241, 0.3);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3), 0 0 15px rgba(79, 70, 229, 0.2);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
}

.expedition-xp-badge:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.4), 0 0 20px rgba(79, 70, 229, 0.3);
}

.expedition-xp-badge::before {
  content: "✨";
  font-size: 14px;
}


.expedition-stats {
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
  font-size: 14px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.expedition-stats > div {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.energy-cost {
  color: #fbbf24;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

.gold-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.gold-icon-small {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  margin-left: 4px;
}

.gold-reward-icon {
  width: 14px;
  height: 14px;
  vertical-align: middle;
}

.success-rate {
  color: #10b981;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.fail-rate {
  color: #ef4444;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

.expedition-button {
  width: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 16px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.expedition-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s ease;
}

.expedition-button:hover::before {
  left: 100%;
}

.expedition-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.2) inset;
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.expedition-button:active {
  transform: translateY(0);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.5);
}

.expedition-button:disabled {
  background: linear-gradient(135deg, #374151, #1f2937);
  color: rgba(156, 163, 175, 0.7);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.expedition-button:disabled:hover {
  transform: none;
  box-shadow: none;
}

.expedition-active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
  }
  50% {
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.6);
  }
}

.expedition-progress {
  background: linear-gradient(135deg, rgba(45, 55, 72, 0.95), rgba(30, 40, 55, 0.95));
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 20px;
  text-align: center;
  border: 1px solid rgba(102, 126, 234, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

.expedition-progress h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #fff, #a0aec0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.progress-bar {
  height: 12px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 25px;
  overflow: hidden;
  margin: 16px 0;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) inset;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
  box-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.progress-fill::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.expedition-timer {
  font-size: 16px;
  font-weight: 700;
  color: #fbbf24;
  margin: 12px 0;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

/* Market */
.market-filters {
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
}

.search-input {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 16px;
  margin-bottom: 12px;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.filter-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap; /* Ermöglicht Umbruch bei kleinen Bildschirmen */
}

.filter-row.mt-20 {
  margin-top: 20px;
}

.filter-row.mb-20 {
  margin-bottom: 20px;
}

.filter-select {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  width: auto; /* Anpassung, damit der Filter nur die Inhaltsbreite einnimmt */
  min-width: 80px; /* Minimale Breite für Lesbarkeit */
  max-width: 150px; /* Begrenzung der maximalen Breite */
}

.filter-container {
  display: flex;
  justify-content: center;
  margin-bottom: 15px;
}

.filter-select:focus {
  outline: none;
  border-color: var(--accent-primary);
}

#sales-sort-filter {
  width: 100%;
  max-width: 300px; /* gleiche Max-Breite wie andere Elemente */
  padding: 8px;
  font-size: 16px;
}

/* Market Container - Grid Layout */
#market-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  padding: 4px;
}

@media (max-width: 768px) {
  #market-container {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
  }
}

@media (max-width: 480px) {
  #market-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

/* Market Item Cards - Modern Card Design */
.market-item {
  background: linear-gradient(135deg, rgba(42, 42, 58, 0.8) 0%, rgba(30, 30, 46, 0.8) 100%);
  border-radius: 16px;
  padding: 16px;
  border: 2px solid var(--border);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.market-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(102, 126, 234, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.market-item:hover::before {
  opacity: 1;
}

.market-item:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
  border-color: var(--accent-primary);
}

.market-item:active {
  transform: translateY(-3px) scale(1.01);
}

/* Rarity Border Colors for Market Items */
.market-item.common {
  border-color: var(--common);
}
.market-item.uncommon {
  border-color: var(--uncommon);
}
.market-item.rare {
  border-color: var(--rare);
}
.market-item.epic {
  border-color: var(--epic);
}
.market-item.legendary {
  border-color: var(--legendary);
}
.market-item.mythic {
  border-color: var(--mythic);
}

.market-item .item-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}

.market-item .item-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
  transition: transform 0.3s ease;
}

.market-item:hover .item-icon img {
  transform: scale(1.1);
}

.market-item-info {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.market-item-info .item-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.2;
  word-wrap: break-word;
}

.market-item-info .item-rarity {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.market-item-seller {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.market-item-seller::before {
  content: '👤';
  font-size: 12px;
}

.market-item-price {
  font-size: 16px;
  color: var(--accent-primary);
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.buy-btn {
  width: 100%;
  background: linear-gradient(135deg, #00bf8f 0%, #00a085 100%);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(0, 191, 143, 0.3);
}

.buy-btn:hover {
  background: linear-gradient(135deg, #00d9a3 0%, #00bf8f 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 191, 143, 0.4);
}

.buy-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 191, 143, 0.3);
}

@media (max-width: 480px) {
  .market-item {
    padding: 12px;
  }
  
  .market-item .item-icon {
    width: 60px;
    height: 60px;
    font-size: 36px;
    margin-bottom: 8px;
  }
  
  .market-item-info .item-name {
    font-size: 13px;
  }
  
  .market-item-info .item-rarity {
    font-size: 10px;
  }
  
  .market-item-seller {
    font-size: 10px;
    margin-bottom: 6px;
  }
  
  .market-item-price {
    font-size: 14px;
    margin-bottom: 10px;
  }
  
  .buy-btn {
    padding: 8px 12px;
    font-size: 12px;
  }
}

/* Market Grid for Items */
.market-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  padding: 4px;
}

@media (max-width: 768px) {
  .market-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
}

@media (max-width: 480px) {
  .market-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

/* Market Empty State */
#market-container:empty::after,
.market-item-list:empty::after {
  content: '🏪 No items available';
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--text-secondary);
  font-size: 16px;
  text-align: center;
  grid-column: 1 / -1;
}

.no-market-items {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: var(--text-secondary);
  background: linear-gradient(135deg, rgba(42, 42, 58, 0.3) 0%, rgba(30, 30, 46, 0.3) 100%);
  border-radius: 16px;
  border: 2px dashed rgba(74, 74, 90, 0.5);
  min-height: 200px;
}

.no-market-items::before {
  content: '🏪';
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.6;
}

.no-market-items-text {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.no-market-items-subtext {
  font-size: 14px;
  color: var(--text-tertiary);
}

/* Leaderboard - Modern Enhanced Design */
.leaderboard-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  max-width: 100%;
  margin: 0 auto;
  overflow-y: auto;
}

.leaderboard-item {
  background: linear-gradient(145deg, rgba(42, 42, 58, 0.95), rgba(30, 30, 46, 0.95));
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 2px solid rgba(74, 74, 90, 0.5);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: visible;
  min-height: 80px;
}

.leaderboard-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.03), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.leaderboard-item:hover::before {
  transform: translateX(100%);
}

.leaderboard-item:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5);
  border-color: var(--accent-primary);
}

/* Top 3 Special Styles */
.leaderboard-item:nth-child(2) {
  background: linear-gradient(145deg, rgba(255, 215, 0, 0.15), rgba(255, 179, 0, 0.1));
  border: 3px solid #ffd700;
  box-shadow: 0 8px 30px rgba(255, 215, 0, 0.4), 0 0 60px rgba(255, 215, 0, 0.2) inset;
  animation: pulse-gold 3s ease-in-out infinite;
}

.leaderboard-item:nth-child(3) {
  background: linear-gradient(145deg, rgba(192, 192, 192, 0.15), rgba(169, 169, 169, 0.1));
  border: 3px solid #c0c0c0;
  box-shadow: 0 6px 25px rgba(192, 192, 192, 0.3), 0 0 40px rgba(192, 192, 192, 0.15) inset;
}

.leaderboard-item:nth-child(4) {
  background: linear-gradient(145deg, rgba(205, 127, 50, 0.15), rgba(184, 115, 51, 0.1));
  border: 3px solid #cd7f32;
  box-shadow: 0 6px 25px rgba(205, 127, 50, 0.3), 0 0 40px rgba(205, 127, 50, 0.15) inset;
}

@keyframes pulse-gold {
  0%, 100% {
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.4), 0 0 60px rgba(255, 215, 0, 0.2) inset;
  }
  50% {
    box-shadow: 0 8px 40px rgba(255, 215, 0, 0.6), 0 0 80px rgba(255, 215, 0, 0.3) inset;
  }
}

.rank {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3a3a4a, #2a2a3a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 20px;
  color: var(--text-primary);
  border: 3px solid var(--border);
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
}

.rank::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary));
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.leaderboard-item:hover .rank::before {
  opacity: 0.5;
}

/* Top 1 - Gold Crown */
.leaderboard-item:nth-child(2) .rank {
  background: linear-gradient(135deg, #ffd700, #ffed4e, #ffc700);
  color: #1a1a1a;
  border: 4px solid #ffed4e;
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.8), 0 8px 20px rgba(255, 215, 0, 0.4);
  font-size: 26px;
  width: 64px;
  height: 64px;
  animation: rotate-glow 4s linear infinite;
}

.leaderboard-item:nth-child(2) .rank::after {
  content: "👑";
  position: absolute;
  top: -12px;
  right: -12px;
  font-size: 28px;
  animation: bounce-crown 2s ease-in-out infinite;
  filter: drop-shadow(0 0 10px rgba(255, 215, 0, 1));
}

@keyframes rotate-glow {
  0% {
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.8), 0 8px 20px rgba(255, 215, 0, 0.4);
  }
  50% {
    box-shadow: 0 0 50px rgba(255, 215, 0, 1), 0 8px 30px rgba(255, 215, 0, 0.6);
  }
  100% {
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.8), 0 8px 20px rgba(255, 215, 0, 0.4);
  }
}

@keyframes bounce-crown {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-4px) scale(1.1);
  }
}

/* Top 2 - Silver Medal */
.leaderboard-item:nth-child(3) .rank {
  background: linear-gradient(135deg, #c0c0c0, #e8e8e8, #b0b0b0);
  color: #1a1a1a;
  border: 4px solid #e8e8e8;
  box-shadow: 0 0 20px rgba(192, 192, 192, 0.6), 0 6px 15px rgba(192, 192, 192, 0.3);
  font-size: 24px;
  width: 60px;
  height: 60px;
}

.leaderboard-item:nth-child(3) .rank::after {
  content: "🥈";
  position: absolute;
  top: -10px;
  right: -10px;
  font-size: 24px;
  filter: drop-shadow(0 0 8px rgba(192, 192, 192, 0.8));
}

/* Top 3 - Bronze Medal */
.leaderboard-item:nth-child(4) .rank {
  background: linear-gradient(135deg, #cd7f32, #e8a870, #b8733b);
  color: #1a1a1a;
  border: 4px solid #e8a870;
  box-shadow: 0 0 20px rgba(205, 127, 50, 0.6), 0 6px 15px rgba(205, 127, 50, 0.3);
  font-size: 24px;
  width: 60px;
  height: 60px;
}

.leaderboard-item:nth-child(4) .rank::after {
  content: "🥉";
  position: absolute;
  top: -10px;
  right: -10px;
  font-size: 24px;
  filter: drop-shadow(0 0 8px rgba(205, 127, 50, 0.8));
}

/* Current Player Highlight */
.leaderboard-item.current-player {
  background: linear-gradient(145deg, rgba(74, 144, 226, 0.2), rgba(74, 144, 226, 0.1));
  border: 2px solid var(--accent-primary);
  box-shadow: 0 4px 20px rgba(74, 144, 226, 0.4), 0 0 30px rgba(74, 144, 226, 0.2) inset;
}

.leaderboard-item.current-player::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--accent-primary);
  border-radius: 16px 0 0 16px;
}

.player-avatar {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  overflow: hidden;
  border: 2px solid var(--accent-primary);
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.leaderboard-item:hover .player-avatar {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.player-avatar::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 19px;
  background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary));
  z-index: -1;
  opacity: 0.7;
}

.leaderboard-item:nth-child(2) .player-avatar,
.leaderboard-item:nth-child(3) .player-avatar,
.leaderboard-item:nth-child(4) .player-avatar {
  width: 56px;
  height: 56px;
  border-width: 3px;
}

.leaderboard-item:nth-child(2) .player-avatar {
  border-color: #ffd700;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
}

.leaderboard-item:nth-child(2) .player-avatar::before {
  background: linear-gradient(45deg, #ffd700, #ffed4e);
}

.leaderboard-item:nth-child(3) .player-avatar {
  border-color: #c0c0c0;
  box-shadow: 0 0 15px rgba(192, 192, 192, 0.5);
}

.leaderboard-item:nth-child(3) .player-avatar::before {
  background: linear-gradient(45deg, #c0c0c0, #e8e8e8);
}

.leaderboard-item:nth-child(4) .player-avatar {
  border-color: #cd7f32;
  box-shadow: 0 0 15px rgba(205, 127, 50, 0.5);
}

.leaderboard-item:nth-child(4) .player-avatar::before {
  background: linear-gradient(45deg, #cd7f32, #e8a870);
}

.player-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 13px;
}

/* ===== AVATAR FRAMES SYSTEM ===== */

/* Avatar Frame Wrapper Container */
.player-avatar-frame {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  overflow: visible;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.profile-avatar-wrapper {
  width: 100px;
  height: 100px;
  border-radius: 16px;
  overflow: visible;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--bg-tertiary);
  margin: 0 auto 16px;
}

.profile-avatar-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
}

.profile-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  width: 100%;
}

.profile-buttons .user-level {
  flex: 1;
  min-width: 120px;
}

/* Change Frame Modal Styles */
.change-frame-modal {
  max-width: 500px;
}

.frame-preview-container {
  text-align: center;
  padding: 20px;
  background: var(--bg-secondary);
  border-radius: 12px;
  margin-bottom: 20px;
}

.frame-preview-container h4 {
  margin: 0 0 15px;
  color: var(--accent-primary);
}

.frame-preview-wrapper {
  width: 150px;
  height: 150px;
  border-radius: 16px;
  overflow: visible;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  margin: 0 auto;
}

.frame-option-preview-inner {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  font-size: 40px;
  position: relative;
}

.available-frames-container h4 {
  margin: 0 0 15px;
  color: var(--accent-primary);
}

.available-frames-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}

.frame-option {
  border: 3px solid transparent;
  border-radius: 12px;
  padding: 12px;
  background: var(--bg-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  position: relative;
}

.frame-option:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

.frame-option.active {
  border-color: var(--accent-primary);
  background: rgba(102, 126, 234, 0.1);
}

.frame-option-name {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-avatar-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

/* Keyframes are defined in avatar-frames.js to avoid conflicts */

/* ============ FRAME STYLING - SVG-ONLY RENDERING ============ */

/* Premium Frame - SVG rendering only */
.player-avatar-frame-premium {
  position: relative;
  overflow: visible;
  border-radius: 12px;
}

/* Legendary Frame - SVG rendering only */
.player-avatar-frame-legendary {
  position: relative;
  overflow: visible;
  border-radius: 12px;
}

/* Mythic Frame - SVG rendering only */
.player-avatar-frame-mythic {
  position: relative;
  overflow: visible;
  border-radius: 12px;
}

/* Avatar Frame Container */
.equipment-avatar {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.equipment-avatar-container {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 12px;
  overflow: visible;
  background: var(--bg-tertiary);
}

/* Equipment Avatar Frame Styles */
.equipment-avatar-container.player-avatar-frame-premium,
.equipment-avatar-container.player-avatar-frame-legendary,
.equipment-avatar-container.player-avatar-frame-mythic {
  background: rgba(26, 26, 46, 0.5);
  overflow: visible;
}

.player-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  overflow: visible;
}

.player-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 8px;
  word-break: break-word;
  letter-spacing: 0.5px;
  line-height: 1.3;
}

.leaderboard-item:nth-child(2) .player-name {
  font-size: 17px;
  color: #ffd700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.6), 0 2px 4px rgba(0, 0, 0, 0.5);
}

.leaderboard-item:nth-child(3) .player-name {
  font-size: 16px;
  color: #e8e8e8;
  text-shadow: 0 0 8px rgba(192, 192, 192, 0.5), 0 2px 4px rgba(0, 0, 0, 0.5);
}

.leaderboard-item:nth-child(4) .player-name {
  font-size: 16px;
  color: #e8a870;
  text-shadow: 0 0 8px rgba(205, 127, 50, 0.5), 0 2px 4px rgba(0, 0, 0, 0.5);
}

.player-stats-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.player-score {
  font-size: 14px;
  font-weight: 800;
  color: var(--accent-primary);
  background: rgba(74, 144, 226, 0.1);
  padding: 6px 12px;
  border-radius: 10px;
  border: 2px solid rgba(74, 144, 226, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(74, 144, 226, 0.2);
  transition: all 0.3s ease;
  white-space: nowrap;
}

.leaderboard-item:hover .player-score {
  transform: scale(1.05);
  border-color: var(--accent-primary);
  box-shadow: 0 4px 12px rgba(74, 144, 226, 0.4);
}

.leaderboard-item:nth-child(2) .player-score {
  background: rgba(255, 215, 0, 0.15);
  border-color: rgba(255, 215, 0, 0.5);
  color: #ffd700;
  font-size: 15px;
  box-shadow: 0 2px 12px rgba(255, 215, 0, 0.3);
}

.leaderboard-item:nth-child(3) .player-score {
  background: rgba(192, 192, 192, 0.15);
  border-color: rgba(192, 192, 192, 0.5);
  color: #e8e8e8;
  font-size: 15px;
  box-shadow: 0 2px 10px rgba(192, 192, 192, 0.3);
}

.leaderboard-item:nth-child(4) .player-score {
  background: rgba(205, 127, 50, 0.15);
  border-color: rgba(205, 127, 50, 0.5);
  color: #e8a870;
  font-size: 15px;
  box-shadow: 0 2px 10px rgba(205, 127, 50, 0.3);
}

.player-level {
  background: linear-gradient(135deg, rgba(42, 42, 58, 0.8), rgba(30, 30, 46, 0.8));
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.player-level::before {
  content: "⚡";
  font-size: 13px;
}

.player-power {
  background: linear-gradient(135deg, var(--epic), var(--legendary));
  color: white;
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 10px rgba(156, 39, 176, 0.4);
}

.player-power::before {
  content: "⚔️";
  font-size: 13px;
}

.player-badges {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.player-badge {
  background: linear-gradient(135deg, rgba(42, 42, 58, 0.9), rgba(30, 30, 46, 0.9));
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 2px solid var(--border);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}


.player-badge.top-trader {
  background: linear-gradient(135deg, var(--success), #00a085);
  color: white;
  border-color: var(--success);
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.4);
}

.leaderboard-filter-container {
  background: linear-gradient(145deg, rgba(42, 42, 58, 0.6), rgba(30, 30, 46, 0.6));
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 20px;
  border: 2px solid var(--border);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.game-select,
.leaderboard-limit-select {
  background: linear-gradient(135deg, #3a3a4a, #2a2a3a);
  border: 2px solid var(--border);
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  font-family: inherit;
}

#leaderboard-filter {
  min-width: 180px;
  flex: 1;
  max-width: 250px;
}

#leaderboard-limit {
  min-width: 80px;
  width: auto;
}

.game-select:hover,
.leaderboard-limit-select:hover {
  border-color: var(--accent-primary);
  box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
  transform: translateY(-2px);
}

.game-select:focus,
.leaderboard-limit-select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.2);
}

.pagination-btn {
  background: linear-gradient(135deg, var(--accent-primary), #3a8ee6);
  color: white;
  border: 2px solid var(--accent-primary);
  padding: 10px 20px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.pagination-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #3a8ee6, var(--accent-primary));
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(74, 144, 226, 0.5);
}

.pagination-btn:disabled {
  background: linear-gradient(135deg, #4a4a5a, #3a3a4a);
  border-color: var(--border);
  color: var(--text-secondary);
  cursor: not-allowed;
  opacity: 0.5;
  box-shadow: none;
}

.page-info {
  color: var(--text-primary);
  font-weight: 700;
  font-size: 15px;
  padding: 10px 16px;
  background: rgba(42, 42, 58, 0.6);
  border-radius: 10px;
  border: 2px solid var(--border);
}

.no-entries {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
  font-style: italic;
  font-size: 18px;
  background: linear-gradient(145deg, rgba(42, 42, 58, 0.4), rgba(30, 30, 46, 0.4));
  border-radius: 16px;
  border: 2px dashed var(--border);
  margin: 20px 0;
}

/* Profile */
.profile-card {
  background: var(--bg-secondary);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  margin-bottom: 24px;
  border: 1px solid var(--border);
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  margin: 0 auto 16px;
}

.profile-name {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.profile-id {
  font-size: 14px;
  color: var(--text-secondary);
}

.wallet-section {
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
  text-align: center;
  border: 1px solid var(--border);
}

.wallet-connect-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

/* TON Connect UI Button Styling */
#ton-connect-button {
  width: 100%;
  max-width: 300px;
  margin: 16px auto 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Style TON Connect UI button to match game design */
#ton-connect-button button,
#ton-connect-button .tc-button {
  width: 100% !important;
  max-width: 300px !important;
  background: var(--accent-primary) !important;
  color: white !important;
  border: none !important;
  padding: 12px 24px !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  font-size: 16px !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

#ton-connect-button button:hover,
#ton-connect-button .tc-button:hover {
  background: #3a8ee6 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(58, 142, 230, 0.3) !important;
}

/* Force TON Connect dropdown to appear above button using viewport positioning */
#ton-connect-button div[style*="position: absolute"] {
  position: fixed !important;
  top: auto !important;
  bottom: 80px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  z-index: 999999 !important;
  max-width: 250px !important;
  min-width: 200px !important;
}

/* Alternative targeting for dropdown elements */
#ton-connect-button > div > div[style*="position: absolute"],
#ton-connect-button [role="dialog"],
#ton-connect-button [role="menu"] {
  position: fixed !important;
  top: auto !important;
  bottom: 80px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  z-index: 999999 !important;
}

/* Style the dropdown content */
#ton-connect-button div[style*="position: absolute"] > div,
#ton-connect-button [role="dialog"] > div,
#ton-connect-button [role="menu"] > div {
  background: var(--bg-primary) !important;
  border: 2px solid var(--border) !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6) !important;
  padding: 16px !important;
}

/* Make disconnect button highly visible */
#ton-connect-button div[style*="position: absolute"] button,
#ton-connect-button [role="dialog"] button,
#ton-connect-button [role="menu"] button {
  background: #ff4757 !important;
  color: white !important;
  border: 2px solid #ff3742 !important;
  font-weight: bold !important;
  padding: 12px 20px !important;
  border-radius: 8px !important;
  margin: 8px 0 !important;
  width: 100% !important;
  font-size: 14px !important;
}

/* Ensure dropdown content is visible */
#ton-connect-button .tc-dropdown-content,
#ton-connect-button .tc-wallet-info {
  background: var(--bg-primary) !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
  color: var(--text-primary) !important;
  padding: 12px !important;
  min-width: 200px !important;
  max-width: 280px !important;
}

/* TON Connect modal styling */
.tc-modal-overlay {
  background: rgba(0, 0, 0, 0.8) !important;
}

.tc-modal {
  background: var(--bg-primary) !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px !important;
}

.tc-modal-header {
  background: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
}

.tc-modal-body {
  background: var(--bg-primary) !important;
  color: var(--text-primary) !important;
}

.wallet-status {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.wallet-address {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  word-break: break-all;
}

.connect-wallet-btn {
  background: var(--accent-primary);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.connect-wallet-btn:hover {
  background: #3a8ee6;
}

.wallet-connected {
  background: var(--bg-tertiary);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  text-align: center;
  border: 1px solid var(--border);
}

.wallet-connected-status {
  font-size: 16px;
  font-weight: 600;
  color: var(--success);
  margin-bottom: 8px;
}

.disconnect-wallet-btn {
  background: var(--error);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.disconnect-wallet-btn:hover {
  background: #d63031;
}

.level-progress {
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
}

.level-bar {
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 12px;
}

.level-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  transition: width 0.3s ease;
}

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.achievement-card {
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.achievement-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--shadow);
}

.achievement-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.achievement-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Section Titles */
.section-title {
  font-size: 20px;
  font-weight: 800;
  margin: 32px 0 20px;
  color: var(--text-primary);
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-radius: 12px;
  border-left: 4px solid var(--accent-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  animation: slideInLeft 0.5s ease-out;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Home Tab Containers */
#daily-quests-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}


/* Airdrop Card Modern Styling */
.expedition-card[style*="airdrop"] {
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.1), rgba(41, 128, 185, 0.1)) !important;
  border: 1px solid rgba(52, 152, 219, 0.3) !important;
  box-shadow: 0 4px 16px rgba(52, 152, 219, 0.2);
}


.winner-distribution-section {
  animation: fadeIn 0.6s ease-out;
}

.wd-chip {
  transition: all 0.3s ease;
}

.wd-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 8px 0;
  z-index: 1000;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.nav-container {
  display: flex;
  justify-content: space-around;
  max-width: 480px;
  margin: 0 auto;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 8px;
  min-width: 60px;
}

.nav-item:hover {
  background: var(--bg-tertiary);
}

.nav-item.active {
  color: var(--accent-primary);
}

.nav-icon {
  font-size: 20px;
  margin-bottom: 4px;
}

.nav-label {
  font-size: 10px;
  font-weight: 600;
}

/* Responsive Design */
@media (max-width: 480px) {
  .main-content {
    padding: 0 12px;
  }

  .header-content {
    padding: 0 12px;
  }

  .welcome-card {
    padding: 24px 20px;
    margin: 12px 0;
  }

  .welcome-title {
    font-size: 24px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .stat-card {
    padding: 16px 12px;
  }

  .stat-value {
    font-size: 20px;
  }

  .stat-label {
    font-size: 11px;
  }

  .section-title {
    font-size: 18px;
    padding: 10px 14px;
    margin: 24px 0 16px;
  }

  

  

  

  .equipment-grid-new {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    max-width: 280px;
  }

  .equipment-slot {
    min-height: 70px;
  }

  .slot-icon {
    font-size: 20px;
  }

  .slot-label {
    font-size: 9px;
  }

  .equipped-item {
    font-size: 18px;
  }

  .equipped-name {
    font-size: 8px;
  }

  .item-stats {
    grid-template-columns: 1fr;
  }

  .achievements-grid {
    grid-template-columns: 1fr;
  }

  .nav-item {
    min-width: 50px;
  }

  .nav-icon {
    font-size: 18px;
  }

  .nav-label {
    font-size: 9px;
  }

  .filter-row {
    gap: 8px;
  }

  .filter-select {
    padding: 8px 10px;
    font-size: 13px;
    min-width: 70px;
    max-width: 120px;
  }

  .filter-select:first-child {
    min-width: 50px; /* Noch schmaler für den ersten Filter auf Mobilgeräten */
  }
}

/* Loading States */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
  color: var(--text-secondary);
}

.loading::after {
  content: "";
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top: 2px solid var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 10px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-tertiary);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

/* Add these styles after the existing market styles */

/* Equipped Badge */
.equipped-badge {
  background: var(--accent-primary);
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
  font-weight: 600;
}

/* Change Button */
.change-btn {
  background: var(--accent-primary);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
}

.change-btn:hover {
  background: #3a8ee6;
}

/* Expedition Refresh Section */
.expedition-refresh-section {
  background: linear-gradient(135deg, rgba(45, 55, 72, 0.95), rgba(30, 40, 55, 0.95));
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 24px;
  border: 1px solid rgba(102, 126, 234, 0.2);
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  position: relative;
  overflow: hidden;
}

.expedition-refresh-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
  box-shadow: 0 2px 10px rgba(102, 126, 234, 0.5);
}

.refresh-info h3 {
  color: var(--text-primary);
  margin-bottom: 16px;
  font-size: 18px;
  font-weight: 700;
  background: linear-gradient(135deg, #fff, #a0aec0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.refresh-info p {
  color: rgba(203, 213, 225, 0.9);
  margin-bottom: 8px;
  font-size: 14px;
}

.refresh-free {
  color: #10b981 !important;
  font-weight: 700 !important;
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
  font-size: 15px !important;
}

.refresh-cost {
  color: #fbbf24 !important;
  font-weight: 700 !important;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.4);
  font-size: 15px !important;
}

.expedition-refresh-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 14px 32px;
  border-radius: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: 16px;
  font-size: 16px;
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.expedition-refresh-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s ease;
}

.expedition-refresh-btn:hover::before {
  left: 100%;
}

.expedition-refresh-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.6);
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.expedition-refresh-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.5);
}

#expedition-rewards-modal .modal-content {
  max-width: 520px;
  background: linear-gradient(135deg, rgba(30, 40, 55, 0.98), rgba(20, 30, 45, 0.98));
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(102, 126, 234, 0.3);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

#expedition-result-title {
  margin-bottom: 8px;
  text-align: center;
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(135deg, #fff, #a0aec0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.5px;
}

#expedition-result-subtitle {
  margin-top: 0;
  text-align: center;
  color: rgba(160, 174, 192, 0.9);
  font-size: 14px;
  font-weight: 500;
}

.rewards-container {
  margin-bottom: 24px;
}

.rewards-container h3 {
  margin-bottom: 14px;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.rewards-list {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  max-height: 300px;
  overflow-y: auto;
  padding: 16px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) inset;
}

.rewards-list::-webkit-scrollbar {
  width: 6px;
}

.rewards-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
}

.rewards-list::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

.rewards-list::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #764ba2, #667eea);
}


.no-rewards {
  text-align: center;
  color: rgba(156, 163, 175, 0.8);
  padding: 32px 0;
  font-size: 15px;
  font-weight: 500;
}

.reroll-section {
  border-top: 1px solid rgba(102, 126, 234, 0.2);
  padding-top: 20px;
  margin-top: 20px;
}

.reroll-section h3 {
  margin-bottom: 8px;
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
}

.reroll-section p {
  margin-top: 0;
  text-align: center;
  color: rgba(160, 174, 192, 0.9);
  margin-bottom: 18px;
  font-size: 14px;
}

.reroll-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.reroll-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.reroll-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.reroll-btn:hover::before {
  left: 100%;
}

.ad-reroll {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.ad-reroll:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(16, 185, 129, 0.5);
  background: linear-gradient(135deg, #059669, #10b981);
}

.ad-reroll:active {
  transform: translateY(0);
}

.ton-reroll {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.ton-reroll:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(59, 130, 246, 0.5);
  background: linear-gradient(135deg, #2563eb, #3b82f6);
}

.ton-reroll:active {
  transform: translateY(0);
}

.store-slider {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 16px auto;
  padding: 6px;
  background: rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  max-width: 400px;
  position: relative;
  overflow: hidden;
}

.store-slider::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
  pointer-events: none;
  z-index: 0;
}

.slider-btn {
  flex: 1;
  padding: 12px 20px;
  background: transparent;
  color: var(--text-secondary);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
  text-transform: capitalize;
  letter-spacing: 0.5px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.slider-btn:hover:not(.active) {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.slider-btn.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.slider-btn:active {
  transform: scale(0.98);
}

.store-section {
  display: none;
  animation: fadeInUp 0.4s ease-out;
}

.store-section.active {
  display: block;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Energy Modal */
.energy-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

.energy-modal.show {
  display: flex;
}

/* Energy Modal - Modern Design */
.energy-modal-content {
  background: linear-gradient(135deg, #1a1d29 0%, #252936 100%);
  border-radius: 20px;
  max-width: 480px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  border: 2px solid rgba(255, 215, 0, 0.2);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.6), 0 0 30px rgba(255, 215, 0, 0.1);
  position: relative;
  animation: energyModalSlideIn 0.3s ease-out;
}

@keyframes energyModalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.energy-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-primary);
  font-size: 24px;
  z-index: 10;
}

.energy-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.energy-modal-header {
  text-align: center;
  padding: 32px 24px 24px;
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.1) 0%, transparent 100%);
}

.energy-icon {
  font-size: 56px;
  margin-bottom: 12px;
  animation: energyPulse 2s ease-in-out infinite;
}

@keyframes energyPulse {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
  }
  50% {
    transform: scale(1.1);
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.8));
  }
}

.energy-modal-header h3 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 8px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.energy-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

.energy-modal-body {
  padding: 0 24px 24px;
}

/* Energy Status Card */
.energy-status-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
}

.energy-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.energy-status-label {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

.energy-status-value {
  font-size: 18px;
  font-weight: 700;
  color: #FFD700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.energy-progress-bar {
  height: 12px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 6px;
  overflow: hidden;
  margin: 12px 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.energy-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #FFD700 0%, #FFA500 100%);
  transition: width 0.3s ease;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
  position: relative;
}

.energy-progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255, 255, 255, 0.3) 50%, 
    transparent 100%);
  animation: energyShimmer 2s infinite;
}

@keyframes energyShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.energy-timer {
  text-align: center;
  color: var(--text-secondary);
  font-size: 13px;
  margin-top: 8px;
  opacity: 0.8;
}

/* Energy Restore Options */
.energy-restore-options {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.energy-restore-card {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 20px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.energy-restore-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.energy-restore-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.energy-restore-card:hover::before {
  opacity: 1;
}

.energy-restore-card.ad-restore {
  border-color: rgba(0, 200, 150, 0.3);
}

.energy-restore-card.ad-restore:hover {
  border-color: rgba(0, 200, 150, 0.5);
}

.energy-restore-card.gem-restore {
  border-color: rgba(74, 158, 255, 0.3);
}

.energy-restore-card.gem-restore:hover {
  border-color: rgba(74, 158, 255, 0.5);
}

.energy-restore-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.energy-restore-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.energy-restore-info {
  flex: 1;
}

.energy-restore-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.energy-restore-desc {
  font-size: 13px;
  color: var(--text-secondary);
}

.energy-restore-badge {
  background: rgba(0, 200, 150, 0.2);
  color: #00C896;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  border: 1px solid rgba(0, 200, 150, 0.3);
}

.energy-restore-badge.premium {
  background: rgba(74, 158, 255, 0.2);
  color: #4A9EFF;
  border-color: rgba(74, 158, 255, 0.3);
}

.energy-restore-limit {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--text-secondary);
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

.energy-restore-limit span {
  font-weight: 700;
  color: #FFD700;
}

.energy-restore-cost {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--text-primary);
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  font-weight: 600;
}

.gem-icon-small {
  width: 20px;
  height: 20px;
  display: inline-block;
  vertical-align: middle;
}

.energy-restore-btn {
  width: 100%;
  padding: 14px 24px;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.energy-restore-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.energy-restore-btn:hover::before {
  width: 300px;
  height: 300px;
}

.energy-restore-btn .btn-icon {
  font-size: 18px;
  z-index: 1;
}

.energy-restore-btn.ad {
  background: linear-gradient(135deg, #00C896 0%, #00A080 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(0, 200, 150, 0.3);
}

.energy-restore-btn.ad:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 200, 150, 0.4);
}

.energy-restore-btn.ad:active {
  transform: translateY(0);
}

.energy-restore-btn.gems {
  background: linear-gradient(135deg, #4A9EFF 0%, #3A7FD5 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(74, 158, 255, 0.3);
}

.energy-restore-btn.gems:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(74, 158, 255, 0.4);
}

.energy-restore-btn.gems:active {
  transform: translateY(0);
}

.energy-restore-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* Info Banner */
.energy-info-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(74, 158, 255, 0.1);
  border: 1px solid rgba(74, 158, 255, 0.3);
  border-radius: 12px;
  font-size: 13px;
  color: var(--text-secondary);
}

.energy-info-banner .info-icon {
  font-size: 18px;
  flex-shrink: 0;
}

/* Responsive */
@media (max-width: 480px) {
  .energy-modal-content {
    max-width: 95%;
  }
  
  .energy-icon {
    font-size: 48px;
  }
  
  .energy-modal-header h3 {
    font-size: 20px;
  }
  
  .energy-restore-icon {
    font-size: 28px;
  }
}

/* Merge Modal Styles */
.modal-content.merge-modal {
  max-width: 650px;
  max-height: 90vh;
}

.merge-info-banner {
  background: linear-gradient(135deg, rgba(74, 158, 255, 0.1) 0%, rgba(155, 89, 182, 0.1) 100%);
  border: 1px solid rgba(74, 158, 255, 0.3);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-primary);
}

.merge-info-banner .info-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.merge-slots-section {
  margin-bottom: 24px;
}

.merge-slots-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent-primary);
  margin-bottom: 16px;
  text-align: center;
}

.merge-slots-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  flex-wrap: wrap;
}

.merge-arrow {
  font-size: 24px;
  font-weight: bold;
  color: var(--accent-primary);
  opacity: 0.6;
}

.merge-result-arrow {
  font-size: 28px;
  opacity: 0.8;
}

.merge-slot {
  width: 90px;
  height: 90px;
  border: 3px dashed rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.merge-slot::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(74, 158, 255, 0.1) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.merge-slot:hover::before {
  opacity: 1;
}

.merge-slot.filled {
  border: 3px solid var(--accent-primary);
  background: linear-gradient(135deg, rgba(74, 158, 255, 0.15) 0%, rgba(74, 158, 255, 0.05) 100%);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.merge-result-slot {
  width: 90px;
  height: 90px;
  border: 3px dashed rgba(255, 215, 0, 0.4);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 215, 0, 0.05) 100%);
  transition: all 0.3s ease;
}

.merge-result-empty {
  font-size: 36px;
  opacity: 0.5;
  color: #ffd700;
}

.merge-slot.filled.common {
  border-color: var(--common);
}

.merge-slot.filled.uncommon {
  border-color: var(--uncommon);
}

.merge-slot.filled.rare {
  border-color: var(--rare);
}

.merge-slot.filled.epic {
  border-color: var(--epic);
}

.merge-slot.filled.legendary {
  border-color: var(--legendary);
}

.merge-slot.filled.mythic {
  border-color: var(--mythic);
}

.merge-slot-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  opacity: 0.6;
}

.slot-number {
  font-size: 24px;
  font-weight: bold;
  color: var(--text-secondary);
}

.merge-item-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin-bottom: 8px;
}

.merge-item-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.merge-item-name {
  font-size: 12px;
  text-align: center;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.merge-success-rate {
  margin-top: 16px;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(74, 158, 255, 0.15) 0%, rgba(155, 89, 182, 0.15) 100%);
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-primary);
  text-align: center;
  border: 1px solid rgba(74, 158, 255, 0.3);
}

.merge-items-section {
  margin-top: 24px;
}

.merge-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 12px;
}

.merge-section-header .section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.merge-filter-select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  padding: 8px 32px 8px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234a9eff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.merge-filter-select:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-primary);
}

.merge-filter-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
}

.merge-filter-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-primary);
}

.merge-filter-btn.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: white;
}

.merge-item-list {
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.2);
}

.merge-item-list::-webkit-scrollbar {
  width: 8px;
}

.merge-item-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.merge-item-list::-webkit-scrollbar-thumb {
  background: var(--accent-primary);
  border-radius: 4px;
}

.merge-item-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 12px;
}

.merge-item-card:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  border-color: var(--accent-primary);
}

.merge-item-card.selected {
  border-color: var(--accent-primary);
  background: linear-gradient(135deg, rgba(74, 158, 255, 0.2) 0%, rgba(74, 158, 255, 0.1) 100%);
  box-shadow: 0 0 20px rgba(74, 158, 255, 0.3);
}

.merge-item-card.common {
  border-color: var(--common);
}

.merge-item-card.uncommon {
  border-color: var(--uncommon);
}

.merge-item-card.rare {
  border-color: var(--rare);
}

.merge-item-card.epic {
  border-color: var(--epic);
}

.merge-item-card.legendary {
  border-color: var(--legendary);
}

.merge-item-card.mythic {
  border-color: var(--mythic);
}

.modal-btn-merge {
  background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
}

.modal-btn-merge:hover {
  box-shadow: 0 6px 20px rgba(155, 89, 182, 0.4);
}

/* Market Listing Modal Modern Styles */
.step-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.market-filters-modern {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Mobile Responsive for Merge Modal */
@media (max-width: 640px) {
  .merge-slots-container {
    gap: 8px;
  }

  .merge-slot,
  .merge-result-slot {
    width: 70px;
    height: 70px;
  }

  .merge-arrow {
    font-size: 20px;
  }

  .merge-result-arrow {
    font-size: 24px;
  }

  .slot-number {
    font-size: 20px;
  }

  .merge-item-icon {
    width: 50px;
    height: 50px;
    font-size: 28px;
  }

  .merge-section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .merge-filter-select {
    width: 100%;
  }

  .merge-item-list {
    max-height: 250px;
  }

  .merge-info-banner {
    font-size: 12px;
    padding: 10px 12px;
  }
}

@media (max-width: 480px) {
  .modal-content.merge-modal {
    max-width: 95vw;
    margin: 10px;
  }

  .merge-slots-container {
    gap: 6px;
    justify-content: space-around;
  }

  .merge-slot,
  .merge-result-slot {
    width: 60px;
    height: 60px;
  }

  .merge-arrow {
    font-size: 16px;
  }

  .merge-result-arrow {
    font-size: 20px;
  }

  .slot-number {
    font-size: 18px;
  }

  .merge-item-card {
    padding: 12px;
  }

  .merge-item-icon {
    width: 45px;
    height: 45px;
    font-size: 24px;
  }

  .merge-item-name {
    font-size: 11px;
  }

  .market-filters-modern {
    grid-template-columns: 1fr;
    padding: 12px;
  }
}

.merge-item-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.merge-item-info {
  flex: 1;
}

.merge-item-rarity {
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 600;
}

.merge-item-rarity.common {
  color: var(--common);
}

.merge-item-rarity.uncommon {
  color: var(--uncommon);
}

.merge-item-rarity.rare {
  color: var(--rare);
}

.merge-item-rarity.epic {
  color: var(--epic);
}

.merge-item-rarity.legendary {
  color: var(--legendary);
}

.merge-item-rarity.mythic {
  color: var(--mythic);
}

.merge-item-quantity {
  font-size: 11px;
  color: var(--text-secondary);
}

/* Enhanced Clan System Styles */

/* Available Clans List Styling */
#available-clans-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 400px;
  overflow-y: auto;
  padding: 8px;
}

.available-clan-card {
  background: var(--bg-secondary);
  border-radius: 16px;
  padding: 20px;
  border: 2px solid var(--border);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.available-clan-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.available-clan-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  border-color: var(--accent-primary);
}

.available-clan-card:hover::before {
  opacity: 1;
}

.available-clan-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.available-clan-info h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 8px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.available-clan-info h3::before {
  content: "⚔️";
  font-size: 18px;
}


.available-clan-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.available-clan-stat {
  background: var(--bg-tertiary);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.available-clan-stat:hover {
  background: rgba(74, 158, 255, 0.1);
  border-color: var(--accent-primary);
}

.available-clan-stat-icon {
  font-size: 20px;
  margin-bottom: 4px;
  display: block;
}

.available-clan-stat-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-primary);
  display: block;
}

.available-clan-stat-label {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.available-clan-requirements {
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid rgba(255, 193, 7, 0.3);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 16px;
}

.available-clan-requirements-text {
  font-size: 12px;
  color: var(--warning);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.available-clan-requirements-text::before {
  content: "🎯";
  font-size: 14px;
}

.join-clan-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--success), #00a085);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(0, 184, 148, 0.3);
}

.join-clan-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 184, 148, 0.4);
  background: linear-gradient(135deg, #00a085, var(--success));
}

.join-clan-btn:disabled {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Enhanced Clan Members List */


/* Enhanced Leaderboard Styling */
#leaderboard-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 500px;
  overflow-y: auto;
  padding: 8px;
}


/* Clan Styles */
.clan-burger-menu {
  position: fixed;
  bottom: 82px; /* Adjusted to avoid overlap with bottom nav */
  right: 16px;
  z-index: 1001; /* Ensure above most content but below modals */
}

.clan-menu-button {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 12px var(--shadow);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.clan-menu-button:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  background: linear-gradient(135deg, var(--accent-secondary), var(--accent-primary));
}

.clan-burger-menu .clan-menu-icon {
  transition: transform 0.2s ease;
}
.clan-burger-menu.expanded .clan-menu-icon {
  transform: rotate(90deg);
}

/* When there are unread messages, highlight the burger icon similarly to the message button */
.clan-burger-menu.has-unread .clan-menu-button {
  box-shadow: 0 0 0 4px rgba(74,158,255,0.12), 0 6px 16px rgba(0,0,0,0.25);
}
.clan-burger-menu.has-unread .clan-menu-icon {
  color: var(--accent-primary);
}


/* Expanded buttons when burger is clicked: show message and season-pass buttons */
.clan-expanded-buttons {
  position: absolute;
  bottom: 64px; /* align just above the burger button */
  right: 0;
  display: none;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  padding: 8px;
  transition: opacity 240ms ease, transform 240ms ease;
  opacity: 0;
  transform: translateY(8px);
}

.clan-expanded-buttons.show {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

/* When burger has expanded state toggle the buttons visually */
.clan-burger-menu.expanded .clan-expanded-buttons {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

/* Ensure message and season-pass buttons align to the burger and look identical */
.clan-burger-menu .clan-message-button {
  position: static; /* override fixed from the standalone implementation */
  bottom: auto;
  right: auto;
  z-index: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 18px;
  padding: 0;
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

.clan-burger-menu .clan-message-button .message-badge {
  top: -4px;
  right: -4px;
}

/* Ensure badge is visible and positioned correctly when used on the burger/its buttons */
.clan-burger-menu .clan-menu-button {
  position: relative; /* so message-badge absolute positions are relative to the button */
}
.clan-burger-menu .message-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
}


/* Clan Modal */


.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

.stat-item {
  background: var(--bg-secondary);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--border);
}

.stat-item span:first-child {
  font-size: 14px;
  color: var(--text-secondary);
}

.stat-item span:last-child {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-primary);
}


.event-list .event-card {
  background: var(--bg-tertiary);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.event-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow);
}

.event-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.event-card .status-active {
  color: var(--success);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(0, 184, 148, 0.2); /* Success color with transparency */
}


.shop-items .shop-item-card {
  background: var(--bg-tertiary);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.shop-item-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow);
}

.shop-item-card .item-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  overflow: hidden;
}

.shop-item-card .item-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 4px;
}

.shop-item-card .item-info {
  flex: 1;
}

.shop-item-card .item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.shop-item-card .price {
  font-size: 12px;
  color: var(--accent-primary);
  font-weight: 600;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.leaderboard-filters select {
  width: 100%;
  max-width: 200px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
}

.leaderboard-filters select:focus {
  outline: none;
  border-color: var(--accent-primary);
}


/* ADDED: General size for merchant modals */
/* Merchant Modal - Modern Size */
.modal-content.merchant-modal-size {
  max-width: 600px;
  max-height: 90vh;
  background: linear-gradient(135deg, rgba(26, 26, 38, 0.98) 0%, rgba(18, 18, 28, 0.98) 100%);
  border: 1px solid rgba(102, 126, 234, 0.2);
}

/* Merchant Items Scroll Container - Separate scrollable area */
.merchant-items-scroll-container {
  max-height: 400px;
  overflow-y: auto;
  overflow-x: hidden;
  margin-top: 20px;
  padding-right: 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.3);
  padding: 12px;
}

/* Custom scrollbar styling for merchant items container */
.merchant-items-scroll-container::-webkit-scrollbar {
  width: 8px;
}

.merchant-items-scroll-container::-webkit-scrollbar-track {
  background: rgba(102, 126, 234, 0.1);
  border-radius: 4px;
}

.merchant-items-scroll-container::-webkit-scrollbar-thumb {
  background: rgba(102, 126, 234, 0.4);
  border-radius: 4px;
}

.merchant-items-scroll-container::-webkit-scrollbar-thumb:hover {
  background: rgba(102, 126, 234, 0.6);
}

/* Merchant Items Grid - Modern Layout with Mobile Optimization */
.merchant-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  margin-top: 0;
  padding: 4px;
}

@media (max-width: 768px) {
  .merchant-items-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .merchant-items-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    max-width: 100%;
  }
}

/* Merchant Item Cards - Modern Design with Mobile Optimization */
.merchant-item-card,
.merchant-sell-item-card {
  background: linear-gradient(135deg, rgba(42, 42, 58, 0.8) 0%, rgba(30, 30, 46, 0.8) 100%);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  min-width: 0;
  max-width: 100%;
}

.merchant-item-card::before,
.merchant-sell-item-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
  transition: left 0.5s ease;
}

.merchant-item-card:hover::before,
.merchant-sell-item-card:hover::before {
  left: 100%;
}

.merchant-item-card:hover,
.merchant-sell-item-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
  border-color: var(--accent-primary);
}

.merchant-item-card:active,
.merchant-sell-item-card:active {
  transform: translateY(-2px) scale(1.01);
}

.merchant-item-card.common,
.merchant-sell-item-card.common {
  border-color: var(--common);
}
.merchant-item-card.uncommon,
.merchant-sell-item-card.uncommon {
  border-color: var(--uncommon);
}
.merchant-item-card.rare,
.merchant-sell-item-card.rare {
  border-color: var(--rare);
}
.merchant-item-card.epic,
.merchant-sell-item-card.epic {
  border-color: var(--epic);
}
.merchant-item-card.legendary,
.merchant-sell-item-card.legendary {
  border-color: var(--legendary);
}
.merchant-item-card.mythic,
.merchant-sell-item-card.mythic {
  border-color: var(--mythic);
}

/* ADDED: Merchant Item Header Styles */
.merchant-item-header,
.merchant-sell-item-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

/* Merchant Item Icon - Modern Style */
.merchant-item-icon,
.merchant-sell-item-icon {
  width: 70px;
  height: 70px;
  font-size: 36px;
  margin-bottom: 12px;
  border-radius: 10px;
  background: rgba(30, 30, 46, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.merchant-item-icon img,
.merchant-sell-item-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
  transition: transform 0.3s ease;
}

.merchant-item-card:hover .merchant-item-icon img,
.merchant-sell-item-card:hover .merchant-sell-item-icon img {
  transform: scale(1.1);
}

@media (max-width: 480px) {
  .merchant-item-icon,
  .merchant-sell-item-icon {
    width: 80px;
    height: 80px;
    font-size: 32px;
    margin-bottom: 10px;
  }
  
  .merchant-item-card,
  .merchant-sell-item-card {
    padding: 16px;
  }
  
  .merchant-item-name,
  .merchant-sell-item-name {
    font-size: 15px;
  }
  
  .merchant-item-price,
  .merchant-sell-price {
    font-size: 13px;
  }
  
  .modal-content.merchant-modal-size {
    max-width: 95%;
    padding: 16px;
  }
}

/* Merchant Item Name Styles with Text Wrapping */
.merchant-item-name,
.merchant-sell-item-name {
  font-size: 16px;
  margin-bottom: 4px;
  color: var(--text-primary);
  font-weight: 600;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  max-width: 100%;
  line-height: 1.3;
}

/* Merchant Item Rarity Styles */
.merchant-item-rarity,
.merchant-sell-item-rarity {
  font-size: 12px;
  margin-bottom: 4px;
  padding: 2px 6px;
  text-transform: uppercase;
  font-weight: 700;
  border-radius: 4px;
  display: inline-block;
}

/* Merchant Item Price Styles with Wrapping */
.merchant-item-price,
.merchant-sell-price {
  font-size: 14px;
  color: var(--legendary);
  margin-top: 8px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
}

/* Gold Icon Small Styles */
.gold-icon-small {
  margin-left: 4px;
}

/* Merchant Actions Styles */
.merchant-actions {
  margin-top: 16px;
}

/* Buy Merchant Button Styles */
.buy-merchant-btn {
  background: var(--success);
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  border: none; /* ADDED */
  cursor: pointer; /* ADDED */
  transition: background 0.3s; /* ADDED */
  font-weight: 600; /* ADDED */
}

.buy-merchant-btn:hover {
  background: #00a085;
}

/* No Items Styles */
.no-items {
  color: var(--text-secondary);
  font-size: 16px;
  font-style: italic;
  padding: 40px 20px;
}

/* Merchant Sell Modal Body Styles */
#merchant-sell-modal .modal-body {
  padding: 20px 24px;
}

/* Filter Controls Styles */
/* Filter Controls - Modern Design */
.filter-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  padding: 14px;
  background: linear-gradient(135deg, rgba(42, 42, 58, 0.5) 0%, rgba(30, 30, 46, 0.5) 100%);
  border-radius: 12px;
  border: 1px solid rgba(74, 74, 90, 0.5);
}

.filter-controls select {
  flex: 1;
  min-width: 140px;
  padding: 11px 36px 11px 12px;
  border-radius: 10px;
  border: 2px solid rgba(102, 126, 234, 0.2);
  background: rgba(30, 30, 46, 0.8);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="rgba(102, 126, 234, 0.6)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>');
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
}

.filter-controls select:hover {
  border-color: rgba(102, 126, 234, 0.4);
  background-color: rgba(30, 30, 46, 0.95);
}

.filter-controls select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

@media (max-width: 480px) {
  .filter-controls {
    padding: 12px;
    gap: 10px;
  }
  
  .filter-controls select {
    min-width: 100%;
    padding: 10px 32px 10px 10px;
    font-size: 13px;
  }
}

/* Inventory Grid Styles */
.inventory-grid {
  display: grid; /* ADDED */
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); /* ADDED */
  gap: 16px;
}

/* Merchant Sell Item Quantity Styles */
.merchant-sell-item-quantity {
  color: var(--text-secondary);
  font-size: 12px; /* ADDED for consistency */
  margin-top: 4px; /* ADDED for spacing */
}

/* ADDED: Merchant Item Info Styles */
.merchant-item-info,
.merchant-sell-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Selected Item Preview Styles */
.selected-item-preview {
  margin-top: 20px;
  padding: 16px;
  background: var(--bg-tertiary);
  border-radius: 12px;
  border: 2px dashed var(--border);
  display: flex; /* ADDED */
  align-items: center; /* ADDED */
  gap: 16px;
}

/* Selected Item Sell Icon Container Styles */
.selected-item-sell-icon-container {
  width: 60px;
  height: 60px;
  font-size: 28px;
  margin-right: 16px;
  background: var(--bg-secondary);
  border-radius: 8px; /* ADDED */
  display: flex; /* ADDED */
  align-items: center; /* ADDED */
  justify-content: center; /* ADDED */
  overflow: hidden; /* ADDED */
}
/* ADDED: Image styling for selected item sell icon */
.selected-item-sell-icon-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 4px;
}

/* Selected Item Sell Name Styles */
.selected-item-sell-name {
  font-size: 18px;
  font-weight: 600; /* ADDED */
  color: var(--text-primary); /* ADDED */
}

/* Selected Item Sell Rarity Styles */
.selected-item-sell-rarity {
  font-size: 12px;
  padding: 2px 6px;
  text-transform: uppercase; /* ADDED */
  font-weight: 600; /* ADDED */
}

/* Selected Item Sell Suggested Price and Price Per Item Styles */
.selected-item-sell-suggested-price,
.selected-item-sell-price-per-item {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px; /* ADDED */
}

/* Input Group Styles */
.input-group {
  margin-bottom: 16px;
}

.input-group label {
  color: var(--text-primary);
  font-weight: 600; /* ADDED */
  margin-bottom: 8px; /* ADDED */
  display: block; /* ADDED */
}

.input-group input[type="number"] {
  width: 100%; /* ADDED */
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 16px;
}
.input-group input[type="number"]:focus {
  /* ADDED */
  outline: none;
  border-color: var(--accent-primary);
}

/* Total Sell Price Styles */
.total-sell-price {
  margin-top: 24px;
  color: var(--legendary);
  font-size: 18px; /* ADDED for prominence */
  font-weight: 700; /* ADDED for prominence */
  text-align: center; /* ADDED */
}

/* Merchant Status Message Styles */
/* Merchant Status Message - Modern Alert Style */
.merchant-status-message,
.status-message {
  background: linear-gradient(135deg, rgba(253, 203, 110, 0.15) 0%, rgba(253, 203, 110, 0.08) 100%);
  color: var(--warning);
  border: 2px solid rgba(253, 203, 110, 0.4);
  margin-bottom: 20px;
  padding: 16px;
  border-radius: 12px;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(253, 203, 110, 0.1);
  position: relative;
  overflow: hidden;
}

.merchant-status-message::before,
.status-message::before {
  content: '⚠️';
  font-size: 20px;
  margin-right: 8px;
}

/* Blurred Merchant Items Grid Styles */
.merchant-items-grid.blurred {
  filter: blur(5px);
  pointer-events: none;
}

/* Modal Actions for Merchant Sell Confirmation */
.modal-actions {
  display: flex;
  gap: 12px;
  padding-top: 20px;
  justify-content: center;
}

/* Pagination Container - Modern Design */
.pagination-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(42, 42, 58, 0.4) 0%, rgba(30, 30, 46, 0.4) 100%);
  border-radius: 12px;
  border: 1px solid rgba(74, 74, 90, 0.5);
}

.pagination-container button {
  min-width: 100px;
}

#sales-page-info,
#listings-page-info {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  padding: 0 12px;
}

@media (max-width: 480px) {
  .pagination-container {
    padding: 12px;
    gap: 10px;
  }
  
  .pagination-container button {
    min-width: 80px;
    font-size: 12px;
    padding: 8px 12px;
  }
  
  #sales-page-info,
  #listings-page-info {
    font-size: 12px;
    padding: 0 8px;
  }
}

/* TASKS */


.loading-spinner-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 9999999; /* ÜBER allem - über alle Modals */
  pointer-events: auto; /* Standardblockierung */
  color: #fff;
  font-size: 1.2rem;
}

.loading-spinner-container.full-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7); /* wie overlay: dunkler Hintergrund */
}

.loading-spinner-container.element-specific {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(42, 42, 42, 0.8); /* heller Hintergrund */
  pointer-events: none; /* nur außerhalb klickbar */
}

.loading-spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #8774e1; /* Telegram-ähnliche Farbe */
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin-bottom: 10px;
}

.loading-spinner-text {
  font-weight: bold;
  text-align: center;
  color: #fff;
}

/* für Interaktionssperre */
body.loading {
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 1;
  transition: opacity 0.5s ease;
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow: hidden; /* Wichtig für ::before */
  pointer-events: auto; /* Block all interactions with underlying elements */
}

/* 🔽 Hintergrundbild mit niedriger Deckkraft */
#loading-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("/images/TraderLegends.png"); /* <== Pfad anpassen */
  background-size: cover;
  background-position: center;
  opacity: 0.6; /* <== Deckkraft anpassen */
  z-index: -1;
  pointer-events: none;
}

.loading-logo-img {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  object-fit: contain;
  background: var(--bg-tertiary);
  padding: 8px;
}

.loading-text {
  color: var(--text-primary);
  font-size: 24px;
  font-weight: 700;
  margin: 20px 0;
}

.loading-progress {
  width: 200px;
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.loading-progress-bar {
  width: 0; /* Initial auf 0, wird durch JavaScript gesetzt */
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  transition: width 0.3s ease; /* Sanfte Übergänge ohne Animation */
}

.loading-tip {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 20px 0;
}

.loading-debug {
  font-size: 10px;
  color: var(--text-secondary);
  margin-top: 20px;
}

.loading-terms {
  font-size: 10px;
  color: var(--text-secondary);
  margin-top: 12px;
  text-align: center;
}

.loading-terms-link {
  color: var(--text-secondary);
  text-decoration: underline;
}


.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.section-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.level-badge {
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}


.copy-btn {
  background: #4caf50;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: background 0.3s;
}

.copy-btn:hover {
  background: #45a049;
}

.copy-btn:active {
  transform: scale(0.95);
}

/* Affiliate Section */


.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.section-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.level-badge {
  background: var(--bg-tertiary);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}


.copy-btn {
  background: var(--success);
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: background 0.3s;
}

.copy-btn:hover {
  background: #00a085;
}

.copy-btn:active {
  transform: scale(0.95);
}


.details-link {
  color: var(--accent-primary);
  text-decoration: underline;
  font-size: 14px;
  cursor: pointer;
}

.details-link:hover {
  color: #3a8ee6;
}

.details-btn {
  width: 100%;
  background: var(--accent-primary);
  color: white;
  border: none;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s;
}

.details-btn:hover {
  background: #3a8ee6;
  transform: translateY(-1px);
}

/* Responsive adjustments */
@media (max-width: 480px) {
  

  

  .copy-btn {
    width: 100%;
  }

  

  .stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }

  .stat-label,
  .stat-value {
    display: inline;
  }

  

  

  

  

  

  

  

  .clan-menu-button {
    width: 48px;
    height: 48px;
    font-size: 20px;
  }

  /* removed legacy .clan-menu-dropdown and .clan-menu-item styles (no longer used) */

  

  

  

  

  .stat-grid {
    grid-template-columns: 1fr;
  }

  

  

  
}

/* Loading States */


/* Empty States */


/* ===== SEASON PASS STYLES ===== */

/* Season Pass Modal */


/* Season Pass Header */


.progress-text {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: 600;
}

.progress-bar {
  width: 100%;
  height: 24px;
  background: var(--bg-tertiary);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  transition: width 0.5s ease;
  position: relative;
  overflow: hidden;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Season Pass Modal and Content */


/* Season Pass Day Card */


/* Available Day - Ready to Claim */


/* Claimed Day */


/* Locked Day */


/* Missed Day */


/* Day Number */
.day-number {
  font-weight: 700;
  font-size: 16px;
  color: var(--text-primary);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Day Reward */
.day-reward {
  margin: 12px 0;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.seasonpass-reward-icon {
  font-size: 2.2em;
  display: block;
  text-align: center;
  line-height: 1;
}


/* Day Status */
.day-status {
  font-size: 12px;
  font-weight: 600;
  margin-top: 8px;
  padding: 4px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}


/* Claim Reward Button */
.claim-reward-btn {
  background: var(--success);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  margin-top: 12px;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  width: 100%;
}

.claim-reward-btn:hover {
  background: #00a085;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 184, 148, 0.4);
}

.claim-reward-btn:active {
  transform: translateY(0);
}

/* Season Pass Info */


/* Rarity-specific styling for items */


/* Special styling for final day */


/* Close Button for Season Pass Modal */


/* Responsive Design */
@media (max-width: 768px) {
  
  
  
  
  .day-number {
    font-size: 14px;
  }
  
  
  
  
  
  

  /* Expedition Cards Mobile Optimization */
  .expedition-card {
    padding: 18px;
    border-radius: 16px;
  }

  .expedition-header {
    flex-direction: row;
    gap: 10px;
  }

  .expedition-info h3 {
    font-size: 17px;
  }

  .expedition-difficulty {
    padding: 6px 12px;
    font-size: 11px;
  }

  .expedition-rewards {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
  }

  .expedition-badges {
    justify-content: center;
  }

  .expedition-button {
    padding: 14px;
    font-size: 14px;
  }

  .expedition-refresh-section {
    padding: 20px;
  }

  .expedition-refresh-btn {
    padding: 12px 24px;
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  
  
  
  
  

  /* Expedition Cards Mobile Optimization */
  .expedition-card {
    padding: 16px;
    border-radius: 14px;
    margin-bottom: 16px;
  }

  .expedition-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
  }

  .expedition-info h3 {
    font-size: 16px;
  }

  .expedition-duration {
    font-size: 12px;
  }

  .expedition-difficulty {
    padding: 6px 12px;
    font-size: 10px;
    align-self: flex-start;
  }

  .expedition-rewards {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px;
    margin-bottom: 14px;
  }

  

  .expedition-badges {
    gap: 8px;
    justify-content: flex-start;
    margin-bottom: 12px;
  }

  .expedition-xp-badge {
    padding: 5px 10px;
    font-size: 11px;
  }

  .expedition-stats {
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px;
    font-size: 13px;
  }

  .expedition-stats > div {
    justify-content: space-between;
  }

  .expedition-button {
    padding: 13px;
    font-size: 13px;
    border-radius: 12px;
  }

  .expedition-progress {
    padding: 18px;
    border-radius: 16px;
  }

  .expedition-progress h3 {
    font-size: 16px;
  }

  .progress-bar {
    height: 10px;
    margin: 12px 0;
  }

  .expedition-timer {
    font-size: 15px;
  }

  .expedition-refresh-section {
    padding: 18px;
    border-radius: 16px;
    margin-bottom: 18px;
  }

  .refresh-info h3 {
    font-size: 16px;
    margin-bottom: 12px;
  }

  .refresh-info p {
    font-size: 13px;
    margin-bottom: 6px;
  }

  .expedition-refresh-btn {
    padding: 12px 24px;
    font-size: 14px;
    border-radius: 12px;
  }
  
  
}

/* Scrollbar Styling for Season Pass */


.clan-message-button .message-icon { color: var(--text-primary); }
.message-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  min-width: 20px;
  height: 20px;
  border-radius: 50%;
  display: none; /* hidden by default; JS toggles to inline-flex when unread */
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  padding: 0 4px;
  border: 2px solid rgba(0, 0, 0, 0.3);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.5), 0 0 0 2px rgba(255, 255, 255, 0.1);
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.5), 0 0 0 2px rgba(255, 255, 255, 0.1);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 0 3px 12px rgba(102, 126, 234, 0.7), 0 0 0 2px rgba(255, 255, 255, 0.15);
  }
}

/* ===== QUESTS MODAL STYLES ===== */


/* Quest Tabs */


/* Quest Content */


@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Quest Reset Timer Card */


.reset-timer-icon {
  font-size: 48px;
  filter: drop-shadow(0 0 20px rgba(102, 126, 234, 0.8));
  animation: timerPulse 2s ease-in-out infinite;
}

@keyframes timerPulse {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 0 20px rgba(102, 126, 234, 0.8));
  }
  50% {
    transform: scale(1.1);
    filter: drop-shadow(0 0 30px rgba(102, 126, 234, 1));
  }
}

.reset-timer-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.reset-timer-label {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.reset-timer-value {
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: 'Courier New', monospace;
  letter-spacing: 2px;
  transition: all 0.3s ease;
}

.reset-timer-value.reset-imminent {
  animation: timerWarning 1s ease-in-out infinite;
}

@keyframes timerWarning {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.05);
  }
}

.reset-timer-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  height: 80%;
  background: radial-gradient(circle, rgba(102, 126, 234, 0.2), transparent 70%);
  border-radius: 50%;
  opacity: 0;
  animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2);
  }
}

/* Quest Groups */


/* Quest Items */


/* No Quests Message */
.no-quests {
  text-align: center;
  padding: 60px 20px;
  color: rgba(160, 174, 192, 0.7);
  font-size: 16px;
  font-weight: 500;
}

.no-quests::before {
  content: '📋';
  display: block;
  font-size: 64px;
  margin-bottom: 20px;
  opacity: 0.4;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

/* Mobile Responsive */
@media (max-width: 768px) {
  

  

  

  

  

  

  

  

  .reset-timer-icon {
    font-size: 36px;
  }

  .reset-timer-label {
    font-size: 12px;
  }

  .reset-timer-value {
    font-size: 22px;
    letter-spacing: 1px;
  }

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  .no-quests {
    padding: 40px 16px;
    font-size: 14px;
  }

  .no-quests::before {
    font-size: 56px;
    margin-bottom: 16px;
  }
}

/* ===== ACHIEVEMENT MILESTONE TRACKER STYLES ===== */
.achievement-milestone-tracker {
  margin-top: 20px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.08));
  border: 1px solid rgba(102, 126, 234, 0.2);
  border-radius: 12px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}


/* Milestone States */


/* Mobile Responsive for Milestone Tracker */
@media (max-width: 768px) {
  .achievement-milestone-tracker {
    padding: 12px;
  }

  

  

  

  

  

  

  
}


/* Task Badge - Red variant for available tasks */
.task-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
  color: #fff;
  min-width: 20px;
  height: 20px;
  border-radius: 50%;
  display: none; /* hidden by default; JS toggles to inline-flex when tasks available */
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  padding: 0 4px;
  border: 2px solid rgba(0, 0, 0, 0.3);
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.5), 0 0 0 2px rgba(255, 255, 255, 0.1);
  animation: taskBadgePulse 2s ease-in-out infinite;
}

@keyframes taskBadgePulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.5), 0 0 0 2px rgba(255, 255, 255, 0.1);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 0 3px 12px rgba(255, 107, 107, 0.7), 0 0 0 2px rgba(255, 255, 255, 0.15);
  }
}

/* Task badge positioning for nav-item */
.nav-item {
  position: relative;
}

.nav-item .task-badge {
  top: 4px;
  right: 4px;
}

/* Task badge positioning for slider button */
.slider-btn .task-badge {
  position: absolute;
  top: -8px;
  right: -8px;
}
/* Reuse .clan-menu-button hover styles for visual consistency */

/* message button no longer uses a fixed-positioned layout; it now lives inside the burger menu */

/* Messages Modal */
.messages-modal {
  width: 540px;
  max-width: calc(100% - 40px);
}
.messages-list-container {
  max-height: 360px;
  overflow-y: auto;
  padding: 8px;
}
.message-card {
  display: flex;
  flex-direction: column;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 8px;
  background: rgba(255,255,255,0.03);
  cursor: pointer;
}
.message-card.unread {
  background: linear-gradient(90deg, rgba(102,126,234,0.08), rgba(118,75,162,0.03));
  border-left: 4px solid var(--accent-primary);
}
.message-card .message-title {
  font-weight: 600;
  margin-bottom: 6px;
}
.message-card .message-time {
  font-size: 12px;
  color: var(--text-secondary);
}
.message-detail {
  background: transparent;
  padding: 12px 8px;
}

.message-detail h4{ margin:0 0 8px; }
.message-detail #message-detail-body{ white-space: pre-wrap; }

/* Slot Selection Modal */
#slot-selection-modal .modal-content {
  max-width: 500px;
}

.slot-selection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  padding: 8px 0;
}

.slot-selection-card {
  background: linear-gradient(145deg, var(--bg-tertiary), var(--bg-secondary));
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.slot-selection-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(145deg, transparent, rgba(255, 255, 255, 0.05));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.slot-selection-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  border-color: var(--accent-primary);
}

.slot-selection-card:hover::before {
  opacity: 1;
}

.slot-selection-card:active {
  transform: translateY(-2px) scale(1.01);
}

/* Rarity-based borders for slot cards */
.slot-selection-card.common {
  border-color: var(--rarity-common);
  background: linear-gradient(145deg, 
    rgba(158, 158, 158, 0.1), 
    var(--bg-secondary));
}

.slot-selection-card.uncommon {
  border-color: var(--rarity-uncommon);
  background: linear-gradient(145deg, 
    rgba(30, 255, 0, 0.1), 
    var(--bg-secondary));
}

.slot-selection-card.rare {
  border-color: var(--rarity-rare);
  background: linear-gradient(145deg, 
    rgba(0, 112, 221, 0.15), 
    var(--bg-secondary));
}

.slot-selection-card.epic {
  border-color: var(--rarity-epic);
  background: linear-gradient(145deg, 
    rgba(163, 53, 238, 0.15), 
    var(--bg-secondary));
}

.slot-selection-card.legendary {
  border-color: var(--rarity-legendary);
  background: linear-gradient(145deg, 
    rgba(255, 128, 0, 0.15), 
    var(--bg-secondary));
}

.slot-selection-card.mythic {
  border-color: var(--rarity-mythic);
  background: linear-gradient(145deg, 
    rgba(255, 0, 220, 0.15), 
    var(--bg-secondary));
}

.slot-card-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  background: var(--bg-primary);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.slot-card-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
}

.slot-card-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent-primary);
  text-align: center;
  margin-bottom: 6px;
}

.slot-card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slot-card-stats {
  display: flex;
  justify-content: space-around;
  gap: 4px;
  font-size: 11px;
  color: var(--text-secondary);
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.slot-card-stats span {
  display: flex;
  align-items: center;
  gap: 2px;
}

/* Mobile responsiveness */
@media (max-width: 480px) {
  .slot-selection-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .slot-selection-card {
    padding: 12px;
  }
  
  .slot-card-icon {
    width: 50px;
    height: 50px;
    font-size: 28px;
  }
}

/* ==================== GACHA SYSTEM STYLES ==================== */
:root {
  --primary: #667eea;
  --primary-dark: #764ba2;
  --common: #a0aec0;
  --uncommon: #48bb78;
  --rare: #4299e1;
  --epic: #9f7aea;
  --legendary: #f6ad55;
  --bg-primary: #0f0f23;
  --bg-secondary: #1a1a2e;
  --text-primary: #e2e8f0;
}

.gacha-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  min-height: 100vh;
  padding: 1rem;
}

.gacha-header {
  width: 100%;
  text-align: center;
  padding: 1rem 0;
}

.gacha-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.series-selector {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.series-btn {
  padding: 0.75rem 1rem;
  border: 2px solid transparent;
  border-radius: 20px;
  background: rgba(102, 126, 234, 0.1);
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.series-btn.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  transform: scale(1.05);
}

.gacha-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  position: relative;
  gap: 1.5rem;
}

.series-preview {
  display: flex;
  justify-content: center;
  width: 100%;
}

.series-preview-image {
  width: 100%;
  max-width: 250px;
  height: auto;
  border-radius: 12px;
  border: 2px solid rgba(102, 126, 234, 0.3);
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.2);
}

.pity-info {
  width: 100%;
  max-width: 300px;
  padding: 1rem;
  background: rgba(102, 126, 234, 0.1);
  border-radius: 12px;
  border: 1px solid rgba(102, 126, 234, 0.3);
}

.pity-label {
  font-size: 0.85rem;
  color: #a0aec0;
  margin-bottom: 0.5rem;
}

.pity-bar-container {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.pity-bar {
  flex: 1;
  height: 8px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(102, 126, 234, 0.5);
}

.pity-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 10px;
  transition: width 0.3s ease;
}

.pity-count {
  font-weight: 700;
  color: var(--primary);
  font-size: 0.85rem;
  min-width: 40px;
}

.draw-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  width: 100%;
  max-width: 320px;
}

.draw-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.draw-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
  z-index: 0;
}

.draw-btn-1 {
  background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
}

.draw-btn-10 {
  background: linear-gradient(135deg, #f6ad55 0%, #ed8936 100%);
}

.draw-btn:hover::before {
  width: 300px;
  height: 300px;
}

.draw-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
  transform: translateY(-2px);
}

.draw-btn-1:hover:not(:disabled) {
  background: linear-gradient(135deg, #38a169 0%, #48bb78 100%);
  box-shadow: 0 6px 20px rgba(72, 187, 120, 0.5);
}

.draw-btn-10:hover:not(:disabled) {
  background: linear-gradient(135deg, #ed8936 0%, #f6ad55 100%);
  box-shadow: 0 6px 20px rgba(246, 173, 85, 0.5);
}

.draw-btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.draw-btn:disabled {
  background: linear-gradient(135deg, #555 0%, #777 100%);
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
  transform: none;
}

.btn-label {
  font-size: 12px;
  font-weight: 600;
  position: relative;
  z-index: 1;
}

.btn-cost {
  font-size: 11px;
  opacity: 0.95;
  position: relative;
  z-index: 1;
}

.btn-count {
  font-size: 14px;
  font-weight: 600;
  position: relative;
  z-index: 1;
}

.gacha-footer {
  display: flex;
  justify-content: center;
  padding: 1rem 0;
}

.info-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.info-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.info-btn:hover::before {
  width: 300px;
  height: 300px;
}

.info-btn:hover {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
  transform: translateY(-2px);
}

.info-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.info-btn:hover {
  background: rgba(102, 126, 234, 0.1);
  transform: scale(1.1);
}

/* PAYOUT MODAL */
.payout-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.payout-tab {
  padding: 0.6rem 1rem;
  background: rgba(102, 126, 234, 0.1);
  color: #667eea;
  border: 1px solid #667eea;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.payout-tab.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.payout-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.payout-table thead {
  background: rgba(102, 126, 234, 0.1);
}

.payout-table th {
  padding: 1rem;
  text-align: left;
  font-weight: 700;
  color: #667eea;
  border-bottom: 2px solid #667eea;
}

.payout-table td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid rgba(102, 126, 234, 0.2);
  color: #e2e8f0;
}

.rarity-badge {
  display: inline-block;
  padding: 0.3rem 0.6rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: white;
}

.rarity-badge.common { background: var(--common); }
.rarity-badge.uncommon { background: var(--uncommon); }
.rarity-badge.rare { background: var(--rare); }
.rarity-badge.epic { background: var(--epic); }
.rarity-badge.legendary { background: var(--legendary); }

.chance-percentage {
  font-weight: 700;
  color: #667eea;
}

/* Responsive */
@media (max-width: 600px) {
  .gacha-main {
    padding: 0.5rem;
  }

  .gacha-title {
    font-size: 1.5rem;
  }

  .series-selector {
    gap: 0.25rem;
    margin-bottom: 1rem;
  }

  .series-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }

  .draw-buttons {
    gap: 0.5rem;
  }

  .draw-btn {
    padding: 0.75rem 1rem;
    min-width: 80px;
    font-size: 0.8rem;
  }

  .payout-table td,
  .payout-table th {
    padding: 0.5rem;
    font-size: 0.85rem;
  }
}

/* ===== PLAYER EQUIPMENT MODAL ===== */
.player-equipment-modal {
  max-width: 500px;
  max-height: 85vh;
  box-sizing: border-box;
}

.equipment-modal-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
  text-align: center;
  width: 100%;
}

.equipment-avatar {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  object-fit: cover;
  border: 3px solid var(--accent-primary);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.equipment-player-info {
  flex: none;
  width: 100%;
}

.equipment-player-info h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
  color: var(--text-primary);
}

.equipment-player-stats-quick {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-secondary);
}

.equipment-player-stats-quick span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.equipment-grid-section,
.equipment-stats-section {
  margin-bottom: 24px;
}

.section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 14px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.9;
}

/* Equipment Grid - 4 Columns */
.equipment-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.equipment-slot {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(42, 42, 58, 0.8) 0%, rgba(30, 30, 46, 0.8) 100%);
  border: 2px solid var(--border);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.equipment-slot::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.15), transparent);
  transition: left 0.5s ease;
  z-index: 1;
}

.equipment-slot:hover::before {
  left: 100%;
}

.equipment-slot:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.25);
  border-color: var(--accent-primary);
}

.equipment-slot.common {
  border-color: var(--common);
}

.equipment-slot.uncommon {
  border-color: var(--uncommon);
}

.equipment-slot.rare {
  border-color: var(--rare);
}

.equipment-slot.epic {
  border-color: var(--epic);
}

.equipment-slot.legendary {
  border-color: var(--legendary);
}

.equipment-slot.mythic {
  border-color: var(--mythic);
}

.equipment-slot-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--text-secondary);
  font-size: 24px;
  opacity: 0.6;
  z-index: 2;
}

.equipment-slot-type {
  font-size: 10px;
  margin-top: 4px;
  text-transform: uppercase;
  font-weight: 600;
  opacity: 0.7;
}

.equipment-slot-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 2;
  text-align: center;
}

.equipment-slot-icon {
  width: 100%;
  height: 70%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  overflow: hidden;
}

.equipment-slot-icon img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border-radius: 6px;
}

.equipment-slot-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 4px;
  line-height: 1.2;
  word-wrap: break-word;
  max-width: 95%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Detailed Stats Section */
.equipment-stats-details {
  background: linear-gradient(135deg, rgba(42, 42, 58, 0.6) 0%, rgba(30, 30, 46, 0.6) 100%);
  border-radius: 12px;
  border: 1px solid rgba(74, 74, 90, 0.5);
  padding: 16px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(74, 74, 90, 0.3);
}

.stat-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
}

.stat-value {
  color: var(--accent-primary);
  font-size: 16px;
  font-weight: 700;
}

/* Responsive Design */
@media (max-width: 480px) {
  .player-equipment-modal {
    max-width: 100%;
    width: 100%;
    max-height: 90vh;
    margin: 0 auto;
  }
  
  .equipment-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  
  .equipment-modal-header {
    flex-direction: column;
    text-align: center;
  }
  
  .equipment-avatar {
    width: 50px;
    height: 50px;
  }
  
  .equipment-player-stats-quick {
    justify-content: center;
    font-size: 12px;
  }
}

/* Extra small devices (under 360px) */
@media (max-width: 360px) {
  .player-equipment-modal {
    max-width: 100%;
    width: calc(100vw - 16px);
    margin: 0 8px;
    max-height: 95vh;
  }
  
  .equipment-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  
  .modal-header,
  .modal-body,
  .modal-footer {
    padding: 12px 16px;
  }
  
  .equipment-player-stats-quick {
    flex-direction: column;
    gap: 4px;
  }
}

/* Ensure no horizontal scroll on any device */
@media (max-width: 768px) {
  .modal-content {
    width: calc(100vw - 16px);
    margin: 0 8px;
  }
  
  .player-equipment-modal {
    width: 100%;
    max-width: 100%;
  }
}

/* ============ AVATAR GLOW ANIMATIONS - NAHTLOSE LOOPS ============ */
/* Avatar glow animations are now defined in avatar-frames.js to avoid conflicts */

/* Items (T3): Item-Level, Wert, Aufwerten, Truhen */
.item-level-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(78, 205, 196, 0.15);
  color: #4ECDC4;
  font-size: 11px;
  font-weight: bold;
}
.item-power {
  font-weight: bold;
  font-size: 12px;
}
.inventory-card-stats-compact.negative .item-level-badge {
  background: rgba(220, 53, 69, 0.2);
  color: #ff6b6b;
}
.item-levelup {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.item-levelup-title {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.item-levelup-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.item-levelup-buttons .modal-btn {
  flex: 1;
  min-width: 120px;
  font-size: 12px;
}
.item-levelup-hint {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-secondary);
}
.chests-button {
  display: block;
  margin: 0 auto 12px;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
  color: #222;
  font-weight: bold;
  cursor: pointer;
}
.chest-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 10px;
  text-align: left;
}
.chest-title {
  font-weight: bold;
  margin-bottom: 4px;
}
.chest-info {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.chest-slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 6px;
}
.chest-slot-btn {
  padding: 6px 4px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 18px;
  cursor: pointer;
}
.chest-slot-btn small {
  font-size: 10px;
}

/* ==================== EXPEDITIONEN (T4) ==================== */
/* Regler für die Dauer mit Ziel-Bild, Belohnungs-Kacheln, laufende Expedition, Ergebnis mit Reroll je Fund.
   Stil wie die übrigen Spielkarten: dunkles Glas, Verlauf #667eea → #764ba2 → #f093fb, Seltenheitsfarben. */
.exped-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 16px;
}

/* Seltenheitsfarben für Rahmen, Leuchten und Text */
.exped-r-common { --rc: var(--common); --rc-soft: rgba(160, 174, 192, 0.12); --rc-glow: rgba(160, 174, 192, 0.22); }
.exped-r-uncommon { --rc: var(--uncommon); --rc-soft: rgba(72, 187, 120, 0.13); --rc-glow: rgba(72, 187, 120, 0.3); }
.exped-r-rare { --rc: var(--rare); --rc-soft: rgba(66, 153, 225, 0.15); --rc-glow: rgba(66, 153, 225, 0.38); }
.exped-r-epic { --rc: var(--epic); --rc-soft: rgba(159, 122, 234, 0.16); --rc-glow: rgba(159, 122, 234, 0.42); }
.exped-r-legendary { --rc: var(--legendary); --rc-soft: rgba(246, 173, 85, 0.16); --rc-glow: rgba(246, 173, 85, 0.48); }
.exped-r-mythic { --rc: var(--mythic); --rc-soft: rgba(244, 67, 54, 0.16); --rc-glow: rgba(244, 67, 54, 0.52); }
.exped-rtext { color: var(--rc); font-weight: 800; }

/* Kopfzeile */
.exped-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 2px 0;
}
.exped-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.3px;
  background: linear-gradient(135deg, #fff, #a0aec0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.exped-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}
.exped-info-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(102, 126, 234, 0.45);
  background: rgba(102, 126, 234, 0.15);
  color: #c3cdfd;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(102, 126, 234, 0.25);
  transition: all 0.2s ease;
}
.exped-info-btn:active { transform: scale(0.94); }
.exped-boosts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.exped-boost {
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(5, 150, 105, 0.22));
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #6ee7b7;
}

/* Energie und XP-Vorrat */
.exped-resources {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  cursor: pointer;
}
.exped-resource {
  background: linear-gradient(135deg, rgba(45, 55, 72, 0.92), rgba(30, 40, 55, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}
.exped-resource-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}
.exped-resource-head strong { font-size: 15px; font-variant-numeric: tabular-nums; }
.exped-energy strong { color: #FFD700; text-shadow: 0 0 10px rgba(255, 215, 0, 0.45); }
.exped-reserve strong { color: #4ECDC4; text-shadow: 0 0 10px rgba(78, 205, 196, 0.45); }
.exped-resource-sub {
  font-size: 10.5px;
  color: rgba(176, 176, 176, 0.85);
}
.exped-bar {
  height: 8px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 20px;
  overflow: hidden;
  margin: 7px 0 5px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}
.exped-bar-fill {
  height: 100%;
  width: 0;
  border-radius: 20px;
  background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
  box-shadow: 0 0 12px rgba(102, 126, 234, 0.5);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.exped-energy .exped-bar-fill {
  background: linear-gradient(90deg, #f59e0b, #FFD700);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}
.exped-reserve .exped-bar-fill {
  background: linear-gradient(90deg, #0ea5a0, #4ECDC4);
  box-shadow: 0 0 10px rgba(78, 205, 196, 0.5);
}

/* Ziel-Bild */
.exped-hero {
  position: relative;
  height: 190px;
  border-radius: 20px;
  overflow: hidden;
  background-color: #1a1a2e;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(102, 126, 234, 0.3);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.45);
}
.exped-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  z-index: 2;
  background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
  box-shadow: 0 2px 10px rgba(102, 126, 234, 0.5);
}
.exped-hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 15, 35, 0.05) 0%, rgba(15, 15, 35, 0.35) 45%, rgba(15, 15, 35, 0.94) 100%);
}
.exped-hero-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 16px;
}
.exped-kicker {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #c3cdfd;
}
.exped-place {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  margin: 2px 0 8px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.75);
}
.exped-hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.exped-chip {
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 20px;
  color: #fff;
  background: rgba(15, 15, 35, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.15);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.exped-chip-energy { color: #FFD700; border-color: rgba(255, 215, 0, 0.4); }
.exped-chip-reserve { color: #4ECDC4; border-color: rgba(78, 205, 196, 0.4); }
.exped-hero-dim { filter: grayscale(0.6) brightness(0.8); }
.exped-hero-done .exped-place {
  color: #FFD700;
  text-shadow: 0 0 18px rgba(255, 215, 0, 0.55), 0 2px 10px rgba(0, 0, 0, 0.8);
}
.exped-hero-running {
  height: 240px;
  background-size: 130% auto;
  animation: expedHeroPan 26s ease-in-out infinite alternate;
}
@keyframes expedHeroPan {
  from { background-position: 0% 40%; }
  to { background-position: 100% 60%; }
}
.exped-countdown {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
  color: #fbbf24;
  text-shadow: 0 0 18px rgba(251, 191, 36, 0.55), 0 2px 8px rgba(0, 0, 0, 0.7);
}
.exped-run-bar {
  height: 10px;
  margin: 6px 0 10px;
}
.exped-shimmer {
  position: relative;
  overflow: hidden;
}
.exped-shimmer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: translateX(-100%);
  animation: expedShimmer 2.2s infinite;
}
@keyframes expedShimmer {
  to { transform: translateX(100%); }
}

/* Karte mit Regler */
.exped-card {
  background: linear-gradient(135deg, rgba(45, 55, 72, 0.95), rgba(30, 40, 55, 0.95));
  border: 1px solid rgba(102, 126, 234, 0.2);
  border-radius: 20px;
  padding: 18px 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}
.exped-duration {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}
.exped-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.exped-duration-value {
  font-size: 28px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, #fff, #c3cdfd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.exped-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 10px;
  margin: 10px 0 8px;
  border-radius: 20px;
  outline: none;
  touch-action: pan-y;
  background:
    linear-gradient(90deg, #667eea, #764ba2, #f093fb) left / var(--fill, 100%) 100% no-repeat,
    rgba(0, 0, 0, 0.4);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}
.exped-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff, #c3cdfd 45%, #764ba2);
  border: 3px solid #fff;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.35), 0 4px 14px rgba(102, 126, 234, 0.6);
  cursor: grab;
}
.exped-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff, #c3cdfd 45%, #764ba2);
  border: 3px solid #fff;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.35), 0 4px 14px rgba(102, 126, 234, 0.6);
  cursor: grab;
}
.exped-slider:disabled { opacity: 0.6; }
.exped-scale {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}
.exped-note {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 8px 0;
}
.exped-note-small { font-size: 11.5px; }
.exped-center { text-align: center; }

/* Belohnungs-Kacheln */
.exped-rewards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 16px 0 12px;
}
.exped-reward {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 12px 6px 10px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.exped-reward::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--exped-line, linear-gradient(90deg, #667eea, #764ba2));
}
.exped-reward-xp { --exped-line: linear-gradient(90deg, #4f46e5, #a78bfa); }
.exped-reward-gold { --exped-line: linear-gradient(90deg, #f59e0b, #FFD700); }
.exped-reward-items { --exped-line: linear-gradient(90deg, #ec4899, #f093fb); }
.exped-reward-icon {
  height: 22px;
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.exped-coin {
  width: 20px;
  height: 20px;
  object-fit: contain;
}
.exped-reward-value {
  margin-top: 6px;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.exped-reward-xp .exped-reward-value { color: #c4b5fd; }
.exped-reward-bonus {
  margin-top: 3px;
  font-size: 9.5px;
  font-weight: 700;
  color: #4ECDC4;
}
.exped-reward-gold .exped-reward-value { color: #FFD700; }
.exped-reward-items .exped-reward-value { color: #f9a8d4; }
.exped-reward-label {
  margin-top: 2px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* Fundzähler */
.exped-counter {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.exped-counter-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}
.exped-counter-head span:last-child {
  font-weight: 600;
  color: var(--text-secondary);
}
.exped-counter-bar .exped-bar-fill {
  background: linear-gradient(90deg, #ec4899, #f093fb);
  box-shadow: 0 0 10px rgba(240, 147, 251, 0.5);
}

/* Chancen je Seltenheit */
.exped-odds-title {
  margin: 14px 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.exped-odds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 6px;
}
.exped-odds {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 4px;
  border-radius: 12px;
  background: var(--rc-soft);
  border: 1px solid var(--rc);
  box-shadow: 0 0 12px var(--rc-glow);
}
.exped-odds-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--rc);
}
.exped-odds-value {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.exped-odds-locked {
  opacity: 0.55;
  border-style: dashed;
  box-shadow: none;
}

/* Knöpfe */
.exped-start {
  position: relative;
  overflow: hidden;
  width: 100%;
  margin-top: 16px;
  padding: 16px;
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.exped-start::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  animation: expedSweep 3.2s ease-in-out infinite;
}
@keyframes expedSweep {
  0% { left: -100%; }
  60%, 100% { left: 100%; }
}
.exped-start:active { transform: scale(0.98); }
.exped-start-gold {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}
.exped-speedup {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 14px;
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  box-shadow: 0 6px 20px rgba(236, 72, 153, 0.4);
  transition: transform 0.15s ease;
}
.exped-speedup small {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.85;
}
.exped-speedup:active { transform: scale(0.98); }
.exped-speedup:disabled {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
  color: var(--text-secondary);
  cursor: not-allowed;
}
.exped-empty {
  text-align: center;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* Ergebnis-Fenster */
.exped-result-banner {
  position: relative;
  height: 96px;
  margin-bottom: 12px;
  border-radius: 14px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}
.exped-result-banner-text {
  position: absolute;
  left: 12px;
  bottom: 10px;
  z-index: 1;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}
.exped-result-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.exped-reroll-note {
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  background: rgba(102, 126, 234, 0.12);
  border: 1px solid rgba(102, 126, 234, 0.35);
  animation: expedPop 0.35s ease-out;
}
.exped-finds {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}
.exped-find {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--rc-soft), rgba(0, 0, 0, 0.25));
  border: 1px solid var(--rc);
  border-left-width: 4px;
  box-shadow: 0 0 14px var(--rc-glow);
  animation: expedPop 0.35s ease-out both;
}
.exped-find.exped-r-legendary,
.exped-find.exped-r-mythic {
  animation: expedPop 0.35s ease-out both, expedGlow 1.8s ease-in-out infinite alternate;
}
@keyframes expedPop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes expedGlow {
  from { box-shadow: 0 0 8px var(--rc-glow); }
  to { box-shadow: 0 0 26px var(--rc-glow); }
}
.exped-find-icon {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  box-sizing: border-box;
  padding: 4px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  cursor: pointer;
  background: radial-gradient(circle, var(--rc-soft), rgba(0, 0, 0, 0.35));
  border: 1px solid var(--rc);
}
.exped-find-info {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}
.exped-find-name {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.exped-find-rarity {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--rc);
}
.exped-find-summary {
  margin-top: 2px;
  font-size: 11px;
}
.exped-find-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.exped-reroll {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  padding: 6px 8px;
  border: none;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.15;
  color: #fff;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.exped-reroll:active { transform: scale(0.95); }
.exped-reroll small {
  font-size: 9.5px;
  font-weight: 600;
  opacity: 0.85;
}
.exped-reroll img {
  width: 16px;
  height: 16px;
  margin-left: 3px;
  object-fit: contain;
}
.exped-reroll-ad {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 3px 12px rgba(16, 185, 129, 0.4);
}
.exped-reroll-gems {
  flex-direction: row;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 3px 12px rgba(59, 130, 246, 0.4);
}
.exped-result-modal #expedition-claim-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
  border: none;
  color: #fff;
  font-weight: 800;
}

@media (max-width: 360px) {
  .exped-place { font-size: 20px; }
  .exped-duration-value { font-size: 24px; }
  .exped-countdown { font-size: 28px; }
  .exped-reward-value { font-size: 13px; }
}

/* Energie-Fenster: Hinweis zum XP-Vorrat (T4) */
.energy-reserve-hint {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ==================== REROLL-ANIMATION (T4) ==================== */
/* Bühne über dem Ergebnisfenster: Durchlauf der Seltenheiten, Enthüllung mit Strahlen, Blitz und Partikeln.
   Stärke nach neuer Seltenheit: rfx-tier-1 (Uncommon) bis rfx-tier-5 (Mythic). Farben über --rc aus .exped-r-*. */
.rfx-overlay {
  position: fixed;
  inset: 0;
  z-index: 10150;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: rfxFadeIn 0.25s ease-out both;
}
.rfx-overlay.rfx-out { animation: rfxFadeOut 0.25s ease-in both; }
@keyframes rfxFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes rfxFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}
.rfx-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 42%, rgba(26, 26, 46, 0.92), rgba(5, 5, 15, 0.97) 70%);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.rfx-win .rfx-backdrop {
  background: radial-gradient(circle at 50% 42%, var(--rc-soft), rgba(5, 5, 15, 0.97) 70%);
}

/* Lichtstrahlen hinter der Karte (nur bei einer Verbesserung) */
.rfx-rays {
  position: absolute;
  top: 42%;
  left: 50%;
  width: 760px;
  height: 760px;
  margin: -380px 0 0 -380px;
  pointer-events: none;
  opacity: 0;
  background: repeating-conic-gradient(from 0deg, var(--rc-glow) 0deg 7deg, transparent 7deg 22deg);
  -webkit-mask: radial-gradient(circle, #000 0%, rgba(0, 0, 0, 0.6) 35%, transparent 65%);
  mask: radial-gradient(circle, #000 0%, rgba(0, 0, 0, 0.6) 35%, transparent 65%);
}
.rfx-win .rfx-rays {
  animation: rfxRaysIn 0.6s ease-out forwards, rfxSpin 14s linear infinite;
}
.rfx-tier-1 .rfx-rays { --rays-opacity: 0.35; }
.rfx-tier-2 .rfx-rays { --rays-opacity: 0.55; }
.rfx-tier-3 .rfx-rays { --rays-opacity: 0.75; }
.rfx-tier-4 .rfx-rays,
.rfx-tier-5 .rfx-rays { --rays-opacity: 1; animation: rfxRaysIn 0.6s ease-out forwards, rfxSpin 6s linear infinite; }
@keyframes rfxRaysIn {
  from { opacity: 0; transform: scale(0.4) rotate(0deg); }
  to { opacity: var(--rays-opacity, 0.5); transform: scale(1); }
}
@keyframes rfxSpin {
  to { rotate: 360deg; }
}

/* Blitz bei der Enthüllung */
.rfx-flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at 50% 42%, #fff 0%, var(--rc) 35%, transparent 75%);
}
.rfx-win .rfx-flash { animation: rfxFlash 0.7s ease-out; }
.rfx-tier-4 .rfx-flash,
.rfx-tier-5 .rfx-flash { animation: rfxFlash 0.9s ease-out, rfxFlashEcho 1.4s ease-out 0.5s; }
@keyframes rfxFlash {
  0% { opacity: 0; }
  12% { opacity: 0.95; }
  100% { opacity: 0; }
}
@keyframes rfxFlashEcho {
  0% { opacity: 0; }
  20% { opacity: 0.45; }
  100% { opacity: 0; }
}

/* Bühne */
.rfx-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px;
  width: 100%;
  max-width: 360px;
}
.rfx-tier-4 .rfx-stage,
.rfx-tier-5 .rfx-stage { animation: rfxQuake 0.55s ease-in-out 1; }
@keyframes rfxQuake {
  0%, 100% { transform: translate(0, 0); }
  15% { transform: translate(-7px, 4px); }
  30% { transform: translate(6px, -5px); }
  45% { transform: translate(-5px, -3px); }
  60% { transform: translate(5px, 4px); }
  75% { transform: translate(-3px, 2px); }
}
.rfx-kicker {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #c3cdfd;
  margin-bottom: 18px;
  min-height: 16px;
}
.rfx-win .rfx-kicker {
  font-size: 20px;
  letter-spacing: 4px;
  color: #fff;
  text-shadow: 0 0 18px var(--rc), 0 0 36px var(--rc-glow);
  animation: rfxPop 0.5s cubic-bezier(0.2, 1.4, 0.4, 1);
}

/* Karte */
.rfx-card {
  position: relative;
  width: 150px;
  height: 150px;
  border-radius: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 40%, var(--rc-soft), rgba(15, 15, 35, 0.95) 75%);
  border: 3px solid var(--rc);
  box-shadow: 0 0 24px var(--rc-glow), inset 0 0 24px var(--rc-soft);
}
.rfx-card-glow {
  position: absolute;
  inset: -18px;
  border-radius: 40px;
  background: radial-gradient(circle, var(--rc-glow), transparent 70%);
  opacity: 0.6;
  pointer-events: none;
}
.rfx-card.rfx-tick { animation: rfxTick 0.12s ease-out; }
@keyframes rfxTick {
  from { transform: scale(1.06); }
  to { transform: scale(1); }
}
.rfx-card.rfx-tense { animation: rfxTense 0.09s linear infinite; }
.rfx-card.rfx-tense .rfx-card-glow { opacity: 1; animation: rfxPulse 0.4s ease-in-out infinite alternate; }
@keyframes rfxTense {
  0% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(-2px, 1px) rotate(-1deg); }
  50% { transform: translate(2px, -1px) rotate(1deg); }
  75% { transform: translate(-1px, -2px) rotate(0deg); }
}
@keyframes rfxPulse {
  from { transform: scale(0.9); opacity: 0.6; }
  to { transform: scale(1.2); opacity: 1; }
}
.rfx-card.rfx-reveal { animation: rfxReveal 0.7s cubic-bezier(0.2, 1.5, 0.4, 1); }
.rfx-card.rfx-reveal .rfx-card-glow { opacity: 1; animation: rfxPulse 1.2s ease-in-out infinite alternate; }
.rfx-tier-4 .rfx-card,
.rfx-tier-5 .rfx-card { box-shadow: 0 0 40px var(--rc), 0 0 90px var(--rc-glow), inset 0 0 30px var(--rc-soft); }
@keyframes rfxReveal {
  0% { transform: scale(0.3) rotate(-12deg); }
  60% { transform: scale(1.18) rotate(3deg); }
  100% { transform: scale(1) rotate(0deg); }
}
.rfx-card.rfx-settle { animation: rfxSettle 0.4s ease-out; }
@keyframes rfxSettle {
  0% { transform: scale(0.92); }
  100% { transform: scale(1); }
}

/* Inhalt der Karte */
.rfx-icon {
  position: relative;
  width: 104px;
  height: 104px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
}
.rfx-icon img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.6)); }
.rfx-mystery {
  font-size: 72px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 0 20px var(--rc), 0 0 40px var(--rc-glow);
  animation: rfxFloat 0.8s ease-in-out infinite alternate;
}
@keyframes rfxFloat {
  from { transform: translateY(-4px) scale(0.96); }
  to { transform: translateY(4px) scale(1.04); }
}
.rfx-dud { animation: rfxDud 0.45s ease-out; opacity: 0.6; }
@keyframes rfxDud {
  0% { transform: scale(1.1); }
  30% { transform: scale(0.85); }
  100% { transform: scale(1); }
}

/* Texte */
.rfx-rarity {
  margin-top: 20px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--rc);
  text-shadow: 0 0 16px var(--rc-glow);
  min-height: 32px;
}
.rfx-win .rfx-rarity {
  font-size: 34px;
  animation: rfxPop 0.6s cubic-bezier(0.2, 1.6, 0.4, 1), rfxGlowText 1.4s ease-in-out 0.6s infinite alternate;
}
.rfx-tier-5 .rfx-rarity {
  background: linear-gradient(90deg, #ff8a80, #f44336, #FFD700, #f44336, #ff8a80);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: rfxPop 0.6s cubic-bezier(0.2, 1.6, 0.4, 1), rfxShine 2s linear infinite;
}
@keyframes rfxPop {
  0% { transform: scale(0.4); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes rfxGlowText {
  from { text-shadow: 0 0 10px var(--rc-glow); }
  to { text-shadow: 0 0 28px var(--rc), 0 0 50px var(--rc-glow); }
}
@keyframes rfxShine {
  to { background-position: 200% 0; }
}
.rfx-name {
  margin-top: 4px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  min-height: 20px;
}
.rfx-sub {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  min-height: 18px;
}
.rfx-continue {
  margin-top: 26px;
  padding: 13px 40px;
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #667eea, #764ba2);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.45);
  opacity: 0;
  pointer-events: none;
}
.rfx-continue.rfx-continue-show {
  pointer-events: auto;
  animation: rfxButtonIn 0.3s ease-out both;
}
@keyframes rfxButtonIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.rfx-win .rfx-continue { background: linear-gradient(135deg, var(--rc), #764ba2); box-shadow: 0 6px 24px var(--rc-glow); }

/* Partikel */
.rfx-particle {
  position: absolute;
  width: var(--size);
  height: var(--size);
  margin: calc(var(--size) / -2) 0 0 calc(var(--size) / -2);
  border-radius: 50%;
  background: var(--color);
  box-shadow: 0 0 10px var(--color);
  pointer-events: none;
  animation: rfxBurst 1s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}
@keyframes rfxBurst {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--tx), var(--ty)) scale(0.2); opacity: 0; }
}

/* Chance auf ein besseres Item auf den Fund-Karten */
.exped-find-odds {
  margin-top: 3px;
  font-size: 10.5px;
  font-weight: 700;
  color: #c3cdfd;
}
.exped-find-odds.exped-find-maxed { color: var(--text-secondary); font-weight: 600; }
.exped-odds-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}
.exped-odds-list .exped-odds { min-width: 70px; }

@media (prefers-reduced-motion: reduce) {
  .rfx-overlay *,
  .rfx-overlay *::before,
  .rfx-overlay *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

/* ==================== TALENTE (T2b) ==================== */
/* Talentbaum als Fenster von unten, je Zweig eine Akzentfarbe (--tc), Stufen mit Freischalt-Fortschritt, Karten mit
   Rang-Punkten. Stil wie Expeditionen: dunkles Glas, Verläufe, Leuchten. */
.tal-b-adventurer { --tc: #4ECDC4; --tc2: #4299e1; --tc-soft: rgba(78, 205, 196, 0.14); --tc-glow: rgba(78, 205, 196, 0.42); }
.tal-b-endurance { --tc: #FFD700; --tc2: #f59e0b; --tc-soft: rgba(255, 215, 0, 0.13); --tc-glow: rgba(255, 215, 0, 0.4); }
.tal-b-warrior { --tc: #f87171; --tc2: #dc2626; --tc-soft: rgba(248, 113, 113, 0.14); --tc-glow: rgba(248, 113, 113, 0.42); }
.tal-b-trader { --tc: #34d399; --tc2: #059669; --tc-soft: rgba(52, 211, 153, 0.14); --tc-glow: rgba(52, 211, 153, 0.4); }
.tal-b-smith { --tc: #fb923c; --tc2: #c2410c; --tc-soft: rgba(251, 146, 60, 0.14); --tc-glow: rgba(251, 146, 60, 0.42); }

.tal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(5, 5, 15, 0.78);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: rfxFadeIn 0.2s ease-out both;
}
.tal-sheet {
  width: 100%;
  max-width: 480px;
  height: 92vh;
  overflow-y: auto;
  box-sizing: border-box;
  padding: 18px 16px 32px;
  border-radius: 24px 24px 0 0;
  background: linear-gradient(180deg, #1f2238 0%, #14142a 40%, #0f0f23 100%);
  border: 1px solid rgba(102, 126, 234, 0.25);
  border-bottom: none;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.5);
  animation: talSlideUp 0.32s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}
@keyframes talSlideUp {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.tal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.tal-title {
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(135deg, #fff, #a0aec0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.tal-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}
.tal-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

/* Freie Punkte */
.tal-points {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 16px 0;
  padding: 12px 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(45, 55, 72, 0.9), rgba(30, 40, 55, 0.9));
  border: 1px solid rgba(102, 126, 234, 0.2);
}
.tal-points-orb {
  width: 70px;
  height: 70px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.25), var(--tc2) 45%, #14142a 100%);
  border: 2px solid var(--tc);
  box-shadow: 0 0 16px var(--tc-glow);
}
.tal-points-glow { animation: talOrb 1.8s ease-in-out infinite alternate; }
@keyframes talOrb {
  from { box-shadow: 0 0 10px var(--tc-glow); }
  to { box-shadow: 0 0 28px var(--tc), 0 0 50px var(--tc-glow); }
}
.tal-points-value {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}
.tal-points-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}
.tal-points-info {
  flex: 1;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}
.tal-reset {
  margin-top: 8px;
  padding: 6px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.tal-reset:disabled { opacity: 0.4; cursor: not-allowed; }
.tal-gem { width: 14px; height: 14px; object-fit: contain; }

/* Zweig-Reiter */
.tal-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}
.tal-tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 2px 6px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  cursor: pointer;
  transition: transform 0.15s ease;
}
.tal-tab:active { transform: scale(0.96); }
.tal-tab-icon { font-size: 20px; line-height: 1.1; }
.tal-tab-name { font-size: 9.5px; font-weight: 700; letter-spacing: 0.3px; }
.tal-tab-points {
  font-size: 10px;
  font-weight: 800;
  color: var(--tc);
}
.tal-tab-active {
  color: #fff;
  background: var(--tc-soft);
  border-color: var(--tc);
  box-shadow: 0 0 14px var(--tc-glow);
}
.tal-branch-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 4px;
}
.tal-branch-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  background: var(--tc-soft);
  border: 1px solid var(--tc);
  box-shadow: 0 0 14px var(--tc-glow);
}
.tal-branch-name {
  font-size: 19px;
  font-weight: 800;
  color: var(--tc);
  text-shadow: 0 0 14px var(--tc-glow);
}

/* Stufen */
.tal-tier { margin-top: 16px; }
.tal-tier-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.tal-tier-req {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: none;
}
.tal-tier-master .tal-tier-head > span:first-child {
  background: linear-gradient(90deg, #FFD700, #f6ad55);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.tal-tier-locked .tal-cards { opacity: 0.5; filter: grayscale(0.4); }
.tal-bar {
  height: 5px;
  margin: -2px 0 8px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
}
.tal-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--tc2), var(--tc));
  box-shadow: 0 0 8px var(--tc-glow);
}
.tal-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Talent-Karten */
.tal-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(45, 55, 72, 0.92), rgba(30, 40, 55, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.tal-card-active {
  border-color: var(--tc);
  box-shadow: 0 0 12px var(--tc-glow), inset 0 0 18px var(--tc-soft);
}
.tal-card-soon { opacity: 0.6; filter: grayscale(0.7); }
.tal-card-learned { animation: talLearned 0.6s cubic-bezier(0.2, 1.4, 0.4, 1); }
@keyframes talLearned {
  0% { transform: scale(0.96); box-shadow: 0 0 0 var(--tc-glow); }
  40% { transform: scale(1.03); box-shadow: 0 0 34px var(--tc), 0 0 60px var(--tc-glow); }
  100% { transform: scale(1); }
}
.tal-card-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: var(--tc-soft);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.tal-card-active .tal-card-icon { border-color: var(--tc); }
.tal-card-body { flex: 1; min-width: 0; }
.tal-card-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
}
.tal-card-name {
  font-size: 13.5px;
  font-weight: 800;
  color: #fff;
}
.tal-card-rank {
  font-size: 11px;
  font-weight: 800;
  color: var(--tc);
  font-variant-numeric: tabular-nums;
}
.tal-pips {
  display: flex;
  gap: 3px;
  margin: 5px 0 4px;
}
.tal-pip {
  width: 14px;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.14);
}
.tal-pip-on {
  background: var(--tc);
  box-shadow: 0 0 6px var(--tc-glow);
}
.tal-effect {
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--text-secondary);
}
.tal-effect strong { color: #fff; }
.tal-effect-next { opacity: 0.75; }
.tal-card-action {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.tal-learn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--tc), var(--tc2));
  box-shadow: 0 4px 14px var(--tc-glow), 0 0 0 1px rgba(255, 255, 255, 0.15) inset;
  transition: transform 0.15s ease;
}
.tal-learn:active { transform: scale(0.9); }
.tal-learn:disabled {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.35);
  box-shadow: none;
  cursor: not-allowed;
}
.tal-max {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 5px 8px;
  border-radius: 8px;
  color: #1a1a2e;
  background: linear-gradient(135deg, #FFD700, #f6ad55);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}
.tal-soon {
  max-width: 74px;
  text-align: center;
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1.2;
  padding: 4px 6px;
  border-radius: 8px;
  color: var(--text-secondary);
  border: 1px dashed rgba(255, 255, 255, 0.25);
}

/* Einstiege: Profilkarte, Hinweis auf der Startseite */
.tal-entry {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  padding: 14px 16px;
  border-radius: 18px;
  cursor: pointer;
  background: linear-gradient(135deg, rgba(45, 55, 72, 0.95), rgba(30, 40, 55, 0.95));
  border: 1px solid rgba(78, 205, 196, 0.3);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}
.tal-entry-glow { animation: talEntry 2s ease-in-out infinite alternate; }
@keyframes talEntry {
  from { box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3); border-color: rgba(78, 205, 196, 0.3); }
  to { box-shadow: 0 0 22px rgba(78, 205, 196, 0.45); border-color: #4ECDC4; }
}
.tal-entry-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  background: rgba(78, 205, 196, 0.14);
}
.tal-entry-text { flex: 1; }
.tal-entry-title { font-size: 16px; font-weight: 800; color: #fff; }
.tal-entry-sub { font-size: 12px; color: #4ECDC4; font-weight: 700; margin-top: 2px; }
.tal-entry-arrow { font-size: 26px; color: var(--text-secondary); line-height: 1; }
.tal-home-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, rgba(78, 205, 196, 0.18), rgba(66, 153, 225, 0.18));
  border: 1px solid rgba(78, 205, 196, 0.45);
  animation: talEntry 2s ease-in-out infinite alternate;
}
.tal-home-hint #talent-home-hint-text { flex: 1; }
#profile-nav-talent-badge { background: linear-gradient(135deg, #4ECDC4, #4299e1); box-shadow: 0 2px 8px rgba(78, 205, 196, 0.5); }

/* Zweiter Atem im Energie-Fenster */
.energy-restore-card.second-wind {
  border-color: rgba(78, 205, 196, 0.4);
  background: linear-gradient(135deg, rgba(78, 205, 196, 0.12), rgba(66, 153, 225, 0.08));
}
.energy-restore-btn.wind {
  background: linear-gradient(135deg, #4ECDC4, #4299e1);
  color: #fff;
}
.energy-restore-btn.wind:disabled { opacity: 0.5; cursor: not-allowed; }

/* Fund-Abzeichen aus Talenten */
.exped-find-tag {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 8px;
  font-size: 9px;
  letter-spacing: 0.3px;
  text-transform: none;
  color: #4ECDC4;
  background: rgba(78, 205, 196, 0.14);
  border: 1px solid rgba(78, 205, 196, 0.35);
}
.exped-boost-talent {
  cursor: pointer;
  color: #9ae6e0;
  border-color: rgba(78, 205, 196, 0.45);
  background: linear-gradient(135deg, rgba(78, 205, 196, 0.16), rgba(66, 153, 225, 0.16));
}

/* ===== Inventar (T5, E-T5-9): Werkzeugleiste, Sortier-Knopf, Filter-Chips, Karten (js/inventory.js) =====
   Seltenheitsfarben über die Klassen exped-r-* (--rc, --rc-soft, --rc-glow) */
.inv-toolbar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 4px 0 10px;
}
.inv-toolbar-row { display: flex; gap: 8px; }
.inv-sort {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 8px 12px;
  border-radius: 14px;
  border: 1px solid rgba(102, 126, 234, 0.4);
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.24), rgba(118, 75, 162, 0.24));
  color: #fff;
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s;
}
.inv-sort:active { transform: scale(0.97); }
.inv-sort-icon {
  flex: 0 0 30px;
  height: 30px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.12);
  font-size: 16px;
}
.inv-sort-text { flex: 1; display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.inv-sort-text small { font-size: 10px; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-secondary); }
.inv-sort-text strong { font-size: 15px; white-space: nowrap; }
.inv-sort-dots { display: flex; align-items: center; gap: 3px; }
.inv-sort-dots i { width: 4px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.25); transition: all 0.2s; }
.inv-sort-dots i.on { width: 10px; background: #fff; box-shadow: 0 0 6px rgba(255, 255, 255, 0.8); }
.inv-tool {
  flex: 0 0 auto;
  min-width: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 6px 8px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(135deg, rgba(45, 55, 72, 0.95), rgba(30, 40, 55, 0.95));
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.inv-tool span { font-size: 18px; }
.inv-tool:active { transform: scale(0.95); }
.inv-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}
.inv-chips::-webkit-scrollbar { display: none; }
.inv-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}
.inv-chip small { opacity: 0.75; font-weight: 600; }
.inv-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rc, #888); box-shadow: 0 0 6px var(--rc-glow, transparent); }
.inv-chip.active { color: #fff; background: rgba(102, 126, 234, 0.3); border-color: rgba(102, 126, 234, 0.75); }
.inv-chip[class*="exped-r-"].active { color: #fff; background: var(--rc-soft); border-color: var(--rc); box-shadow: 0 0 10px var(--rc-glow); }
.inv-chip-icon { padding: 4px 9px; font-size: 15px; }
.inv-chip-sep { flex: 0 0 1px; margin: 4px 2px; background: rgba(255, 255, 255, 0.14); }
.inv-workshop {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(245, 158, 11, 0.3);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.13), rgba(217, 119, 6, 0.05));
  color: #fff;
  text-align: left;
  cursor: pointer;
}
.inv-workshop.ready { border-color: rgba(245, 158, 11, 0.7); box-shadow: 0 0 18px rgba(245, 158, 11, 0.2); }
.inv-workshop:active { transform: scale(0.98); }
.inv-workshop-icon { font-size: 22px; }
.inv-workshop.ready .inv-workshop-icon { animation: invBubble 2.4s ease-in-out infinite; }
@keyframes invBubble {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-2px) rotate(-8deg); }
}
.inv-workshop-text { flex: 1; display: flex; flex-direction: column; font-size: 13px; line-height: 1.25; }
.inv-workshop-text small { font-size: 10px; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase; color: #fbbf24; }
.inv-workshop-go { font-size: 24px; color: #fbbf24; }
.inv-count { padding: 0 2px; font-size: 11px; color: var(--text-secondary); }

.inventory-items-container.inv-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 0;
}
.inv-card {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 6px 10px;
  border-radius: 14px;
  border: 1px solid var(--rc-glow);
  background: linear-gradient(165deg, var(--rc-soft), rgba(26, 26, 46, 0.94) 70%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s;
}
.inv-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--rc);
  box-shadow: 0 0 8px var(--rc);
}
.inv-card:active { transform: scale(0.96); }
.inv-card.exped-r-epic, .inv-card.exped-r-legendary, .inv-card.exped-r-mythic { box-shadow: 0 0 12px var(--rc-glow); }
.inv-card-top { width: 100%; display: flex; justify-content: space-between; font-size: 10px; font-weight: 800; }
.inv-lv { color: var(--text-secondary); }
.inv-lv.too-high { color: var(--error); }
.inv-ref { color: #fbbf24; text-shadow: 0 0 6px rgba(251, 191, 36, 0.6); }
.inv-card-icon { width: 58px; height: 58px; display: grid; place-items: center; font-size: 34px; filter: drop-shadow(0 0 8px var(--rc-glow)); }
.inv-card-icon img { width: 100%; height: 100%; object-fit: contain; }
.inv-card-name {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10.5px;
  font-weight: 700;
  color: #e2e8f0;
}
.inv-card-power { display: flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.inv-up { color: #48bb78; font-size: 11px; text-shadow: 0 0 6px rgba(72, 187, 120, 0.7); animation: invUp 1.6s ease-in-out infinite; }
@keyframes invUp {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}
.inv-card.listed { opacity: 0.55; }
.inv-card-tag {
  position: absolute;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-12deg);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
  color: #fbbf24;
  background: rgba(0, 0, 0, 0.72);
}

/* ===== Werkstatt: Sammel-Merge und Sammelverkauf ===== */
.bm-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(5, 8, 20, 0.72);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  animation: bmFade 0.2s ease-out;
}
@keyframes bmFade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.bm-sheet {
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 14px 14px calc(18px + env(safe-area-inset-bottom));
  border-radius: 22px 22px 0 0;
  border: 1px solid rgba(102, 126, 234, 0.25);
  border-bottom: none;
  background: linear-gradient(180deg, #1f2740, #141a2c);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.5);
  animation: bmUp 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}
@keyframes bmUp {
  from { transform: translateY(40px); opacity: 0.6; }
  to { transform: none; opacity: 1; }
}
.bm-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.bm-title { font-size: 18px; font-weight: 900; letter-spacing: 0.3px; }
.bm-close { width: 32px; height: 32px; border: none; border-radius: 10px; background: rgba(255, 255, 255, 0.08); color: #fff; font-size: 20px; cursor: pointer; }
.bm-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 12px;
  padding: 4px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.25);
}
.bm-tab { padding: 9px; border: none; border-radius: 10px; background: transparent; color: var(--text-secondary); font-size: 13px; font-weight: 800; cursor: pointer; }
.bm-tab.active { color: #fff; background: linear-gradient(135deg, #667eea, #764ba2); box-shadow: 0 4px 14px rgba(102, 126, 234, 0.35); }
.bm-intro { margin: 0 0 10px; font-size: 12px; line-height: 1.4; color: var(--text-secondary); }
.bm-rarities { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 12px; }
.bm-rarities-6 { grid-template-columns: repeat(3, 1fr); }
.bm-rarity {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.bm-rarity.on { border-color: var(--rc); background: linear-gradient(135deg, var(--rc-soft), rgba(255, 255, 255, 0.02)); box-shadow: 0 0 14px var(--rc-glow); }
.bm-rarity.empty:not(.on) { opacity: 0.45; }
.bm-rarity.on::after { content: "✓"; position: absolute; right: 10px; bottom: 8px; font-weight: 900; color: var(--rc); }
.bm-rarity-name { font-size: 13px; font-weight: 900; color: var(--rc); }
.bm-rarity-arrow { font-size: 10px; color: var(--text-secondary); }
.bm-rarity-count { font-size: 11px; color: #cbd5e0; }
.bm-rarity-chance { position: absolute; top: 9px; right: 10px; font-size: 11px; font-weight: 800; color: #cbd5e0; }
.bm-rarity-small { padding: 8px; }
.bm-rarities:not(.bm-rarities-6) .bm-rarity:last-child:nth-child(odd) { grid-column: 1 / -1; }
.bm-toggles { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.bm-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  text-align: left;
  cursor: pointer;
}
.bm-switch { position: relative; flex: 0 0 38px; height: 22px; border-radius: 11px; background: rgba(255, 255, 255, 0.15); transition: background 0.2s; }
.bm-switch i { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left 0.2s; }
.bm-toggle.on .bm-switch { background: linear-gradient(135deg, #48bb78, #2f855a); }
.bm-toggle.on .bm-switch i { left: 19px; }
.bm-toggle-text { display: flex; flex-direction: column; font-size: 13px; }
.bm-toggle-text small { font-size: 11px; color: var(--text-secondary); }
.bm-summary {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.25);
  font-size: 13px;
}
.bm-line { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.bm-line > span:last-child { display: flex; align-items: center; gap: 4px; font-weight: 700; font-variant-numeric: tabular-nums; }
.bm-total { padding-top: 6px; border-top: 1px solid rgba(255, 255, 255, 0.08); font-weight: 900; }
.bm-summary .bm-total:first-child { padding-top: 0; border-top: none; }
.bm-muted { color: var(--text-secondary); }
.bm-warn { font-size: 11px; color: #fbbf24; }
.bm-go { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 12px; }
.bm-go:disabled { opacity: 0.45; filter: grayscale(0.5); cursor: not-allowed; }
.bm-go:disabled::before { display: none; }

/* Ergebnis: neue Items erscheinen nacheinander; Strahlen ab Epic, schneller ab Legendary */
.bm-result-overlay {
  position: fixed;
  inset: 0;
  z-index: 10060;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: hidden;
  background: rgba(5, 8, 20, 0.86);
  animation: bmFade 0.25s ease-out;
}
.bm-result-glow {
  position: absolute;
  width: 140vmax;
  height: 140vmax;
  background: radial-gradient(circle, var(--rc-glow) 0%, transparent 45%);
  animation: bmGlow 1.6s ease-out both;
}
@keyframes bmGlow {
  0% { transform: scale(0.2); opacity: 0; }
  40% { opacity: 1; }
  100% { transform: scale(1); opacity: 0.75; }
}
.bm-tier-0 .bm-result-glow { opacity: 0.5; }
.bm-result-rays {
  position: absolute;
  width: 120vmax;
  height: 120vmax;
  background: repeating-conic-gradient(from 0deg, var(--rc-soft) 0deg 8deg, transparent 8deg 24deg);
  -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 60%);
  mask-image: radial-gradient(circle, #000 0%, transparent 60%);
  animation: bmSpin 14s linear infinite;
}
.bm-tier-3 .bm-result-rays, .bm-tier-4 .bm-result-rays { animation-duration: 7s; filter: brightness(1.5); }
@keyframes bmSpin { to { transform: rotate(360deg); } }
.bm-result-card {
  position: relative;
  width: 100%;
  max-width: 380px;
  padding: 18px 16px;
  border-radius: 22px;
  border: 1px solid var(--rc);
  background: linear-gradient(160deg, rgba(31, 39, 64, 0.96), rgba(20, 26, 44, 0.96));
  box-shadow: 0 0 40px var(--rc-glow);
  text-align: center;
  animation: bmPop 0.45s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
@keyframes bmPop {
  from { transform: scale(0.7); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.bm-result-kicker { font-size: 10px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-secondary); }
.bm-result-title { margin: 2px 0 4px; font-size: 22px; font-weight: 900; color: var(--rc); text-shadow: 0 0 16px var(--rc-glow); }
.bm-result-sub { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px; font-size: 12px; color: #cbd5e0; }
.bm-result-sub .ok { color: #48bb78; font-weight: 800; }
.bm-result-sub .fail { color: #fc8181; font-weight: 800; }
.bm-result-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0 10px; }
.bm-result-item {
  padding: 6px 4px 4px;
  border-radius: 12px;
  border: 1px solid var(--rc);
  background: linear-gradient(160deg, var(--rc-soft), rgba(0, 0, 0, 0.3));
  box-shadow: 0 0 10px var(--rc-glow);
  animation: bmItem 0.5s cubic-bezier(0.2, 1.5, 0.4, 1) both;
}
@keyframes bmItem {
  0% { transform: scale(0) rotate(-20deg); opacity: 0; }
  100% { transform: none; opacity: 1; }
}
.bm-result-icon { width: 100%; aspect-ratio: 1; display: grid; place-items: center; font-size: 26px; }
.bm-result-icon img { width: 86%; height: 86%; object-fit: contain; }
.bm-result-lv { font-size: 9px; font-weight: 800; color: #cbd5e0; }
.bm-result-more { display: grid; place-items: center; border-radius: 12px; border: 1px dashed rgba(255, 255, 255, 0.25); font-weight: 900; color: #cbd5e0; }
.bm-result-tally { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-bottom: 8px; }
.bm-tally { padding: 3px 9px; border-radius: 999px; border: 1px solid var(--rc); background: var(--rc-soft); color: var(--rc); font-size: 11px; font-weight: 800; }
.bm-result-note { margin-top: 4px; font-size: 11px; color: var(--text-secondary); }
.bm-result-done { background: linear-gradient(135deg, #667eea, #764ba2); box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4); }

/* ===== Veredelung im Item-Fenster (T5, E-T5-7) ===== */
/* Aufwerten und Veredeln über die ganze Breite des Werte-Rasters */
.item-details-stats > .item-levelup,
.item-details-stats > .item-levelup-hint,
.item-details-stats > .refine-box { grid-column: 1 / -1; }
.refine-box {
  margin-top: 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(251, 191, 36, 0.35);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(0, 0, 0, 0.2));
}
.refine-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.refine-title { font-weight: 900; color: #fbbf24; }
.refine-steps { font-size: 13px; color: #cbd5e0; }
.refine-steps strong { font-size: 16px; color: #fbbf24; }
.refine-pips { display: flex; gap: 3px; margin-bottom: 10px; }
.refine-pips i { flex: 1; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.12); }
.refine-pips i.over { background: rgba(252, 129, 129, 0.2); }
.refine-pips i.done { background: linear-gradient(90deg, #fbbf24, #f59e0b); box-shadow: 0 0 6px rgba(251, 191, 36, 0.6); }
.refine-pips i.over.done { background: linear-gradient(90deg, #f97316, #ef4444); box-shadow: 0 0 6px rgba(239, 68, 68, 0.6); }
.refine-pips i.next { animation: refinePip 1.2s ease-in-out infinite; }
@keyframes refinePip {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; background: rgba(251, 191, 36, 0.55); }
}
.refine-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 8px; }
.refine-stats span {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 4px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.refine-stats small { font-size: 9px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--text-secondary); }
.refine-stats .refine-risk { color: #fbbf24; }
.refine-note { margin-bottom: 10px; font-size: 11px; line-height: 1.35; color: var(--text-secondary); }
.refine-note.warn { color: #fc8181; }
.refine-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.35);
  color: #1a1205;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}
.refine-btn:active:not(:disabled) { transform: scale(0.98); }
.refine-btn:disabled { opacity: 0.5; filter: grayscale(0.4); cursor: not-allowed; }
.refine-working .refine-btn { pointer-events: none; opacity: 0.75; }
#item-details-icon { position: relative; overflow: visible; }
.refine-hammer { animation: refineHammer 0.18s ease-in-out 3; }
@keyframes refineHammer {
  0%, 100% { transform: rotate(0); }
  50% { transform: rotate(-6deg) scale(0.96); filter: brightness(1.4); }
}
.refine-fx { position: absolute; inset: 0; pointer-events: none; }
.refine-fx-success::before {
  content: "";
  position: absolute;
  inset: -12px;
  border-radius: 18px;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.6), transparent 65%);
  animation: refineFlash 0.8s ease-out forwards;
}
@keyframes refineFlash {
  from { opacity: 1; transform: scale(0.6); }
  to { opacity: 0; transform: scale(1.4); }
}
.refine-spark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4px;
  height: 12px;
  margin: -6px -2px;
  border-radius: 2px;
  background: #fde68a;
  box-shadow: 0 0 8px #f59e0b;
  animation: refineSpark 0.7s ease-out forwards;
}
@keyframes refineSpark {
  0% { transform: rotate(var(--a)) translateY(0) scaleY(0.4); opacity: 1; }
  100% { transform: rotate(var(--a)) translateY(-56px) scaleY(1); opacity: 0; }
}
.refine-fx-fail .refine-spark { background: #a0aec0; box-shadow: none; animation-duration: 0.45s; }
.refine-fx-text {
  position: absolute;
  left: 50%;
  top: 50%;
  white-space: nowrap;
  font-size: 26px;
  font-weight: 900;
  color: #fbbf24;
  text-shadow: 0 0 12px rgba(245, 158, 11, 0.9), 0 2px 0 #7c2d12;
  animation: refineText 1.4s ease-out forwards;
}
.refine-fx-fail .refine-fx-text { font-size: 16px; color: #e2e8f0; text-shadow: 0 0 8px rgba(0, 0, 0, 0.9); }
@keyframes refineText {
  0% { transform: translate(-50%, -30%) scale(0.4); opacity: 0; }
  25% { transform: translate(-50%, -50%) scale(1.25); opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translate(-50%, -120%) scale(1); opacity: 0; }
}

/* Merge-Fenster: getragenes Item darf mitgemergt werden (T5) */
.merge-equipped-badge {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  padding: 1px 6px;
  border-radius: 6px;
  background: #fbbf24;
  color: #1a1205;
  font-size: 9px;
  font-weight: 900;
}
.merge-equipped-badge.inline { position: static; transform: none; display: inline-block; vertical-align: middle; }
.merge-refine-badge { color: #fbbf24; font-size: 11px; font-weight: 900; }

/* ===== Gold gegen Gems (T5, E-T5-8) ===== */
#gold-packs-container { margin-bottom: 16px; }
.gold-packs-head { display: flex; justify-content: space-between; align-items: baseline; margin: 4px 2px 8px; }
.gold-packs-head span { font-size: 18px; font-weight: 900; }
.gold-packs-head small { font-size: 11px; color: var(--text-secondary); }
.gold-packs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.gold-pack {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 12px 6px 8px;
  border-radius: 16px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  background: linear-gradient(165deg, rgba(245, 158, 11, 0.16), rgba(26, 26, 46, 0.95) 70%);
  text-align: center;
  overflow: hidden;
}
.gold-pack-2 { border-color: rgba(245, 158, 11, 0.75); box-shadow: 0 0 16px rgba(245, 158, 11, 0.25); }
.gold-pack-coins { font-size: 20px; letter-spacing: -6px; filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.6)); }
.gold-pack-name { font-size: 12px; font-weight: 900; color: #fbbf24; }
.gold-pack-amount { display: flex; align-items: center; gap: 3px; font-size: 14px; font-weight: 900; font-variant-numeric: tabular-nums; }
.gold-pack-days { font-size: 10px; line-height: 1.2; color: var(--text-secondary); }
.gold-pack-buy {
  width: 100%;
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 7px 4px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}
.gold-pack-buy:disabled { opacity: 0.45; cursor: not-allowed; }

/* Markt: Erlös nach Steuer unter dem Preisfeld (T5) */
.listing-proceeds { margin-top: 6px; font-size: 12px; color: #48bb78; }
.listing-proceeds.out { color: var(--error); }

/* ===== Gacha (T6): Mythic-Zähler, Gratis-Zug, Chancen-Hinweis ===== */
.pity-label-mythic { margin-top: 8px; }
.pity-bar-fill-mythic { background: linear-gradient(90deg, #f97316, #f44336); box-shadow: 0 0 8px rgba(244, 67, 54, 0.6); }
.pity-gate-hint { margin-top: 6px; font-size: 11px; color: var(--text-secondary); }
.draw-btn-free {
  width: 100%;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #48bb78, #2f855a);
  box-shadow: 0 6px 18px rgba(72, 187, 120, 0.35);
}
.payout-odds-note { margin: 4px 0 10px; font-size: 12px; line-height: 1.4; color: var(--text-secondary); }

/* ===== Stars-Shop (T6, E-T6-2/E-T6-9) ===== */
.stars-store { display: flex; flex-direction: column; gap: 10px; }
.stars-icon { filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.8)); }
.stars-buy {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 12px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}
.stars-buy:active { transform: scale(0.97); }
.stars-buy-hot { padding: 10px 18px; font-size: 15px; }
.stars-buy-claim { background: linear-gradient(135deg, #48bb78, #2f855a); box-shadow: 0 4px 14px rgba(72, 187, 120, 0.4); }
.stars-starter {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 14px 14px;
  border-radius: 18px;
  border: 1px solid rgba(245, 158, 11, 0.7);
  background: radial-gradient(circle at 50% 0%, rgba(245, 158, 11, 0.3), transparent 60%), linear-gradient(160deg, #2a2340, #161b2e);
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.25);
  text-align: center;
}
.stars-starter-badge {
  position: absolute;
  top: -10px;
  padding: 3px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f43f5e, #e11d48);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}
.stars-starter-title { font-size: 18px; font-weight: 900; color: #fbbf24; }
.stars-starter-items { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.stars-starter-items span { padding: 4px 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); font-size: 12px; font-weight: 700; }
.stars-sub {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(102, 126, 234, 0.25);
  background: linear-gradient(135deg, rgba(45, 55, 72, 0.95), rgba(30, 40, 55, 0.95));
}
.stars-sub.active { border-color: rgba(72, 187, 120, 0.6); }
.stars-sub-icon { flex: 0 0 auto; font-size: 26px; }
.stars-sub-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.stars-sub-text strong { font-size: 14px; }
.stars-sub-text small { font-size: 11px; line-height: 1.35; color: var(--text-secondary); }
.stars-sub-done { flex: 0 0 auto; font-size: 12px; font-weight: 800; color: #48bb78; }
.stars-packs-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 4px; }
.stars-packs-head span { white-space: nowrap; }
.stars-packs-head span { font-size: 17px; font-weight: 900; }
.stars-packs-head small { font-size: 10px; color: var(--text-secondary); text-align: right; }
.stars-packs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.stars-pack {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 24px 8px 10px;
  border-radius: 16px;
  border: 1px solid rgba(66, 153, 225, 0.35);
  background: linear-gradient(165deg, rgba(66, 153, 225, 0.16), rgba(26, 26, 46, 0.95) 70%);
  overflow: hidden;
}
.stars-pack.first { border-color: rgba(245, 158, 11, 0.6); }
.stars-pack-ribbon {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 3px 4px;
  background: linear-gradient(135deg, #f43f5e, #e11d48);
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.6px;
  text-align: center;
  text-transform: uppercase;
}
.stars-pack-gems { font-size: 18px; font-weight: 900; font-variant-numeric: tabular-nums; }
.stars-pack-name { font-size: 11px; color: var(--text-secondary); }
.stars-pack-bonus { font-size: 11px; font-weight: 800; color: #48bb78; }
.stars-pack .stars-buy { width: 100%; margin-top: 4px; }
.stars-note { margin-top: 2px; font-size: 10px; line-height: 1.4; color: var(--text-secondary); text-align: center; }

/* ===== Aufstieg im Item-Fenster (T6, E-T6-7) ===== */
.item-details-stats > .ascend-box { grid-column: 1 / -1; }
.ascend-box {
  margin-top: 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(244, 67, 54, 0.45);
  background: linear-gradient(135deg, rgba(244, 67, 54, 0.12), rgba(0, 0, 0, 0.2));
}
.ascend-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.ascend-title { font-weight: 900; color: #fca5a5; }
.ascend-stars { font-size: 16px; color: #fbbf24; letter-spacing: 1px; text-shadow: 0 0 8px rgba(251, 191, 36, 0.6); }
.ascend-next { color: rgba(251, 191, 36, 0.3); animation: refinePip 1.2s ease-in-out infinite; }
.ascend-info { margin-bottom: 8px; font-size: 11px; line-height: 1.35; color: var(--text-secondary); }
.ascend-progress { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.ascend-progress span { display: block; height: 100%; background: linear-gradient(90deg, #f97316, #f44336); }
.ascend-count { margin: 4px 0 10px; font-size: 11px; font-weight: 700; color: #cbd5e0; }
.ascend-btn {
  width: 100%;
  padding: 11px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #f97316, #dc2626);
  box-shadow: 0 6px 18px rgba(220, 38, 38, 0.35);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}
.ascend-btn:disabled { opacity: 0.45; filter: grayscale(0.5); cursor: not-allowed; }
.ascend-stars-value { color: #fbbf24; }
.inv-star { color: #fbbf24; font-size: 9px; text-shadow: 0 0 6px rgba(251, 191, 36, 0.7); }

/* ===== Kisten-Animation (T6, js/chest-fx.js): Gacha-Kisten und Truhen ===== */
@property --cfx-aura { syntax: "<color>"; inherits: true; initial-value: rgba(226, 232, 240, 1); }
@property --cfx-aura-soft { syntax: "<color>"; inherits: true; initial-value: rgba(160, 174, 192, 0.42); }

.cfx {
  --cfx-cx: 50vw;
  --cfx-cy: 46vh;
  --amp: 1px;
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: flex;
  flex-direction: column;
  color: #f1f5f9;
  overflow: hidden;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  opacity: 0;
  transition: opacity 0.25s ease, --cfx-aura 0.35s ease, --cfx-aura-soft 0.35s ease;
}
.cfx.is-in { opacity: 1; }
.cfx.is-out { opacity: 0; transition: opacity 0.22s ease; }

.cfx-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 45% at 50% 44%, var(--cfx-tint) 0%, transparent 70%),
    linear-gradient(180deg, #06070f 0%, #0b0e1c 50%, #040509 100%);
}
.cfx-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--cfx-cx) var(--cfx-cy), var(--cfx-aura-soft) 0%, transparent 46%);
  opacity: 0.35;
  transition: opacity 0.4s ease;
}
.cfx.is-charging .cfx-bg::after,
.cfx.is-burst .cfx-bg::after { opacity: 0.8; }
.cfx.is-mythic .cfx-bg::after { animation: cfx-flicker 0.9s steps(2) infinite; }

/* Lichtstrahlen hinter Kiste bzw. Karten */
.cfx-rays {
  position: absolute;
  left: var(--cfx-cx);
  top: var(--cfx-cy);
  width: 0;
  height: 0;
  opacity: 0;
  transform: scale(0.35);
  transition: opacity 0.6s ease, transform 1s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.cfx-rays::before {
  content: "";
  position: absolute;
  left: -110vmax;
  top: -110vmax;
  width: 220vmax;
  height: 220vmax;
  background: repeating-conic-gradient(from 0deg, var(--cfx-aura-soft) 0deg 4deg, transparent 4deg 13deg);
  -webkit-mask: radial-gradient(circle, #000 0%, rgba(0, 0, 0, 0.6) 12%, transparent 36%);
  mask: radial-gradient(circle, #000 0%, rgba(0, 0, 0, 0.6) 12%, transparent 36%);
  animation: cfx-spin 30s linear infinite;
}
.cfx.is-burst .cfx-rays { opacity: 1; transform: scale(1); }
.cfx.is-revealed .cfx-rays { opacity: var(--cfx-rays, 0.6); }
.cfx.is-mythic .cfx-rays::before { animation-duration: 14s; }

.cfx-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
}

/* Kopfzeile: Titel, Zusammenfassung, Skip */
.cfx-top {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 0;
}
.cfx-heading { min-width: 0; }
.cfx-title {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.7);
}
.cfx-summary { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; min-height: 22px; }
.cfx-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px 3px 7px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  animation: cfx-pop 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.4) both;
}
.cfx-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--rc); box-shadow: 0 0 8px var(--rc); }
.cfx-skip {
  flex: none;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(8, 10, 22, 0.55);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.cfx.is-done .cfx-skip { visibility: hidden; }

/* Bühne */
.cfx-stage { position: relative; z-index: 2; flex: 1; min-height: 0; }
.cfx-stage.is-quake { animation: cfx-quake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97); }

.cfx-crate-wrap {
  position: absolute;
  left: 50%;
  top: 46%;
  width: min(62vw, 250px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  perspective: 600px;
}
.cfx-crate-wrap.is-pulse { animation: cfx-pulse 0.34s ease-out; }
.cfx.is-revealed .cfx-crate-wrap { visibility: hidden; transition: visibility 0s 0.8s; }

.cfx-circle {
  position: absolute;
  left: 50%;
  top: 80%;
  width: 150%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%) rotateX(70deg);
  opacity: 0;
  transition: opacity 0.5s ease;
}
.cfx-circle svg {
  display: block;
  width: 100%;
  height: 100%;
  color: var(--cfx-aura);
  filter: drop-shadow(0 0 5px var(--cfx-aura));
  animation: cfx-spin 18s linear infinite;
}
.cfx.is-ready .cfx-circle { opacity: 0.8; }
.cfx.is-charging .cfx-circle { opacity: 1; }
.cfx.is-charging .cfx-circle svg { animation-duration: 2.4s; }
.cfx.is-burst .cfx-circle { opacity: 0; transition-duration: 0.2s; }

.cfx-aura {
  position: absolute;
  inset: -40%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--cfx-aura) 0%, var(--cfx-aura-soft) 28%, transparent 62%);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.4s ease, transform 0.5s ease;
}
.cfx.is-ready .cfx-aura { opacity: 0.32; transform: scale(0.8); animation: cfx-breathe 2.4s ease-in-out infinite; }
.cfx.is-charging .cfx-aura { opacity: 0.85; transform: scale(1.05); animation: cfx-breathe 0.5s ease-in-out infinite; }
.cfx.is-burst .cfx-aura { opacity: 0; transform: scale(1.8); transition-duration: 0.6s; }

.cfx-crate {
  position: absolute;
  inset: 0;
  opacity: 0;
}
.cfx-crate::before {
  content: "";
  position: absolute;
  left: 14%;
  right: 14%;
  bottom: 3%;
  height: 14%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.6), transparent 70%);
}
.cfx-crate img,
.cfx-shard img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-mask: radial-gradient(circle at 50% 50%, #000 50%, transparent 70%);
  mask: radial-gradient(circle at 50% 50%, #000 50%, transparent 70%);
}
.cfx.is-landing .cfx-crate { animation: cfx-drop 0.62s cubic-bezier(0.3, 1.25, 0.5, 1) forwards; }
.cfx.is-ready .cfx-crate { opacity: 1; animation: cfx-float 2.6s ease-in-out infinite; }
.cfx.is-charging .cfx-crate { opacity: 1; animation: cfx-rumble 0.11s linear infinite; }
.cfx.is-charging .cfx-crate img { filter: brightness(1.15) saturate(1.2); }
.cfx.is-burst .cfx-crate { visibility: hidden; }

/* Risse (ab Epic), passend zu den Scherben */
.cfx-cracks { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; opacity: 0; }
.cfx-cracks path {
  fill: none;
  stroke: #fff;
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  filter: drop-shadow(0 0 3px var(--cfx-aura)) drop-shadow(0 0 8px var(--cfx-aura));
}
.cfx.is-cracking .cfx-cracks { opacity: 1; }
.cfx.is-cracking .cfx-cracks path { animation: cfx-crack 0.3s ease-out forwards; animation-delay: var(--d); }

/* Scherben */
.cfx-shards { position: absolute; inset: 0; pointer-events: none; }
.cfx-shard { position: absolute; inset: 0; opacity: 0; }
.cfx.is-burst .cfx-shard { animation: cfx-shard 0.85s cubic-bezier(0.12, 0.75, 0.3, 1) forwards; }

.cfx-hint {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(46% + min(50vw, 200px));
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
  text-shadow: 0 0 12px var(--cfx-aura-soft);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.cfx-hint.is-visible { opacity: 1; animation: cfx-blink 1.8s ease-in-out infinite; }

/* Blitz */
.cfx-flash {
  --strength: 1;
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at var(--cfx-cx) var(--cfx-cy), #fff 0%, var(--cfx-aura) 30%, var(--cfx-aura-soft) 55%, transparent 80%);
}
.cfx-flash.is-on { animation: cfx-flash 0.6s ease-out; }

/* Karten */
.cfx-cards {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 6px 16px;
  pointer-events: none;
}
.cfx-cards.is-grid { gap: 10px; }
.cfx-row { display: flex; justify-content: center; gap: 8px; }
.cfx-card {
  --cw: clamp(64px, calc((100vw - 56px) / 4), 96px);
  --glow: 0;
  position: relative;
  width: var(--cw);
  aspect-ratio: 0.72;
  perspective: 900px;
  pointer-events: auto;
  cursor: pointer;
  transition: transform 0.6s cubic-bezier(0.2, 0.9, 0.25, 1.12), opacity 0.3s ease;
}
.cfx-card.is-pending { opacity: 0; transition: none; }
.cfx-card.is-big { --cw: min(66vw, 240px); cursor: default; }
.cfx-card.cfx-t2 { --glow: 0.35; }
.cfx-card.cfx-t3 { --glow: 0.6; }
.cfx-card.cfx-t4 { --glow: 0.9; }
.cfx-card.cfx-t5 { --glow: 1; }
.cfx-card-inner {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: rotateY(180deg);
  transition: transform 0.62s cubic-bezier(0.2, 0.8, 0.25, 1.15);
}
.cfx-card.is-open .cfx-card-inner { transform: rotateY(0deg); }
.cfx-face {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  overflow: hidden;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.cfx-card.is-big .cfx-face { border-radius: 18px; }

/* Rückseite: Zeichen der Kiste, Glühen deutet die Seltenheit an */
.cfx-back {
  transform: rotateY(180deg);
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.035) 0 6px, transparent 6px 12px),
    radial-gradient(circle at 50% 40%, var(--rc-dim), transparent 70%),
    linear-gradient(160deg, #1b2034 0%, #0c0f1d 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.35), 0 0 calc(var(--glow) * 22px) calc(var(--glow) * 3px) var(--rc-soft);
}
.cfx-back::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.cfx-back-glyph { font-size: calc(var(--cw) * 0.36); filter: drop-shadow(0 0 10px var(--rc-soft)); opacity: 0.9; }
.cfx-card.cfx-t3 .cfx-back { animation: cfx-back-pulse 1.4s ease-in-out infinite; }
.cfx-card.cfx-t4 .cfx-back { animation: cfx-back-pulse 0.9s ease-in-out infinite; border-color: var(--rc); }
.cfx-card.cfx-t5 .cfx-back { animation: cfx-back-pulse 0.6s ease-in-out infinite, cfx-flicker 0.7s steps(2) infinite; border-color: var(--rc); }
.cfx-card.is-charging { z-index: 2; animation: cfx-card-charge 0.1s linear infinite; }
.cfx-card.is-charging .cfx-back { box-shadow: 0 0 34px 8px var(--rc-soft), 0 0 70px 12px var(--rc-dim); }

/* Vorderseite */
.cfx-front {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 7px 6px 6px;
  background:
    radial-gradient(120% 70% at 50% 0%, var(--rc-soft) 0%, transparent 62%),
    linear-gradient(170deg, #1d2238 0%, #0e1120 100%);
  border: 1.5px solid var(--rc);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.55), 0 0 calc(8px + var(--glow) * 16px) var(--rc-soft);
}
.cfx-front::after {
  content: "";
  position: absolute;
  inset: -30% -70%;
  background: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, 0.32) 50%, transparent 58%);
  transform: translateX(-55%);
  opacity: 0;
  pointer-events: none;
}
.cfx-card.is-open.cfx-t3 .cfx-front::after,
.cfx-card.is-open.cfx-t4 .cfx-front::after,
.cfx-card.is-open.cfx-t5 .cfx-front::after { animation: cfx-shine 3s ease-in-out 0.5s infinite; }
.cfx-card.is-special:not(.is-big) { transform: scale(1.06); z-index: 1; }
.cfx-card.is-special .cfx-front { animation: cfx-special-glow 1.8s ease-in-out infinite; }
.cfx-card.is-special.cfx-t5 .cfx-front { animation: cfx-mythic-glow 1.4s ease-in-out infinite; }

.cfx-icon {
  width: 72%;
  aspect-ratio: 1;
  margin-top: 4%;
  border-radius: 10px;
  overflow: hidden;
  display: grid;
  place-items: center;
  font-size: calc(var(--cw) * 0.38);
  background: rgba(0, 0, 0, 0.3);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 14px var(--rc-soft);
}
.cfx-name {
  margin-top: auto;
  width: 100%;
  font-size: 0.64rem;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  color: #f8fafc;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cfx-rar {
  margin-top: 2px;
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rc-light);
}

/* Große Karte (ein Item) */
.cfx-card.is-big { aspect-ratio: 0.8; }
.cfx-card.is-big .cfx-front { justify-content: center; padding: 40px 14px 18px; }
.cfx-card.is-big .cfx-icon { width: 68%; margin-top: 0; border-radius: 14px; }
.cfx-card.is-big .cfx-name { margin-top: 16px; font-size: 1.12rem; font-weight: 800; }
.cfx-ribbon {
  position: absolute;
  top: 12px;
  left: 50%;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #0b0d18;
  background: linear-gradient(90deg, var(--rc), var(--rc-light), var(--rc));
  box-shadow: 0 0 16px var(--rc-soft);
  opacity: 0;
  transform: translateX(-50%) scale(1.8);
}
.cfx-card.is-stamped .cfx-ribbon { opacity: 1; transform: translateX(-50%) scale(1); animation: cfx-stamp 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.35) backwards; }
.cfx-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 0.74rem;
  color: rgba(226, 232, 240, 0.85);
}
.cfx-meta span {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.cfx-card.is-arriving { animation: cfx-arrive 0.95s cubic-bezier(0.16, 1, 0.3, 1) both; }

/* Aktionen */
.cfx-actions {
  position: relative;
  z-index: 4;
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px calc(18px + env(safe-area-inset-bottom, 0px));
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
}
.cfx.is-done .cfx-actions { opacity: 1; transform: none; pointer-events: auto; }
.cfx-btn {
  flex: 1;
  max-width: 200px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
}
.cfx-btn small { display: block; margin-top: 2px; font-size: 0.72rem; font-weight: 700; opacity: 0.85; }
.cfx-btn-primary { background: linear-gradient(135deg, #667eea, #764ba2); box-shadow: 0 6px 20px rgba(102, 126, 234, 0.35); }
.cfx-btn-secondary { background: rgba(255, 255, 255, 0.08); }
.cfx-btn:focus-visible, .cfx-skip:focus-visible { outline: 2px solid rgba(255, 255, 255, 0.7); outline-offset: 2px; }

@keyframes cfx-spin { to { transform: rotate(360deg); } }
@keyframes cfx-pop { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: none; } }
@keyframes cfx-blink { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }
@keyframes cfx-breathe { 0%, 100% { filter: brightness(0.9); } 50% { filter: brightness(1.25); } }
@keyframes cfx-flicker { 0% { opacity: 0.9; } 50% { opacity: 0.55; } }
@keyframes cfx-drop {
  0% { opacity: 0; transform: translateY(-62vh) scale(0.72) rotate(-7deg); }
  55% { opacity: 1; transform: translateY(0) scale(1.05, 0.93) rotate(1deg); }
  75% { opacity: 1; transform: translateY(-9px) scale(0.98, 1.03); }
  100% { opacity: 1; transform: none; }
}
@keyframes cfx-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes cfx-rumble {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(calc(var(--amp) * -1), calc(var(--amp) * 0.5)) rotate(-0.7deg); }
  50% { transform: translate(var(--amp), 0) rotate(0.6deg); }
  75% { transform: translate(calc(var(--amp) * -0.5), calc(var(--amp) * -0.6)) rotate(-0.3deg); }
}
@keyframes cfx-pulse {
  0% { transform: translate(-50%, -50%) scale(1); }
  35% { transform: translate(-50%, -50%) scale(1.08); }
  100% { transform: translate(-50%, -50%) scale(1); }
}
@keyframes cfx-crack { to { stroke-dashoffset: 0; } }
@keyframes cfx-shard {
  0% { opacity: 1; transform: none; filter: brightness(2.4); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(0.5); filter: brightness(1); }
}
@keyframes cfx-flash { 0% { opacity: 0; } 12% { opacity: var(--strength); } 100% { opacity: 0; } }
@keyframes cfx-quake {
  10%, 90% { transform: translate(-2px, 1px); }
  20%, 80% { transform: translate(4px, -2px); }
  30%, 50%, 70% { transform: translate(-7px, 3px); }
  40%, 60% { transform: translate(7px, -3px); }
}
@keyframes cfx-back-pulse {
  0%, 100% { box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.35), 0 0 calc(var(--glow) * 16px) calc(var(--glow) * 2px) var(--rc-soft); }
  50% { box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.35), 0 0 calc(var(--glow) * 30px) calc(var(--glow) * 6px) var(--rc-soft); }
}
@keyframes cfx-card-charge {
  0%, 100% { transform: scale(1.14) translate(0, 0); }
  25% { transform: scale(1.14) translate(-1.5px, 1px); }
  50% { transform: scale(1.14) translate(1.5px, -1px); }
  75% { transform: scale(1.14) translate(-1px, -1.5px); }
}
@keyframes cfx-shine {
  0% { transform: translateX(-55%); opacity: 0; }
  12% { opacity: 1; }
  45%, 100% { transform: translateX(55%); opacity: 0; }
}
@keyframes cfx-special-glow {
  0%, 100% { box-shadow: 0 8px 22px rgba(0, 0, 0, 0.55), 0 0 18px 2px var(--rc-soft); }
  50% { box-shadow: 0 8px 22px rgba(0, 0, 0, 0.55), 0 0 34px 8px var(--rc-soft); }
}
@keyframes cfx-mythic-glow {
  0%, 100% { box-shadow: 0 8px 22px rgba(0, 0, 0, 0.55), 0 0 20px 3px rgba(244, 67, 54, 0.6); border-color: #f44336; }
  50% { box-shadow: 0 8px 22px rgba(0, 0, 0, 0.55), 0 0 38px 10px rgba(255, 112, 67, 0.55); border-color: #ff9e80; }
}
@keyframes cfx-stamp {
  0% { opacity: 0; transform: translateX(-50%) scale(1.8); }
  60% { opacity: 1; transform: translateX(-50%) scale(0.94); }
  100% { opacity: 1; transform: translateX(-50%) scale(1); }
}
@keyframes cfx-arrive {
  0% { opacity: 0; transform: translateY(46px) scale(0.3) rotateY(-540deg); }
  35% { opacity: 1; }
  100% { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .cfx, .cfx *, .cfx *::before, .cfx *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}

/* Gacha-Pity (Migration 009): Hinweis je Zähler; voll und gesperrt = Garantie wartet auf das Freischalt-Level */
.pity-note { margin: 4px 0 2px; font-size: 11px; line-height: 1.35; color: var(--text-secondary); }
.pity-note.is-ready { color: #fbd38d; font-weight: 700; }
.pity-bar-fill.is-full { animation: pity-full 1.6s ease-in-out infinite; }
@keyframes pity-full { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.5); } }

/* Kaufbedingungen vor dem ersten Stars-Kauf (Migration 009) */
.terms-consent { text-align: left; font-size: 0.9rem; line-height: 1.45; }
.terms-consent ul { margin: 8px 0 10px; padding-left: 18px; }
.terms-consent li { margin-bottom: 6px; }
.terms-consent a { color: #90cdf4; font-weight: 700; }
.terms-consent-legal { margin: 0 0 10px; padding: 8px 10px; border-radius: 8px; font-size: 0.8rem; color: #e2e8f0; background: rgba(255, 255, 255, 0.06); }

/* ===== Arena (T7, js/arena.js): eigener Bildschirm über dem Spiel ===== */
.ar {
  --ar-panel: rgba(255, 255, 255, 0.045);
  --ar-line: rgba(255, 255, 255, 0.08);
  --ar-text: #eef1f8;
  --ar-muted: #9aa3bd;
  --ar-gold: #f6c455;
  --ar-up: #6ee7a0;
  --ar-down: #ff7b72;
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  color: var(--ar-text);
  background: #0a0c15;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  -webkit-tap-highlight-color: transparent;
}
.ar.is-in { opacity: 1; transform: none; }
.ar.is-out { opacity: 0; transform: translateY(14px); }
.ar-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(110% 55% at 50% -12%, rgba(255, 138, 60, 0.2), transparent 62%),
    radial-gradient(90% 45% at 50% 112%, rgba(120, 86, 255, 0.14), transparent 60%),
    linear-gradient(180deg, #0e1121 0%, #090b14 100%);
}
.ar-top {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 10px;
  border-bottom: 1px solid var(--ar-line);
  background: rgba(10, 12, 22, 0.72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.ar-title { font-size: 1rem; font-weight: 900; letter-spacing: 0.2em; text-transform: uppercase; }
.ar-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--ar-line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ar-text);
  font-size: 0.95rem;
  cursor: pointer;
}
.ar-season {
  grid-column: 3;
  justify-self: end;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(246, 196, 85, 0.35);
  background: rgba(246, 196, 85, 0.08);
  color: #ffe2a0;
  font-size: 0.7rem;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}
.ar-tokens {
  grid-column: 4;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--ar-line);
  font-size: 0.78rem;
  white-space: nowrap;
}
.ar-tokens b { color: var(--ar-gold); }
.ar-body { position: relative; z-index: 1; flex: 1; overflow-y: auto; padding: 14px 14px 18px; -webkit-overflow-scrolling: touch; }
.ar-tabs {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 6px 8px calc(8px + env(safe-area-inset-bottom, 0px));
  background: rgba(9, 11, 20, 0.94);
  border-top: 1px solid var(--ar-line);
}
.ar-tabs button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 7px 0 6px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ar-muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.ar-tabs button span { font-size: 1.15rem; filter: grayscale(0.6); }
.ar-tabs button.is-active { color: #fff; background: linear-gradient(180deg, rgba(255, 122, 61, 0.22), rgba(229, 56, 59, 0.1)); }
.ar-tabs button.is-active span { filter: none; }

.ar-loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 50px 0; color: var(--ar-muted); }
.ar-loading span { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.15); border-top-color: var(--ar-gold); animation: ar-spin 0.8s linear infinite; }
.ar-empty { padding: 40px 16px; text-align: center; color: var(--ar-muted); }
.ar-hint { margin: 14px 4px 0; font-size: 0.74rem; line-height: 1.45; color: var(--ar-muted); }
.ar-note { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: rgba(110, 231, 160, 0.08); border: 1px solid rgba(110, 231, 160, 0.25); font-size: 0.78rem; color: #c8f5da; }

/* Liga-Wappen */
.ar-crest { display: block; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.5)); }
.ar-crest .fill { fill: rgba(255, 255, 255, 0.92); stroke-width: 1.5; }
.ar-mini-crest { display: inline-block; vertical-align: -2px; margin-right: 3px; }
.ar-mini-crest .ar-crest { display: inline-block; filter: none; }

/* Kopf: Liga, Rating, Fortschritt */
.ar-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 14px;
  align-items: center;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-color: color-mix(in srgb, var(--lc) 45%, transparent);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--lc) 26%, transparent), transparent 60%),
              linear-gradient(150deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
}
.ar-hero-crest { grid-row: span 1; animation: ar-float 4s ease-in-out infinite; }
.ar-hero-league { font-size: 0.72rem; font-weight: 900; letter-spacing: 0.18em; text-transform: uppercase; color: var(--lc); }
.ar-hero-rating { display: flex; align-items: baseline; gap: 6px; margin-top: 2px; }
.ar-hero-rating b { font-size: 2rem; font-weight: 900; line-height: 1; letter-spacing: -0.01em; }
.ar-hero-rating span { font-size: 0.75rem; color: var(--ar-muted); }
.ar-progress { height: 7px; margin-top: 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.ar-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--lc), #fff); box-shadow: 0 0 12px var(--lc); }
.ar-hero-next { margin-top: 6px; font-size: 0.72rem; color: var(--ar-muted); }
.ar-hero-stats {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.ar-hero-stats div { padding: 8px 6px; border-radius: 12px; background: rgba(0, 0, 0, 0.25); text-align: center; }
.ar-hero-stats span { display: block; font-size: 0.6rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ar-muted); }
.ar-hero-stats b { display: block; margin-top: 3px; font-size: 0.95rem; }
.ar-hero-stats small { display: block; margin-top: 2px; font-size: 0.62rem; color: var(--ar-muted); }

/* Kämpfe heute */
.ar-fights {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 12px;
  align-items: center;
  margin: 12px 0;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--ar-panel);
  border: 1px solid var(--ar-line);
}
.ar-fights-info span { display: block; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ar-muted); }
.ar-fights-info b { font-size: 1.05rem; }
.ar-pips { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.ar-pips i { width: 9px; height: 9px; border-radius: 3px; background: linear-gradient(135deg, #ff9a52, #e5383b); box-shadow: 0 0 6px rgba(255, 120, 60, 0.6); }
.ar-pips i.used { background: rgba(255, 255, 255, 0.12); box-shadow: none; }
.ar-refresh {
  grid-column: 1 / -1;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  background: transparent;
  color: var(--ar-text);
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
}
.ar-refresh small { margin-left: 4px; color: var(--ar-gold); font-weight: 800; }

/* Gegner */
.ar-offers { display: grid; gap: 12px; }
.ar-offer {
  --slot: #f3c14e;
  position: relative;
  padding: 14px 14px 12px 16px;
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--ar-line);
  overflow: hidden;
  animation: ar-rise 0.35s ease both;
}
.ar-offer:nth-child(2) { animation-delay: 0.05s; }
.ar-offer:nth-child(3) { animation-delay: 0.1s; }
.ar-offer:nth-child(4) { animation-delay: 0.15s; }
.ar-offer::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--slot); box-shadow: 0 0 16px var(--slot); }
.ar-offer.is-easy { --slot: #48bb78; }
.ar-offer.is-even { --slot: #f3c14e; }
.ar-offer.is-hard { --slot: #f05a4f; }
.ar-offer.is-revenge { --slot: #ff3d71; border-color: rgba(255, 61, 113, 0.45); box-shadow: 0 10px 34px rgba(255, 61, 113, 0.18); }
.ar-offer-tag { position: absolute; top: 10px; right: 12px; font-size: 0.6rem; font-weight: 900; letter-spacing: 0.16em; text-transform: uppercase; color: var(--slot); }
.ar-offer-head { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding-top: 6px; }
.ar-offer-id { min-width: 0; }
.ar-offer-name { font-weight: 900; font-size: 0.98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ar-npc { padding: 1px 6px; border-radius: 6px; background: rgba(160, 130, 255, 0.18); color: #cbb8ff; font-size: 0.6rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; vertical-align: 2px; }
.ar-offer-meta { margin-top: 3px; font-size: 0.72rem; color: var(--ar-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ar-offer-power { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-weight: 900; font-size: 0.86rem; }
.ar-set { display: inline-flex; align-items: center; gap: 4px; font-size: 0.82rem; }
.ar-pips { line-height: 0; }
.ar-set .ar-pips { display: inline-flex; gap: 2px; }
.ar-set .ar-pips i { width: 5px; height: 5px; border-radius: 50%; background: rgba(255, 255, 255, 0.2); box-shadow: none; }
.ar-set .ar-pips i.on { background: #f6c455; }
.ar-chance { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; margin: 12px 0 10px; }
.ar-chance-bar { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.ar-chance-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--slot), rgba(255, 255, 255, 0.85)); }
.ar-chance-num { font-size: 0.78rem; font-weight: 900; color: var(--slot); }
.ar-offer-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ar-offer-stakes { display: flex; gap: 16px; min-width: 0; }
.ar-offer-stakes small { display: block; font-size: 0.56rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ar-muted); }
.ar-offer-stakes b { display: block; margin-top: 2px; font-size: 0.95rem; font-weight: 900; white-space: nowrap; }
.ar-offer-stakes b span { font-size: 0.76rem; font-weight: 700; color: var(--ar-muted); }
.ar .is-up { color: var(--ar-up); }
.ar .is-down { color: var(--ar-down); }
.ar-fight-btn {
  flex: none;
  padding: 9px 18px 8px;
  border-radius: 12px;
  border: 0;
  color: #fff;
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #ff7a3d, #e5383b);
  box-shadow: 0 6px 18px rgba(229, 56, 59, 0.35);
  cursor: pointer;
}
.ar-fight-btn small { display: block; margin-top: 1px; font-size: 0.62rem; letter-spacing: 0; opacity: 0.9; }
.ar-fight-btn:disabled { opacity: 0.45; filter: grayscale(0.8); box-shadow: none; }
.ar-fight-btn.is-loading { pointer-events: none; animation: ar-pulse 0.8s ease-in-out infinite; }

/* Porträts */
.ar-avatar {
  position: relative;
  flex: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  border: 2px solid var(--lc, rgba(255, 255, 255, 0.25));
  background: linear-gradient(135deg, #2b3253, #161a2c);
  color: #fff;
  font-weight: 900;
  font-size: 0.9rem;
}
.ar-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ar-avatar.is-md { width: 46px; height: 46px; }
.ar-avatar.is-sm { width: 34px; height: 34px; border-radius: 10px; font-size: 0.72rem; border-width: 1.5px; }
.ar-avatar.is-guardian { color: #d7d0ff; background: linear-gradient(135deg, #3b2e60, #1b1630); }
.ar-avatar.is-guardian svg { width: 68%; height: 68%; }

/* Saisonbelohnung */
.ar-reward {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(246, 196, 85, 0.4);
  background: linear-gradient(135deg, rgba(246, 196, 85, 0.16), rgba(246, 196, 85, 0.04));
  animation: ar-rise 0.4s ease both;
}
.ar-reward b { display: block; font-size: 0.86rem; }
.ar-reward span { display: block; margin-top: 3px; font-size: 0.76rem; color: #ffe2a0; }

/* Bereiche: Rangliste, Shop, Verlauf */
.ar-panel { padding: 4px 0; }
.ar-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 2px 12px; }
.ar-panel-head h3 { margin: 0; font-size: 1.05rem; font-weight: 900; }
.ar-panel-head span { font-size: 0.76rem; color: var(--ar-muted); }
.ar-panel-head b { color: var(--ar-gold); }
.ar-ranking, .ar-log { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.ar-ranking li, .ar-log li {
  display: grid;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 14px;
  background: var(--ar-panel);
  border: 1px solid var(--ar-line);
}
.ar-ranking li { grid-template-columns: 28px auto 1fr auto auto; }
.ar-ranking li.is-me { border-color: rgba(246, 196, 85, 0.55); background: rgba(246, 196, 85, 0.08); }
.ar-rank { font-weight: 900; text-align: center; color: var(--ar-muted); }
.ar-rank.is-top { color: #0b0d18; border-radius: 8px; padding: 2px 0; }
.ar-rank.is-top1 { background: linear-gradient(135deg, #ffe08a, #e2a93a); }
.ar-rank.is-top2 { background: linear-gradient(135deg, #f1f4fa, #a9b2c6); }
.ar-rank.is-top3 { background: linear-gradient(135deg, #f0b98a, #b9763e); }
.ar-rank-id, .ar-log-id { min-width: 0; }
.ar-rank-id b, .ar-log-id b { display: block; font-size: 0.86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ar-rank-id small, .ar-log-id small { display: block; margin-top: 2px; font-size: 0.68rem; color: var(--ar-muted); }
.ar-rank-rating { font-weight: 900; font-size: 0.9rem; }
.ar-log li { grid-template-columns: auto auto 1fr auto auto; }
.ar-log li.is-won { border-left: 3px solid var(--ar-up); }
.ar-log li.is-lost { border-left: 3px solid var(--ar-down); }
.ar-log-role { font-size: 1.05rem; }
.ar-log-res { text-align: right; }
.ar-icon-btn.is-off { display: grid; place-items: center; opacity: 0.3; cursor: default; }
.ar-log-res span { display: block; font-weight: 900; font-size: 0.88rem; }
.ar-log-res small { display: block; font-size: 0.66rem; color: var(--ar-muted); }

.ar-shop { display: grid; gap: 10px; }
.ar-shop-item {
  --glow: rgba(255, 255, 255, 0.1);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: var(--ar-panel);
  border: 1px solid var(--ar-line);
  box-shadow: inset 0 0 0 1px transparent;
}
.ar-shop-item.is-rare { --glow: rgba(66, 153, 225, 0.55); }
.ar-shop-item.is-epic { --glow: rgba(159, 122, 234, 0.6); }
.ar-shop-item.is-legendary { --glow: rgba(246, 173, 85, 0.7); background: linear-gradient(135deg, rgba(246, 173, 85, 0.12), rgba(255, 255, 255, 0.03)); }
.ar-shop-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-size: 1.6rem;
  background: rgba(0, 0, 0, 0.3);
  box-shadow: 0 0 0 1px var(--glow), 0 0 18px var(--glow);
}
.ar-shop-info { min-width: 0; }
.ar-shop-info b { display: block; font-size: 0.9rem; }
.ar-shop-info small { display: block; margin-top: 3px; font-size: 0.7rem; line-height: 1.35; color: var(--ar-muted); }
.ar-shop-limit { display: inline-block; margin-top: 5px; padding: 1px 7px; border-radius: 999px; font-size: 0.62rem; font-weight: 800; color: #ffe2a0; background: rgba(246, 196, 85, 0.12); }
.ar-buy {
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(246, 196, 85, 0.45);
  background: rgba(246, 196, 85, 0.12);
  color: #ffe9b0;
  font-weight: 900;
  font-size: 0.8rem;
  white-space: nowrap;
  cursor: pointer;
}
.ar-buy:disabled { opacity: 0.4; cursor: default; }

/* Saison-Übersicht */
.ar-sheet {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: flex-end;
  background: rgba(0, 0, 0, 0.55);
  animation: ar-fade 0.2s ease both;
}
.ar-sheet-card {
  position: relative;
  width: 100%;
  max-height: 86%;
  overflow-y: auto;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px));
  border-radius: 22px 22px 0 0;
  background: linear-gradient(180deg, #171b30, #0f1222);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  animation: ar-sheet 0.28s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}
.ar-sheet-card h3 { margin: 0; font-size: 1.15rem; font-weight: 900; }
.ar-sheet-card p { margin: 8px 0; font-size: 0.8rem; line-height: 1.5; color: #d3d8e8; }
.ar-sheet-sub { color: var(--ar-gold) !important; font-weight: 800; }
.ar-sheet-small { font-size: 0.72rem !important; color: var(--ar-muted) !important; }
.ar-sheet-x { position: absolute; top: 12px; right: 12px; }
.ar-league-list { margin: 12px 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.ar-league-list li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--ar-line);
}
.ar-league-list li.is-mine { border-color: var(--lc); box-shadow: 0 0 16px rgba(255, 255, 255, 0.06); }
.ar-league-list b { display: block; font-size: 0.88rem; color: var(--lc); }
.ar-league-list small { display: block; font-size: 0.68rem; color: var(--ar-muted); }
.ar-league-list span { font-size: 0.74rem; text-align: right; }

@media (max-width: 359px) {
  .ar-title { display: none; }
}

/* Arena-Saisonrahmen (T7, js/avatar-frames.js) */
.player-avatar-frame-arena_platinum,
.player-avatar-frame-arena_diamond,
.player-avatar-frame-arena_legend {
  position: relative;
  overflow: visible;
  border-radius: 12px;
}
.equipment-avatar-container.player-avatar-frame-arena_platinum,
.equipment-avatar-container.player-avatar-frame-arena_diamond,
.equipment-avatar-container.player-avatar-frame-arena_legend {
  background: rgba(26, 26, 46, 0.5);
  overflow: visible;
}

@keyframes ar-spin { to { transform: rotate(360deg); } }
@keyframes ar-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes ar-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes ar-pulse { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.35); } }
@keyframes ar-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ar-sheet { from { transform: translateY(100%); } to { transform: none; } }

/* ===== Arena-Kampf (T7, js/arena-fx.js) ===== */
.bfx {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: grid;
  grid-template-rows: auto minmax(84px, 1fr) auto minmax(118px, 1.15fr);
  overflow: hidden;
  color: #fff;
  background: #0b0810;
  opacity: 0;
  transition: opacity 0.22s ease;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}
.bfx.is-in { opacity: 1; }
.bfx.is-out { opacity: 0; }
.bfx::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(130% 85% at 50% 48%, transparent 58%, rgba(0, 0, 0, 0.6));
}

/* Kulisse: Abendhimmel, Arkaden der Arena, Lichtkegel, Sandboden */
.bfx-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(70% 34% at 50% 34%, rgba(255, 168, 88, 0.2), transparent 72%),
    linear-gradient(180deg, #110a19 0%, #1b1022 28%, #29141b 50%, #150c0e 100%);
}
.bfx-wall {
  position: absolute;
  left: 0;
  right: 0;
  top: 15%;
  height: 39%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='168' viewBox='0 0 84 168'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23ffb66c' stop-opacity='.5'/%3E%3Cstop offset='.7' stop-color='%23ff7a35' stop-opacity='.14'/%3E%3Cstop offset='1' stop-color='%23ff6a2a' stop-opacity='.04'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='84' height='168' fill='%231e1317'/%3E%3Crect width='84' height='5' fill='%232e1d1f'/%3E%3Cpath d='M20 74V44a22 22 0 0 1 44 0v30z' fill='url(%23g)'/%3E%3Crect y='78' width='84' height='7' fill='%232e1d1f'/%3E%3Crect y='85' width='84' height='2' fill='%23140c0f'/%3E%3Cpath d='M13 168V120a29 29 0 0 1 58 0v48z' fill='url(%23g)'/%3E%3Crect x='0' y='87' width='3' height='81' fill='%232a1a1c'/%3E%3Crect x='81' y='87' width='3' height='81' fill='%232a1a1c'/%3E%3C/svg%3E") repeat-x center bottom / auto 100%;
  opacity: 0.9;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 38%, #000 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 38%, #000 100%);
}
.bfx-beams {
  position: absolute;
  left: -30%;
  right: -30%;
  top: -12%;
  height: 80%;
  pointer-events: none;
  background:
    linear-gradient(114deg, transparent 41%, rgba(255, 214, 160, 0.075) 47%, transparent 53%),
    linear-gradient(66deg, transparent 41%, rgba(255, 214, 160, 0.075) 47%, transparent 53%);
  animation: bfx-beams 10s ease-in-out infinite alternate;
}
.bfx-floor {
  position: absolute;
  left: -35%;
  right: -35%;
  top: 54%;
  bottom: -30%;
  border-radius: 50% 50% 0 0 / 18% 18% 0 0;
  background:
    radial-gradient(34% 26% at 50% 16%, rgba(255, 204, 140, 0.34), transparent 72%),
    repeating-radial-gradient(ellipse at 50% 0%, rgba(255, 236, 200, 0.022) 0 2px, transparent 2px 11px),
    linear-gradient(180deg, #6b4529 0%, #44291a 34%, #1d120c 100%);
  box-shadow: 0 -2px 0 rgba(255, 214, 165, 0.14), 0 -36px 70px rgba(0, 0, 0, 0.5);
}
.bfx-canvas { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; pointer-events: none; }

/* Kopfzeile und Runde */
.bfx-top {
  position: relative;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 14px 0;
}
.bfx-tag { min-width: 0; font-size: 0.74rem; font-weight: 900; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bfx-ctrl { display: flex; flex: none; gap: 6px; }
.bfx-btn {
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(10, 8, 16, 0.55);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
}
.bfx-btn.is-on { border-color: rgba(246, 196, 85, 0.7); color: #ffe2a0; }
.bfx.is-done .bfx-ctrl { visibility: hidden; }
.bfx-upper { position: relative; z-index: 2; display: flex; justify-content: center; align-items: flex-start; padding-top: 12px; }
.bfx-round {
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #eadfcd;
  opacity: 0;
  transition: opacity 0.3s;
}
.bfx-round.is-on { opacity: 1; }

/* Bühne und Kämpfer */
.bfx-stage {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 10px;
  transform-origin: 50% 0;
  transition: transform 0.45s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.bfx-stage.is-quake { animation: bfx-quake 0.32s ease; }
.bfx-side { position: relative; display: flex; justify-content: center; transition: transform 0.35s ease, filter 0.4s ease, opacity 0.4s ease; }
.bfx-side::after {
  content: "";
  position: absolute;
  left: 14%;
  right: 14%;
  bottom: -18px;
  height: 24px;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.62), transparent);
}
.bfx-card {
  position: relative;
  width: min(42vw, 182px);
  padding: 14px 10px 12px;
  border-radius: 22px;
  text-align: center;
  background: linear-gradient(170deg, rgba(42, 33, 56, 0.96), rgba(16, 13, 24, 0.97));
  border: 1.5px solid var(--fc-soft);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.55), 0 0 30px var(--fc-soft), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.bfx-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(90% 45% at 50% 0%, var(--fc-soft), transparent 70%);
  opacity: 0.6;
}
.bfx-portrait { position: relative; width: 88px; height: 88px; margin: 0 auto 10px; }
.bfx-portrait .ar-avatar { width: 100%; height: 100%; border-radius: 24px; border-width: 2.5px; border-color: var(--fc); font-size: 1.55rem; box-shadow: 0 0 18px var(--fc-soft); }
.bfx-shield {
  position: absolute;
  inset: -9px;
  border-radius: 30px;
  border: 2px solid rgba(120, 190, 255, 0.95);
  box-shadow: 0 0 24px rgba(120, 190, 255, 0.75), inset 0 0 18px rgba(120, 190, 255, 0.45);
  opacity: 0;
  pointer-events: none;
}
.bfx-shield.is-on { animation: bfx-shield 0.65s ease-out; }
.bfx-name { position: relative; font-size: 1rem; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bfx-sub { position: relative; margin-top: 2px; font-size: 0.72rem; color: rgba(255, 255, 255, 0.72); }
.bfx-set { position: relative; min-height: 20px; margin-top: 6px; }
.bfx-set .ar-set { max-width: 100%; gap: 5px; padding: 2px 8px; border-radius: 999px; background: rgba(0, 0, 0, 0.3); font-size: 0.72rem; }
.bfx-set .ar-set-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.64rem; font-weight: 800; color: #f2dcb6; }
.bfx-set .ar-pips { flex: none; }
.bfx-hp {
  position: relative;
  height: 16px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.bfx-hp-ghost { position: absolute; inset: 0 auto 0 0; background: rgba(255, 238, 200, 0.6); transition: width 0.6s ease 0.35s; }
.bfx-hp-fill { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #36d27c, #8ef0b5); transition: width 0.28s ease; }
.bfx-hp-fill[data-level="mid"] { background: linear-gradient(90deg, #f1b733, #ffe08a); }
.bfx-hp-fill[data-level="low"] { background: linear-gradient(90deg, #ee4f45, #ff9b8f); }
.bfx-hp-text { position: absolute; inset: 0; display: grid; place-items: center; font-size: 0.64rem; font-weight: 800; text-shadow: 0 1px 2px #000; }

/* Zahlen und Hinweise steigen über der Karte auf */
.bfx-pops { position: absolute; left: 0; right: 0; top: -20px; height: 0; z-index: 4; pointer-events: none; }
.bfx-pop {
  position: absolute;
  left: 50%;
  bottom: 0;
  font-size: 1.5rem;
  font-weight: 900;
  white-space: nowrap;
  color: #fff;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.65), 0 0 14px rgba(0, 0, 0, 0.7);
  animation: bfx-pop 1.15s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
.bfx-pop.is-taken { color: #ffb0a8; }
.bfx-pop.is-crit { font-size: 2.2rem; color: #ffd76a; text-shadow: 0 2px 0 #7a4b00, 0 0 20px rgba(255, 200, 80, 0.85); }
.bfx-pop.is-crit.is-taken { color: #ff8a7a; text-shadow: 0 2px 0 #6a1208, 0 0 20px rgba(255, 90, 70, 0.8); }
.bfx-pop.is-miss { font-size: 1rem; letter-spacing: 0.18em; color: #c9d0de; }
.bfx-pop.is-burn { bottom: -26px; font-size: 1rem; color: #ffa04a; }
.bfx-pop.is-heal { font-size: 1.2rem; color: #6ee7a0; }
.bfx-pop.is-label {
  bottom: 34px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  background: rgba(0, 0, 0, 0.66);
  text-shadow: none;
}
.bfx-pop.is-counter { color: #7ee8ff; border: 1px solid rgba(126, 232, 255, 0.5); }
.bfx-pop.is-shield { color: #a9d4ff; border: 1px solid rgba(120, 190, 255, 0.5); }
.bfx-pop.is-critlabel { color: #ffd76a; border: 1px solid rgba(255, 215, 106, 0.6); }
.bfx-pop.is-first { color: #ffc46b; border: 1px solid rgba(255, 196, 107, 0.6); }
.bfx-slash {
  position: absolute;
  left: 2%;
  right: 2%;
  top: 30%;
  height: 6px;
  z-index: 3;
  border-radius: 999px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, #fff 45%, var(--sc) 60%, transparent);
  box-shadow: 0 0 16px var(--sc), 0 0 4px #fff;
  transform: rotate(-30deg) scaleX(0);
  animation: bfx-slash 0.38s ease-out forwards;
}
.bfx-slash.from-right { animation-name: bfx-slash-r; }
.bfx-slash.is-crit { height: 10px; top: 27%; }
.bfx-vs { position: relative; z-index: 1; padding: 0 2px; opacity: 0.45; transition: opacity 0.3s; }
.bfx-vs span {
  display: block;
  font-size: 1.9rem;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.02em;
  color: #ffb54c;
  background: linear-gradient(180deg, #fff3c4, #f39a2c);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 12px rgba(255, 140, 40, 0.55));
}
/* Einmarsch nur rückwärts füllen, damit K.o.-Neigung und Ausfallschritte danach greifen */
.bfx.is-intro .bfx-side.is-left { animation: bfx-in-l 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.15) backwards; }
.bfx.is-intro .bfx-side.is-right { animation: bfx-in-r 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.15) backwards; }
.bfx.is-intro .bfx-vs { animation: bfx-vs 1.6s cubic-bezier(0.2, 0.9, 0.3, 1.3) 0.45s both; }
.bfx-card.is-hit { animation: bfx-hit 0.36s ease; }
.bfx .bfx-side.is-left.is-lunge-right { animation: bfx-lunge-r 0.42s cubic-bezier(0.3, 1.4, 0.5, 1); }
.bfx .bfx-side.is-right.is-lunge-left { animation: bfx-lunge-l 0.42s cubic-bezier(0.3, 1.4, 0.5, 1); }
.bfx .bfx-side.is-left.is-dodge-left { animation: bfx-dodge-l 0.38s ease; }
.bfx .bfx-side.is-right.is-dodge-right { animation: bfx-dodge-r 0.38s ease; }
.bfx-side.is-ko { filter: grayscale(1) brightness(0.55); opacity: 0.85; }
.bfx-side.is-left.is-ko { transform: translateY(14px) rotate(-6deg); }
.bfx-side.is-right.is-ko { transform: translateY(14px) rotate(6deg); }
.bfx-side.is-winner .bfx-card { box-shadow: 0 18px 36px rgba(0, 0, 0, 0.55), 0 0 46px var(--fc); border-color: var(--fc); }
.bfx.is-over .bfx-vs { opacity: 0.15; }

/* Kampfzeile */
.bfx-lower { position: relative; z-index: 2; display: flex; justify-content: center; padding: 30px 16px 0; transition: opacity 0.3s; }
.bfx-log { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 6px; }
.bfx-line {
  padding: 7px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3px solid rgba(255, 255, 255, 0.3);
  background: rgba(12, 9, 18, 0.66);
  font-size: 0.78rem;
  line-height: 1.35;
  color: #ece6dc;
  animation: bfx-line 0.28s ease both;
  transition: opacity 0.3s;
}
.bfx-line.is-me { border-left-color: #f6c455; }
.bfx-line.is-foe { border-left-color: #f45c50; }
.bfx-line.is-saved { border-left-color: #fff; background: rgba(40, 36, 52, 0.8); }
.bfx-line.is-old { opacity: 0.5; }
.bfx-line b { color: #fff; }
.bfx-line em { font-style: normal; font-weight: 900; color: #ffd76a; }
.bfx-line.is-saved em { color: #fff; }
.bfx.is-done .bfx-lower { opacity: 0; }

/* Banner, Blitz */
.bfx-banner {
  position: absolute;
  left: 0;
  right: 0;
  top: 17%;
  z-index: 5;
  text-align: center;
  font-size: 2.6rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  opacity: 0;
  pointer-events: none;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
}
.bfx-banner.is-on { animation: bfx-banner 1s ease-out forwards; }
.bfx-banner.is-fight { color: #ffe2a0; }
.bfx-banner.is-saved { font-size: 1.8rem; color: #fff; text-shadow: 0 0 24px rgba(255, 255, 255, 0.9); }
.bfx-banner.is-win.is-on, .bfx-banner.is-loss.is-on { animation: bfx-banner-stay 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.3) forwards; }
.bfx-banner.is-win { color: #ffd76a; text-shadow: 0 0 28px rgba(255, 196, 80, 0.75), 0 4px 0 #6d4100; }
.bfx-banner.is-loss { color: #ff8f86; text-shadow: 0 0 24px rgba(240, 80, 70, 0.6), 0 4px 0 #5a1410; }
.bfx.is-done .bfx-banner { animation: bfx-banner-out 0.3s ease forwards; }
.bfx-flash { position: absolute; inset: 0; z-index: 4; background: var(--fl, rgba(255, 255, 255, 0.4)); opacity: 0; pointer-events: none; }
.bfx-flash.is-on { animation: bfx-flash 0.35s ease-out; }

/* Ergebnis */
.bfx-result { position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; padding: 0 14px calc(16px + env(safe-area-inset-bottom, 0px)); }
.bfx-result-card {
  max-width: 440px;
  margin: 0 auto;
  padding: 16px 16px 14px;
  border-radius: 22px;
  text-align: center;
  background: linear-gradient(180deg, rgba(32, 27, 46, 0.97), rgba(14, 12, 22, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.45);
  animation: bfx-result 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.1) both;
}
.bfx-result-card.is-win { border-color: rgba(255, 215, 106, 0.55); box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.45), 0 0 34px rgba(255, 196, 80, 0.16); }
.bfx-result-card.is-loss { border-color: rgba(255, 143, 134, 0.4); }
.bfx-result-title { font-size: 1.5rem; font-weight: 900; letter-spacing: 0.18em; text-transform: uppercase; }
.bfx-result-card.is-win .bfx-result-title { color: #ffd76a; text-shadow: 0 0 20px rgba(255, 196, 80, 0.5); }
.bfx-result-card.is-loss .bfx-result-title { color: #ff8f86; }
.bfx-rating { display: flex; align-items: baseline; justify-content: center; gap: 10px; margin-top: 6px; }
.bfx-rating-num { font-size: 2.1rem; font-weight: 900; line-height: 1; }
.bfx-rating-delta { font-size: 1.1rem; font-weight: 900; }
.bfx-rating-delta.is-up { color: #6ee7a0; }
.bfx-rating-delta.is-down { color: #ff7b72; }
.bfx-rating-label { margin-top: 2px; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: #a9a2b6; }
.bfx-league { display: inline-block; margin-top: 10px; padding: 4px 12px; border-radius: 999px; font-size: 0.78rem; border: 1px solid var(--lc); color: var(--lc); }
.bfx-league.is-up { animation: bfx-promote 1.2s ease-in-out 2; box-shadow: 0 0 18px var(--lc); }
.bfx-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 8px; margin-top: 10px; }
.bfx-chip { padding: 4px 10px; border-radius: 999px; font-size: 0.74rem; font-weight: 800; background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.12); }
.bfx-actions { display: flex; gap: 10px; margin-top: 14px; }
.bfx-action { flex: 1; padding: 11px 12px; border-radius: 14px; font-size: 0.9rem; font-weight: 900; cursor: pointer; color: #fff; border: 1px solid rgba(255, 255, 255, 0.16); }
.bfx-action.is-ghost { background: rgba(255, 255, 255, 0.07); }
.bfx-action.is-primary { background: linear-gradient(135deg, #ff7a3d, #e5383b); border: 0; box-shadow: 0 6px 18px rgba(229, 56, 59, 0.35); }

@keyframes bfx-pop {
  0% { opacity: 0; transform: translate(calc(-50% + var(--dx, 0px)), 14px) scale(0.6); }
  15% { opacity: 1; transform: translate(calc(-50% + var(--dx, 0px)), -4px) scale(1.18); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx, 0px)), -62px) scale(1); }
}
@keyframes bfx-slash {
  0% { opacity: 1; transform: rotate(-30deg) scaleX(0); }
  55% { opacity: 1; transform: rotate(-30deg) scaleX(1); }
  100% { opacity: 0; transform: rotate(-30deg) scaleX(1.12); }
}
@keyframes bfx-slash-r {
  0% { opacity: 1; transform: rotate(30deg) scaleX(0); }
  55% { opacity: 1; transform: rotate(30deg) scaleX(1); }
  100% { opacity: 0; transform: rotate(30deg) scaleX(1.12); }
}
@keyframes bfx-hit {
  0% { transform: none; filter: none; }
  20% { transform: translateX(-7px); filter: brightness(1.9) saturate(0.5); }
  45% { transform: translateX(6px); }
  70% { transform: translateX(-3px); }
  100% { transform: none; filter: none; }
}
@keyframes bfx-lunge-r { 0% { transform: none; } 40% { transform: translateX(30%) rotate(6deg) scale(1.06); } 100% { transform: none; } }
@keyframes bfx-lunge-l { 0% { transform: none; } 40% { transform: translateX(-30%) rotate(-6deg) scale(1.06); } 100% { transform: none; } }
@keyframes bfx-dodge-l { 0% { transform: none; } 40% { transform: translateX(-16%) rotate(-5deg); } 100% { transform: none; } }
@keyframes bfx-dodge-r { 0% { transform: none; } 40% { transform: translateX(16%) rotate(5deg); } 100% { transform: none; } }
@keyframes bfx-in-l { from { opacity: 0; transform: translateX(-70%) rotate(-8deg); } to { opacity: 1; transform: none; } }
@keyframes bfx-in-r { from { opacity: 0; transform: translateX(70%) rotate(8deg); } to { opacity: 1; transform: none; } }
@keyframes bfx-vs {
  0% { opacity: 0; transform: scale(2.6); }
  30% { opacity: 1; transform: scale(0.9); }
  45% { transform: scale(1.05); }
  75% { opacity: 1; transform: scale(1); }
  100% { opacity: 0.45; transform: scale(1); }
}
@keyframes bfx-shield { 0% { opacity: 0; transform: scale(0.85); } 30% { opacity: 1; transform: scale(1.02); } 100% { opacity: 0; transform: scale(1.12); } }
@keyframes bfx-quake {
  20% { translate: -6px 2px; }
  40% { translate: 6px -3px; }
  60% { translate: -4px 2px; }
  80% { translate: 3px -1px; }
}
@keyframes bfx-banner {
  0% { opacity: 0; transform: scale(1.8); }
  20% { opacity: 1; transform: scale(0.95); }
  70% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.04); }
}
@keyframes bfx-banner-stay { 0% { opacity: 0; transform: scale(1.8); } 60% { opacity: 1; transform: scale(0.94); } 100% { opacity: 1; transform: scale(1); } }
@keyframes bfx-banner-out { from { opacity: 1; } to { opacity: 0; transform: translateY(-12px); } }
@keyframes bfx-flash { 0% { opacity: 0; } 25% { opacity: 1; } 100% { opacity: 0; } }
@keyframes bfx-line { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes bfx-result { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
@keyframes bfx-promote { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@keyframes bfx-beams { from { transform: translateX(-3%); } to { transform: translateX(3%); } }

@media (prefers-reduced-motion: reduce) {
  .ar, .ar *, .bfx, .bfx *, .ar *::before, .bfx *::before {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
  .bfx-banner.is-win, .bfx-banner.is-loss { opacity: 1; }
  .bfx.is-done .bfx-banner { opacity: 0; }
  .bfx-pop { display: none; }
}

/* ===== Fenster-Grundlage (T9, js/ui.js): Dialoge, Bottom-Sheets, Belohnungen; Ebene setzt nextLayer() ===== */
.ui-dialog {
  --ui-card: #141829;
  --ui-line: rgba(255, 255, 255, 0.09);
  --ui-text: #eef1f8;
  --ui-muted: #9aa3bd;
  --ui-accent: #7c8cff;
  --ui-accent2: #5b6bff;
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(5, 7, 14, 0.62);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.17s ease;
  color: var(--ui-text);
  -webkit-tap-highlight-color: transparent;
}
.ui-dialog.is-in { opacity: 1; }
.ui-dialog.is-out { opacity: 0; }
.ui-dialog-card {
  position: relative;
  width: 100%;
  max-width: 380px;
  max-height: calc(100vh - 36px);
  max-height: calc(100dvh - 36px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid var(--ui-line);
  background: linear-gradient(180deg, #1a1f36 0%, var(--ui-card) 100%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform: translateY(10px) scale(0.96);
  transition: transform 0.2s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.ui-dialog.is-in .ui-dialog-card { transform: none; }
.ui-dialog.is-out .ui-dialog-card { transform: translateY(6px) scale(0.98); }
.ui-dialog-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 14px 4px 18px;
}
.ui-dialog-title { flex: 1; min-width: 0; margin: 0; font-size: 1.05rem; font-weight: 900; line-height: 1.25; color: var(--ui-text); }
.ui-dialog-x {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid var(--ui-line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ui-muted);
  font-size: 0.85rem;
  cursor: pointer;
}
.ui-dialog-icon {
  flex: none;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--tone, var(--ui-accent));
  box-shadow: 0 0 18px var(--tone, var(--ui-accent));
}
.ui-dialog-icon svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.ui-dialog.is-success { --tone: #22c55e; }
.ui-dialog.is-error { --tone: #ef4444; }
.ui-dialog.is-warning { --tone: #f59e0b; }
.ui-dialog.is-info { --tone: #5b8cff; }
.ui-dialog-body {
  padding: 8px 18px 4px;
  overflow-y: auto;
  font-size: 0.88rem;
  line-height: 1.5;
  color: #d3d8e8;
  -webkit-overflow-scrolling: touch;
  -webkit-user-select: text;
  user-select: text;
}
.ui-dialog-body p { margin: 0 0 10px; line-height: 1.5; color: #d3d8e8; }
.ui-dialog-body p:last-child { margin-bottom: 4px; }
.ui-dialog-body a { color: #9db4ff; }
.ui-dialog-body ul { margin: 6px 0 10px; padding-left: 20px; }
.ui-dialog-actions {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 10px;
  padding: 14px 18px 18px;
}
.ui-btn {
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--ui-line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ui-text);
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease;
}
.ui-btn:active { transform: scale(0.97); }
.ui-btn.is-primary {
  border: 0;
  background: linear-gradient(135deg, var(--ui-accent), var(--ui-accent2));
  box-shadow: 0 8px 22px rgba(91, 107, 255, 0.35);
  color: #fff;
}
.ui-dialog.is-success .ui-btn.is-primary { background: linear-gradient(135deg, #34d399, #16a34a); box-shadow: 0 8px 22px rgba(34, 197, 94, 0.3); }
.ui-dialog.is-error .ui-btn.is-primary { background: linear-gradient(135deg, #f87171, #dc2626); box-shadow: 0 8px 22px rgba(239, 68, 68, 0.3); }
.ui-dialog.is-warning .ui-btn.is-primary { background: linear-gradient(135deg, #fbbf24, #d97706); box-shadow: 0 8px 22px rgba(245, 158, 11, 0.3); color: #1b1203; }
.ui-btn.is-danger { border: 0; background: linear-gradient(135deg, #f87171, #dc2626); color: #fff; }
.ui-link { padding: 0; border: 0; background: none; color: #9db4ff; font-size: 0.82rem; font-weight: 700; text-decoration: underline; cursor: pointer; }
.ui-small { font-size: 0.75rem !important; color: var(--ui-muted) !important; }
.ui-list { margin: 4px 0 6px !important; padding-left: 18px !important; display: grid; gap: 8px; }
.ui-list li { line-height: 1.45; }
.ui-list b { color: #fff; }

/* Bottom-Sheet */
.ui-dialog.is-sheet { align-items: flex-end; padding: 0; }
.ui-dialog.is-sheet .ui-dialog-card {
  max-width: 560px;
  max-height: 88vh;
  max-height: 88dvh;
  border-radius: 22px 22px 0 0;
  border-bottom: 0;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  transform: translateY(100%);
  transition: transform 0.26s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.ui-dialog.is-sheet.is-in .ui-dialog-card { transform: none; }
.ui-dialog.is-sheet.is-out .ui-dialog-card { transform: translateY(100%); }
.ui-sheet-grip { width: 40px; height: 4px; margin: 8px auto 0; border-radius: 99px; background: rgba(255, 255, 255, 0.18); }

/* Alte Fenster-Inhalte (showModal) im neuen Rahmen */
.ui-legacy .ui-dialog-body .modal-btn { border-radius: 12px; }
.ui-legacy .ui-dialog-body h3, .ui-legacy .ui-dialog-body h4 { color: #fff; }

/* Belohnungs-Chips */
.ui-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 2px 4px 2px 0;
  padding: 3px 8px 3px 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: #f1f4fb;
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  vertical-align: middle;
}
.ui-chip img { width: 14px; height: 14px; object-fit: contain; }
.ui-chip b { font-size: 0.62rem; letter-spacing: 0.04em; padding: 1px 4px; border-radius: 6px; background: rgba(255, 255, 255, 0.12); }
.ui-chip.is-gems { border-color: rgba(96, 165, 250, 0.35); background: rgba(59, 130, 246, 0.14); }
.ui-chip.is-gold { border-color: rgba(246, 196, 85, 0.35); background: rgba(246, 196, 85, 0.12); }
.ui-chip.is-xp b { background: rgba(167, 139, 250, 0.3); color: #e4dbff; }
.ui-chip.is-energy { border-color: rgba(250, 204, 21, 0.3); }
.ui-chip.is-pass b { background: linear-gradient(135deg, #a78bfa, #7c3aed); color: #fff; }
.ui-chip.is-chest { border-color: rgba(255, 255, 255, 0.2); }
.ui-chip.is-chest.is-rare { border-color: rgba(66, 153, 225, 0.6); background: rgba(66, 153, 225, 0.16); }
.ui-chip.is-chest.is-epic { border-color: rgba(159, 122, 234, 0.65); background: rgba(159, 122, 234, 0.18); }
.ui-chip.is-chest.is-legendary { border-color: rgba(246, 173, 85, 0.7); background: rgba(246, 173, 85, 0.18); }
.ui-chip.is-ticket { border-color: rgba(56, 189, 248, 0.4); background: rgba(56, 189, 248, 0.12); }
.ui-chip.is-frame, .ui-chip.is-adfree { border-color: rgba(244, 114, 182, 0.4); background: rgba(244, 114, 182, 0.12); }
.ui-chip.is-lg { padding: 7px 12px 7px 9px; font-size: 0.95rem; }
.ui-chip.is-lg img { width: 20px; height: 20px; }

/* Fortschrittsbalken */
.ui-progress { position: relative; height: 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.ui-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--acc, #34d399), var(--acc2, #38bdf8)); transition: width 0.4s ease; }
.ui-progress.is-full i { background: linear-gradient(90deg, #fcd34d, #f59e0b); box-shadow: 0 0 10px rgba(245, 158, 11, 0.6); }
.ui-progress.is-pass i { background: linear-gradient(90deg, #a78bfa, #f6c455); }

/* Belohnung feiern */
.ui-reward .ui-dialog-card { overflow: hidden; text-align: center; border-color: rgba(246, 196, 85, 0.35); }
.ui-reward .ui-dialog-head { position: absolute; top: 0; right: 0; z-index: 2; padding: 12px; }
.ui-reward .ui-dialog-body { position: relative; padding: 26px 18px 0; overflow: visible; }
.ui-reward-rays {
  position: absolute;
  left: 50%;
  top: 56px;
  width: 340px;
  height: 340px;
  margin: -170px 0 0 -170px;
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(246, 196, 85, 0.16) 0deg 9deg, transparent 9deg 22deg);
  -webkit-mask: radial-gradient(circle, #000 18%, transparent 68%);
  mask: radial-gradient(circle, #000 18%, transparent 68%);
  animation: ui-spin 14s linear infinite;
  pointer-events: none;
}
.ui-reward-badge {
  position: relative;
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe7a3, #f6c455 45%, #d48a14);
  box-shadow: 0 0 0 6px rgba(246, 196, 85, 0.15), 0 10px 30px rgba(246, 196, 85, 0.45);
  animation: ui-pop 0.45s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
.ui-reward-badge svg { width: 34px; height: 34px; fill: none; stroke: #4a2c00; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ui-reward-title { position: relative; margin: 0; font-size: 1.25rem; font-weight: 900; color: #fff; }
.ui-reward-sub { position: relative; margin: 4px 0 0 !important; font-size: 0.82rem; color: var(--ui-muted) !important; }
.ui-reward-chips { position: relative; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 16px 0 4px; }
.ui-reward-chips .ui-chip { margin: 0; animation: ui-pop 0.4s cubic-bezier(0.2, 1.4, 0.4, 1) both; }
.ui-reward-note { position: relative; font-size: 0.76rem !important; color: var(--ui-muted) !important; }
.ui-reward-none { color: var(--ui-muted); }
.ui-reward .ui-dialog-actions { padding-top: 18px; }

@keyframes ui-spin { to { transform: rotate(360deg); } }
@keyframes ui-pop { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: none; } }

/* ===== Vollbild-Bereiche (T9, js/ui.js openScreen): Quests, Pass, Freunde, Airdrop im Stil der Arena ===== */
.scr {
  --acc: #34d399;
  --acc2: #38bdf8;
  --scr-tint: rgba(52, 211, 153, 0.18);
  --scr-tint2: rgba(56, 189, 248, 0.12);
  --scr-panel: rgba(255, 255, 255, 0.045);
  --scr-line: rgba(255, 255, 255, 0.08);
  --scr-text: #eef1f8;
  --scr-muted: #9aa3bd;
  --scr-gold: #f6c455;
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  color: var(--scr-text);
  background: #0a0c15;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  -webkit-tap-highlight-color: transparent;
}
.scr.is-in { opacity: 1; transform: none; }
.scr.is-out { opacity: 0; transform: translateY(14px); }
.scr-pass { --acc: #a78bfa; --acc2: #f6c455; --scr-tint: rgba(167, 139, 250, 0.22); --scr-tint2: rgba(246, 196, 85, 0.12); }
.scr-friends { --acc: #60a5fa; --acc2: #22d3ee; --scr-tint: rgba(96, 165, 250, 0.2); --scr-tint2: rgba(34, 211, 238, 0.12); }
.scr-airdrop { --acc: #22d3ee; --acc2: #0098ea; --scr-tint: rgba(0, 152, 234, 0.24); --scr-tint2: rgba(34, 211, 238, 0.12); }
.scr-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(110% 55% at 50% -12%, var(--scr-tint), transparent 62%),
    radial-gradient(90% 45% at 50% 112%, var(--scr-tint2), transparent 60%),
    linear-gradient(180deg, #0e1121 0%, #090b14 100%);
}
.scr-top {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 10px;
  border-bottom: 1px solid var(--scr-line);
  background: rgba(10, 12, 22, 0.72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.scr-title { font-size: 1rem; font-weight: 900; letter-spacing: 0.16em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scr-right { display: flex; align-items: center; gap: 8px; }
.scr-icon-btn {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 10px;
  border: 1px solid var(--scr-line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--scr-text);
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
}
.scr-pill {
  padding: 7px 12px;
  border-radius: 999px;
  border: 0;
  background: linear-gradient(135deg, #fcd34d, #f59e0b);
  color: #1b1203;
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
  animation: scr-glow 2.2s ease-in-out infinite;
}
.scr-pill[hidden] { display: none; }
.scr-chip { padding: 6px 10px; border-radius: 999px; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--scr-line); font-size: 0.74rem; font-weight: 800; white-space: nowrap; }
.scr-body { position: relative; z-index: 1; flex: 1; overflow-y: auto; padding: 14px 14px 22px; -webkit-overflow-scrolling: touch; }
.scr-tabs {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(var(--n, 4), 1fr);
  gap: 6px;
  padding: 6px 8px calc(8px + env(safe-area-inset-bottom, 0px));
  background: rgba(9, 11, 20, 0.94);
  border-top: 1px solid var(--scr-line);
}
.scr-tabs button {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 7px 0 6px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--scr-muted);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  cursor: pointer;
}
.scr-tab-icon { font-size: 1.15rem; filter: grayscale(0.6); }
.scr-tabs button.is-active { color: #fff; background: linear-gradient(180deg, var(--scr-tint), transparent); }
.scr-tabs button.is-active .scr-tab-icon { filter: none; }
.scr-tab-badge {
  position: absolute;
  top: 3px;
  right: calc(50% - 22px);
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 99px;
  background: #f59e0b;
  color: #1b1203;
  font-size: 0.6rem;
  font-style: normal;
  font-weight: 900;
}
.scr-tab-badge.is-on { display: inline-flex; }
.scr-loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 50px 0; color: var(--scr-muted); }
.scr-loading span { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.15); border-top-color: var(--acc); animation: ui-spin 0.8s linear infinite; }
.scr-empty { padding: 40px 16px; text-align: center; color: var(--scr-muted); }
.scr-hint { margin: 14px 4px 0; font-size: 0.74rem; line-height: 1.45; color: var(--scr-muted); }
.scr-hint a { color: #9db4ff; }
.scr .is-loading { pointer-events: none; animation: ar-pulse 0.8s ease-in-out infinite; }

/* ---------- Quests ---------- */
.qs-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  margin-bottom: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: radial-gradient(120% 140% at 0% 0%, var(--scr-tint), transparent 60%), linear-gradient(150deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.3);
}
.qs-hero-main b, .qs-hero > div > b { display: block; font-size: 1.02rem; font-weight: 900; }
.qs-hero-main span, .qs-hero > div > span { display: block; margin-top: 3px; font-size: 0.76rem; color: var(--scr-muted); }
.qs-hero em { font-style: normal; color: #fff; font-weight: 800; }
.qs-hero.is-locked { grid-template-columns: auto 1fr; }
.qs-hero-icon { font-size: 1.8rem; }
.qs-ring {
  --p: 0;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--acc) calc(var(--p) * 1%), rgba(255, 255, 255, 0.08) 0);
  position: relative;
}
.qs-ring::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: #121628; }
.qs-ring b { position: relative; font-size: 0.9rem; font-weight: 900; }
.qs-list, .qs-ach-list { display: grid; gap: 10px; }
.qs-quest {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: var(--scr-panel);
  border: 1px solid var(--scr-line);
  animation: ar-rise 0.3s ease both;
}
.qs-quest.is-ready { border-color: rgba(245, 158, 11, 0.55); background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(255, 255, 255, 0.03)); }
.qs-quest.is-done > * { opacity: 0.5; }
.qs-quest.is-bonus { border-style: dashed; border-color: rgba(246, 196, 85, 0.35); }
.qs-quest.is-bonus.is-ready { border-style: solid; }
.qs-quest-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 1.3rem;
  background: rgba(0, 0, 0, 0.3);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.qs-quest-main { min-width: 0; }
.qs-quest-text { font-size: 0.88rem; font-weight: 800; line-height: 1.3; }
.qs-quest-progress { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; margin: 7px 0 6px; }
.qs-quest-progress:empty { display: none; }
.qs-count { font-size: 0.7rem; font-weight: 800; color: var(--scr-muted); white-space: nowrap; }
.qs-quest-reward { line-height: 1.6; }
.qs-pips { display: flex; gap: 4px; }
.qs-pips i { width: 18px; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, 0.12); }
.qs-pips i.on { background: linear-gradient(90deg, #fcd34d, #f59e0b); }
.qs-claim {
  padding: 9px 14px;
  border-radius: 12px;
  border: 0;
  background: linear-gradient(135deg, #fcd34d, #f59e0b);
  color: #1b1203;
  font-size: 0.8rem;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.35);
}
.qs-done { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(52, 211, 153, 0.18); color: #6ee7a0; font-weight: 900; }
.qs-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 18px 2px 10px; }
.qs-section-head h4 { margin: 0; font-size: 0.78rem; font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase; color: #dfe4f2; white-space: nowrap; }
.qs-section-head span { font-size: 0.7rem; color: var(--scr-muted); text-align: right; }
.qs-prev { margin-bottom: 14px; display: grid; gap: 8px; }
.qs-prev .qs-section-head { margin-top: 0; }
.qs-prev .qs-quest { padding: 10px 12px; }
.qs-tasks { display: grid; gap: 8px; }
.qs-task {
  --adsgram-task-font-size: 14px;
  --adsgram-task-icon-size: 42px;
  --adsgram-task-icon-title-gap: 12px;
  --adsgram-task-button-width: 72px;
  --adsgram-task-icon-border-radius: 12px;
  display: block;
  padding: 12px;
  border-radius: 16px;
  background: var(--scr-panel);
  border: 1px solid var(--scr-line);
  color: var(--scr-text);
}
.qs-task-reward { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 8px; }
.qs-task-left { font-size: 0.7rem; color: var(--scr-muted); margin-left: 2px; }
.qs-task-btn { padding: 8px 12px; border-radius: 12px; background: linear-gradient(135deg, var(--acc), var(--acc2)); color: #06131a; font-size: 0.8rem; font-weight: 900; text-align: center; }
.qs-task-btn.is-claim { background: linear-gradient(135deg, #fcd34d, #f59e0b); color: #1b1203; }
.qs-task-btn.is-done { background: rgba(52, 211, 153, 0.18); color: #6ee7a0; }
.qs-task-card.is-empty { opacity: 0.6; }
.qs-tz {
  width: 100%;
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  background: transparent;
  color: var(--scr-muted);
  font-size: 0.76rem;
  text-align: left;
  cursor: pointer;
}
.qs-tz b { color: #fff; }
.qs-tz-change { color: var(--acc); font-weight: 800; white-space: nowrap; }
.qs-tz-field { display: grid; gap: 6px; margin: 6px 0 8px; font-size: 0.78rem; color: var(--ui-muted, #9aa3bd); }
.qs-tz-field select {
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #0f1324;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
}
.qs-tz-lock { padding: 10px 12px; border-radius: 12px; background: rgba(245, 158, 11, 0.1); border: 1px solid rgba(245, 158, 11, 0.3); }
.qs-ach {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: var(--scr-panel);
  border: 1px solid var(--scr-line);
}
.qs-ach.is-ready { border-color: rgba(245, 158, 11, 0.55); background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(255, 255, 255, 0.03)); }
.qs-ach.is-complete { border-color: rgba(246, 196, 85, 0.45); background: linear-gradient(135deg, rgba(246, 196, 85, 0.1), rgba(255, 255, 255, 0.02)); }
.qs-ach-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; font-size: 1.45rem; background: rgba(0, 0, 0, 0.3); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07); }
.qs-ach-main { min-width: 0; display: grid; gap: 5px; }
.qs-ach-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.qs-ach-head b { font-size: 0.92rem; }
.qs-ach-head span { font-size: 0.66rem; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; color: var(--scr-gold); white-space: nowrap; }
.qs-ach-text { font-size: 0.76rem; color: var(--scr-muted); }
.qs-ach-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.qs-ach-pips { display: flex; gap: 3px; }
.qs-ach-pips i { flex: 1; max-width: 22px; height: 4px; border-radius: 99px; background: rgba(255, 255, 255, 0.1); }
.qs-ach-pips i.on { background: var(--scr-gold); }
.qs-ach-pips i.ready { background: #f59e0b; box-shadow: 0 0 6px rgba(245, 158, 11, 0.7); }

/* ---------- Saison-Pass ---------- */
.ps-settled { margin-bottom: 12px; padding: 12px 14px; border-radius: 16px; border: 1px solid rgba(110, 231, 160, 0.3); background: rgba(110, 231, 160, 0.08); }
.ps-settled b { display: block; margin-bottom: 6px; font-size: 0.84rem; }
.ps-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(167, 139, 250, 0.35);
  background: radial-gradient(120% 140% at 0% 0%, rgba(167, 139, 250, 0.28), transparent 60%), linear-gradient(150deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
}
.ps-hero.is-premium { border-color: rgba(246, 196, 85, 0.5); background: radial-gradient(120% 140% at 0% 0%, rgba(246, 196, 85, 0.24), transparent 60%), linear-gradient(150deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02)); }
.ps-hero-tier {
  width: 76px;
  height: 84px;
  display: grid;
  place-items: center;
  align-content: center;
  clip-path: polygon(50% 0, 100% 18%, 100% 78%, 50% 100%, 0 78%, 0 18%);
  background: linear-gradient(160deg, #c4b5fd, #7c3aed 60%, #4c1d95);
  box-shadow: 0 0 30px rgba(167, 139, 250, 0.5);
  animation: ar-float 4s ease-in-out infinite;
}
.ps-hero.is-premium .ps-hero-tier { background: linear-gradient(160deg, #ffe7a3, #f6c455 55%, #b7791f); }
.ps-hero-tier small { font-size: 0.56rem; font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255, 255, 255, 0.85); }
.ps-hero.is-premium .ps-hero-tier small, .ps-hero.is-premium .ps-hero-tier b { color: #3b2400; }
.ps-hero-tier b { font-size: 1.9rem; font-weight: 900; line-height: 1; color: #fff; }
.ps-hero-main { min-width: 0; }
.ps-hero-season { font-size: 0.72rem; font-weight: 900; letter-spacing: 0.16em; text-transform: uppercase; color: #c4b5fd; }
.ps-crown { margin-left: 4px; padding: 1px 7px; border-radius: 99px; background: rgba(246, 196, 85, 0.18); color: #ffe2a0; letter-spacing: 0.04em; }
.ps-hero-points { margin: 3px 0 9px; font-size: 0.8rem; color: var(--scr-muted); }
.ps-hero-points b { font-size: 1.6rem; font-weight: 900; color: #fff; }
.ps-hero-next { margin-top: 6px; font-size: 0.72rem; color: var(--scr-muted); }
.ps-offer {
  margin-top: 12px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(246, 196, 85, 0.45);
  background: linear-gradient(135deg, rgba(246, 196, 85, 0.16), rgba(167, 139, 250, 0.1));
  box-shadow: 0 10px 30px rgba(246, 196, 85, 0.12);
}
.ps-offer-head { display: flex; align-items: center; gap: 12px; }
.ps-offer-crown { font-size: 1.8rem; filter: drop-shadow(0 0 10px rgba(246, 196, 85, 0.6)); }
.ps-offer-head b { display: block; font-size: 1rem; }
.ps-offer-head small { display: block; font-size: 0.74rem; color: #e9dcb8; }
.ps-offer-chips { margin: 10px 0 4px; }
.ps-offer p { margin: 6px 0 10px; font-size: 0.76rem; color: #e9dcb8; }
.ps-buy {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #ffe08a, #f59e0b);
  color: #2a1700;
  font-size: 1rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(245, 158, 11, 0.4);
}
.ps-claim-all {
  width: 100%;
  margin-top: 12px;
  min-height: 44px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #fcd34d, #f59e0b);
  color: #1b1203;
  font-size: 0.9rem;
  font-weight: 900;
  cursor: pointer;
  animation: scr-glow 2.2s ease-in-out infinite;
}
.ps-track { margin-top: 16px; }
.ps-track-head { display: grid; grid-template-columns: 1fr 44px 1fr; gap: 8px; margin: 0 0 8px; font-size: 0.68rem; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; color: var(--scr-muted); text-align: center; }
.ps-rows { position: relative; display: grid; gap: 8px; }
.ps-rows::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 4px;
  margin-left: -2px;
  border-radius: 99px;
  background: linear-gradient(180deg, #a78bfa 0, #f6c455 var(--fill), rgba(255, 255, 255, 0.08) var(--fill));
}
.ps-row { position: relative; display: grid; grid-template-columns: 1fr 44px 1fr; gap: 8px; align-items: stretch; }
.ps-node { position: relative; z-index: 1; display: grid; place-items: center; }
.ps-node span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #1a1f36;
  border: 2px solid rgba(255, 255, 255, 0.14);
  font-size: 0.78rem;
  font-weight: 900;
  color: var(--scr-muted);
}
.ps-row.is-reached .ps-node span { border-color: #f6c455; color: #fff; background: linear-gradient(160deg, #8b5cf6, #5b21b6); }
.ps-row.is-current .ps-node span { border-color: #c4b5fd; color: #fff; box-shadow: 0 0 0 4px rgba(167, 139, 250, 0.2); }
.ps-cell {
  position: relative;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 8px;
  border-radius: 14px;
  border: 1px solid var(--scr-line);
  background: var(--scr-panel);
  color: var(--scr-text);
  font: inherit;
  text-align: center;
}
.ps-cell.is-premium { background: linear-gradient(135deg, rgba(246, 196, 85, 0.08), rgba(167, 139, 250, 0.06)); border-color: rgba(246, 196, 85, 0.18); }
.ps-cell-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; }
.ps-cell-chips .ui-chip { margin: 0; }
.ps-cell.is-locked { opacity: 0.5; }
.ps-cell.is-reached { opacity: 0.85; }
.ps-cell.is-claimed > * { opacity: 0.45; }
.ps-cell.is-claimed .ps-check { opacity: 1; }
.ps-cell.is-ready { cursor: pointer; border-color: #f59e0b; background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(255, 255, 255, 0.04)); box-shadow: 0 0 16px rgba(245, 158, 11, 0.3); animation: scr-glow 2.2s ease-in-out infinite; }
.ps-check { position: absolute; top: 4px; right: 6px; font-size: 0.7rem; font-weight: 900; color: #6ee7a0; }
.ps-lock { position: absolute; top: 3px; right: 5px; font-size: 0.7rem; }
.ps-bonus { margin-top: 14px; padding: 14px; border-radius: 16px; border: 1px dashed rgba(246, 196, 85, 0.35); background: rgba(246, 196, 85, 0.05); display: grid; gap: 8px; }
.ps-bonus-head { display: flex; justify-content: space-between; align-items: baseline; }
.ps-bonus-head span { font-size: 0.72rem; color: var(--scr-muted); }
.ps-bonus p { margin: 0; font-size: 0.78rem; color: #d3d8e8; }
.ps-bonus small { font-size: 0.7rem; color: var(--scr-muted); }
.ps-bonus .qs-claim { justify-self: start; }

/* ---------- Freunde ---------- */
.fr-hero {
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(96, 165, 250, 0.35);
  background: radial-gradient(120% 140% at 0% 0%, rgba(96, 165, 250, 0.26), transparent 60%), linear-gradient(150deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
}
.fr-hero-head { display: flex; align-items: center; gap: 12px; }
.fr-hero-icon { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 16px; font-size: 1.7rem; background: rgba(0, 0, 0, 0.3); }
.fr-hero-head b { display: block; font-size: 1.02rem; }
.fr-hero-head small { display: block; margin-top: 2px; font-size: 0.74rem; color: var(--scr-muted); }
.fr-gift { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; margin-top: 14px; padding: 10px 12px; border-radius: 14px; background: rgba(0, 0, 0, 0.25); font-size: 0.78rem; }
.fr-steps-title { margin: 12px 2px 6px; font-size: 0.68rem; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; color: var(--scr-muted); }
.fr-steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.fr-steps li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border-radius: 12px; background: rgba(0, 0, 0, 0.22); }
.fr-step-lv { font-size: 0.8rem; font-weight: 900; color: #bfdbfe; white-space: nowrap; }
.fr-step-chips { display: flex; flex-wrap: wrap; justify-content: flex-end; }
.fr-link { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding: 6px 6px 6px 12px; border-radius: 14px; border: 1px solid rgba(96, 165, 250, 0.3); background: rgba(0, 0, 0, 0.35); }
.fr-link span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.78rem; color: #dbeafe; -webkit-user-select: all; user-select: all; }
.fr-link.is-off span { white-space: normal; color: var(--scr-muted); }
.fr-copy { flex: none; padding: 8px 12px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.08); color: #fff; font-size: 0.78rem; font-weight: 800; cursor: pointer; }
.fr-share { width: 100%; min-height: 46px; margin-top: 10px; border: 0; border-radius: 14px; background: linear-gradient(135deg, #60a5fa, #2563eb); color: #fff; font-size: 0.95rem; font-weight: 900; cursor: pointer; box-shadow: 0 8px 22px rgba(37, 99, 235, 0.4); }
.fr-note { margin: 10px 2px 0; font-size: 0.7rem; line-height: 1.4; color: var(--scr-muted); }
.fr-list-box { margin-top: 4px; }
.fr-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.fr-friend { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--scr-panel); border: 1px solid var(--scr-line); }
.fr-friend.is-ready { border-color: rgba(245, 158, 11, 0.55); background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(255, 255, 255, 0.03)); }
.fr-friend-main { min-width: 0; }
.fr-friend-name { display: flex; align-items: baseline; gap: 8px; }
.fr-friend-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.88rem; }
.fr-friend-name span { font-size: 0.7rem; color: var(--scr-muted); white-space: nowrap; }
.fr-friend-ms { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.fr-ms { padding: 2px 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.06); font-size: 0.66rem; font-weight: 800; color: var(--scr-muted); }
.fr-ms.is-ready { background: rgba(245, 158, 11, 0.2); color: #fcd34d; }
.fr-ms.is-claimed { background: rgba(52, 211, 153, 0.14); color: #6ee7a0; }
.fr-empty { padding: 18px 14px; border-radius: 14px; border: 1px dashed var(--scr-line); text-align: center; font-size: 0.8rem; color: var(--scr-muted); }
.fr-ton { margin-top: 18px; padding: 14px; border-radius: 18px; border: 1px solid rgba(0, 152, 234, 0.35); background: linear-gradient(150deg, rgba(0, 152, 234, 0.12), rgba(255, 255, 255, 0.02)); display: grid; gap: 10px; }
.fr-ton-head { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; }
.fr-ton-icon { font-size: 1.5rem; }
.fr-ton-head b { display: block; font-size: 0.92rem; }
.fr-ton-head small { display: block; font-size: 0.7rem; color: var(--scr-muted); }
.fr-ton-amount { font-size: 1.1rem; font-weight: 900; color: #7dd3fc; white-space: nowrap; }
.fr-ton p { margin: 0; font-size: 0.76rem; line-height: 1.45; color: #cfd8ea; }
.fr-ton-pending { padding: 8px 10px; border-radius: 10px; background: rgba(245, 158, 11, 0.1); font-size: 0.76rem; color: #fcd34d; }
.fr-ton-wallet { font-size: 0.74rem; color: var(--scr-muted); }
.fr-ton-wallet b { color: #fff; }
.fr-withdraw { min-height: 44px; border: 0; border-radius: 14px; background: linear-gradient(135deg, #38bdf8, #0284c7); color: #fff; font-size: 0.9rem; font-weight: 900; cursor: pointer; }
.fr-withdraw:disabled { opacity: 0.4; cursor: default; }
.fr-history { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.fr-history li { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; font-size: 0.74rem; color: var(--scr-muted); }
.fr-history b { color: #fff; }
.fr-status { padding: 2px 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.06); font-weight: 800; }
.fr-status.is-pending { color: #fcd34d; }
.fr-status.is-completed, .fr-status.is-approved, .fr-status.is-paid { color: #6ee7a0; }
.fr-status.is-rejected { color: #fca5a5; }
.fr-amount { display: grid; gap: 6px; font-size: 0.78rem; color: var(--ui-muted, #9aa3bd); }
.fr-amount input { min-height: 46px; padding: 8px 12px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.14); background: #0f1324; color: #fff; font-size: 1.05rem; font-weight: 800; }
.fr-amount-quick { display: flex; gap: 16px; margin: 8px 0 4px; }
.fr-amount-error { margin: 6px 0 0 !important; color: #fca5a5 !important; font-size: 0.78rem; }
.fr-entry .tal-entry-icon { background: linear-gradient(135deg, #60a5fa, #2563eb); }

/* ---------- Airdrop ---------- */
.drop-hero { display: grid; gap: 12px; padding: 16px; border-radius: 20px; border: 1px solid rgba(0, 152, 234, 0.4); background: radial-gradient(120% 140% at 50% 0%, rgba(0, 152, 234, 0.3), transparent 62%), linear-gradient(150deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02)); text-align: center; }
.drop-hero > b { font-size: 1rem; }
.drop-hero > span { font-size: 0.78rem; color: var(--scr-muted); }
.drop-pool small { display: block; font-size: 0.68rem; font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase; color: #7dd3fc; }
.drop-pool b { display: block; margin: 4px 0; font-size: 2.1rem; font-weight: 900; color: #fff; text-shadow: 0 0 24px rgba(56, 189, 248, 0.6); }
.drop-pool span { font-size: 0.78rem; color: var(--scr-muted); }
.drop-pool em { font-style: normal; color: #fff; font-weight: 800; }
.drop-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.drop-stats div { padding: 8px 4px; border-radius: 12px; background: rgba(0, 0, 0, 0.28); }
.drop-stats small { display: block; font-size: 0.58rem; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; color: var(--scr-muted); }
.drop-stats b { display: block; margin-top: 3px; font-size: 0.95rem; }
.drop-chance { font-size: 0.78rem; color: #cfe8f7; }
.drop-wallet { padding: 10px 12px; border-radius: 12px; background: rgba(245, 158, 11, 0.12); border: 1px solid rgba(245, 158, 11, 0.3); font-size: 0.76rem; color: #fde68a; text-align: left; }
.drop-earn ul, .drop-prizes ol, .drop-last ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.drop-earn li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--scr-panel); border: 1px solid var(--scr-line); font-size: 0.8rem; }
.drop-earn li b { color: #7dd3fc; white-space: nowrap; }
.drop-prizes ol { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
.drop-prizes li { display: flex; justify-content: space-between; gap: 6px; padding: 8px 10px; border-radius: 12px; background: var(--scr-panel); border: 1px solid var(--scr-line); font-size: 0.76rem; }
.drop-prizes li span { color: var(--scr-muted); font-weight: 800; }
.drop-last li { display: grid; grid-template-columns: 32px 1fr auto auto; gap: 8px; align-items: center; padding: 8px 12px; border-radius: 12px; background: var(--scr-panel); border: 1px solid var(--scr-line); font-size: 0.8rem; }
.drop-last li.is-me { border-color: rgba(246, 196, 85, 0.5); background: rgba(246, 196, 85, 0.08); }
.drop-last li span { color: var(--scr-muted); font-weight: 900; }
.drop-last li b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drop-last li em { font-style: normal; font-weight: 900; color: #7dd3fc; }
.drop-last li small { font-size: 0.66rem; color: var(--scr-muted); }

/* ---------- Menü-Einträge (T9): Symbol mit Beschriftung; Umbau von Menü und Nachrichten in T12 ---------- */
.clan-burger-menu .clan-expanded-buttons { align-items: flex-end; gap: 8px; padding: 0 0 6px; }
.clan-burger-menu .clan-expanded-buttons .clan-menu-button {
  position: relative;
  width: auto;
  height: 44px;
  padding: 0 7px 0 14px;
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(18, 22, 40, 0.95);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4);
  color: #eef1f8;
  font-size: 0.82rem;
  font-weight: 800;
}
.clan-burger-menu .clan-expanded-buttons .clan-menu-button:hover { transform: none; background: rgba(28, 33, 58, 0.97); }
.clan-expanded-buttons .menu-icon,
.clan-expanded-buttons .clan-message-button svg {
  width: 32px;
  height: 32px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  font-size: 16px;
  box-sizing: border-box;
}
.clan-expanded-buttons .clan-message-button svg { padding: 6px; }
.clan-expanded-buttons .menu-label { white-space: nowrap; }
.clan-burger-menu .clan-expanded-buttons .message-badge { top: -5px; right: auto; left: -6px; }

@keyframes scr-glow { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.15); } }

@media (prefers-reduced-motion: reduce) {
  .ui-dialog, .ui-dialog *, .scr, .scr * { animation: none !important; transition-duration: 0.01ms !important; }
}

/* ===== Fenster einheitlich (T11): alte Fenster (.modal-overlay) im Stil der Fenster-Grundlage (js/ui.js) ===== */
/* Ebene setzt js/ui.js beim Öffnen; Animation über .ui-legacy-in. Auf dem Handy von unten, sonst mittig. */
.modal-overlay {
  background: rgba(5, 7, 14, 0.62);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  padding: 18px;
  justify-content: stretch; /* Spalte über die volle Breite, das Fenster selbst mittig (justify-items) */
}
.modal-content {
  background: linear-gradient(180deg, #1a1f36 0%, #141829 100%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: #eef1f8;
}
.modal-overlay.ui-legacy-in { animation: ui-legacy-fade 0.18s ease both; }
.modal-overlay.ui-legacy-in > .modal-content { animation: ui-legacy-pop 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.15) both; }
.modal-header {
  gap: 10px;
  padding: 16px 14px 10px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.modal-header h2,
.modal-header h3 { margin: 0; font-size: 1.05rem; font-weight: 900; color: #eef1f8; }
.modal-close {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.05);
  color: #9aa3bd;
  font-size: 1.15rem;
  line-height: 1;
}
.modal-close:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.modal-body { padding: 14px 18px; }
.modal-body p { color: #d3d8e8; }
.modal-footer { gap: 10px; padding: 12px 18px 18px; }
.modal-btn {
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 0.88rem;
  transition: transform 0.12s ease, filter 0.12s ease;
}
.modal-btn:active { transform: scale(0.97); }
.modal-btn-primary {
  background: linear-gradient(135deg, #7c8cff, #5b6bff);
  box-shadow: 0 8px 22px rgba(91, 107, 255, 0.32);
  color: #fff;
}
.modal-btn-primary:hover { background: linear-gradient(135deg, #8a98ff, #6474ff); }
.modal-btn-secondary { background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.1); color: #eef1f8; }
.modal-btn-secondary:hover { background: rgba(255, 255, 255, 0.1); }
.modal-footer .modal-btn { flex: 1; }
@media (max-width: 480px) {
  .modal-overlay { padding: 0; align-items: end; align-content: end; }
  .modal-overlay > .modal-content {
    width: 100%;
    max-width: 100%;
    margin: 0;
    max-height: 92vh;
    max-height: 92dvh;
    border-radius: 22px 22px 0 0;
    border-bottom: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .modal-overlay.ui-legacy-in > .modal-content { animation: ui-legacy-up 0.26s cubic-bezier(0.2, 0.9, 0.3, 1) both; }
  .modal-btn { font-size: 0.86rem; }
}
@keyframes ui-legacy-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ui-legacy-pop { from { opacity: 0; transform: translateY(10px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes ui-legacy-up { from { transform: translateY(100%); } to { transform: none; } }

/* Item-Fenster: Kopf in der Farbe der Seltenheit */
.modal-content.item-modal {
  border-color: color-mix(in srgb, var(--rc) 45%, transparent);
  background: radial-gradient(120% 60% at 50% 0%, var(--rc-soft, rgba(255, 255, 255, 0.05)), transparent 70%), linear-gradient(180deg, #1a1f36 0%, #141829 100%);
}
#item-details-modal .modal-header { border-bottom: 0; padding-bottom: 0; }
#item-details-modal .modal-header h3 { font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: #9aa3bd; }
#item-details-modal .item-details-content { gap: 14px; }
#item-details-modal .item-details-header { gap: 14px; }
#item-details-modal .item-details-icon {
  width: 92px;
  height: 92px;
  border-radius: 20px;
  border: 1px solid var(--rc);
  background: radial-gradient(circle at 50% 40%, var(--rc-glow, rgba(255, 255, 255, 0.1)), rgba(0, 0, 0, 0.35) 70%);
  box-shadow: 0 0 24px var(--rc-glow, transparent);
  position: relative;
  overflow: visible;
}
#item-details-modal .item-details-icon img { width: 86%; height: 86%; border-radius: 0; }
#item-details-modal .item-details-name { margin-bottom: 6px; font-size: 1.2rem; font-weight: 900; line-height: 1.2; }
#item-details-modal .item-details-rarity {
  display: inline-block;
  margin: 0 6px 0 0;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--rc);
  background: var(--rc-soft, transparent);
  color: var(--rc) !important;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}
#item-details-modal .item-details-set { display: inline; font-size: 0.78rem; font-style: normal; color: #9aa3bd; }
#item-details-modal .item-details-stats { gap: 8px; }
#item-details-modal .stat-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}
#item-details-modal .stat-label { font-size: 0.72rem; font-weight: 700; color: #9aa3bd; }
#item-details-modal .stat-value { font-size: 0.95rem; font-weight: 900; color: #fff; }
#item-details-modal .stat-value.negative { color: #ff7b72; }
#item-details-modal .stat-row-note { grid-column: 1 / -1; grid-template-columns: auto 1fr; }
#item-details-modal .stat-row-note.is-warn { border-color: rgba(255, 123, 114, 0.35); background: rgba(255, 123, 114, 0.08); }
#item-details-modal .stat-row-note.is-warn .stat-label { color: #ffb4ae; }
#item-details-modal .item-details-price {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: transparent;
}
#item-details-modal .suggested-price-label { font-size: 0.76rem; color: #9aa3bd; }
#item-details-modal .suggested-price-value { margin: 0; font-size: 0.95rem; font-weight: 900; color: #f6c455; }

/* Info-Sheets (Profil, Expeditionen, Level) */
.help-sheet .ui-dialog-body { font-size: 0.86rem; }
.help-sheet .help-h { margin: 16px 0 6px; font-size: 0.76rem; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; color: #dfe4f2; }
.help-sheet .help-h:first-child { margin-top: 4px; }
.help-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.help-grid div { padding: 10px 12px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, 0.08); background: rgba(255, 255, 255, 0.04); }
.help-grid b { display: block; font-size: 0.84rem; color: #fff; }
.help-grid span { display: block; margin-top: 3px; font-size: 0.72rem; line-height: 1.35; color: #9aa3bd; }
.help-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 8px; }
.help-links a {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #dbe3ff !important;
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
}
.help-small { font-size: 0.74rem !important; color: #9aa3bd !important; }
.help-reserve { margin: 4px 0 10px; padding: 10px 12px; border-radius: 14px; border: 1px solid rgba(246, 196, 85, 0.3); background: rgba(246, 196, 85, 0.07); }
.help-reserve-head { display: flex; justify-content: space-between; margin-bottom: 7px; font-size: 0.78rem; color: #e9dcb8; }
.help-reserve-head b { color: #f6c455; }
.help-reserve .ui-progress i { background: linear-gradient(90deg, #f6c455, #fff1c4); }
.help-odds { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.help-odds li { display: flex; justify-content: space-between; padding: 8px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.07); }
.help-odds b { color: #fff; }

/* Level-Übersicht */
.lv-hero { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; margin-bottom: 10px; padding: 12px 14px; border-radius: 16px; border: 1px solid rgba(124, 140, 255, 0.35); background: radial-gradient(120% 140% at 0% 0%, rgba(124, 140, 255, 0.22), transparent 60%), rgba(255, 255, 255, 0.03); }
.lv-hero-num { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; background: linear-gradient(160deg, #8a98ff, #4c5bd6); box-shadow: 0 0 24px rgba(124, 140, 255, 0.45); }
.lv-hero-num small { font-size: 0.52rem; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255, 255, 255, 0.85); }
.lv-hero-num b { font-size: 1.5rem; line-height: 1; color: #fff; }
.lv-hero-main span { display: block; margin-top: 6px; font-size: 0.76rem; color: #c7cde0; }
.lv-progress i { background: linear-gradient(90deg, #7c8cff, #c7cfff); }
.help-points { margin-bottom: 12px !important; }
.lv-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.lv-row { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.06); background: rgba(255, 255, 255, 0.03); }
.lv-row.is-past { opacity: 0.55; }
.lv-row.is-current { border-color: #7c8cff; background: rgba(124, 140, 255, 0.14); box-shadow: 0 0 0 3px rgba(124, 140, 255, 0.15); }
.lv-row.has-unlocks:not(.is-past) { border-color: rgba(110, 231, 160, 0.3); }
.lv-num { display: grid; place-items: center; height: 30px; border-radius: 9px; background: rgba(0, 0, 0, 0.3); font-weight: 900; font-size: 0.82rem; }
.lv-row.is-current .lv-num { background: #7c8cff; color: #fff; }
.lv-main { min-width: 0; }
.lv-rewards { line-height: 1.7; }
.lv-rewards .ui-chip { font-size: 0.68rem; }
.lv-none { font-size: 0.72rem; color: #9aa3bd; }
.lv-unlocks { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.lv-unlock { padding: 2px 7px; border-radius: 999px; background: rgba(110, 231, 160, 0.12); color: #a7f3c8; font-size: 0.66rem; font-weight: 800; }
.lv-xp { text-align: right; font-size: 0.78rem; font-weight: 800; color: #c7cde0; white-space: nowrap; }
.lv-xp small { display: block; font-size: 0.56rem; font-weight: 800; color: #6b7390; }

/* Tutorial */
.ui-tutorial .ui-dialog-card { max-width: 400px; }
.ui-tutorial .ui-dialog-head { position: absolute; top: 0; right: 0; z-index: 3; padding: 10px; }
.ui-tutorial .ui-dialog-x { background: rgba(10, 12, 22, 0.6); color: #fff; }
.ui-tutorial .ui-dialog-body { padding: 0; }
.tut-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: radial-gradient(circle at 50% 45%, rgba(246, 196, 85, 0.22), #10131f 70%); }
.tut-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; display: block; animation: tut-zoom 6s ease-out both; }
.tut-media::after { content: ""; position: absolute; inset: auto 0 0; height: 45%; background: linear-gradient(transparent, #171c31); }
.tut-hero-crest { display: grid; place-items: center; height: 100%; animation: ar-float 4s ease-in-out infinite; }
.tut-text { padding: 4px 18px 0; }
.tut-step { font-size: 0.66rem; font-weight: 900; letter-spacing: 0.16em; text-transform: uppercase; color: #9db4ff; }
.tut-title { margin: 4px 0 8px; font-size: 1.2rem; font-weight: 900; color: #fff; }
.tut-text p { margin: 0 0 8px; }
.tut-small { font-size: 0.78rem; color: #9aa3bd !important; }
.tut-dots { display: flex; justify-content: center; gap: 6px; padding: 12px 0 2px; }
.tut-dots i { width: 7px; height: 7px; border-radius: 99px; background: rgba(255, 255, 255, 0.15); transition: width 0.2s ease, background 0.2s ease; }
.tut-dots i.done { background: rgba(124, 140, 255, 0.5); }
.tut-dots i.on { width: 22px; background: #7c8cff; }
.ui-tutorial .ui-btn:disabled { opacity: 0.35; }
@keyframes tut-zoom { from { transform: scale(1.08); } to { transform: scale(1); } }

/* Merge-Ergebnis (ein Item) */
.bm-single .bm-result-card { padding-top: 20px; }
.bm-single-item {
  position: relative;
  width: 128px;
  height: 128px;
  margin: 16px auto 10px;
  display: grid;
  place-items: center;
  border-radius: 26px;
  border: 2px solid var(--rc);
  background: radial-gradient(circle at 50% 40%, var(--rc-glow), rgba(0, 0, 0, 0.35) 72%);
  box-shadow: 0 0 34px var(--rc-glow);
  animation: bmItem 0.6s cubic-bezier(0.2, 1.5, 0.4, 1) 0.15s both;
}
.bm-single-icon { width: 84%; height: 84%; display: grid; place-items: center; font-size: 48px; }
.bm-single-icon img { width: 100%; height: 100%; object-fit: contain; }
.bm-single-name { font-size: 1.05rem; font-weight: 900; color: #fff; }
.bm-single-meta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 10px; margin: 6px 0 4px; font-size: 0.78rem; color: #cbd5e0; }
.bm-single .bm-result-note { margin: 8px 0 12px; }
.bm-single.is-fail .bm-result-title { color: #ff7b72; text-shadow: none; }
.bm-single.is-fail .bm-result-card { border-color: rgba(255, 123, 114, 0.5); box-shadow: 0 0 30px rgba(255, 123, 114, 0.18); animation: bmPop 0.45s ease both, bm-shake 0.45s ease 0.45s; }
.bm-single.is-fail .bm-single-item { filter: saturate(0.6); }
@keyframes bm-shake { 0%, 100% { transform: none; } 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* Nachrichten: leerer Posteingang (Umbau des Menüs und der Nachrichten in T12) */
.msg-empty { display: grid; justify-items: center; gap: 8px; padding: 36px 16px; color: #9aa3bd; font-size: 0.86rem; }
.msg-empty span { font-size: 2.2rem; }

@media (prefers-reduced-motion: reduce) {
  .modal-overlay.ui-legacy-in, .modal-overlay.ui-legacy-in > .modal-content, .tut-media img, .bm-single-item { animation: none !important; }
}

/* ===== Startseite (T12, js/home.js): Held, Expedition, Hinweise, Kacheln, nächste Freischaltung, Statistik ===== */
.hm {
  --hm-panel: rgba(255, 255, 255, 0.045);
  --hm-line: rgba(255, 255, 255, 0.08);
  --hm-text: #eef1f8;
  --hm-muted: #9aa3bd;
  --hm-gold: #f6c455;
  --hm-accent: #7c8cff;
  display: grid;
  gap: 12px;
  padding: 4px 0 84px; /* Platz für den schwebenden Menü-Knopf */
  color: var(--hm-text);
}
.hm button { font: inherit; color: inherit; cursor: pointer; text-align: left; -webkit-tap-highlight-color: transparent; }
.hm button:active { transform: scale(0.985); }

.hm-hero {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(124, 140, 255, 0.3);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(124, 140, 255, 0.28), transparent 60%),
    radial-gradient(90% 120% at 100% 100%, rgba(246, 196, 85, 0.12), transparent 60%),
    linear-gradient(160deg, #1b2140, #121628);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}
.hm-avatar {
  position: relative;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  border: 2px solid rgba(124, 140, 255, 0.7);
  background: linear-gradient(135deg, #2b3253, #161a2c);
  box-shadow: 0 0 20px rgba(124, 140, 255, 0.35);
  font-weight: 900;
  font-size: 1.2rem;
  padding: 0;
}
.hm-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 16px; background: #1b2140; }
.hm-level {
  position: absolute;
  right: -8px;
  bottom: -8px;
  z-index: 1;
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 2px solid #121628;
  background: linear-gradient(135deg, #ffe08a, #f59e0b);
  color: #2a1700;
  font-size: 0.76rem;
  font-weight: 900;
}
.hm-hero-main { min-width: 0; }
.hm-hello { font-size: 0.66rem; font-weight: 900; letter-spacing: 0.16em; text-transform: uppercase; color: #aab4ff; }
.hm-name { margin: 2px 0 8px; font-size: 1.2rem; font-weight: 900; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-xp { display: grid; gap: 5px; width: 100%; padding: 0; border: 0; background: none; }
.hm-xp-bar { display: block; height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.hm-xp-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #7c8cff, #c7cfff); box-shadow: 0 0 10px rgba(124, 140, 255, 0.6); }
.hm-xp-text { font-size: 0.72rem; color: var(--hm-muted); }
.hm-power { display: grid; justify-items: end; padding: 8px 10px; border-radius: 14px; background: rgba(0, 0, 0, 0.28); }
.hm-power small { font-size: 0.56rem; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; color: var(--hm-muted); }
.hm-power b { font-size: 1.05rem; font-weight: 900; }

.hm-exped {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(52, 211, 153, 0.35);
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.16), rgba(56, 189, 248, 0.08));
}
.hm-exped.is-running { border-color: rgba(96, 165, 250, 0.4); background: linear-gradient(135deg, rgba(96, 165, 250, 0.16), rgba(124, 140, 255, 0.08)); }
.hm-exped.is-back { border-color: rgba(246, 196, 85, 0.6); background: linear-gradient(135deg, rgba(246, 196, 85, 0.22), rgba(245, 158, 11, 0.08)); box-shadow: 0 0 24px rgba(246, 196, 85, 0.22); animation: hm-glow 2.2s ease-in-out infinite; }
.hm-exped-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: rgba(0, 0, 0, 0.28); font-size: 1.6rem; }
.hm-exped-main { min-width: 0; display: grid; gap: 3px; }
.hm-exped-main b { font-size: 0.98rem; font-weight: 900; }
.hm-exped-main small { font-size: 0.76rem; color: #cfd6ea; }
.hm-exped-main em { font-style: normal; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }
.hm-run-bar { display: block; height: 6px; margin-top: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.hm-run-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #60a5fa, #c7d8ff); transition: width 1s linear; }
.hm-go { padding: 9px 14px; border-radius: 12px; background: linear-gradient(135deg, #34d399, #10b981); color: #052417; font-size: 0.82rem; font-weight: 900; white-space: nowrap; box-shadow: 0 6px 16px rgba(16, 185, 129, 0.3); }
.hm-exped.is-back .hm-go { background: linear-gradient(135deg, #ffe08a, #f59e0b); color: #2a1700; box-shadow: 0 6px 16px rgba(245, 158, 11, 0.35); }
.hm-go.is-ghost { background: rgba(255, 255, 255, 0.08); color: #fff; box-shadow: none; }

.hm-alerts { display: grid; gap: 8px; }
.hm-alert {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 11px 14px;
  border-radius: 14px;
  border: 1px solid rgba(245, 158, 11, 0.45);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(255, 255, 255, 0.02));
}
.hm-alert span { font-size: 1.2rem; }
.hm-alert b { font-size: 0.86rem; }
.hm-alert i { font-style: normal; color: var(--hm-gold); font-weight: 900; }

.hm-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hm-tile {
  position: relative;
  display: grid;
  gap: 2px;
  align-content: start;
  min-height: 104px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid var(--hm-line);
  background: var(--hm-panel);
}
.hm-tile.is-hot { border-color: rgba(245, 158, 11, 0.5); background: linear-gradient(160deg, rgba(245, 158, 11, 0.12), rgba(255, 255, 255, 0.02)); }
.hm-tile.is-locked { opacity: 0.55; }
.hm-tile-icon { width: 38px; height: 38px; display: grid; place-items: center; margin-bottom: 6px; border-radius: 12px; background: rgba(0, 0, 0, 0.3); font-size: 1.25rem; }
.hm-tile b { font-size: 0.9rem; font-weight: 900; }
.hm-tile small { font-size: 0.72rem; line-height: 1.3; color: var(--hm-muted); }
.hm-tile-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #f59e0b;
  color: #1b1203;
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 900;
}

.hm-next {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px dashed rgba(110, 231, 160, 0.4);
  background: rgba(110, 231, 160, 0.05);
}
.hm-next-lv { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: rgba(110, 231, 160, 0.14); }
.hm-next-lv small { font-size: 0.5rem; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; color: #a7f3c8; }
.hm-next-lv b { font-size: 1.15rem; line-height: 1; color: #fff; }
.hm-next-main { display: grid; gap: 2px; min-width: 0; }
.hm-next-main small { font-size: 0.66rem; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; color: #a7f3c8; }
.hm-next-main b { font-size: 0.88rem; }
.hm-next > i { font-style: normal; color: #a7f3c8; font-weight: 900; }

.hm-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.hm-stats div { padding: 10px 8px; border-radius: 14px; background: var(--hm-panel); border: 1px solid var(--hm-line); text-align: center; }
.hm-stats b { display: block; font-size: 0.98rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.hm-stats small { display: block; margin-top: 2px; font-size: 0.64rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--hm-muted); }

@keyframes hm-glow { 0%, 100% { box-shadow: 0 0 18px rgba(246, 196, 85, 0.18); } 50% { box-shadow: 0 0 30px rgba(246, 196, 85, 0.35); } }
@media (prefers-reduced-motion: reduce) { .hm-exped.is-back { animation: none; } }

/* ===== Profil (T12, js/profile.js): Kopf, Kampfwerte, Einträge, Einstellungen, Wallet ===== */
.pf {
  --pf-panel: rgba(255, 255, 255, 0.045);
  --pf-line: rgba(255, 255, 255, 0.08);
  --pf-text: #eef1f8;
  --pf-muted: #9aa3bd;
  --pf-gold: #f6c455;
  display: grid;
  gap: 12px;
  padding: 4px 0 84px;
  color: var(--pf-text);
}
.pf button { font: inherit; color: inherit; cursor: pointer; text-align: left; -webkit-tap-highlight-color: transparent; }
.pf button:active { transform: scale(0.985); }

.pf-hero {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 22px 16px 16px;
  border-radius: 22px;
  border: 1px solid rgba(124, 140, 255, 0.3);
  background:
    radial-gradient(110% 90% at 50% 0%, rgba(124, 140, 255, 0.3), transparent 65%),
    linear-gradient(170deg, #1b2140, #121628);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
  text-align: center;
}
.pf-hero .profile-avatar-wrapper {
  width: 92px;
  height: 92px;
  margin: 0 0 10px;
  border-radius: 24px;
  background: linear-gradient(135deg, #2b3253, #161a2c);
  box-shadow: 0 0 0 2px rgba(124, 140, 255, 0.6), 0 0 26px rgba(124, 140, 255, 0.35);
}
/* Foto über dem Kürzel; das Kürzel ist nur sichtbar, solange kein Foto lädt. Rahmen (SVG, Ebene 2) darüber */
.pf-hero .profile-avatar-wrapper img { position: relative; z-index: 1; border-radius: 24px; background: #1b2140; }
.pf-hero .profile-avatar-wrapper img:not([src]) { visibility: hidden; }
.pf-hero .profile-avatar-wrapper::before { content: attr(data-initials); position: absolute; z-index: 0; font-size: 1.9rem; font-weight: 900; color: #c7cfff; }
.pf-name { max-width: 100%; font-size: 1.3rem; font-weight: 900; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-level {
  padding: 3px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffe08a, #f59e0b);
  color: #2a1700;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}
.pf-xp { display: grid; gap: 6px; width: 100%; max-width: 320px; margin-top: 10px; padding: 0; border: 0; background: none; text-align: center !important; }
.pf-xp-bar { display: block; height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.pf-xp-bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #7c8cff, #c7cfff); box-shadow: 0 0 10px rgba(124, 140, 255, 0.6); transition: width 0.4s ease; }
.pf-xp-text { font-size: 0.74rem; color: var(--pf-muted); }
.pf-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; margin-top: 12px; }
.pf-actions button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.25);
  font-size: 0.8rem;
  font-weight: 800;
  text-align: center;
}

.pf-dynamic { display: grid; gap: 12px; }
.pf-block { display: grid; gap: 10px; padding: 14px; border-radius: 20px; border: 1px solid var(--pf-line); background: var(--pf-panel); }
.pf-block-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pf-block-head h3 { margin: 0; font-size: 0.7rem; font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase; color: var(--pf-muted); }
.pf .pf-link { padding: 0; border: 0; background: none; font-size: 0.78rem; font-weight: 800; color: #aab4ff !important; }

.pf-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pf-stats div { display: grid; justify-items: center; gap: 1px; padding: 10px 6px; border-radius: 14px; background: rgba(0, 0, 0, 0.22); }
.pf-stats div.is-main { background: linear-gradient(160deg, rgba(124, 140, 255, 0.22), rgba(0, 0, 0, 0.2)); box-shadow: inset 0 0 0 1px rgba(124, 140, 255, 0.35); }
.pf-stats span { font-size: 1.1rem; }
.pf-stats b { font-size: 1.05rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.pf-stats small { font-size: 0.62rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--pf-muted); }

.pf-set {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.08);
}
.pf-set > span:first-child { font-size: 1.3rem; }
.pf-set > span:nth-child(2) { display: grid; min-width: 0; }
.pf-set b { font-size: 0.86rem; }
.pf-set small { font-size: 0.72rem; color: var(--pf-muted); }
.pf-set em { font-style: normal; font-weight: 900; color: #6ee7a0; }
.pf-set.is-empty { border-style: dashed; border-color: var(--pf-line); background: transparent; }

.pf-arena {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 8px 12px;
  border-radius: 14px;
  border: 1px solid rgba(246, 196, 85, 0.3);
  background: linear-gradient(135deg, rgba(246, 196, 85, 0.1), rgba(0, 0, 0, 0.15));
}
.pf-arena-crest { display: grid; place-items: center; width: 40px; height: 40px; }
.pf-arena-crest svg { width: 100%; height: 100%; }
.pf-arena span:nth-child(2) { display: grid; }
.pf-arena small { font-size: 0.62rem; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; color: var(--pf-gold); }
.pf-arena b { font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.pf-arena > i { font-style: normal; font-weight: 900; color: var(--pf-gold); }

.pf-list { display: grid; gap: 2px; margin: -4px -6px; }
.pf-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 9px 8px;
  border: 0;
  border-radius: 14px;
  background: none;
}
.pf-row + .pf-row { border-top: 1px solid var(--pf-line); border-radius: 0; }
.pf-row:first-child { border-radius: 14px 14px 0 0; }
.pf-row:last-child { border-radius: 0 0 14px 14px; }
.pf-row:only-child { border-radius: 14px; }
.pf-row:hover { background: rgba(255, 255, 255, 0.03); }
.pf-row.is-glow, .pf-row.tal-entry-glow { background: linear-gradient(90deg, rgba(245, 158, 11, 0.14), transparent); animation: none; }
.pf-row-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: rgba(0, 0, 0, 0.3); font-size: 1.15rem; }
.pf-row-main { display: grid; gap: 1px; min-width: 0; }
.pf-row-main b { font-size: 0.9rem; font-weight: 800; }
.pf-row-main small { font-size: 0.72rem; line-height: 1.3; color: var(--pf-muted); }
.pf-row-value { font-size: 0.78rem; font-weight: 800; color: #cfd6ea; font-variant-numeric: tabular-nums; }
.pf-row-arrow { font-style: normal; font-size: 1.3rem; line-height: 1; color: var(--pf-muted); }
.pf-row-badge {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #f59e0b;
  color: #1b1203;
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 900;
}

.pf-wallet { gap: 12px; }
.pf-wallet-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; }
.pf-wallet-head .pf-row-icon { background: linear-gradient(135deg, rgba(56, 189, 248, 0.35), rgba(37, 99, 235, 0.25)); }
.pf-wallet-state { justify-self: start; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); font-size: 0.72rem; font-weight: 800; color: var(--pf-muted); }
.pf-wallet-state.is-on { background: rgba(52, 211, 153, 0.14); color: #6ee7a0; }
.pf-wallet .wallet-connect-container { display: flex; justify-content: center; margin: 0; }
.pf-wallet #ton-connect-button { margin: 0 auto; }

/* ===== Markt (T12, js/market.js): Tab, Händler, eigene Angebote, Fenster ===== */
.mk, .scr-mk-trades, .scr-mk-merchant, .mk-sheet {
  --mk-panel: rgba(255, 255, 255, 0.045);
  --mk-line: rgba(255, 255, 255, 0.08);
  --mk-text: #eef1f8;
  --mk-muted: #9aa3bd;
  --mk-gold: #f6c455;
  --mk-good: #6ee7a0;
  --mk-bad: #fca5a5;
}
.mk { display: grid; gap: 12px; padding: 4px 0 84px; color: var(--mk-text); }
.mk button, .scr-mk-trades button, .scr-mk-merchant button, .mk-sheet button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mk-head {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(246, 196, 85, 0.28);
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(246, 196, 85, 0.2), transparent 60%),
    linear-gradient(160deg, #1f1d33, #121628);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
}
.mk-head h2 { margin: 0; font-size: 1.25rem; font-weight: 900; }
.mk-head p { margin: 4px 0 0; font-size: 0.78rem; line-height: 1.4; color: #cfd6ea; }
.mk-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mk-action {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 10px 6px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.28);
  text-align: center;
}
.mk-action:active { transform: scale(0.97); }
.mk-action.is-locked { opacity: 0.6; }
.mk-action-icon { font-size: 1.35rem; line-height: 1.2; }
.mk-action b { font-size: 0.84rem; font-weight: 900; }
.mk-action small { font-size: 0.66rem; color: var(--mk-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

.mk-tools { display: grid; gap: 8px; }
.mk-search-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.mk-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 14px;
  border: 1px solid var(--mk-line);
  background: var(--mk-panel);
}
.mk-search input {
  flex: 1;
  min-width: 0;
  height: 42px;
  border: 0;
  outline: none;
  background: none;
  color: var(--mk-text);
  font: inherit;
  font-size: 0.86rem;
}
.mk-search input::placeholder { color: var(--mk-muted); }
.mk-search:focus-within { border-color: rgba(124, 140, 255, 0.6); }
.mk-sort {
  display: grid;
  align-content: center;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--mk-line);
  background: var(--mk-panel);
  text-align: left;
}
.mk-sort small { font-size: 0.56rem; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mk-muted); }
.mk-sort b { font-size: 0.8rem; white-space: nowrap; }
.mk-chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.mk-chips::-webkit-scrollbar { display: none; }
.mk-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid var(--mk-line);
  background: var(--mk-panel);
  font-size: 0.74rem !important;
  font-weight: 800;
  color: #cfd6ea !important;
}
.mk-chip span { font-size: 0.9rem; }
.mk-chip.is-rarity { color: var(--rc) !important; }
.mk-chip.is-on { border-color: rgba(124, 140, 255, 0.7); background: rgba(124, 140, 255, 0.22); color: #fff !important; }
.mk-chip.is-rarity.is-on { border-color: var(--rc); background: var(--rc-soft); color: var(--rc) !important; }

.mk-list { display: grid; gap: 8px; }
.mk-count { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mk-muted); padding: 0 2px; }
.mk-note {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(124, 140, 255, 0.3);
  background: rgba(124, 140, 255, 0.1);
  font-size: 0.78rem;
  line-height: 1.4;
  color: #d5dbff;
}

.mk-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid var(--mk-line);
  border-left: 3px solid var(--rc);
  background: linear-gradient(90deg, var(--rc-soft), rgba(255, 255, 255, 0.02) 60%);
  text-align: left;
}
button.mk-card:active { transform: scale(0.985); }
.mk-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid var(--rc);
  background: radial-gradient(circle at 50% 35%, var(--rc-soft), rgba(0, 0, 0, 0.35));
  box-shadow: 0 0 12px var(--rc-glow);
  font-size: 1.6rem;
  overflow: hidden;
}
.mk-icon img { width: 86%; height: 86%; object-fit: contain; }
.mk-icon.is-lg { width: 64px; height: 64px; border-radius: 18px; font-size: 2rem; }
.mk-card-main { display: grid; gap: 2px; min-width: 0; }
.mk-card-main b { font-size: 0.9rem; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-card-main small { font-size: 0.74rem; color: #cfd6ea; }
.mk-card-main em { font-style: normal; font-size: 0.7rem; color: var(--mk-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-own { font-style: normal; padding: 1px 7px; border-radius: 999px; background: rgba(124, 140, 255, 0.22); color: #c7cfff; font-weight: 800; }
.mk-card-price { display: grid; justify-items: end; gap: 2px; text-align: right; }
.mk-card-price small { font-size: 0.66rem; color: var(--mk-muted); white-space: nowrap; }
.mk-cost { display: inline-flex; align-items: center; gap: 4px; font-weight: 900; font-variant-numeric: tabular-nums; color: var(--mk-gold); white-space: nowrap; }
.mk-cost img { width: 1.05em; height: 1.05em; object-fit: contain; }
.mk-cost.is-gems { color: #93c5fd; }
.mk-card-price .mk-cost { font-size: 0.95rem; }
.mk-deal.is-good { color: var(--mk-good) !important; }
.mk-deal.is-high { color: var(--mk-bad) !important; }
.mk-plus { color: var(--mk-good); font-size: 0.95rem; font-variant-numeric: tabular-nums; }

.mk-empty {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 34px 16px;
  border-radius: 18px;
  border: 1px dashed var(--mk-line);
  text-align: center;
  color: var(--mk-text);
}
.mk-empty > span { font-size: 2rem; }
.mk-empty b { font-size: 0.92rem; }
.mk-empty small { max-width: 280px; font-size: 0.76rem; line-height: 1.4; color: var(--mk-muted); }
.mk-spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.15); border-top-color: var(--mk-gold); animation: mk-spin 0.8s linear infinite; }
@keyframes mk-spin { to { transform: rotate(360deg); } }

/* Fenster (Angebot, Preis, Auswahl) */
.mk-sheet .ui-dialog-body { display: grid; gap: 12px; }
.mk-item-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; }
.mk-item-head b { display: block; font-size: 1rem; font-weight: 900; color: var(--rc); }
.mk-item-head small { display: block; margin-top: 2px; font-size: 0.74rem; color: var(--mk-muted); }
.mk-rows { display: grid; gap: 6px; }
.mk-rows .stat-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; margin: 0; padding: 9px 12px; min-height: 0; border: 1px solid var(--mk-line); border-radius: 12px; background: rgba(0, 0, 0, 0.22); }
.mk-rows .stat-icon { font-size: 1rem; }
.mk-rows .stat-label { margin: 0; font-size: 0.8rem; font-weight: 700; letter-spacing: 0; text-transform: none; color: #cfd6ea; }
.mk-rows .stat-value { margin: 0; font-size: 0.95rem; font-weight: 900; color: #fff; font-variant-numeric: tabular-nums; }
.mk-rows .stat-value.negative, .mk-rows .is-warn .stat-label { color: #fcd34d; }
.mk-rows .stat-row-note { grid-template-columns: auto minmax(0, 1fr); }
.mk-price-box {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--mk-line);
}
.mk-price-box > span { display: grid; gap: 2px; min-width: 0; font-size: 0.86rem; font-weight: 800; overflow: hidden; text-overflow: ellipsis; }
.mk-price-box small { font-size: 0.6rem; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mk-muted); }
.mk-hint { margin: 0; font-size: 0.76rem; line-height: 1.45; color: var(--mk-muted); }
.mk-hint.is-warn { color: #fcd34d; }

.mk-price-edit { display: grid; gap: 10px; }
.mk-price-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(246, 196, 85, 0.45);
  background: rgba(0, 0, 0, 0.3);
}
.mk-price-input img { width: 24px; height: 24px; object-fit: contain; }
.mk-price-input input {
  flex: 1;
  min-width: 0;
  height: 52px;
  border: 0;
  outline: none;
  background: none;
  color: var(--mk-gold);
  font: inherit;
  font-size: 1.4rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.mk-range { width: 100%; accent-color: var(--mk-gold); }
.mk-price-scale { display: flex; justify-content: space-between; gap: 8px; font-size: 0.66rem; color: var(--mk-muted); font-variant-numeric: tabular-nums; }
.mk-quick { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.mk-quick button {
  padding: 8px 4px;
  border-radius: 10px;
  border: 1px solid var(--mk-line);
  background: var(--mk-panel);
  font-size: 0.74rem !important;
  font-weight: 800;
}
.mk-proceeds { padding: 10px 12px; border-radius: 12px; background: rgba(52, 211, 153, 0.1); color: var(--mk-good); font-size: 0.84rem; text-align: center; }
.mk-proceeds b { font-size: 1rem; }
.mk-proceeds small { color: var(--mk-muted); }
.mk-proceeds.is-bad { background: rgba(248, 113, 113, 0.12); color: var(--mk-bad); }
.mk-facts { display: grid; gap: 4px; margin: 0; padding: 0 0 0 18px; font-size: 0.74rem; line-height: 1.45; color: var(--mk-muted); }
.mk-pick-sheet .ui-dialog-card { max-height: min(86vh, 760px); }
.mk-pick-list { display: grid; gap: 8px; max-height: 56vh; overflow-y: auto; padding-right: 2px; }

/* Meine Angebote und Verkäufe, Händler (Vollbild) */
.scr-mk-trades .scr-body, .scr-mk-merchant .scr-body { display: grid; align-content: start; gap: 10px; color: var(--mk-text); }
.mk-slots {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--mk-line);
  background: var(--mk-panel);
}
.mk-slots-text { display: grid; gap: 1px; }
.mk-slots-text small { font-size: 0.62rem; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mk-muted); }
.mk-slots-text b { font-size: 1.2rem; font-weight: 900; }
.mk-slots-text em { font-style: normal; font-size: 0.7rem; color: var(--mk-muted); }
.mk-slot-bar { grid-column: 1 / -1; display: flex; gap: 4px; }
.mk-slot-bar i { flex: 1; height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); }
.mk-slot-bar i.is-on { background: linear-gradient(90deg, #f6c455, #f59e0b); }
.mk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.8rem !important;
  font-weight: 900;
  white-space: nowrap;
}
.mk-btn.is-primary { border-color: transparent; background: linear-gradient(135deg, #ffe08a, #f59e0b); color: #2a1700 !important; }

.mk-lcard {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--mk-line);
  border-left: 3px solid var(--rc);
  background: linear-gradient(90deg, var(--rc-soft), rgba(255, 255, 255, 0.02) 60%);
}
.mk-lcard-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.mk-lcard-status { display: flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 10px; background: rgba(0, 0, 0, 0.25); font-size: 0.78rem; color: #cfd6ea; }
.mk-lcard-status b { color: #fff; font-variant-numeric: tabular-nums; }
.mk-lcard-status.is-live { color: var(--mk-good); }
.mk-lcard-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.mk-lcard-actions button {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--mk-line);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.76rem !important;
  font-weight: 800;
  white-space: nowrap;
}
.mk-lcard-actions button.is-danger { color: var(--mk-bad) !important; border-color: rgba(248, 113, 113, 0.35); }
.mk-lcard-actions button:disabled { opacity: 0.5; }
.mk-lcard-actions .mk-cost { font-size: 0.76rem; }

.mk-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mk-sum div { display: grid; justify-items: center; gap: 2px; padding: 12px 6px; border-radius: 14px; border: 1px solid var(--mk-line); background: var(--mk-panel); }
.mk-sum small { font-size: 0.6rem; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mk-muted); }
.mk-sum b, .mk-sum .mk-cost { font-size: 1rem; font-weight: 900; font-variant-numeric: tabular-nums; }

.mk-wallet { display: inline-flex; padding: 6px 10px; border-radius: 999px; background: rgba(0, 0, 0, 0.35); font-size: 0.8rem; }
.mk-merchant-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(246, 196, 85, 0.3);
  background: linear-gradient(135deg, rgba(246, 196, 85, 0.14), rgba(0, 0, 0, 0.15));
}
.mk-merchant-face { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: rgba(0, 0, 0, 0.3); font-size: 1.7rem; }
.mk-merchant-head b { display: block; font-size: 0.95rem; }
.mk-merchant-head small { font-size: 0.74rem; color: var(--mk-muted); }
.mk-merchant-head em { font-style: normal; font-weight: 800; color: #fff; }
.mk-sell-intro { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; }

/* ===== Menü und Nachrichten (T12, js/menu.js) ===== */
.mn-sheet, .scr-msg, .mn-read {
  --mn-panel: rgba(255, 255, 255, 0.045);
  --mn-line: rgba(255, 255, 255, 0.08);
  --mn-muted: #9aa3bd;
}
.mn-sheet .ui-dialog-body button, .scr-msg .scr-body button { font: inherit; color: inherit; cursor: pointer; text-align: left; -webkit-tap-highlight-color: transparent; }
.mn-sheet .ui-dialog-body { display: grid; gap: 10px; }
.mn-sheet .ui-dialog-body button:active, .scr-msg .scr-body button:active { transform: scale(0.985); }
.mn-badge {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #f59e0b;
  color: #1b1203;
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 900;
}
.mn-inbox {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(124, 140, 255, 0.3);
  background: linear-gradient(135deg, rgba(124, 140, 255, 0.18), rgba(255, 255, 255, 0.02));
}
.mn-inbox.is-hot { border-color: rgba(245, 158, 11, 0.5); background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(255, 255, 255, 0.02)); }
.mn-inbox-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: rgba(0, 0, 0, 0.3); font-size: 1.35rem; }
.mn-inbox-text { display: grid; gap: 2px; min-width: 0; }
.mn-inbox-text b { font-size: 0.95rem; font-weight: 900; }
.mn-inbox-text small { font-size: 0.74rem; color: var(--mn-muted); }
.mn-arrow { font-style: normal; font-size: 1.3rem; color: var(--mn-muted); }
.mn-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mn-tile {
  position: relative;
  display: grid;
  gap: 2px;
  align-content: start;
  min-height: 98px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid var(--mn-line);
  background: var(--mn-panel);
}
.mn-tile.is-hot { border-color: rgba(245, 158, 11, 0.5); background: linear-gradient(160deg, rgba(245, 158, 11, 0.12), rgba(255, 255, 255, 0.02)); }
.mn-tile.is-locked { opacity: 0.55; }
.mn-tile-icon { width: 36px; height: 36px; display: grid; place-items: center; margin-bottom: 6px; border-radius: 12px; background: rgba(0, 0, 0, 0.3); font-size: 1.2rem; }
.mn-tile b { font-size: 0.88rem; font-weight: 900; }
.mn-tile small { font-size: 0.7rem; line-height: 1.3; color: var(--mn-muted); }
.mn-tile .mn-badge { position: absolute; top: 10px; right: 10px; }
.mn-grid > .mn-tile:last-child:nth-child(odd) { grid-column: 1 / -1; min-height: 0; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; align-items: center; }
.mn-grid > .mn-tile:last-child:nth-child(odd) .mn-tile-icon { grid-row: span 2; margin: 0; }
.mn-link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 11px 14px;
  border-radius: 14px;
  border: 1px solid var(--mn-line);
  background: none;
  font-size: 0.84rem;
  font-weight: 800;
  color: #cfd6ea !important;
}
.mn-link i { font-style: normal; font-size: 1.2rem; color: var(--mn-muted); }

.scr-msg .scr-body { display: grid; align-content: start; gap: 8px; }
.mn-readall {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(124, 140, 255, 0.45);
  background: rgba(124, 140, 255, 0.16);
  font-size: 0.74rem !important;
  font-weight: 800;
  color: #d5dbff !important;
}
.mn-msg {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  width: 100%;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--mn-line);
  background: var(--mn-panel);
}
.mn-msg.is-unread { border-color: rgba(124, 140, 255, 0.45); background: linear-gradient(135deg, rgba(124, 140, 255, 0.14), rgba(255, 255, 255, 0.02)); }
.mn-msg-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: rgba(0, 0, 0, 0.3); font-size: 1.2rem; }
.mn-msg-main { display: grid; gap: 3px; min-width: 0; }
.mn-msg-main b { font-size: 0.9rem; font-weight: 800; color: #cfd6ea; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mn-msg.is-unread .mn-msg-main b { color: #fff; font-weight: 900; }
.mn-msg-main small {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.76rem;
  line-height: 1.4;
  color: var(--mn-muted);
}
.mn-msg-time { display: grid; justify-items: end; gap: 6px; font-size: 0.68rem; color: var(--mn-muted); white-space: nowrap; }
.mn-msg-time i { width: 9px; height: 9px; border-radius: 50%; background: #7c8cff; box-shadow: 0 0 8px rgba(124, 140, 255, 0.8); }
.mn-empty { display: grid; justify-items: center; gap: 4px; padding: 48px 16px; text-align: center; }
.mn-empty > span { font-size: 2.2rem; }
.mn-empty b { font-size: 0.95rem; }
.mn-empty small { max-width: 280px; font-size: 0.78rem; line-height: 1.4; color: var(--mn-muted); }
.mn-spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.15); border-top-color: #7c8cff; animation: mk-spin 0.8s linear infinite; }
.mn-read-meta { display: flex; align-items: center; gap: 8px; font-size: 0.74rem; color: var(--mn-muted); }
.mn-read-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.9rem; line-height: 1.55; color: #e5e9f5; max-height: 55vh; overflow-y: auto; }
.mn-read-body a { color: #a5b4fc; text-decoration: underline; }

/* ===== Rangliste (T12, js/leaderboard.js): Gesamt und Arena, Podest, Profilbilder mit Rahmen ===== */
.lb, .lb-sheet {
  --lb-panel: rgba(255, 255, 255, 0.045);
  --lb-line: rgba(255, 255, 255, 0.08);
  --lb-muted: #9aa3bd;
  --lb-gold: #f6c455;
}
.lb { display: grid; gap: 12px; padding: 4px 0 84px; color: #eef1f8; }
.lb button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.lb-head {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(246, 196, 85, 0.28);
  background:
    radial-gradient(110% 120% at 50% 0%, rgba(246, 196, 85, 0.22), transparent 60%),
    linear-gradient(170deg, #211d36, #121628);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
}
.lb-head h2 { margin: 0; font-size: 1.25rem; font-weight: 900; }
.lb-head p { margin: 4px 0 0; font-size: 0.78rem; line-height: 1.4; color: #cfd6ea; }
.lb-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(0, 0, 0, 0.35); }
.lb-switch button { padding: 9px 8px; border: 0; border-radius: 10px; background: none; font-size: 0.84rem !important; font-weight: 900; color: var(--lb-muted) !important; text-align: center; }
.lb-switch button.is-on { background: linear-gradient(135deg, #ffe08a, #f59e0b); color: #2a1700 !important; box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3); }

.lb-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.lb-chips::-webkit-scrollbar { display: none; }
.lb-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid var(--lb-line);
  background: var(--lb-panel);
  font-size: 0.74rem !important;
  font-weight: 800;
  color: #cfd6ea !important;
}
.lb-chip.is-on { border-color: rgba(246, 196, 85, 0.7); background: rgba(246, 196, 85, 0.16); color: #fff !important; }
.lb-chip-crest { display: inline-grid; width: 16px; height: 16px; }
.lb-chip-crest svg, .lb-crest svg { width: 100%; height: 100%; }

.lb-body { display: grid; gap: 10px; }

/* Profilbild: Kürzel unter dem Foto; der Rahmen (SVG aus js/avatar-frames.js) liegt um .lb-av */
.lb-av { position: relative; flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px; overflow: visible; }
.lb-av-in {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: inherit;
  overflow: hidden;
  background: linear-gradient(135deg, #2b3253, #161a2c);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.lb-av-in b { font-size: 0.8rem; font-weight: 900; color: #c7cfff; }
.lb-av-in img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #1b2140; }
.lb-av.is-lg { width: 60px; height: 60px; border-radius: 18px; }
.lb-av.is-lg .lb-av-in b { font-size: 1.1rem; }
.lb-av.is-xl { width: 76px; height: 76px; border-radius: 22px; }
.lb-av.is-xl .lb-av-in b { font-size: 1.35rem; }
.lb-av svg[data-avatar-frame] { z-index: 2; pointer-events: none; }

.lb-podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 8px; align-items: end; padding-top: 18px; }
.lb-pod {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: none;
  text-align: center;
  min-width: 0;
}
.lb-pod b { max-width: 100%; font-size: 0.8rem; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-pod small { font-size: 0.7rem; font-weight: 800; color: var(--lb-gold); font-variant-numeric: tabular-nums; }
.lb-crown { position: absolute; top: -20px; font-size: 1.3rem; filter: drop-shadow(0 2px 6px rgba(246, 196, 85, 0.6)); z-index: 3; }
.lb-pod-step {
  width: 100%;
  display: grid;
  place-items: center;
  margin-top: 4px;
  border-radius: 14px 14px 6px 6px;
  border: 1px solid var(--lb-line);
  font-style: normal;
}
.lb-pod-step i { font-style: normal; font-size: 1.2rem; font-weight: 900; color: #0b0d18; }
.lb-pod.is-p1 .lb-pod-step { height: 64px; background: linear-gradient(180deg, #ffe08a, #e2a93a); }
.lb-pod.is-p2 .lb-pod-step { height: 46px; background: linear-gradient(180deg, #f1f4fa, #a9b2c6); }
.lb-pod.is-p3 .lb-pod-step { height: 34px; background: linear-gradient(180deg, #f0b98a, #b9763e); }
.lb-pod.is-me b { color: var(--lb-gold); }

.lb-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.lb-row, .lb-mebar {
  display: grid;
  grid-template-columns: 34px auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 8px 12px 8px 8px;
  border-radius: 14px;
  border: 1px solid var(--lb-line);
  background: var(--lb-panel);
  text-align: left;
}
.lb-row:active { transform: scale(0.985); }
.lb-row.is-me { border-color: rgba(246, 196, 85, 0.55); background: rgba(246, 196, 85, 0.08); }
.lb-rank { font-weight: 900; font-size: 0.84rem; text-align: center; color: var(--lb-muted); font-variant-numeric: tabular-nums; }
.lb-rank.is-top { color: #0b0d18; border-radius: 8px; padding: 3px 0; }
.lb-rank.is-top1 { background: linear-gradient(135deg, #ffe08a, #e2a93a); }
.lb-rank.is-top2 { background: linear-gradient(135deg, #f1f4fa, #a9b2c6); }
.lb-rank.is-top3 { background: linear-gradient(135deg, #f0b98a, #b9763e); }
.lb-id { min-width: 0; display: grid; gap: 1px; }
.lb-id b { font-size: 0.86rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-id small { font-size: 0.68rem; color: var(--lb-muted); }
.lb-you { font-style: normal; margin-left: 4px; padding: 0 6px; border-radius: 999px; background: rgba(246, 196, 85, 0.2); color: var(--lb-gold); font-size: 0.66rem; }
.lb-val { display: inline-flex; align-items: center; gap: 5px; font-weight: 900; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.lb-crest { display: inline-grid; width: 18px; height: 18px; }
.lb-mebar { border-color: rgba(246, 196, 85, 0.45); background: linear-gradient(90deg, rgba(246, 196, 85, 0.14), rgba(255, 255, 255, 0.03)); }
.lb-mebar .lb-rank { color: var(--lb-gold); }
.lb-mebar:disabled { cursor: default; opacity: 1; }
.lb-more {
  padding: 11px;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  background: none;
  font-size: 0.8rem !important;
  font-weight: 800;
  color: #cfd6ea !important;
}
.lb-more:disabled { opacity: 0.6; }
.lb-empty { display: grid; justify-items: center; gap: 4px; padding: 40px 16px; text-align: center; }
.lb-empty > span { font-size: 2rem; }
.lb-empty b { font-size: 0.92rem; }
.lb-empty small { font-size: 0.76rem; color: var(--lb-muted); }
.lb-empty.is-small { padding: 20px 0; }
.lb-spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.15); border-top-color: var(--lb-gold); animation: mk-spin 0.8s linear infinite; }

/* Spieler ansehen */
.lb-sheet .ui-dialog-body { display: grid; gap: 12px; }
.lb-player { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center; }
.lb-player b { display: block; font-size: 1.05rem; font-weight: 900; }
.lb-player small { font-size: 0.76rem; color: var(--lb-muted); }
.lb-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.lb-stats div { display: grid; justify-items: center; gap: 1px; padding: 10px 6px; border-radius: 14px; background: rgba(0, 0, 0, 0.22); }
.lb-stats div.is-main { background: linear-gradient(160deg, rgba(124, 140, 255, 0.22), rgba(0, 0, 0, 0.2)); box-shadow: inset 0 0 0 1px rgba(124, 140, 255, 0.35); }
.lb-stats b { font-size: 1rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.lb-stats small { font-size: 0.6rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--lb-muted); }
.lb-set { padding: 8px 12px; border-radius: 12px; border: 1px solid rgba(52, 211, 153, 0.35); background: rgba(52, 211, 153, 0.08); font-size: 0.78rem; color: #a7f3c8; }
.lb-gear { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.lb-slot {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 8px 4px;
  border-radius: 14px;
  border: 1px solid var(--rc, var(--lb-line));
  background: radial-gradient(circle at 50% 30%, var(--rc-soft, transparent), rgba(0, 0, 0, 0.3));
  box-shadow: 0 0 10px var(--rc-glow, transparent);
}
.lb-slot-icon { width: 46px; height: 46px; display: grid; place-items: center; font-size: 1.6rem; }
.lb-slot-icon img { width: 100%; height: 100%; object-fit: contain; }
.lb-slot small { font-size: 0.66rem; font-weight: 800; color: #cfd6ea; }
.lb-slot.is-empty { border-style: dashed; opacity: 0.55; }
.lb-slot.is-empty span { font-size: 1.4rem; line-height: 46px; }

/* ===== Personalisierung (T13, js/cosmetics.js): Rahmen und Abzeichen ===== */
@property --cf-x { syntax: "<percentage>"; inherits: false; initial-value: -60%; }

/* Rahmen: Bild (Foto oder Kürzel), Ring (Maske), Schein, Verzierung oben, Schild unten */
.cf {
  --s: 60px;
  --r: calc(var(--s) * 0.3);
  --w: calc(var(--s) * 0.06);
  --o: calc(var(--s) * 0.07);
  position: relative;
  display: inline-block;
  flex: none;
  width: var(--s);
  height: var(--s);
  isolation: isolate;
}
.cf-pic {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: var(--r);
  overflow: hidden;
  background: linear-gradient(135deg, #2b3253, #161a2c);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.cf-pic b { font-size: calc(var(--s) * 0.3); font-weight: 900; color: #c7cfff; letter-spacing: 0.02em; }
.cf-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #1b2140; }
.cf-ring, .cf-glow, .cf-fx { position: absolute; pointer-events: none; }
.cf-ring {
  inset: calc(var(--o) * -1);
  border-radius: calc(var(--r) + var(--o));
  padding: var(--w);
  background: var(--cf-ring, transparent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  z-index: 2;
}
.cf-glow {
  inset: calc(var(--o) * -1.6);
  border-radius: calc(var(--r) + var(--o) * 1.6);
  background: var(--cf-glow, transparent);
  filter: blur(calc(var(--s) * 0.09));
  opacity: 0.55;
  z-index: -1;
}
.cf-fx { inset: calc(var(--o) * -1); border-radius: calc(var(--r) + var(--o)); z-index: 3; overflow: hidden; }
.cf-orn {
  position: absolute;
  left: 50%;
  top: calc(var(--s) * -0.2);
  width: calc(var(--s) * 0.36);
  height: calc(var(--s) * 0.36);
  transform: translateX(-50%);
  z-index: 4;
  filter: drop-shadow(0 calc(var(--s) * 0.02) calc(var(--s) * 0.03) rgba(0, 0, 0, 0.55));
}
.cf-orn svg { width: 100%; height: 100%; display: block; }
.cf-tag {
  position: absolute;
  left: 50%;
  bottom: calc(var(--s) * -0.13);
  transform: translateX(-50%);
  z-index: 4;
  padding: 0 calc(var(--s) * 0.07);
  border-radius: 999px;
  background: var(--cf-tag, #1b2140);
  color: var(--cf-tag-fg, #fff);
  font-size: max(9px, calc(var(--s) * 0.15));
  font-weight: 900;
  line-height: 1.45;
  white-space: nowrap;
  box-shadow: 0 0 0 max(1px, calc(var(--s) * 0.02)) rgba(10, 12, 24, 0.9);
}
/* Klein (Listen): keine Verzierung und kein Schild, dünnerer Ring */
.cf.is-sm .cf-orn, .cf.is-sm .cf-tag { display: none; }

/* Bewegung */
.cf.spin .cf-ring, .cf.spin .cf-glow { background: none; overflow: hidden; }
/* Drehung als echte Rotation einer übergroßen Fläche im Ring (läuft auch ohne @property in älteren WebViews) */
.cf.spin .cf-ring::before, .cf.spin .cf-glow::before {
  content: "";
  position: absolute;
  inset: -45%;
  animation: cf-rot var(--cf-speed, 6s) linear infinite;
}
.cf.spin .cf-ring::before { background: var(--cf-ring); }
.cf.spin .cf-glow::before { background: var(--cf-glow); }
.cf.sheen .cf-fx::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 0 calc(var(--cf-x) - 12%), rgba(255, 255, 255, 0.55) var(--cf-x), transparent calc(var(--cf-x) + 12%) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  padding: var(--w);
  border-radius: inherit;
  animation: cf-sheen var(--cf-sheen, 3.6s) ease-in-out infinite;
}
.cf.pulse .cf-glow { animation: cf-pulse 2.6s ease-in-out infinite; }
@keyframes cf-rot { to { transform: rotate(360deg); } }
@keyframes cf-sheen { 0%, 35% { --cf-x: -60%; } 75%, 100% { --cf-x: 160%; } }
@keyframes cf-pulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 0.8; } }
@media (prefers-reduced-motion: reduce) {
  .cf .cf-ring, .cf .cf-glow, .cf .cf-ring::before, .cf .cf-glow::before, .cf .cf-fx::after, .cf .cf-sparks i { animation: none !important; }
}

/* Funken (Sterne, Glut): Punkte mit eigener Verzögerung */
.cf-sparks { position: absolute; inset: calc(var(--o) * -1.4); z-index: 3; pointer-events: none; }
.cf-sparks i {
  position: absolute;
  width: max(2px, calc(var(--s) * 0.045));
  height: max(2px, calc(var(--s) * 0.045));
  border-radius: 50%;
  background: var(--cf-spark, #fff);
  box-shadow: 0 0 calc(var(--s) * 0.06) var(--cf-spark, #fff);
  opacity: 0;
  animation: cf-twinkle 2.4s ease-in-out infinite;
}
.cf.embers .cf-sparks i { animation: cf-ember 2.2s ease-in infinite; }
@keyframes cf-twinkle { 0%, 100% { opacity: 0; transform: scale(0.4); } 50% { opacity: 1; transform: scale(1); } }
@keyframes cf-ember { 0% { opacity: 0; transform: translateY(0) scale(1); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(calc(var(--s) * -0.35)) scale(0.3); } }

/* ---- Rahmen ---- */
/* Level-Rahmen */
.cf-lv10 { --cf-ring: linear-gradient(135deg, #ffd2a6, #b06f3a 45%, #6e4020 55%, #e7a873); --cf-glow: radial-gradient(#c8803f, transparent 70%); }
.cf-lv20 { --cf-ring: linear-gradient(135deg, #ffffff, #b9c3d6 40%, #6f7c94 55%, #e9eef7); --cf-glow: radial-gradient(#aab6cc, transparent 70%); }
.cf-lv30 { --cf-ring: linear-gradient(135deg, #fff3b0, #f2b632 40%, #a86a07 58%, #ffe08a); --cf-glow: radial-gradient(#f2b632, transparent 70%); --cf-tag: linear-gradient(135deg, #ffe08a, #d18c12); --cf-tag-fg: #2a1700; }
.cf-lv40 {
  --cf-ring: conic-gradient(from 0deg, #e9fbff, #7fdcff, #3c7bff, #b9f2ff, #e9fbff, #69c7ff, #e9fbff);
  --cf-glow: conic-gradient(from 0deg, #7fdcff, transparent 40%, #3c7bff, transparent 85%);
  --cf-speed: 9s; --cf-spark: #dff8ff; --cf-tag: linear-gradient(135deg, #b9f2ff, #3c7bff); --cf-tag-fg: #04162e;
}
.cf-lv50 {
  --cf-ring: conic-gradient(from 0deg, #ffe08a, #ff6fb5, #9b6bff, #46d1ff, #6fffb0, #ffe08a);
  --cf-glow: conic-gradient(from 0deg, #ff6fb5, #9b6bff, #46d1ff, #ffe08a, #ff6fb5);
  --cf-speed: 5s; --cf-spark: #fff6c9; --cf-tag: linear-gradient(135deg, #ffe08a, #ff6fb5 50%, #9b6bff); --cf-tag-fg: #1a0a24;
}
/* Arena-Saison: doppelter Ring in Ligafarbe, Wappen oben, Saison unten */
.cf-ar_platinum { --cf-ring: conic-gradient(from 0deg, #e6fffb, #2fb8a6, #0f6e63, #9ff3e6, #2fb8a6, #0f6e63, #e6fffb); --cf-speed: 8s; --cf-glow: radial-gradient(#2fb8a6, transparent 70%); --cf-tag: #0f6e63; }
.cf-ar_diamond {
  --cf-ring: conic-gradient(from 0deg, #eaf2ff, #4f7dff, #9cc0ff, #2a4fd6, #eaf2ff, #74a7ff, #eaf2ff);
  --cf-glow: radial-gradient(#4f7dff, transparent 70%); --cf-speed: 8s; --cf-spark: #dfe9ff; --cf-tag: #2a4fd6;
}
.cf-ar_legend {
  --cf-ring: conic-gradient(from 0deg, #ffd8a8, #ff3d3d, #ffb000, #c2185b, #ffd8a8, #ff6a3d, #ffd8a8);
  --cf-glow: conic-gradient(from 0deg, #ff3d3d, #ffb000, #c2185b, #ff3d3d);
  --cf-speed: 4.5s; --cf-spark: #ffb36b; --cf-tag: linear-gradient(135deg, #ff6a3d, #c2185b);
}
.cf-ar_platinum .cf-ring, .cf-ar_diamond .cf-ring, .cf-ar_legend .cf-ring { box-shadow: inset 0 0 0 max(1px, calc(var(--s) * 0.012)) rgba(255, 255, 255, 0.5); }
/* Saison-Pass: Farbe je Monat über --h */
.cf-pass {
  --cf-ring: conic-gradient(from 0deg, hsl(var(--h) 95% 85%), hsl(var(--h) 80% 55%), hsl(calc(var(--h) + 40) 70% 38%), hsl(var(--h) 95% 75%), hsl(var(--h) 80% 55%), hsl(calc(var(--h) + 40) 70% 38%), hsl(var(--h) 95% 85%));
  --cf-speed: 8s;
  --cf-glow: radial-gradient(hsl(var(--h) 85% 60%), transparent 70%);
  --cf-tag: hsl(calc(var(--h) + 30) 70% 34%);
}
/* Shop (Gems) */
.cf-celestial {
  --cf-ring: conic-gradient(from 0deg, #0b1240, #3d4bd6, #0b1240, #8f7bff, #0b1240, #3d4bd6, #0b1240);
  --cf-glow: radial-gradient(#5b62ff, transparent 70%); --cf-speed: 12s; --cf-spark: #ffffff;
}
.cf-inferno {
  --cf-ring: conic-gradient(from 0deg, #ffe46b, #ff7a1a, #e52b12, #ff9a3d, #ffd14a, #ff5a1f, #ffe46b);
  --cf-glow: conic-gradient(from 0deg, #ff5a1f, #ffd14a, #e52b12, #ff5a1f);
  --cf-speed: 2.8s; --cf-spark: #ffb347;
}
.cf-void {
  --cf-ring: conic-gradient(from 0deg, #12001f, #8a2be2, #12001f, #ff3df2, #12001f, #5a1bd6, #12001f);
  --cf-glow: conic-gradient(from 0deg, #8a2be2, transparent 35%, #ff3df2, transparent 75%, #8a2be2);
  --cf-speed: 7s;
}
.cf-royal { --cf-ring: conic-gradient(from 0deg, #fff3b0, #e0a800, #7a4a00, #ffd76a, #a86a07, #e0a800, #fff3b0); --cf-speed: 7s; --cf-glow: radial-gradient(#e0a800, transparent 70%); --cf-sheen: 2.8s; }
.cf-founder {
  --cf-ring: conic-gradient(from 0deg, #6fffb0, #12b886, #e6fff4, #12b886, #6fffb0);
  --cf-glow: radial-gradient(#12b886, transparent 70%); --cf-speed: 10s; --cf-tag: #0b6e50;
}

/* ---- Abzeichen ---- */
.cb {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 7px 0 4px;
  border-radius: 999px;
  border: 1px solid var(--cb-line, rgba(255, 255, 255, 0.18));
  background: var(--cb-bg, rgba(255, 255, 255, 0.08));
  color: var(--cb-fg, #fff);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
  vertical-align: middle;
}
.cb svg { width: 14px; height: 14px; flex: none; }
.cb.is-icon { padding: 0; width: 20px; justify-content: center; }
.cb.is-icon span { display: none; }
.cb-og { --cb-bg: linear-gradient(135deg, #3a2a08, #1c1404); --cb-line: #e2a93a; --cb-fg: #ffd76a; }
.cb-sup1 { --cb-bg: linear-gradient(135deg, #4a2a16, #24140a); --cb-line: #c8803f; --cb-fg: #ffc79a; }
.cb-sup2 { --cb-bg: linear-gradient(135deg, #3b4252, #1d2230); --cb-line: #b9c3d6; --cb-fg: #eef2fa; }
.cb-sup3 { --cb-bg: linear-gradient(135deg, #4a3608, #241a04); --cb-line: #f2b632; --cb-fg: #ffe08a; }
.cb-sup4 { --cb-bg: linear-gradient(135deg, #3a1460, #1a0a2e); --cb-line: #b388ff; --cb-fg: #e7d6ff; box-shadow: 0 0 10px rgba(179, 136, 255, 0.45); }
.cb-founder { --cb-bg: linear-gradient(135deg, #0b3a2c, #06201a); --cb-line: #12b886; --cb-fg: #8ff5cf; }
.cb-champion { --cb-bg: linear-gradient(135deg, #4a0f1a, #22070c); --cb-line: #ff5d5d; --cb-fg: #ffc2c2; }
.cb-top10 { --cb-bg: linear-gradient(135deg, #2a1d4a, #140d24); --cb-line: #9b7bff; --cb-fg: #ddd1ff; }
.cb-team { --cb-bg: linear-gradient(135deg, #0d2c55, #07182f); --cb-line: #4ea1ff; --cb-fg: #cfe5ff; }

/* Einbau der Rahmen: Profil, Start, Rangliste, Arena */
.pf-avatar { margin: 6px 0 14px; line-height: 0; }
.pf-tags { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; }
.pf-tags:has(#pf-badge:empty) { gap: 0; }
.hm-avatar { width: 64px; height: 64px; border: 0; background: none; box-shadow: none; padding: 0; overflow: visible; }
.hm-avatar .cf-tag { display: none; }
.hm-avatar .hm-level { z-index: 6; }
.lb-pod .cf { margin-bottom: calc(var(--s) * 0.18); }
.lb-pod b, .lb-id b { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; }
.lb-pod b .cb, .lb-id b .cb { flex: none; }
.lb-player-badge { display: block; margin-top: 6px; }
.ar-rank-id b .cb { margin-left: 2px; }

/* Sammlung (js/cosmetics.js) */
.scr-cos .scr-body { display: grid; align-content: start; gap: 10px; color: #eef1f8; }
.scr-cos button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.cos-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 22px 18px;
  border-radius: 20px;
  border: 1px solid rgba(124, 140, 255, 0.3);
  background: radial-gradient(110% 120% at 0% 0%, rgba(124, 140, 255, 0.25), transparent 60%), linear-gradient(160deg, #1b2140, #121628);
}
.cos-hero-text { display: grid; gap: 4px; justify-items: start; min-width: 0; }
.cos-hero-text b { font-size: 1.1rem; font-weight: 900; }
.cos-hero-text small { font-size: 0.78rem; color: #cfd6ea; }
.cos-muted { color: #9aa3bd !important; }
.cos-h { margin: 8px 2px 0; font-size: 0.7rem; font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase; color: #9aa3bd; }
.cos-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cos-none { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cos-card {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 20px 6px 10px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.045);
  text-align: center;
  min-width: 0;
}
.cos-card .cf { margin-bottom: 8px; }
.cos-card b { max-width: 100%; font-size: 0.78rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cos-card small { font-size: 0.66rem; color: #9aa3bd; line-height: 1.3; }
.cos-card.is-on { border-color: rgba(110, 231, 160, 0.6); background: rgba(110, 231, 160, 0.08); }
.cos-card.is-on small { color: #6ee7a0; font-weight: 800; }
.cos-card.is-shop small { color: #93c5fd; font-weight: 800; }
.cos-card.is-locked .cf { filter: grayscale(0.85) brightness(0.7); }
.cos-card.is-locked small { color: #9aa3bd; }
.cos-card:active { transform: scale(0.97); }
.cos-badges { display: grid; gap: 6px; }
.cos-badge {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.045);
  text-align: left;
}
.cos-badge small { font-size: 0.72rem; color: #9aa3bd; line-height: 1.35; }
.cos-badge i { font-style: normal; font-weight: 900; color: #6ee7a0; }
.cos-badge.is-on { border-color: rgba(110, 231, 160, 0.6); background: rgba(110, 231, 160, 0.08); }
.cos-badge.is-locked { cursor: default; }
.cos-badge.is-locked .cb { filter: grayscale(0.8); opacity: 0.6; }
.cb-none { --cb-bg: rgba(255, 255, 255, 0.06); padding: 0 9px; color: #9aa3bd; }
.cos-note { margin: 6px 2px 0; font-size: 0.72rem; line-height: 1.4; color: #9aa3bd; }
.cos-buy { display: grid; place-items: center; padding: 22px 0 10px; }
.cos-center { text-align: center; }
.cos-empty { display: grid; justify-items: center; gap: 6px; padding: 40px 16px; text-align: center; }
.cos-empty > span { font-size: 2rem; }
.cos-spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.15); border-top-color: #7c8cff; animation: mk-spin 0.8s linear infinite; }

/* ===== Kopfzeile (Nachtrag T12): Profilbild mit Rahmen, Gold, Gems, Energie ===== */
.header.hd {
  padding: calc(8px + env(safe-area-inset-top, 0px)) 14px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(14, 17, 32, 0.96), rgba(14, 17, 32, 0.86));
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}
.hd button { font-family: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }

.hd-chips { min-width: 0; max-width: 480px; margin: 0 auto; display: flex; gap: 8px; }
.hd-chips .hd-chip { flex: 1 1 0; justify-content: center; }
.hd-chip {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  height: 32px;
  padding: 0 8px 0 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.35);
  font-size: 0.82rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.hd-chip img { width: 20px; height: 20px; object-fit: contain; flex: none; }
.hd-chip > span { overflow: hidden; text-overflow: ellipsis; }
.hd-chip.is-gold { color: #f6c455; }
.hd-chip.is-gems { color: #93c5fd; }
.hd-chip.is-energy { color: #fde68a; }
.hd-chip:active { transform: scale(0.96); }
.hd-plus {
  flex: none;
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 0.72rem;
  font-style: normal;
  line-height: 1;
}
.hd-bolt { font-size: 0.95rem; flex: none; }
.hd-energy { display: grid; gap: 2px; min-width: 0; }
.hd-energy > span:first-child { font-size: 0.74rem; line-height: 1; }
.hd-bar { display: block; width: 100%; min-width: 44px; height: 3px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.hd-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #f59e0b, #fde68a); transition: width 0.4s ease; }
.main-content { margin-top: calc(62px + env(safe-area-inset-top, 0px)); }

/* Rechtstexte in der Mini-App (js/ui.js, openLegal) */
.scr-legal .scr-body { padding: 0; display: flex; }
.legal-frame { flex: 1; width: 100%; min-height: 100%; border: 0; background: #fff; }

/* Gacha: Übersicht nach dem 10er-Zug und „?“-Fenster (js/gacha.js) */
.gx-summary .ui-dialog-body, .gx-info .ui-dialog-body { display: grid; gap: 12px; }
.gx-counts { display: flex; flex-wrap: wrap; gap: 6px; }
.gx-count { padding: 3px 10px; border-radius: 999px; border: 1px solid var(--rc); background: var(--rc-soft); color: var(--rc); font-size: 0.74rem; font-weight: 900; }
.gx-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.gx-item { display: grid; justify-items: center; gap: 3px; padding: 8px 4px; border-radius: 12px; border: 1px solid var(--rc); background: radial-gradient(circle at 50% 30%, var(--rc-soft), rgba(0, 0, 0, 0.3)); text-align: center; min-width: 0; }
.gx-item-icon { width: 40px; height: 40px; display: grid; place-items: center; font-size: 1.4rem; }
.gx-item-icon img { width: 100%; height: 100%; object-fit: contain; }
.gx-item b { max-width: 100%; font-size: 0.6rem; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #fff; }
.gx-item small { font-size: 0.58rem; color: #cfd6ea; }
.gx-hint { margin: 0; font-size: 0.76rem; line-height: 1.45; color: #9aa3bd; }
.gx-loading { padding: 30px 0; text-align: center; color: #9aa3bd; }
.gx-rars { display: grid; gap: 6px; }
.gx-rar { border-radius: 14px; border: 1px solid rgba(255, 255, 255, 0.08); border-left: 3px solid var(--rc); background: linear-gradient(90deg, var(--rc-soft), rgba(255, 255, 255, 0.02) 60%); }
.gx-rar summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 10px 12px; cursor: pointer; list-style: none; }
.gx-rar summary::-webkit-details-marker { display: none; }
.gx-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--rc); box-shadow: 0 0 8px var(--rc-glow); }
.gx-rar summary b { font-size: 0.88rem; color: var(--rc); }
.gx-rar summary small { font-size: 0.7rem; color: #9aa3bd; }
.gx-rar summary em { font-style: normal; font-weight: 900; font-variant-numeric: tabular-nums; color: #fff; }
.gx-rar.is-locked summary em { color: #9aa3bd; font-size: 0.78rem; }
.gx-items { display: grid; gap: 4px; padding: 0 12px 10px; }
.gx-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 0.78rem; }
.gx-row-icon { width: 28px; height: 28px; display: grid; place-items: center; }
.gx-row-icon img { width: 100%; height: 100%; object-fit: contain; }
.gx-row-name { color: #e5e9f5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gx-row-chance { color: #cfd6ea; font-variant-numeric: tabular-nums; }
.gx-pity { display: grid; gap: 6px; }
.gx-pity div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; padding: 10px 12px; border-radius: 14px; border: 1px solid rgba(246, 196, 85, 0.3); background: rgba(246, 196, 85, 0.08); }
.gx-pity b { font-size: 0.84rem; color: #fff; }
.gx-pity small { grid-column: 1; font-size: 0.7rem; color: #9aa3bd; }
.gx-pity em { grid-column: 2; grid-row: 1 / span 2; font-style: normal; font-weight: 900; color: #f6c455; font-variant-numeric: tabular-nums; }

/* ===== Startbildschirm (Nachtrag T12) =====
   Hintergrundbild: nur --ls-image tauschen (z. B. url("/images/loading-bg.jpg")), der Verlauf darüber bleibt. */
#loading-screen.ls {
  --ls-image: url("/images/TraderLegends.png");
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  padding: calc(56px + env(safe-area-inset-top, 0px)) 24px calc(22px + env(safe-area-inset-bottom, 0px));
  background: #070912;
  color: #eef1f8;
  overflow: hidden;
  opacity: 1;
  transition: opacity 0.5s ease;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
#loading-screen.ls::before { content: none; }
.ls-bg {
  position: absolute;
  inset: 0;
  background: var(--ls-image) center / cover no-repeat;
  transform: scale(1.08);
  animation: ls-drift 18s ease-in-out infinite alternate;
}
.ls-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 9, 18, 0.72) 0%, rgba(7, 9, 18, 0.35) 35%, rgba(7, 9, 18, 0.85) 72%, #070912 100%);
}
.ls-glow {
  position: absolute;
  left: 50%;
  top: 22%;
  width: 420px;
  height: 420px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(246, 196, 85, 0.28), rgba(124, 140, 255, 0.12) 45%, transparent 70%);
  filter: blur(10px);
  animation: ls-pulse 4s ease-in-out infinite;
  pointer-events: none;
}
.ls-center, .ls-bottom { position: relative; z-index: 1; display: grid; justify-items: center; text-align: center; }
.ls-center { gap: 10px; }
.ls-logo {
  width: 104px;
  height: 104px;
  padding: 4px;
  border-radius: 28px;
  background: conic-gradient(from 0deg, #ffe08a, #f59e0b, #7c8cff, #ffe08a);
  box-shadow: 0 0 40px rgba(246, 196, 85, 0.35), 0 20px 40px rgba(0, 0, 0, 0.5);
}
#loading-screen .loading-logo-img { width: 100%; height: 100%; padding: 0; border-radius: 24px; object-fit: cover; background: #10131f; }
.ls-title {
  margin: 10px 0 0;
  font-size: 2.1rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  background: linear-gradient(180deg, #fff6d8, #f6c455 60%, #d18c12);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 4px 30px rgba(246, 196, 85, 0.25);
}
.ls-tag { margin: 0; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.22em; text-transform: uppercase; color: #cfd6ea; }
.ls-bottom { gap: 10px; width: 100%; max-width: 360px; margin: 0 auto; }
.ls-status { display: flex; justify-content: space-between; align-items: baseline; width: 100%; gap: 10px; }
#loading-screen .loading-text { margin: 0; font-size: 0.86rem; font-weight: 800; color: #eef1f8; }
.ls-pct { font-size: 0.86rem; font-weight: 900; color: #f6c455; font-variant-numeric: tabular-nums; }
#loading-screen .loading-progress { width: 100%; height: 8px; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 999px; background: rgba(0, 0, 0, 0.45); overflow: hidden; }
#loading-screen .loading-progress-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f59e0b, #ffe08a 60%, #fff6d8);
  box-shadow: 0 0 12px rgba(246, 196, 85, 0.6);
  transition: width 0.45s ease;
}
.ls-tip { min-height: 2.6em; font-size: 0.78rem; line-height: 1.35; color: #cfd6ea; opacity: 0; }
.ls-tip.is-in { animation: ls-tip 0.5s ease forwards; }
#loading-screen .loading-debug { margin: 0; font-size: 0.66rem; color: #9aa3bd; }
#loading-screen .loading-terms { margin: 0; font-size: 0.66rem; line-height: 1.5; color: #9aa3bd; }
#loading-screen .loading-terms-link { color: #cfd6ea; }
.ls-version { display: block; margin-top: 2px; opacity: 0.7; }
@keyframes ls-drift { from { transform: scale(1.08) translate(0, 0); } to { transform: scale(1.14) translate(-1.5%, -1%); } }
@keyframes ls-pulse { 0%, 100% { opacity: 0.7; transform: translate(-50%, -50%) scale(1); } 50% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); } }
@keyframes ls-tip { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ls-bg, .ls-glow { animation: none; } }

/* Expedition: alle Gratis-Rerolls mit Werbefrei-Pass */
.exped-reroll-all {
  display: grid;
  justify-items: center;
  gap: 2px;
  width: 100%;
  margin: 4px 0 10px;
  padding: 11px 14px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #7c8cff, #a855f7);
  color: #fff;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(124, 140, 255, 0.35);
}
.exped-reroll-all small { font-size: 0.68rem; font-weight: 700; opacity: 0.85; }

/* Quests: alle Bonus-Aufgaben mit Werbefrei-Abo */
.qs-claim-all-tasks { width: 100%; margin: 2px 0 8px; padding: 10px 14px; }

/* ===== Onboarding (T8, js/onboarding.js): Ziel-Karte, Willkommenswoche ===== */
.ob-goal {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(124, 140, 255, 0.35);
  background: linear-gradient(135deg, rgba(124, 140, 255, 0.16), rgba(255, 255, 255, 0.02));
}
.ob-goal.is-done { border-color: rgba(52, 211, 153, 0.55); background: linear-gradient(135deg, rgba(52, 211, 153, 0.16), rgba(255, 255, 255, 0.02)); }
.ob-goal-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ob-goal-head small { font-size: 0.66rem; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; color: #aab4ff; }
.ob-steps { display: flex; gap: 3px; }
.ob-steps i { width: 10px; height: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.14); }
.ob-steps i.is-on { background: #6ee7a0; }
.ob-steps i.is-now { background: #aab4ff; }
.ob-goal-main { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.ob-goal-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: rgba(0, 0, 0, 0.3); font-size: 1.3rem; }
.ob-goal-text { display: grid; gap: 5px; min-width: 0; }
.ob-goal-text b { font-size: 0.92rem; font-weight: 900; color: #fff; }
.ob-goal-reward { display: flex; flex-wrap: wrap; gap: 4px; }
.hm .ob-btn, .ob-btn {
  padding: 9px 14px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}
.ob-btn.is-claim { background: linear-gradient(135deg, #34d399, #10b981); color: #052417; box-shadow: 0 6px 16px rgba(16, 185, 129, 0.3); }
.ob-btn.is-loading { opacity: 0.6; pointer-events: none; }
.ob-lock { font-size: 0.74rem; font-weight: 800; color: #9aa3bd; white-space: nowrap; }
.hm .ob-week, .ob-week {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.045);
  color: #eef1f8;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.ob-week.is-ready { border-color: rgba(246, 196, 85, 0.6); background: linear-gradient(135deg, rgba(246, 196, 85, 0.18), rgba(255, 255, 255, 0.02)); animation: hm-glow 2.2s ease-in-out infinite; }
.ob-week-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: rgba(0, 0, 0, 0.3); font-size: 1.3rem; }
.ob-week-text { display: grid; gap: 2px; }
.ob-week-text b { font-size: 0.9rem; font-weight: 900; }
.ob-week-text small { font-size: 0.74rem; color: #cfd6ea; }
.ob-week > i { font-style: normal; font-weight: 900; color: #f6c455; }
.ob-week-sheet .ui-dialog-body { display: grid; gap: 12px; }
.ob-week-intro { margin: 0; font-size: 0.8rem; line-height: 1.45; color: #9aa3bd; }
.ob-days { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ob-day {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 6px;
  min-height: 86px;
  padding: 10px 4px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  text-align: center;
}
.ob-day small { font-size: 0.64rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; color: #9aa3bd; }
.ob-day-reward { display: grid; gap: 4px; justify-items: center; }
.ob-day.is-big { grid-column: span 2; border-color: rgba(168, 85, 247, 0.5); background: linear-gradient(135deg, rgba(168, 85, 247, 0.16), rgba(255, 255, 255, 0.02)); }
.ob-day.is-today { border-color: rgba(246, 196, 85, 0.8); background: rgba(246, 196, 85, 0.12); box-shadow: 0 0 18px rgba(246, 196, 85, 0.25); }
.ob-day.is-claimed { opacity: 0.55; }
.ob-day-check { position: absolute; top: 6px; right: 8px; font-style: normal; font-weight: 900; color: #6ee7a0; }
.ui-tutorial.is-hint .tut-step { color: #f6c455; }

/* Sperr-Bildschirm (Admin-Center AC4, public/js/ban.js) */
.ui-dialog-body .ban-help { color: var(--ui-muted); font-size: 0.9em; }
