.country-dropdown {
  position: relative;
  width: 100%;
  margin-bottom: 6px;
  z-index: 10;
}
.country-dropdown-selected {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 2px solid #ccc;
  border-radius: 8px;
  padding: 4px 10px;
  cursor: pointer;
  min-height: 32px;
  transition: border-color 0.2s;
  position: relative;
  z-index: 11;
  pointer-events: auto;
}
/* Länder-Dropdown-Menü */
.country-dropdown {
  position: relative;
  width: 100%;
  margin-bottom: 6px;
}
.country-dropdown-selected {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(90deg, #2c3e50 0%, #34495e 100%);
  border: 2px solid #9b59b6;
  border-radius: 10px;
  padding: 6px 14px;
  cursor: pointer;
  min-height: 36px;
  transition: border-color 0.2s, box-shadow 0.2s;
  position: relative;
  z-index: 11;
  pointer-events: auto;
  box-shadow: 0 2px 8px rgba(155,89,182,0.10);
}
.country-dropdown-selected:hover, .country-dropdown-selected.active {
  border-color: #27ae60;
  box-shadow: 0 4px 16px rgba(39,174,96,0.15);
}
.country-dropdown-label {
  font-size: 1em;
  font-weight: 600;
  color: #feca57;
  text-shadow: 1px 1px 2px rgba(44,62,80,0.3);
}
.country-dropdown-arrow {
  margin-left: auto;
  font-size: 1.2em;
  color: #9b59b6;
  transition: color 0.2s;
}
.country-dropdown-selected:hover .country-dropdown-arrow,
.country-dropdown-selected.active .country-dropdown-arrow {
  color: #27ae60;
}
.country-dropdown-menu {
  position: absolute;
  top: 110%;
  left: 0;
  width: 100%;
  background: linear-gradient(90deg, #34495e 0%, #2c3e50 100%);
  border: 2px solid #9b59b6;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(44,62,80,0.18);
  z-index: 10;
  padding: 6px 0;
  animation: fadeInDropdown 0.2s;
  max-height: 180px; /* ca. 4 Optionen */
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #9b59b6 #2c3e50;
}

.country-dropdown-menu::-webkit-scrollbar {
  width: 8px;
  height: 0px;
}
.country-dropdown-menu::-webkit-scrollbar-thumb {
  background: #9b59b6;
  border-radius: 8px;
}
.country-dropdown-menu::-webkit-scrollbar-track {
  background: #2c3e50;
  border-radius: 8px;
}

@keyframes fadeInDropdown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
.country-dropdown-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  color: #fff;
  font-weight: 500;
  border-radius: 8px;
}
.country-dropdown-option:hover {
  background: linear-gradient(90deg, #27ae60 0%, #2ecc71 100%);
  color: #fff;
}
.country-logo-img {
  width: 32px;
  height: 24px;
  object-fit: contain;
  border-radius: 4px;
  display: block;
}
/* Länder-Logo-Auswahl im Profil */
.country-logo-select {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.country-logo-option {
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 2px;
  cursor: pointer;
  transition: border-color 0.2s;
  background: #fff;
}
.country-logo-option.selected {
  border-color: #0078d7;
  background: #e6f0ff;
}
.country-logo-img {
  width: 32px;
  height: 24px;
  object-fit: contain;
  border-radius: 4px;
  display: block;
}
/* --- Profil Tabs & Profilbereich im Dropdown --- */
.profile-tabs-section {
    margin-top: 10px;
    background: rgba(44, 62, 80, 0.95);
    border-radius: 12px;
    padding: 10px 8px 8px 8px;
    min-width: 320px;
    box-shadow: 0 2px 10px rgba(44,62,80,0.15);
}
.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}
.tab-btn {
    flex: 1;
    padding: 8px 0;
    background: linear-gradient(45deg, #9b59b6, #8e44ad);
    color: #fff;
    border: none;
    border-radius: 8px 8px 0 0;
    font-weight: bold;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    opacity: 0.7;
}
.tab-btn.active {
    background: linear-gradient(45deg, #27ae60, #2ecc71);
    color: #fff;
    opacity: 1;
    box-shadow: 0 2px 8px rgba(39,174,96,0.15);
}
.tab-content {
    background: rgba(44, 62, 80, 0.97);
    border-radius: 0 0 12px 12px;
    padding: 10px 6px 6px 6px;
    min-height: 120px;
}
.profile-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
.profile-left {
    flex: 1;
    min-width: 140px;
}
.profile-right {
    flex: 1;
    min-width: 100px;
}
.profile-picture-edit {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 10px;
}
.profile-img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #9b59b6;
    box-shadow: 0 2px 8px rgba(155,89,182,0.15);
    margin-bottom: 6px;
}
#editProfileImageBtn {
    background: linear-gradient(45deg, #48dbfb, #0abde3);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 13px;
    cursor: pointer;
    margin-top: 2px;
    transition: background 0.2s;
}
#editProfileImageBtn:hover {
    background: linear-gradient(45deg, #0abde3, #48dbfb);
}
.profile-info-edit label {
    color: #ecf0f1;
    font-size: 13px;
    margin-bottom: 2px;
    display: block;
}
.profile-info-edit input,
.profile-info-edit select {
    width: 100%;
    padding: 6px 8px;
    border-radius: 6px;
    border: 1.5px solid #9b59b6;
    background: rgba(236, 240, 241, 0.1);
    color: #fff;
    font-size: 14px;
    margin-bottom: 6px;
    outline: none;
    transition: border 0.2s;
}
.profile-info-edit input:focus,
.profile-info-edit select:focus {
    border-color: #27ae60;
}
#saveProfileBtn {
    background: linear-gradient(45deg, #27ae60, #2ecc71);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 10px;
    transition: background 0.2s;
}
#saveProfileBtn:hover {
    background: linear-gradient(45deg, #2ecc71, #27ae60);
}
.profile-stats {
    background: rgba(155, 89, 182, 0.08);
    border-radius: 8px;
    padding: 8px 10px;
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.profile-stats h4 {
    color: #feca57;
    font-size: 14px;
    margin-bottom: 4px;
    text-align: left;
}
#profileStatsList {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0;
    margin: 0;
}
#profileStatsList li {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    background: none;
    border-radius: 6px;
    padding: 0 0 0 0;
}
#profileStatsList li span {
    font-weight: bold;
    color: #feca57;
    margin-left: 4px;
}
#profileStatsList li:nth-child(1) span {
    color: #ff6b6b;
}
#profileStatsList li:nth-child(2) span {
    color: #48dbfb;
}
#profileStatsList li:nth-child(3) span {
    color: #f39c12;
}
#profileStatsList li:last-child {
    margin-bottom: 0;
}
#profileStatsList .stat-money {
    display: flex;
    align-items: center;
    gap: 4px;
}
#profileStatsList .stat-money::after {
    content: '💰';
    font-size: 18px;
    margin-left: 2px;
    color: #f39c12;
}
.club-section, .slot-section {
    border: 1.5px solid #9b59b6;
    min-height: 60px;
    border-radius: 8px;
    background: rgba(155, 89, 182, 0.08);
    margin-bottom: 10px;
    padding: 8px 10px;
}
.club-section h4, .slot-section h4 {
    color: #9b59b6;
    font-size: 14px;
    margin: 0 0 4px 0;
}
/* Responsive Anpassung für Profilbereich */
@media (max-width: 600px) {
    .profile-tabs-section {
        min-width: 180px;
        padding: 6px 2px 2px 2px;
    }
    .profile-layout {
        flex-direction: column;
        gap: 10px;
    }
    .profile-left, .profile-right {
        min-width: 0;
    }
}
/* Kopfzeile Styles */
.header {
    background: linear-gradient(90deg, #1a1a2e 0%, #16213e 100%);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.back-button {
    background: linear-gradient(45deg, #3498db, #2980b9);
    padding: 10px 15px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 45px;
}

.back-button:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.5);
}

.back-icon {
    font-size: 20px;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.level-system {
    display: flex;
    align-items: center;
    gap: 15px;
}

.level-badge {
    background: linear-gradient(45deg, #ff6b6b, #feca57);
    padding: 8px 15px;
    border-radius: 25px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: bold;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.level-number {
    font-size: 18px;
}

.level-text {
    font-size: 12px;
    opacity: 0.9;
}

.xp-bar {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 4px;
    width: 150px;
    position: relative;
    overflow: hidden;
}

.xp-fill {
    background: linear-gradient(90deg, #48dbfb, #0abde3);
    height: 20px;
    border-radius: 12px;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.xp-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 11px;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.money-display {
    background: linear-gradient(45deg, #f39c12, #e67e22);
    padding: 10px 20px;
    border-radius: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: bold;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3); }
    to { box-shadow: 0 3px 20px rgba(243, 156, 18, 0.5); }
}

.coin-icon {
    font-size: 24px;
    animation: bounce 1s ease-in-out infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-5px); }
    60% { transform: translateY(-3px); }
}

.header-right {
    display: flex;
    align-items: center;
}

.profile-icon {
    background: linear-gradient(45deg, #9b59b6, #8e44ad);
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    position: relative;
}

.profile-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(155, 89, 182, 0.5);
}

.profile-avatar {
    font-size: 24px;
}

/* Profile Dropdown Styles */
.profile-dropdown {
    position: absolute;
    top: 120%;
    right: 0;
    background: linear-gradient(145deg, #2c3e50, #34495e);
    border-radius: 15px;
    padding: 15px;
    min-width: 200px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    border: 2px solid rgba(155, 89, 182, 0.3);
}

.profile-icon:hover .profile-dropdown,
.profile-dropdown:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Arrow for dropdown */
.profile-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #2c3e50;
}

.profile-status {
    color: #ecf0f1;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 12px;
    padding: 8px;
    background: rgba(155, 89, 182, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(155, 89, 182, 0.3);
}

.profile-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-btn {
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-btn {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    box-shadow: 0 3px 10px rgba(52, 152, 219, 0.3);
}

.login-btn:hover {
    background: linear-gradient(45deg, #2980b9, #1f6298);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.register-btn {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
    box-shadow: 0 3px 10px rgba(231, 76, 60, 0.3);
}

.register-btn:hover {
    background: linear-gradient(45deg, #c0392b, #a93226);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
}

.logout-btn {
    background: linear-gradient(45deg, #f39c12, #e67e22);
    color: white;
    box-shadow: 0 3px 10px rgba(243, 156, 18, 0.3);
}

.logout-btn:hover {
    background: linear-gradient(45deg, #e67e22, #d35400);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(243, 156, 18, 0.4);
}

/* Logged in state */
.profile-status.logged-in {
    background: linear-gradient(45deg, #27ae60, #2ecc71);
    color: white;
    border: 1px solid rgba(39, 174, 96, 0.5);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(39, 174, 96, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(39, 174, 96, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(39, 174, 96, 0);
    }
}

.profile-actions.logged-in .login-btn,
.profile-actions.logged-in .register-btn {
    display: none;
}

/* Success message styling for welcome */
.profile-status.logged-in::before {
    content: "✓ ";
    font-weight: bold;
}

/* Header Responsive Design */
@media (max-width: 768px) {
    .header {
        padding: 8px 12px;
        flex-wrap: wrap;
    }
    
    .header-left {
        gap: 10px;
    }
    
    .back-button {
        padding: 8px 12px;
        min-width: 40px;
        height: 40px;
    }
    
    .back-icon {
        font-size: 18px;
    }
    
    .level-system {
        gap: 8px;
    }
    
    .xp-bar {
        width: 80px;
    }
    
    .money-display {
        font-size: 14px;
        padding: 6px 12px;
    }
    
    .profile-dropdown {
        right: -10px;
        min-width: 180px;
        padding: 12px;
    }
    
    .profile-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .profile-status {
        font-size: 13px;
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .header {
        flex-direction: column;
        gap: 8px;
        padding: 6px 10px;
    }
    
    .header-left,
    .header-center,
    .header-right {
        width: 100%;
        justify-content: center;
    }
    
    .back-button {
        padding: 6px 10px;
        min-width: 35px;
        height: 35px;
    }
    
    .back-icon {
        font-size: 16px;
    }
    
    .profile-dropdown {
        right: -20px;
        min-width: 160px;
        padding: 10px;
    }
    
    .profile-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .profile-status {
        font-size: 12px;
        margin-bottom: 8px;
        padding: 6px;
    }
}
