/* ----- HEADER ----- */

.mobile-header {
    padding: 10px 15px;
    border-bottom: 1px solid #ddd;
    position: sticky;
    top: 0;
    z-index: 9999;
}

.mobile-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-title a {
    font-size: 20px;
    font-weight: bold;
    color: inherit;
    text-decoration: none;
}

.mobile-menu-btn,
.mobile-user-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

.avatar-small-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

/* ----- LINKES MENÜ (links) ----- */
.mobile-side-menu {
    position: fixed;
    top: 55px;
    bottom: 0;
    left: 0;
    width: 240px;
    background: #031736;
    color: white;
    transform: translateX(-100%);
    transition: transform 0.25s ease-out;
    z-index: 10000;
    overflow-y: auto;
    border-top-right-radius: 12px;
    padding-top: 10px;
}

.mobile-side-menu.active {
    transform: translateX(0);
}

.close-left-menu {
    text-align: right;
    padding: 8px 15px;
    font-size: 22px;
    cursor: pointer;
    color: white;
}

.mobile-side-menu h3 {
    padding: 10px 15px;
    font-size: 18px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    color: white;
    margin: 0;
}

/* Hauptmenüpunkte */
.mobile-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-item a.mobile-link {
    display: flex;
    justify-content: space-between;
    padding: 12px 15px;
    color: white;
    text-decoration: none;
    font-size: 16px;
}

.mobile-item a.mobile-link:hover {
    background: rgba(255,255,255,0.15);
}

.mobile-arrow {
    font-size: 16px;
    opacity: 0.8;
}

/* Untermenüs */
.mobile-submenu {
    display: none;
    background: #06204f;
}

.mobile-item.open > .mobile-submenu {
    display: block;
}

.mobile-submenu li a {
    display: block;
    padding: 10px 20px;
    color: white;
    text-decoration: none;
    font-size: 15px;
}

.mobile-submenu li a:hover {
    background: rgba(255,255,255,0.15);
}


/* Titel */
.mobile-side-menu h3 {
    color: #ffffff;
    font-size: 18px;
    padding: 10px 15px;
    margin: 0;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}

/* Liste */
.mobile-side-menu ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.mobile-side-menu ul li a {
    display: block;
    padding: 12px 15px;
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
}

/* Hover Effekt */
.mobile-side-menu ul li a:hover {
    background: rgba(255,255,255,0.12); /* dezenter heller Effekt */
}

.mobile-side-menu.active {
    transform: translateX(0);
}

.mobile-overlay.active {
    display: block;
}

.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    z-index: 9000;
}

/* ----- AVATAR POPUP ----- */
.mobile-avatar-popup {
    position: absolute;
    top: 55px;
    right: 10px;
    width: 230px;
    background: #062b66;
    color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.4);
    padding: 12px 0;
    z-index: 11000;
    display: none;
}

.mobile-avatar-popup.active {
    display: block;
}

.mobile-avatar-popup .popup-header {
    display: flex;
    justify-content: space-between;
    padding: 10px 12px;
    font-weight: bold;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.popup-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

.mobile-avatar-popup ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-avatar-popup ul li a {
    display: block;
    padding: 12px 14px;
    color: white;
    font-size: 16px;
    text-decoration: none;
}

.mobile-avatar-popup ul li a:hover {
    background: rgba(255,255,255,0.15);
}

/* ----- AUTH POPUPS (LOGIN / REGISTER) ----- */
.mobile-auth-popup {
    position: fixed;
    top: 80px;                  /* Popup steht oben unter dem Header */
    left: 50%;
    transform: translateX(-50%) scale(1);
    width: 90%;
    max-width: 340px;
    background: #062b66;
    color: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    z-index: 12000;
    display: none;
}

.mobile-auth-popup.active {
    display: block;
}
.mobile-auth-popup {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.mobile-auth-popup.active {
    display: block;
    opacity: 1;
}

.mobile-auth-header {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: bold;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding-bottom: 8px;
}

.mobile-auth-close {
    background: none;
    border: none;
    color: white;
    font-size: 22px;
    cursor: pointer;
}

.mobile-auth-form input {
    width: 100%;
    padding: 10px;
    margin-top: 12px;
    border-radius: 6px;
    border: none;
}

.mobile-auth-form button {
    margin-top: 12px;
    padding: 10px;
    background: #0b3f8c;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
}

.mobile-auth-switch {
    margin-top: 12px;
    text-align: center;
}

.mobile-auth-switch a {
    color: #fff;
    font-weight: bold;
}
/* ----- Mobile User Menü ----- */
.mobile-user-leftmenu {
    position: fixed;
    top: 55px;
    bottom: 0;
    left: 0;
    width: 260px;
    background: #041b42;
    color: white;
    transform: translateX(-100%);
    transition: transform .25s ease-out;
    z-index: 11000;
    overflow-y: auto;
    border-top-right-radius: 12px;
    padding-top: 10px;
}

.mobile-user-leftmenu.active {
    transform: translateX(0);
}

.mobile-user-close {
    text-align: right;
    padding: 8px 15px;
    font-size: 22px;
    cursor: pointer;
    color: white;
}

.mobile-user-leftmenu h3 {
    padding: 10px 15px;
    color: white;
    margin: 0;
    font-size: 18px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.mobile-user-leftmenu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-user-leftmenu ul li a {
    display: block;
    padding: 12px 15px;
    color: white;
    text-decoration: none;
    font-size: 16px;
}

.mobile-user-leftmenu ul li a:hover {
    background: rgba(255,255,255,0.15);
}

.mobile-logout {
    background: #7f1d1d;
}

.mobile-logout:hover {
    background: #ef4444;
}

.mobile-user-leftmenu hr {
    margin: 10px 0;
    border: none;
    height: 1px;
    background: rgba(255,255,255,0.2);
}
.mobile-user-menu-btn {
    background: none;
    border: none;
    font-size: 22px;
    color: white;
    cursor: pointer;
    margin-right: 6px;
}

.mobile-user-menu-btn i {
    color: white;
}
body:not(.dark-mode) .mobile-user-menu-btn i {
    color: #111;
}
body.dark-mode .mobile-user-menu-btn i {
    color: white;
}
