/**
 * gamification-styles.css
 * Mordheim Campaign Manager - Schattengold & Level UI
 */

/* ===== SPIELER BADGE ===== */

.gf-player-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(30, 20, 10, 0.8), rgba(50, 35, 20, 0.6));
  border: 1px solid rgba(201, 169, 89, 0.3);
  font-size: 0.78rem;
  white-space: nowrap;
}

.gf-level-icon { font-size: 1rem; line-height: 1; }

.gf-level-num {
  font-family: 'Cinzel', serif;
  font-weight: 600;
  color: var(--color-gold, #c9a959);
  font-size: 0.82rem;
}

.gf-rank-text {
  color: var(--text-secondary, #b0a080);
  font-size: 0.82rem;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gf-sg-display {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 8px;
  background: rgba(201, 169, 89, 0.12);
  border: 1px solid rgba(201, 169, 89, 0.25);
  color: var(--color-gold, #c9a959);
  font-family: 'Cinzel', serif;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: default;
}

.gf-sg-display:hover {
  background: rgba(201, 169, 89, 0.2);
  border-color: rgba(201, 169, 89, 0.4);
}

.gf-sg-icon { font-size: 0.9rem; }

/* ===== LEVEL FORTSCHRITTSBALKEN ===== */

.gf-xp-bar-container {
  width: 100%;
  max-width: 200px;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.gf-xp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #c9a959, #e8d48b);
  border-radius: 3px;
  transition: width 0.6s ease-out;
  min-width: 2px;
}

.gf-xp-text {
  font-size: 0.68rem;
  color: var(--text-muted, #888);
  margin-top: 2px;
}

/* ===== SG TRANSAKTIONSLOG ===== */

.gf-transaction-log {
  max-height: 300px;
  overflow-y: auto;
  padding: 8px 0;
}

.gf-transaction {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.15s;
}

.gf-transaction:hover { background: rgba(255, 255, 255, 0.03); }
.gf-transaction:last-child { border-bottom: none; }

.gf-tx-amount {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 0.9rem;
  min-width: 65px;
  text-align: right;
}

.gf-tx-amount.positive { color: #4ade80; }
.gf-tx-amount.negative { color: #f87171; }

.gf-tx-reason {
  flex: 1;
  font-size: 0.8rem;
  color: var(--text-secondary, #b0a080);
  line-height: 1.3;
}

.gf-tx-time {
  font-size: 0.68rem;
  color: var(--text-muted, #666);
  white-space: nowrap;
}

.gf-tx-type-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.gf-tx-type-badge.battle  { background: rgba(139, 0, 0, 0.3); color: #f87171; }
.gf-tx-type-badge.event   { background: rgba(59, 130, 246, 0.2); color: #93c5fd; }
.gf-tx-type-badge.bounty  { background: rgba(234, 88, 12, 0.2); color: #fb923c; }
.gf-tx-type-badge.content { background: rgba(34, 197, 94, 0.2); color: #86efac; }
.gf-tx-type-badge.social  { background: rgba(168, 85, 247, 0.2); color: #c4b5fd; }
.gf-tx-type-badge.system  { background: rgba(201, 169, 89, 0.2); color: #c9a959; }
.gf-tx-type-badge.bet     { background: rgba(236, 72, 153, 0.2); color: #f9a8d4; }

/* ===== SPOTTNAMEN ===== */

.gf-taunt-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.3);
  font-size: 0.72rem;
  color: #c4b5fd;
  font-style: italic;
  cursor: help;
  position: relative;
}

.gf-taunt-badge::before {
  content: '\1F608';
  font-size: 0.8rem;
  font-style: normal;
}

.gf-taunt-badge:hover { background: rgba(168, 85, 247, 0.25); }

.gf-taunt-badge .gf-taunt-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 12, 8, 0.95);
  border: 1px solid rgba(168, 85, 247, 0.4);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 0.7rem;
  font-style: normal;
  white-space: nowrap;
  z-index: 100;
  color: #ddd;
}

.gf-taunt-badge:hover .gf-taunt-tooltip { display: block; }

/* ===== LEVEL-UP POPUP ===== */

.gf-levelup-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50000;
  animation: gf-fadeIn 0.3s ease-out;
}

.gf-levelup-card {
  background: linear-gradient(135deg, #1a1208, #2a1a0a);
  border: 2px solid #c9a959;
  border-radius: 16px;
  padding: 0;
  text-align: center;
  max-width: 520px;
  width: 94%;
  box-shadow:
    0 0 40px rgba(201, 169, 89, 0.3),
    0 0 80px rgba(201, 169, 89, 0.1),
    inset 0 0 30px rgba(201, 169, 89, 0.05);
  animation: gf-scaleIn 0.4s ease-out;
  overflow: hidden;
}

.gf-levelup-sparkle {
  font-size: 2rem;
  margin-bottom: 8px;
  animation: gf-sparkle 1.5s infinite;
}

.gf-levelup-title,
.gf-levelup-subtitle {
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  color: #c9a959;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 10px;
}

.gf-levelup-level {
  font-family: 'Cinzel', serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: #e8d48b;
  line-height: 1;
  margin-bottom: 8px;
  opacity: 0.85;
}

.gf-levelup-rank {
  font-family: 'Cinzel', serif;
  font-size: 2rem;
  font-weight: 700;
  color: #c9a959;
  margin-bottom: 4px;
  letter-spacing: 2px;
  text-shadow: 0 0 20px rgba(201, 169, 89, 0.3);
}

.gf-levelup-quote {
  font-style: italic;
  font-size: 0.85rem;
  color: var(--text-muted, #888);
  margin-bottom: 24px;
  line-height: 1.4;
}

.gf-levelup-dismiss {
  padding: 10px 32px;
  border: 1px solid rgba(201, 169, 89, 0.5);
  border-radius: 8px;
  background: rgba(201, 169, 89, 0.1);
  color: #c9a959;
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.gf-levelup-dismiss:hover {
  background: rgba(201, 169, 89, 0.25);
  border-color: #c9a959;
}

/* ===== SG REWARD TOAST ===== */

.gf-reward-toast {
  position: fixed;
  top: 80px;
  right: 20px;
  background: linear-gradient(135deg, rgba(30, 20, 10, 0.95), rgba(50, 35, 20, 0.9));
  border: 1px solid rgba(201, 169, 89, 0.5);
  border-radius: 12px;
  padding: 16px 20px;
  min-width: 260px;
  max-width: 350px;
  z-index: 40000;
  animation: gf-slideInRight 0.4s ease-out;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.gf-reward-toast.hiding {
  animation: gf-slideOutRight 0.3s ease-in forwards;
}

.gf-reward-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(201, 169, 89, 0.2);
}

.gf-reward-header-icon { font-size: 1.3rem; }

.gf-reward-header-text {
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  color: #c9a959;
  font-weight: 600;
}

.gf-reward-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 0;
  font-size: 0.8rem;
}

.gf-reward-reason { color: var(--text-secondary, #b0a080); }

.gf-reward-amount {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  color: #4ade80;
  white-space: nowrap;
}

.gf-reward-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(201, 169, 89, 0.2);
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 0.95rem;
}

.gf-reward-total-label { color: #c9a959; }
.gf-reward-total-amount { color: #e8d48b; font-size: 1.1rem; }

.gf-reward-balance {
  text-align: right;
  font-size: 0.72rem;
  color: var(--text-muted, #666);
  margin-top: 4px;
}

/* ===== RANKING (Dashboard Leaderboard) ===== */

.gf-ranking-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background 0.15s;
}

.gf-ranking-row:hover { background: rgba(255, 255, 255, 0.04); }

.gf-ranking-pos {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-muted, #666);
  min-width: 28px;
  text-align: center;
}

.gf-ranking-pos.first  { color: #e8d48b; }
.gf-ranking-pos.second { color: #c0c0c0; }
.gf-ranking-pos.third  { color: #cd7f32; }

.gf-ranking-name {
  flex: 1;
  font-size: 0.88rem;
  color: var(--text-primary, #ddd);
}

.gf-ranking-value {
  font-family: 'Cinzel', serif;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-gold, #c9a959);
}

.gf-ranking-sub {
  font-size: 0.7rem;
  color: var(--text-muted, #666);
}

/* ===== KRIEGSERKLAERUNG BANNER ===== */

.gf-war-banner {
  background: linear-gradient(135deg, rgba(139, 0, 0, 0.3), rgba(80, 0, 0, 0.2));
  border: 1px solid rgba(220, 38, 38, 0.4);
  border-radius: 8px;
  padding: 12px 16px;
  margin: 8px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: gf-warPulse 3s ease-in-out infinite;
}

.gf-war-icon { font-size: 1.5rem; }

.gf-war-text {
  flex: 1;
  font-size: 0.85rem;
  color: #fca5a5;
  line-height: 1.3;
}

.gf-war-text strong {
  color: #f87171;
  font-family: 'Cinzel', serif;
}

/* ===== ANIMATIONEN ===== */

@keyframes gf-fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes gf-scaleIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes gf-sparkle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.15); }
}

@keyframes gf-slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes gf-slideOutRight {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(40px); }
}

@keyframes gf-warPulse {
  0%, 100% { border-color: rgba(220, 38, 38, 0.3); }
  50% { border-color: rgba(220, 38, 38, 0.6); }
}

/* ===== RESPONSIVE ===== */

@media (max-width: 640px) {
  .gf-player-badge { padding: 2px 8px; font-size: 0.72rem; }
  .gf-rank-text { display: none; }
  .gf-levelup-card { max-width: 94%; }
  .gf-levelup-rank { font-size: 1.6rem; }
  .gf-levelup-level { font-size: 1.1rem; }
  .gf-reward-toast { right: 10px; left: 10px; min-width: auto; }
  .gf-sg-display { font-size: 0.72rem; padding: 2px 6px; }
}
/* ===================================================================
   KRIEGSERKLÄRUNG v2 — Phase 2 Banner Styles
   Ans Ende von gamification-styles.css anfügen
   =================================================================== */

/* --- Defender Banner (dramatisch + CTA) --- */
.gf-war-banner.gf-war-defender {
  position: relative;
  overflow: hidden;
  border-color: #8B0000;
  background: linear-gradient(135deg, rgba(139, 0, 0, 0.15), rgba(20, 18, 15, 0.9));
  animation: warPulse 3s ease-in-out infinite;
}

.gf-war-banner.gf-war-defender .gf-war-banner-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.15;
  pointer-events: none;
}

.gf-war-banner .gf-war-banner-content {
  position: relative;
  z-index: 1;
  padding: 4px 0;
}

.gf-war-banner-title {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #f87171;
  margin-bottom: 6px;
}

.gf-war-banner-text {
  font-size: 0.88rem;
  color: var(--text-primary, #ddd);
  margin-bottom: 4px;
}

.gf-war-banner-pot {
  font-size: 0.82rem;
  color: var(--color-gold, #c9a959);
  margin-bottom: 8px;
}

.gf-war-banner-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.gf-war-btn-fight {
  background: linear-gradient(135deg, #8B0000, #a52a2a);
  color: #fff;
  border: 1px solid rgba(255, 100, 100, 0.3);
  padding: 6px 18px;
  border-radius: 6px;
  cursor: pointer;
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  font-weight: 700;
  transition: all 0.2s;
}

.gf-war-btn-fight:hover {
  background: linear-gradient(135deg, #a52a2a, #c0392b);
  box-shadow: 0 0 12px rgba(139, 0, 0, 0.5);
  transform: translateY(-1px);
}

.gf-war-btn-withdraw {
  background: transparent;
  color: var(--text-muted, #8a7e6b);
  border: 1px solid var(--border-color, #3a3631);
  padding: 5px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.78rem;
  transition: all 0.2s;
  font-family: inherit;
}

.gf-war-btn-withdraw:hover {
  border-color: #f87171;
  color: #f87171;
}

/* --- Attacker Banner (sachlich + Status) --- */
.gf-war-banner.gf-war-attacker {
  border-color: var(--color-gold, #c9a959);
  background: rgba(201, 169, 89, 0.06);
}

.gf-war-banner.gf-war-attacker .gf-war-banner-title {
  color: var(--color-gold, #c9a959);
}

/* --- Pot Highlight --- */
.gf-war-pot {
  font-size: 0.78rem;
  color: var(--color-gold, #c9a959);
  font-weight: 600;
}

/* --- Puls-Animation --- */
@keyframes warPulse {
  0%, 100% { border-color: rgba(139, 0, 0, 0.4); }
  50% { border-color: rgba(139, 0, 0, 0.8); box-shadow: 0 0 15px rgba(139, 0, 0, 0.15); }
}

/* --- Responsive --- */
@media (max-width: 600px) {
  .gf-war-banner-title {
    font-size: 0.95rem;
  }
  .gf-war-banner-actions {
    flex-direction: column;
  }
}

/* ===== SCHANDNAME-BANNER (pulsierend) ===== */

.gf-taunt-banner {
  background: linear-gradient(135deg, rgba(88, 28, 135, 0.2), rgba(30, 10, 50, 0.4));
  border: 1px solid rgba(168, 85, 247, 0.4);
  border-radius: 10px;
  padding: 14px 18px;
  margin: 10px 0;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  animation: tauntPulse 3s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}

.gf-taunt-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.06), transparent);
  animation: tauntShimmer 4s ease-in-out infinite;
}

.gf-taunt-banner-icon {
  font-size: 2rem;
  animation: tauntBounce 2s ease-in-out infinite;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  padding-top: 2px;
}

.gf-taunt-banner-content {
  flex: 1;
  position: relative;
  z-index: 1;
}

.gf-taunt-banner-cryer {
  font-size: 0.78rem;
  color: var(--text-muted, #888);
  font-style: italic;
  margin-bottom: 4px;
}

.gf-taunt-banner-name {
  font-family: 'Cinzel', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #c4b5fd;
  font-style: italic;
  text-shadow: 0 0 12px rgba(168, 85, 247, 0.3);
}

.gf-taunt-banner-meta {
  font-size: 0.82rem;
  color: var(--text-secondary, #aaa);
  margin-top: 4px;
}

.gf-taunt-banner-meta strong {
  color: #c4b5fd;
}

.gf-taunt-banner-timer {
  font-family: 'Cinzel', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: rgba(168, 85, 247, 0.5);
  min-width: 40px;
  text-align: center;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  padding-top: 8px;
}

.gf-taunt-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.gf-taunt-btn {
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-family: 'Cinzel', serif;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid rgba(168, 85, 247, 0.3);
  background: rgba(168, 85, 247, 0.1);
  color: #c4b5fd;
  transition: all 0.2s;
}

.gf-taunt-btn:hover:not(.disabled) {
  background: rgba(168, 85, 247, 0.25);
  border-color: rgba(168, 85, 247, 0.6);
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.2);
}

.gf-taunt-btn.disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.gf-taunt-btn-dismiss {
  border-color: rgba(201, 169, 89, 0.3);
  background: rgba(201, 169, 89, 0.08);
  color: var(--color-gold, #c9a959);
}

.gf-taunt-btn-dismiss:hover:not(.disabled) {
  background: rgba(201, 169, 89, 0.2);
  border-color: rgba(201, 169, 89, 0.5);
}

.gf-taunt-btn-hint {
  font-size: 0.72rem;
  color: var(--text-muted, #666);
  font-style: italic;
}

.gf-taunt-btn-hint strong {
  color: #c4b5fd;
}

@keyframes tauntPulse {
  0%, 100% { border-color: rgba(168, 85, 247, 0.3); box-shadow: none; }
  50% { border-color: rgba(168, 85, 247, 0.7); box-shadow: 0 0 20px rgba(168, 85, 247, 0.12); }
}

@keyframes tauntShimmer {
  0%, 100% { transform: translateX(-100%); }
  50% { transform: translateX(100%); }
}

@keyframes tauntBounce {
  0%, 100% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(1.1) rotate(-5deg); }
  75% { transform: scale(1.05) rotate(3deg); }
}

@media (max-width: 600px) {
  .gf-taunt-banner { padding: 10px 14px; gap: 10px; }
  .gf-taunt-banner-name { font-size: 1rem; }
  .gf-taunt-banner-actions { flex-direction: column; align-items: flex-start; }
}

/* ===== SCHANDNAME-BANNER (pulsierend) ===== */

.gf-taunt-banner {
  background: linear-gradient(135deg, rgba(88, 28, 135, 0.2), rgba(30, 10, 50, 0.4));
  border: 1px solid rgba(168, 85, 247, 0.4);
  border-radius: 10px;
  padding: 14px 18px;
  margin: 10px 0;
  display: flex;
  align-items: center;
  gap: 14px;
  animation: tauntPulse 3s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}

.gf-taunt-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.06), transparent);
  animation: tauntShimmer 4s ease-in-out infinite;
}

.gf-taunt-banner-icon {
  font-size: 2rem;
  animation: tauntBounce 2s ease-in-out infinite;
  position: relative;
  z-index: 1;
}

.gf-taunt-banner-content {
  flex: 1;
  position: relative;
  z-index: 1;
}

.gf-taunt-banner-cryer {
  font-size: 0.78rem;
  color: var(--text-muted, #888);
  font-style: italic;
  margin-bottom: 4px;
}

.gf-taunt-banner-name {
  font-family: 'Cinzel', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #c4b5fd;
  font-style: italic;
  text-shadow: 0 0 12px rgba(168, 85, 247, 0.3);
}

.gf-taunt-banner-meta {
  font-size: 0.82rem;
  color: var(--text-secondary, #aaa);
  margin-top: 4px;
}

.gf-taunt-banner-meta strong {
  color: #c4b5fd;
}

.gf-taunt-banner-timer {
  font-family: 'Cinzel', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: rgba(168, 85, 247, 0.6);
  min-width: 40px;
  text-align: center;
  position: relative;
  z-index: 1;
}

@keyframes tauntPulse {
  0%, 100% { border-color: rgba(168, 85, 247, 0.3); box-shadow: none; }
  50% { border-color: rgba(168, 85, 247, 0.7); box-shadow: 0 0 20px rgba(168, 85, 247, 0.15); }
}

@keyframes tauntShimmer {
  0%, 100% { transform: translateX(-100%); }
  50% { transform: translateX(100%); }
}

@keyframes tauntBounce {
  0%, 100% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(1.1) rotate(-5deg); }
  75% { transform: scale(1.05) rotate(3deg); }
}

@media (max-width: 600px) {
  .gf-taunt-banner {
    padding: 10px 14px;
    gap: 10px;
  }
  .gf-taunt-banner-name {
    font-size: 1rem;
  }
}
