/* Egységes challenge-stílus az egész oldalra */

/* Globális színek és változók */
:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --primary-color: #667eea;
  --secondary-color: #764ba2;
  --gold-gradient: linear-gradient(45deg, #FFD700, #FFA500);
  --shadow-light: 0 4px 15px rgba(102,126,234,0.2);
  --shadow-medium: 0 8px 32px rgba(102,126,234,0.3);
  --shadow-heavy: 0 12px 40px rgba(102,126,234,0.4);
}

/* Általános body és háttér */
body {
  background: linear-gradient(135deg, #f8fafc 0%, #e3f2fd 100%) !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #2d3748;
}

/* Navbar egységesítés */
.navbar, .main-nav {
  background: var(--primary-gradient) !important;
  box-shadow: var(--shadow-medium);
  border: none !important;
}

.navbar-brand, .nav-link {
  color: white !important;
  font-weight: 500;
}

.nav-link:hover {
  color: #ffd700 !important;
  transform: translateY(-1px);
  transition: all 0.3s ease;
}

/* Általános gombok */
.btn-primary {
  background: var(--primary-gradient) !important;
  border: none !important;
  border-radius: 25px !important;
  padding: 0.75rem 1.5rem !important;
  font-weight: 600 !important;
  box-shadow: var(--shadow-light) !important;
  transition: all 0.3s ease !important;
}

.btn-primary:hover {
  transform: translateY(-2px) !important;
  box-shadow: var(--shadow-medium) !important;
}

.btn-success {
  background: linear-gradient(135deg, #28a745, #20c997) !important;
  border: none !important;
  border-radius: 25px !important;
  box-shadow: 0 4px 15px rgba(40,167,69,0.3) !important;
}

.btn-warning {
  background: var(--gold-gradient) !important;
  color: #333 !important;
  border: none !important;
  border-radius: 25px !important;
}

/* Általános kártyák */
.card {
  border: none !important;
  border-radius: 15px !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08) !important;
  transition: all 0.3s ease !important;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15) !important;
}

.card-header {
  background: var(--primary-gradient) !important;
  color: white !important;
  border: none !important;
  font-weight: 600 !important;
}

/* Breadcrumb */
.breadcrumb {
  background: rgba(255,255,255,0.7) !important;
  border-radius: 25px !important;
  backdrop-filter: blur(10px);
}

/* Challenge Header */
.challenge-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 15px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.challenge-stats {
  background: rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 1rem;
  backdrop-filter: blur(10px);
  min-width: 120px;
  flex: 1 1 0;
  margin: 0 0.5rem;
}

/* Mobil responsive stílusok */
@media (max-width: 767.98px) {
  .challenge-header .row.g-3 {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: stretch;
    gap: 0.4rem;
    margin: 0 auto;
    width: 100%;
    padding: 0;
    max-width: 300px;
  }
  
  .challenge-header .col-md-4 {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    max-width: none;
    padding: 0;
  }
  
  .challenge-stats {
    padding: 0.4rem 0.2rem;
    font-size: 0.72rem;
    width: 100%;
    margin: 0;
    min-height: auto;
    min-width: auto;
    text-align: center;
  }
  
  .challenge-stats i {
    font-size: 0.9rem !important;
    margin-bottom: 0.2rem !important;
  }
  
  .challenge-stats .h4, 
  .challenge-stats .h5 {
    font-size: 0.75rem !important;
    margin-bottom: 0.1rem !important;
    line-height: 1.1;
  }
  
  .challenge-stats small {
    font-size: 0.6rem;
    line-height: 1;
  }
  
  .challenge-header {
    padding: 1rem 0.5rem;
  }
  
  .challenge-header .d-flex.justify-content-center h1 {
    font-size: 1.4rem;
  }
  
  .challenge-header .trophy-icon, 
  .challenge-header .coins-icon {
    font-size: 2rem !important;
  }
}

/* Animációk */
.trophy-icon {
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

/* Challenge Card Header - Harmonizált kártya fejléc */
.challenge-card-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: #fff !important;
  font-weight: bold;
  font-size: 1rem;
  border: none;
  padding: 1rem;
  text-align: center;
  letter-spacing: 0.5px;
}

/* Challenge Card Title szín */
.challenge-title-color {
  color: #764ba2 !important;
}

/* Challenge Card Item szín */
.challenge-item-color {
  color: #667eea !important;
}

/* Bejelentkezés és nevezés gomb */
.challenge-btn-login {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: #fff !important;
  font-weight: bold;
  font-size: 1rem;
  border: none;
  border-radius: 25px;
  padding: 0.75rem 1.5rem;
  box-shadow: 0 8px 20px rgba(102,126,234,0.3);
  transition: all 0.3s ease;
}

.challenge-btn-login:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(102,126,234,0.4);
}

.coins-icon {
  animation: spin 3s linear infinite;
}

@keyframes spin {
  from { transform: rotateY(0deg); }
  to { transform: rotateY(360deg); }
}

/* Challenge Badge */
.challenge-badge {
  background: linear-gradient(45deg, #FFD700, #FFA500);
  color: #333;
  border: none;
  border-radius: 25px;
  padding: 0.5rem 1rem;
  font-weight: bold;
  box-shadow: 0 4px 15px rgba(255,215,0,0.3);
  animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
  from { box-shadow: 0 4px 15px rgba(255,215,0,0.3); }
  to { box-shadow: 0 4px 25px rgba(255,215,0,0.6); }
}

/* Form elemek egységesítése */
.form-control, .form-select {
  border: 2px solid #e3f2fd !important;
  border-radius: 15px !important;
  padding: 0.75rem 1rem !important;
  font-size: 1rem !important;
  transition: all 0.3s ease !important;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary-color) !important;
  box-shadow: 0 0 0 0.2rem rgba(102,126,234,0.25) !important;
}

/* Alert stílusok */
.alert {
  border: none !important;
  border-radius: 15px !important;
  box-shadow: var(--shadow-light) !important;
}

.alert-success {
  background: linear-gradient(135deg, #d4edda, #c3e6cb) !important;
  color: #155724 !important;
}

.alert-danger {
  background: linear-gradient(135deg, #f8d7da, #f5c6cb) !important;
  color: #721c24 !important;
}

.alert-info {
  background: linear-gradient(135deg, #d1ecf1, #bee5eb) !important;
  color: #0c5460 !important;
}

/* Táblázatok szépítése */
.table {
  border-radius: 15px !important;
  overflow: hidden !important;
  box-shadow: var(--shadow-light) !important;
}

.table th {
  background: var(--primary-gradient) !important;
  color: white !important;
  border: none !important;
  font-weight: 600 !important;
}

.table td {
  border-color: #e3f2fd !important;
  vertical-align: middle !important;
}

/* Progress bar */
.progress {
  border-radius: 25px !important;
  background: rgba(102,126,234,0.1) !important;
}

.progress-bar {
  background: var(--primary-gradient) !important;
}

/* Badge stílusok */
.badge {
  border-radius: 25px !important;
  padding: 0.5rem 1rem !important;
  font-size: 0.85rem !important;
}

.badge.bg-primary {
  background: var(--primary-gradient) !important;
}

.badge.bg-success {
  background: linear-gradient(135deg, #28a745, #20c997) !important;
}

.badge.bg-warning {
  background: var(--gold-gradient) !important;
  color: #333 !important;
}

/* Footer egységesítés */
footer {
  background: var(--primary-gradient) !important;
  color: white !important;
  margin-top: auto;
}

/* User Stats Card - Felhasználói statisztika kártya */
.user-stats-card {
  background: var(--primary-gradient);
  color: white;
  padding: 0.5rem 0;
  margin-bottom: 0;
  box-shadow: 0 2px 10px rgba(102,126,234,0.2);
}

.stats-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.375rem;
}

.stats-avatar {
  flex-shrink: 0;
}

.stats-avatar a {
  display: block;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.stats-avatar a:hover {
  transform: scale(1.05);
}

.avatar-img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.9);
  object-fit: cover;
  transition: border-color 0.3s ease;
}

.stats-avatar a:hover .avatar-img {
  border-color: #ffd700;
}

.stats-items {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex: 1;
  min-width: 0;
}

.stats-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 0;
}

.stats-label {
  font-size: 0.85rem;
  opacity: 0.9;
  margin-bottom: 0.25rem;
  font-weight: 500;
}

.stats-value {
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
}

.league-icon {
  font-size: 1.1rem;
}

.league-name {
  font-size: 0.9rem;
  font-weight: 600;
}

.stats-divider {
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,0.3);
  flex-shrink: 0;
}

/* Mobil responsive */
@media (max-width: 767.98px) {
  .stats-content {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
    padding: 1rem 0.5rem;
  }
  
  .avatar-img {
    width: 50px;
    height: 50px;
  }
  
  .stats-items {
    justify-content: center;
    gap: 1rem;
    width: 100%;
  }
  
  .stats-item {
    flex: 1;
    min-width: 0;
  }
  
  .stats-divider {
    width: 1px;
    height: 30px;
    align-self: center;
  }
  
  .league-icon {
    font-size: 1rem;
  }
  
  .league-name {
    font-size: 0.8rem;
  }
  
  .stats-label {
    font-size: 0.75rem;
  }
  
  .stats-value {
    font-size: 0.9rem;
    justify-content: center;
  }
  
  .stats-value .league-icon {
    font-size: 0.9rem;
  }
  
  .stats-value .league-name {
    font-size: 0.75rem;
  }
}

/* User stats card specifikus liga stílusok */
.user-stats-card .stats-value .league-icon {
  font-size: 1rem;
}

.user-stats-card .stats-value .league-name {
  font-size: 0.85rem;
}

@media (max-width: 767.98px) {
  .user-stats-card .stats-value .league-icon {
    font-size: 0.9rem;
  }
  
  .user-stats-card .stats-value .league-name {
    font-size: 0.75rem;
  }
}

/* Tablet nézet */
@media (min-width: 768px) and (max-width: 991.98px) {
  .stats-items {
    gap: 1rem;
  }
  
  .stats-label {
    font-size: 0.8rem;
  }
  
  .stats-value {
    font-size: 0.95rem;
  }
}

/* Tantusz levonás popup */
.tantusz-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
  padding: 30px 40px;
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.3);
  z-index: 9999;
  text-align: center;
  font-size: 18px;
  font-weight: bold;
  animation: popupFadeIn 0.3s ease-out;
}

@keyframes popupFadeIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
  to { opacity: 1; transform: translate(-50%, -50()) scale(1); }
}

/* Start button stílusok */
.challenge-start-section {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 2rem;
  text-align: center;
  color: white;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.challenge-start-btn {
  background: linear-gradient(45deg, #FFD700, #FFA500);
  border: none;
  color: #333;
  font-weight: bold;
  padding: 12px 24px;
  border-radius: 25px;
  font-size: 18px;
  box-shadow: 0 4px 15px rgba(255,215,0,0.3);
  transition: all 0.3s ease;
}

.challenge-start-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,215,0,0.4);
}

.challenge-start-btn:disabled {
  background: #6c757d;
  color: white;
  cursor: not-allowed;
  box-shadow: none;
}

/* Desktop navbar stats */
.desktop-user-stats {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
}

.navbar-stats-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255,255,255,0.1);
  padding: 0.5rem 1rem;
  border-radius: 25px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
}

.navbar-stats-avatar {
  flex-shrink: 0;
}

.navbar-avatar-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.3);
  transition: all 0.3s ease;
}

.navbar-avatar-img:hover {
  border-color: #ffd700;
  transform: scale(1.1);
}

.navbar-stats-items {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: white;
  font-size: 0.9rem;
  font-weight: 500;
}

.navbar-stats-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
}

.navbar-stats-divider {
  width: 1px;
  height: 20px;
  background: rgba(255,255,255,0.3);
  flex-shrink: 0;
}

.navbar-league-icon {
  font-size: 1rem;
}

.navbar-league-name {
  font-size: 0.8rem;
  font-weight: 600;
}

@media (max-width: 1199.98px) {
  .desktop-user-stats {
    display: none !important;
  }
}

/* Kattintható kijelentkezett állapot stílusai */
.navbar-stats-container[onclick],
.user-stats-card[onclick] {
  transition: all 0.3s ease;
}

.navbar-stats-container[onclick]:hover {
  background: rgba(255,255,255,0.2);
  transform: scale(1.02);
}

.user-stats-card[onclick]:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(102,126,234,0.3);
}

.login-prompt {
  transition: all 0.3s ease;
}
