body {
  margin: 0;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #f2e9e4;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  background: linear-gradient(135deg, #22223b, #9a8c98);
  width: 100vw;
  height: 20px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 20px;
}
.profile {
  position: absolute;
  top: 14px;
  right: 2rem;
  z-index: 100;
}
.profile img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2.5px solid #9a8c98;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  background: #fff;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.profile img:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Profile Dropdown */
.profile-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
}

.profile-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-content {
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.1);
  min-width: 200px;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.dropdown-item {
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.2s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  color: #333;
}

.dropdown-item:hover {
  background: #f8f9fa;
}

.dropdown-item.guest-info {
  background: #f0f8ff;
  color: #666;
  cursor: default;
  font-style: italic;
}

.dropdown-item.guest-info:hover {
  background: #f0f8ff;
}

.dropdown-icon {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

.dropdown-divider {
  height: 1px;
  background: #e9ecef;
  margin: 4px 0;
}

.user-info {
  padding: 16px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-bottom: 1px solid #dee2e6;
}

.username {
  display: block;
  font-weight: 600;
  color: #22223b;
  font-size: 1rem;
  margin-bottom: 4px;
}

.user-email {
  display: block;
  font-size: 0.85rem;
  color: #666;
  opacity: 0.8;
}

/* Logout button special styling */
#logout-btn {
  color: #dc3545;
}

#logout-btn:hover {
  background: #fff5f5;
  color: #c82333;
}

/* Login/Register buttons styling */
#login-btn, #register-btn {
  color: #22223b;
  font-weight: 500;
}

#login-btn:hover, #register-btn:hover {
  background: #f0f8ff;
  color: #1a1a2e;
}

.header-balance {
  padding: 8px 16px;
  border-radius: 12px;
  font-weight: 600;
  background: linear-gradient(135deg, #f4d03f 0%, #f7dc6f 100%);
  color: #1a1a1a;
  font-size: 1.1rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 8px rgba(244, 208, 63, 0.25);
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 10;
}

.header-balance::before {
  content: "🪙";
  font-size: 1.5rem;
  line-height: 1;
}

main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 80px;
}

.slot-cards {
  display: flex;
  gap: 2rem;
  justify-content: flex-start;
  align-items: flex-end;
  flex-wrap: wrap;
}

.slot-card {
  width: 160px;
  height: 284px; /* 9:16 aspect ratio */
  background: linear-gradient(135deg, #fff 70%, #e0c3fc 100%);
  border-radius: 22px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.13);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 600;
  color: #4a4e69;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s;
  border: 2px solid #9a8c98;
  position: relative;
  background-clip: padding-box;
}
.slot-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 12px 32px rgba(0,0,0,0.18);
  border-color: #22223b;
}

.ad-card {
  width: 400px;
  height: 284px; /* Matched to slot card height for consistency */
  background: linear-gradient(135deg, #ffe3e3 70%, #b8c6db 100%);
  border-radius: 26px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.13);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border: 2.5px solid #9a8c98;
}

.slideshow {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.slide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.7s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: bold;
  color: #22223b;
  background: transparent;
}
.slide.active {
  opacity: 1;
  z-index: 2;
}

.slideshow-dots {
  position: absolute;
  bottom: 18px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 5;
  pointer-events: none;
}
.dot {
  display: inline-block;
  width: 13px;
  height: 13px;
  margin: 0 6px;
  border-radius: 50%;
  background: #b8c6db;
  opacity: 0.6;
  transition: background 0.2s, opacity 0.2s, transform 0.2s;
  pointer-events: auto;
}
.dot.active {
  background: #22223b;
  opacity: 1;
  transform: scale(1.18);
}

.bottom-nav {
  width: 100vw;
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: #22223b;
  padding: 0.7rem 0 0.6rem 0;
  position: fixed;
  bottom: 0;
  left: 0;
  box-shadow: 0 -2px 16px rgba(0,0,0,0.10);
  z-index: 20;
}
.bottom-nav button {
  background: none;
  border: none;
  color: #f2e9e4;
  font-size: 1.15rem;
  padding: 0.5rem 1.2rem;
  border-radius: 10px;
  transition: background 0.18s, color 0.18s;
  font-weight: 500;
  letter-spacing: 0.5px;
}
.bottom-nav button:hover, .bottom-nav button:focus {
  background: #9a8c98;
  color: #22223b;
  outline: none;
}

/* Emoji Bonanza Slot Card Design */
.emoji-bonanza {
  width: 160px;
  height: 284px; /* 9:16 aspect ratio */
  background: linear-gradient(135deg, #2e2e4f 0%, #474772 40%, #f7d203 100%);
  border: 3px solid #f7d203;
  color: #f2e9e4;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s;
  box-shadow: 
    0 8px 32px rgba(247, 210, 3, 0.4),
    0 0 20px rgba(247, 210, 3, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.emoji-bonanza::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 70%, rgba(247, 210, 3, 0.2) 0%, transparent 50%);
  pointer-events: none;
  z-index: 1;
}

.emoji-bonanza:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 
    0 16px 48px rgba(247, 210, 3, 0.6),
    0 0 30px rgba(247, 210, 3, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border-color: #ffed4e;
}

.slot-card-header {
  padding: 12px 10px 6px;
  text-align: center;
  position: relative;
  z-index: 2;
}

.slot-title {
  font-size: 1.1rem;
  font-weight: bold;
  color: #f7d203;
  text-shadow: 
    0 0 8px rgba(247, 210, 3, 0.8),
    0 2px 4px rgba(0, 0, 0, 0.6);
  margin-bottom: 2px;
  font-family: 'Segoe UI', Arial, sans-serif;
  letter-spacing: 0.3px;
  line-height: 1.1;
}

.slot-subtitle {
  font-size: 0.75rem;
  color: #c9ada7;
  font-weight: 500;
  opacity: 0.9;
}

.slot-preview {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px;
  position: relative;
  z-index: 2;
}

.preview-reels {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  background: rgba(0, 0, 0, 0.3);
  padding: 8px;
  border-radius: 8px;
  border: 1px solid rgba(247, 210, 3, 0.3);
}

.preview-reel {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 3px;
  border: 1px solid rgba(247, 210, 3, 0.2);
  width: 24px;
}

.symbol {
  font-size: 1rem;
  text-align: center;
  line-height: 1;
  animation: symbolFloat 3s infinite ease-in-out;
  filter: drop-shadow(0 0 3px rgba(247, 210, 3, 0.5));
}

.preview-reel:nth-child(1) .symbol { animation-delay: 0s; }
.preview-reel:nth-child(2) .symbol { animation-delay: 0.5s; }
.preview-reel:nth-child(3) .symbol { animation-delay: 1s; }

@keyframes symbolFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-1px); }
}

.jackpot-display {
  text-align: center;
  background: linear-gradient(135deg, rgba(247, 210, 3, 0.2), rgba(255, 237, 78, 0.1));
  border: 1px solid rgba(247, 210, 3, 0.4);
  border-radius: 6px;
  padding: 6px 8px;
  margin-bottom: 8px;
  width: 100%;
  box-sizing: border-box;
}

.jackpot-label {
  font-size: 0.6rem;
  color: #f7d203;
  font-weight: bold;
  margin-bottom: 1px;
  text-shadow: 0 0 5px rgba(247, 210, 3, 0.8);
}

.jackpot-amount {
  font-size: 0.9rem;
  color: #ffed4e;
  font-weight: bold;
  text-shadow: 
    0 0 6px rgba(255, 237, 78, 0.8),
    0 1px 2px rgba(0, 0, 0, 0.6);
  animation: jackpotPulse 2s infinite ease-in-out;
}

@keyframes jackpotPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

.slot-features {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: 0 10px 8px;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.feature-tag {
  font-size: 0.55rem;
  background: rgba(247, 210, 3, 0.2);
  color: #f7d203;
  padding: 2px 5px;
  border-radius: 8px;
  border: 1px solid rgba(247, 210, 3, 0.4);
  font-weight: 500;
  text-shadow: 0 0 3px rgba(247, 210, 3, 0.6);
  line-height: 1;
}

.play-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  padding: 12px 10px 10px;
  text-align: center;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 3;
}

.emoji-bonanza:hover .play-overlay {
  opacity: 1;
  transform: translateY(0);
}

.play-btn {
  background: linear-gradient(135deg, #f7d203, #ffed4e);
  color: #2e2e4f;
  border: none;
  padding: 6px 16px;
  border-radius: 16px;
  font-weight: bold;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 
    0 3px 8px rgba(247, 210, 3, 0.4),
    inset 0 1px 0 rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: center;
  width: 100%;
}

.play-btn:hover {
  transform: translateY(-1px);
  box-shadow: 
    0 4px 12px rgba(247, 210, 3, 0.6),
    inset 0 1px 0 rgba(255,255,255,0.4);
  background: linear-gradient(135deg, #ffed4e, #fff3a0);
}

.play-btn:active {
  transform: translateY(0);
}

.play-icon {
  font-size: 0.7rem;
}

/* Animierter Jackpot Counter */
#jackpot-counter {
  background: linear-gradient(45deg, #f7d203, #ffed4e, #f7d203);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: jackpotShine 3s infinite, jackpotPulse 2s infinite ease-in-out;
}

@keyframes jackpotShine {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Guest Warning Notice */
.guest-warning {
  position: absolute;
  top: 14px;
  left: 2rem;
  z-index: 100;
  border-radius: 12px;
  animation: slideInLeft 0.5s ease-out, pulseWarning 3s infinite ease-in-out;
}

.warning-content {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
  color: white;
  padding: 8px 12px;
  border-radius: 12px;
  box-shadow: 
    0 4px 16px rgba(255, 107, 107, 0.4),
    0 0 20px rgba(255, 107, 107, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 280px;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.warning-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: shimmer 2s infinite;
}

.warning-icon {
  font-size: 1.6rem;
  animation: bounce 2s infinite;
}

.warning-text {
  display: flex;
  flex-direction: column;
  flex: 1;
  line-height: 1.2;
}

.warning-text strong {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 1px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.warning-subtext {
  font-size: 0.75rem;
  opacity: 0.9;
  font-weight: 500;
}

.warning-login-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  backdrop-filter: blur(5px);
}

.warning-login-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.warning-login-btn:active {
  transform: translateY(0);
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulseWarning {
  0%, 100% {
    box-shadow: 
      0 4px 16px rgba(255, 107, 107, 0.4),
      0 0 20px rgba(255, 107, 107, 0.2);
  }
  50% {
    box-shadow: 
      0 6px 20px rgba(255, 107, 107, 0.6),
      0 0 30px rgba(255, 107, 107, 0.4);
  }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-3px);
  }
  60% {
    transform: translateY(-1px);
  }
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* Mobile responsiveness for guest warning */
@media (max-width: 600px) {
  .guest-warning {
    left: 1rem;
    right: 1rem;
    top: 10px;
  }
  
  .warning-content {
    min-width: auto;
    width: 100%;
    padding: 6px 10px;
    gap: 6px;
  }
  
  .warning-text strong {
    font-size: 0.8rem;
  }
  
  .warning-subtext {
    font-size: 0.7rem;
  }
  
  .warning-login-btn {
    padding: 3px 6px;
    font-size: 0.7rem;
  }
}

@media (max-width: 900px) {
  .guest-warning {
    left: 1.5rem;
  }
  
  .warning-content {
    min-width: 240px;
  }
}

/* Profil-Popup Styles */
.modal {
    position: fixed;
    z-index: 99999;
    left: 0; 
    top: 0; 
    width: 100vw; 
    height: 100vh;
    background: rgba(0,0,0,0.5);
    display: none; /* Hidden by default */
    align-items: center; 
    justify-content: center;
    backdrop-filter: blur(2px);
}

/* --- Profile Modal Large & Pretty --- */
.profile-modal-large {
    min-width: 480px;
    max-width: 600px;
    padding: 0;
    border-radius: 20px;
    box-shadow: 
        0 20px 60px rgba(0,0,0,0.4),
        0 0 0 1px rgba(218,165,32,0.3);
    background: linear-gradient(145deg, #1a0f2e 0%, #2d1b4e 50%, #4a2d7c 100%);
    border: 2px solid #d4af37;
    z-index: 100000;
    position: relative;
    overflow: hidden;
}

/* WebKit Scrollbar für Profile Modal - Entfernt */

.profile-modal-header {
    background: linear-gradient(135deg, #bfa12c 0%, #e1c13a 50%, #c2a800 100%);
    padding: 32px 40px 24px 40px;
    margin: 0;
    border-radius: 20px 20px 0 0;
    position: relative;
    display: flex;
    align-items: center;
    gap: 24px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}

.close {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 28px;
    font-weight: 300;
    cursor: pointer;
    color: rgba(0,0,0,0.6);
    transition: all 0.2s ease;
    z-index: 10;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0,0,0,0.1);
}

.close:hover {
    color: black;
    background: rgba(0,0,0,0.2);
    transform: scale(1.1);
}

.profile-modal-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid rgba(0,0,0,0.2);
    box-shadow: 
        0 8px 32px rgba(0,0,0,0.4),
        0 0 0 2px rgba(255,255,255,0.3);
    object-fit: cover;
}
.profile-modal-info {
    flex: 1;
    color: #1a1a1a;
}

.profile-modal-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.profile-modal-username {
    font-size: 2.4rem;
    font-weight: 700;
    color: #1a1a1a;
    text-shadow: 0 2px 8px rgba(255,255,255,0.3);
    margin: 0;
}

.edit-btn {
    background: rgba(0,0,0,0.15);
    border: 1px solid rgba(0,0,0,0.2);
    cursor: pointer;
    font-size: 18px;
    padding: 8px;
    border-radius: 50%;
    color: #1a1a1a;
    transition: all 0.2s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.edit-btn:hover {
    background: rgba(0,0,0,0.25);
    transform: scale(1.1);
}

.profile-modal-country {
    font-size: 1.4rem;
    color: rgba(0,0,0,0.8);
    margin-right: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.country-flag {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 8px;
    object-fit: cover;
    border: 2px solid rgba(0,0,0,0.2);
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    vertical-align: middle;
    flex-shrink: 0;
}

.profile-modal-level {
    font-size: 1.2rem;
    color: rgba(0,0,0,0.7);
    font-weight: 600;
    background: rgba(0,0,0,0.1);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid rgba(0,0,0,0.2);
}
.profile-modal-body {
    padding: 32px 40px;
    background: linear-gradient(135deg, #1a0f2e 0%, #2d1b4e 100%);
    color: #f0f0f0;
}

.profile-modal-body label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #d4af37;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: block;
}

.profile-modal-comment {
    background: rgba(212,175,55,0.1);
    border: 1px solid rgba(212,175,55,0.3);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
    min-height: 60px;
    font-size: 1.1rem;
    color: #f0f0f0;
    line-height: 1.6;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.profile-modal-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 8px;
}

.profile-stat {
    background: linear-gradient(135deg, #d4af37 0%, #f4d03f 100%);
    color: #1a1a1a;
    padding: 20px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 
        0 4px 16px rgba(212,175,55,0.4),
        inset 0 1px 0 rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.1);
}

.profile-icon {
    font-size: 2rem;
    margin-bottom: 8px;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.profile-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.profile-stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
    font-weight: 600;
}
.profile-modal-edit {
    padding: 32px 40px 40px 40px;
    background: linear-gradient(135deg, #1a0f2e 0%, #2d1b4e 100%);
    border-top: 1px solid rgba(212,175,55,0.3);
}

.profile-modal-edit label {
    color: #d4af37;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 16px;
    margin-bottom: 8px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.profile-modal-edit input, 
.profile-modal-edit textarea, 
.profile-modal-edit select {
    width: 100%;
    border-radius: 12px;
    border: 2px solid rgba(212,175,55,0.3);
    padding: 14px 16px;
    margin-bottom: 16px;
    font-size: 1rem;
    background: rgba(0,0,0,0.3);
    color: #f0f0f0;
    transition: all 0.2s ease;
    box-sizing: border-box;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}

.profile-modal-edit input:focus,
.profile-modal-edit textarea:focus,
.profile-modal-edit select:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212,175,55,0.2), inset 0 2px 4px rgba(0,0,0,0.3);
    background: rgba(0,0,0,0.4);
}

.profile-modal-edit select {
    cursor: pointer;
    padding-left: 50px; /* Platz für die Flagge */
    position: relative;
}

.profile-modal-edit .country-select-container {
    position: relative;
    display: inline-block;
    width: 100%;
}

.profile-modal-edit select option {
    background: #2d1b4e;
    color: #f0f0f0;
    padding: 8px;
}

.profile-modal-edit textarea {
    resize: vertical;
    min-height: 80px;
}

#save-profile-btn {
    background: linear-gradient(135deg, #d4af37 0%, #f4d03f 100%);
    color: #1a1a1a;
    border: none;
    border-radius: 12px;
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.2s ease;
    box-shadow: 
        0 4px 16px rgba(212,175,55,0.4),
        inset 0 1px 0 rgba(255,255,255,0.2);
    width: 100%;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

#save-profile-btn:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 20px rgba(212,175,55,0.6),
        inset 0 1px 0 rgba(255,255,255,0.3);
    background: linear-gradient(135deg, #f4d03f 0%, #ffd700 100%);
}

/* Custom Select Dropdown with Flags */
.custom-select-container {
    position: relative;
    width: 100%;
    margin-bottom: 16px;
}

.custom-select {
    position: relative;
    width: 100%;
    background: rgba(0,0,0,0.3);
    border: 2px solid rgba(212,175,55,0.3);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}

.custom-select:hover,
.custom-select.active {
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212,175,55,0.2), inset 0 2px 4px rgba(0,0,0,0.3);
    background: rgba(0,0,0,0.4);
}

.select-selected {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #f0f0f0;
    font-size: 1rem;
}

.select-selected .flag-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(212,175,55,0.5);
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    flex-shrink: 0;
}

.select-selected .country-name {
    flex: 1;
    color: #f0f0f0;
}

.select-selected .select-arrow {
    color: rgba(212,175,55,0.8);
    font-size: 0.8rem;
    transition: transform 0.2s ease;
    margin-left: auto;
}

.custom-select.active .select-arrow {
    transform: rotate(180deg);
}

.select-items {
    position: absolute;
    background: rgba(15,15,25,0.98);
    top: 100%;
    left: 0;
    right: 0;
    border: 2px solid rgba(212,175,55,0.4);
    border-top: none;
    border-radius: 0 0 12px 12px;
    max-height: 240px;
    overflow-y: auto;
    z-index: 1001;
    backdrop-filter: blur(15px);
    box-shadow: 
        0 8px 25px rgba(0,0,0,0.5),
        inset 0 1px 0 rgba(212,175,55,0.2);
    display: none;
}

.custom-select.active .select-items {
    display: block;
}

.select-item {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #f0f0f0;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid rgba(212,175,55,0.1);
}

.select-item:last-child {
    border-bottom: none;
}

.select-item:hover {
    background: linear-gradient(135deg, rgba(212,175,55,0.3), rgba(255,215,0,0.2));
    color: #fff;
    transform: translateX(2px);
}

.select-item .flag-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(212,175,55,0.5);
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    flex-shrink: 0;
}

.select-item span {
    color: #f0f0f0;
    font-size: 0.95rem;
}

/* Scrollbar styling for select items */
.select-items::-webkit-scrollbar {
    width: 6px;
}

.select-items::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.2);
    border-radius: 3px;
}

.select-items::-webkit-scrollbar-thumb {
    background: rgba(212,175,55,0.6);
    border-radius: 3px;
}

.select-items::-webkit-scrollbar-thumb:hover {
    background: rgba(212,175,55,0.8);
}

#save-profile-btn {
    background: linear-gradient(135deg, #d4af37 0%, #f4d03f 100%);
    color: #1a1a1a;
    border: none;
    border-radius: 12px;
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.2s ease;
    box-shadow: 
        0 4px 16px rgba(212,175,55,0.4),
        inset 0 1px 0 rgba(255,255,255,0.2);
    width: 100%;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

#save-profile-btn:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 20px rgba(212,175,55,0.6),
        inset 0 1px 0 rgba(255,255,255,0.3);
    background: linear-gradient(135deg, #f4d03f 0%, #ffd700 100%);
}

/* Inline Profile Editing Styles */
.profile-img-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.edit-imglink-input {
    width: 120px;
    padding: 6px 8px;
    font-size: 0.8rem;
    border: 2px solid rgba(212,175,55,0.3);
    border-radius: 8px;
    background: rgba(0,0,0,0.3);
    color: #f0f0f0;
    text-align: center;
    transition: all 0.2s ease;
}

.edit-imglink-input:focus {
    outline: none;
    border-color: #d4af37;
    background: rgba(0,0,0,0.4);
}

.username-container {
    position: relative;
    flex: 1;
}

.edit-username-input {
    width: 100%;
    padding: 8px 12px;
    font-size: 2.4rem;
    font-weight: 700;
    color: #1a1a1a;
    background: rgba(255,255,255,0.9);
    border: 2px solid rgba(212,175,55,0.5);
    border-radius: 8px;
    text-shadow: none;
    transition: all 0.2s ease;
}

.edit-username-input:focus {
    outline: none;
    border-color: #d4af37;
    background: rgba(255,255,255,1);
}

.country-container {
    position: relative;
    margin-right: 16px;
}

.save-btn, .cancel-btn {
    background: rgba(0,0,0,0.15);
    border: 1px solid rgba(0,0,0,0.2);
    cursor: pointer;
    font-size: 18px;
    padding: 8px;
    border-radius: 50%;
    color: #1a1a1a;
    transition: all 0.2s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
}

.save-btn {
    background: rgba(34,139,34,0.2);
    border-color: rgba(34,139,34,0.3);
}

.save-btn:hover {
    background: rgba(34,139,34,0.3);
    transform: scale(1.1);
}

.cancel-btn {
    background: rgba(220,20,60,0.2);
    border-color: rgba(220,20,60,0.3);
}

.cancel-btn:hover {
    background: rgba(220,20,60,0.3);
    transform: scale(1.1);
}

.comment-container {
    position: relative;
}

.edit-comment-input {
    width: 100%;
    background: rgba(212,175,55,0.1);
    border: 2px solid rgba(212,175,55,0.3);
    border-radius: 12px;
    padding: 16px;
    min-height: 60px;
    font-size: 1.1rem;
    color: #f0f0f0;
    line-height: 1.6;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    resize: vertical;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.edit-comment-input:focus {
    outline: none;
    border-color: #d4af37;
    background: rgba(212,175,55,0.15);
}

.edit-comment-input::placeholder {
    color: rgba(240,240,240,0.5);
}

/* Compact custom select for inline editing */
#edit-country-container .custom-select {
    min-width: 200px;
    margin-bottom: 0;
}

#edit-country-container .select-selected {
    padding: 8px 12px;
    font-size: 1.2rem;
}

#edit-country-container .select-selected .flag-icon {
    width: 20px;
    height: 20px;
}

/* Animation for smooth transitions */
.profile-modal-username,
.edit-username-input,
.profile-modal-country,
#edit-country-container,
.profile-modal-comment,
.edit-comment-input,
.profile-modal-img,
.edit-imglink-input {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Ensure proper layout for inline editing */
.profile-modal-row {
    align-items: flex-start;
    min-height: 48px;
}

.profile-modal-header .profile-modal-row:first-child {
    margin-bottom: 12px;
}

/* Account Settings Modal Styles */
.account-settings-modal {
    max-width: 700px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 0;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border: none;
    margin: auto;
    position: relative;
    
    /* Custom Scrollbar Styling */
    scrollbar-width: thin;
    scrollbar-color: #4a90e2 #f1f3f4;
}

/* WebKit Scrollbar Styling für Chrome/Safari */
.account-settings-modal::-webkit-scrollbar {
    width: 8px;
}

.account-settings-modal::-webkit-scrollbar-track {
    background: #f1f3f4;
    border-radius: 10px;
    margin: 15px 0;
}

.account-settings-modal::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #4a90e2, #357abd);
    border-radius: 10px;
    border: 2px solid #f1f3f4;
}

.account-settings-modal::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #357abd, #2968a3);
}

.account-settings-modal::-webkit-scrollbar-corner {
    background: #f1f3f4;
}

/* Ensure modal is centered when shown */
#account-settings-modal.modal-show {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 2px solid #f1f3f4;
    margin-bottom: 0;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 15px 15px 0 0;
}

.modal-header h2 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-icon {
    font-size: 1.6rem;
}

.modal-body {
    padding: 25px 30px 30px;
}

/* Settings Sections */
.settings-section {
    margin-bottom: 20px;
    padding: 25px;
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border-radius: 12px;
    border: 1px solid #e3e6ea;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.settings-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.settings-section-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f1f3f4;
}

.settings-icon {
    font-size: 1.4rem;
    padding: 8px;
    background: linear-gradient(135deg, #4a90e2, #357abd);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
}

.settings-section-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.2rem;
    font-weight: 600;
}

.settings-content {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Input Groups */
.input-group {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.settings-input {
    flex: 1;
    min-width: 250px;
    padding: 14px 18px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.settings-input:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.15);
    transform: translateY(-1px);
}

.settings-btn {
    padding: 14px 24px;
    background: linear-gradient(135deg, #4a90e2, #357abd);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.2);
}

.settings-btn:hover {
    background: linear-gradient(135deg, #357abd, #2968a3);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.3);
}

.settings-btn:active {
    transform: translateY(0);
}

/* Danger Button */
.danger-btn {
    background: linear-gradient(135deg, #e74c3c, #c0392b) !important;
}

.danger-btn:hover {
    background: linear-gradient(135deg, #c0392b, #a93226) !important;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3) !important;
}

/* Current Value Display */
.current-value {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: 10px;
    border: 2px solid #e9ecef;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.current-value label {
    font-weight: 700;
    color: #495057;
    font-size: 0.95rem;
}

.current-value span {
    color: #2c3e50;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    background: #e3f2fd;
    padding: 4px 8px;
    border-radius: 6px;
}

/* Toggle Switch for 2FA */
.toggle-setting {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border-radius: 12px;
    border: 2px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.toggle-setting:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.toggle-info {
    flex: 1;
}

.toggle-info strong {
    display: block;
    color: #2c3e50;
    margin-bottom: 6px;
    font-size: 1.1rem;
    font-weight: 600;
}

.toggle-info p {
    margin: 0;
    color: #6c757d;
    font-size: 0.95rem;
}

.toggle-container {
    position: relative;
}

.toggle-checkbox {
    display: none;
}

.toggle-label {
    display: block;
    width: 70px;
    height: 36px;
    background: #dee2e6;
    border-radius: 18px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-slider {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 28px;
    height: 28px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.toggle-checkbox:checked + .toggle-label {
    background: linear-gradient(135deg, #4a90e2, #357abd);
}

.toggle-checkbox:checked + .toggle-label .toggle-slider {
    transform: translateX(34px);
}

/* QR Code Section */
.qr-section {
    padding: 25px;
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border-radius: 12px;
    border: 2px solid #e9ecef;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.qr-section p {
    margin-bottom: 20px;
    color: #495057;
    font-weight: 600;
}

.qr-code-container {
    width: 220px;
    height: 220px;
    background: #f8f9fa;
    border: 3px dashed #dee2e6;
    border-radius: 12px;
    margin: 20px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.05);
}

/* Security Info */
.security-info {
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border-radius: 12px;
    border: 2px solid #e9ecef;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.security-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
}

.security-item:not(:last-child) {
    border-bottom: 2px solid #f1f3f4;
}

.security-label {
    font-weight: 700;
    color: #495057;
    font-size: 0.95rem;
}

.security-item span:last-child {
    color: #2c3e50;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    background: #e3f2fd;
    padding: 4px 8px;
    border-radius: 6px;
}

/* Danger Section */
.danger-section {
    background: linear-gradient(135deg, #fef2f2, #fee2e2) !important;
    border-color: #fca5a5 !important;
    border-width: 2px !important;
}

.danger-section .settings-section-header {
    border-bottom-color: #fca5a5;
}

.danger-section .settings-icon {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
}

.danger-warning {
    padding: 18px;
    background: #fee2e2;
    border: 2px solid #fca5a5;
    border-radius: 10px;
    color: #dc2626;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.1);
}

.danger-warning p {
    margin: 0;
    font-weight: 600;
}

/* Confirm Modal */
.confirm-modal {
    max-width: 550px;
    width: 95%;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(220, 38, 38, 0.2);
    border: 2px solid #fca5a5;
    margin: auto;
    position: relative;
    max-height: 85vh;
    overflow-y: auto;
    
    /* Custom Scrollbar Styling */
    scrollbar-width: thin;
    scrollbar-color: #ef4444 #fee2e2;
}

/* WebKit Scrollbar für Confirm Modal */
.confirm-modal::-webkit-scrollbar {
    width: 8px;
}

.confirm-modal::-webkit-scrollbar-track {
    background: #fee2e2;
    border-radius: 10px;
    margin: 15px 0;
}

.confirm-modal::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-radius: 10px;
    border: 2px solid #fee2e2;
}

.confirm-modal::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.confirm-modal::-webkit-scrollbar-corner {
    background: #fee2e2;
}

/* Ensure delete confirmation modal is centered when shown */
#delete-account-confirm-modal.modal-show {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.confirm-modal .modal-header {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border-bottom-color: #fca5a5;
}

.confirm-modal .modal-body {
    padding: 25px 30px;
}

.confirm-modal p {
    margin: 0 0 15px 0;
    line-height: 1.6;
}

.confirm-modal p:first-child {
    font-size: 1.1rem;
    color: #dc2626;
}

.confirm-modal ul {
    padding-left: 25px;
    margin: 20px 0;
}

.confirm-modal li {
    margin: 10px 0;
    color: #6c757d;
    line-height: 1.5;
}

.confirm-buttons {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    flex-wrap: wrap;
}

/* Responsive Design */
@media (max-width: 768px) {
    .account-settings-modal {
        width: 98%;
        max-height: 95vh;
        margin: 10px;
    }
    
    .modal-header {
        padding: 20px;
    }
    
    .modal-header h2 {
        font-size: 1.3rem;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .settings-section {
        padding: 20px;
        margin-bottom: 15px;
    }
    
    .settings-section-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .settings-icon {
        align-self: center;
    }
    
    .input-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .settings-input {
        min-width: unset;
        margin-bottom: 10px;
    }
    
    .settings-btn {
        width: 100%;
    }
    
    .toggle-setting {
        flex-direction: column;
        gap: 15px;
        align-items: center;
        text-align: center;
    }
    
    .confirm-buttons {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .modal-header h2 {
        font-size: 1.1rem;
    }
    
    .settings-section {
        padding: 15px;
    }
    
    .modal-body {
        padding: 15px;
    }
}

/* Force specific modals to be hidden initially */
#account-settings-modal,
#delete-account-confirm-modal {
    display: none !important;
}

/* Only show when the modal-show class is added */
#account-settings-modal.modal-show,
#delete-account-confirm-modal.modal-show {
    display: flex !important;
}


