/* Language Selector - Amazon Style */
.language-selector {
  position: relative;
  display: inline-block;
  margin-right: 15px;
}
.language-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid #565959;
  border-radius: 8px;
  padding: 6px 10px;
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s ease;
  text-decoration: none;
}
.language-trigger:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.05);
}
.language-trigger svg {
  width: 12px;
  height: 12px;
  fill: #fff;
  transition: transform 0.2s ease;
}
.language-selector.open .language-trigger svg {
  transform: rotate(180deg);
}
.language-flag-icon {
  font-size: 18px;
  line-height: 1;
}
.language-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: #fff;
  border: 1px solid #d5d9d9;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  min-width: 200px;
  z-index: 1000;
  display: none;
  overflow: hidden;
}
.language-selector.open .language-dropdown {
  display: block;
}
.language-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  color: #0f1111;
  text-decoration: none;
  font-size: 14px;
  transition: background 0.15s ease;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  cursor: pointer;
}
.language-option:hover {
  background: #f3f3f3;
}
.language-option.active {
  background: #e8f4f8;
  position: relative;
}
.language-option.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #007185;
}
.language-option input[type="radio"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #007185;
}
.language-option-text {
  flex: 1;
}
.language-option-label {
  display: block;
  font-weight: 600;
  color: #0f1111;
}
.language-separator {
  height: 1px;
  background: #e7e7e7;
  margin: 4px 0;
}
.language-footer {
  padding: 10px 14px;
  font-size: 12px;
  color: #565959;
}
.language-footer a {
  color: #007185;
  text-decoration: none;
}
.language-footer a:hover {
  text-decoration: underline;
  color: #c7511f;
}

/* Level-Up Animation: Sterne */
.levelup-star {
  position: absolute;
  width: 18px;
  height: 18px;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="gold"><polygon points="12,2 15,9 22,9.5 17,14.5 18.5,22 12,18 5.5,22 7,14.5 2,9.5 9,9"/></svg>') no-repeat center/contain;
  opacity: 0;
  animation: star-explode 3s ease-out forwards;
}
@keyframes star-explode {
  0% { opacity: 1; transform: scale(0.5) translateY(0); }
  60% { opacity: 1; transform: scale(1.2) translateY(-30px); }
  80% { opacity: 1; transform: scale(1) translateY(-50px); }
  100% { opacity: 0; transform: scale(0.7) translateY(-80px); }
}

/* Wartungshinweis Pulse Animation */
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.02); opacity: 0.95; }
}

/* Fortschrittsbalken: Standard nur Desktop anzeigen */
.exp-bar-desktop { display: block; }
.exp-bar-mobile { display: none !important; }
@media (max-width: 700px) {
  .exp-bar-desktop { display: none !important; }
  .exp-bar-mobile { display: flex !important; flex-direction: column; margin-left: 0 !important; margin-right: 0 !important; }
  .exp-bar-mobile-inner { min-width: 0 !important; height: 100%; border-radius: 9px; background: linear-gradient(90deg, #FE2D0E 60%, #FFB300 100%); transition: width 0.3s; }
  .exp-bar-mobile-label { position: absolute; left: 50%; top: 0; transform: translateX(-50%); color: #fff; font-size: 0.9rem; line-height: 18px; font-weight: bold; text-shadow: 0 1px 2px #0008; width: 100%; text-align: center; pointer-events: none; }
  .exp-bar-mobile .exp-bar-inner, .exp-bar-mobile .exp-bar-label { display: none !important; }
}
/* Erfahrungsbalken (Experience Bar) */
.exp-bar-outer {
    display: block;
    width: 140px;
    max-width: 95vw;
    height: 18px;
    background: #222;
    border-radius: 9px;
    border: 2px solid #fff;
    position: relative;
    margin-top: 0;
    overflow: hidden;
}
.exp-bar-inner {
    display: block;
    height: 100%;
    border-radius: 9px;
    background: linear-gradient(90deg, #FE2D0E 60%, #FFB300 100%);
    transition: width 0.3s;
    min-width: 0 !important;
    /* width wird nur per Inline-Style gesetzt! */
}
.exp-bar-label {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    color: #fff;
    font-size: 0.85rem;
    line-height: 18px;
    font-weight: bold;
    text-shadow: 0 1px 2px #0008;
    width: 100%;
    text-align: center;
    pointer-events: none;
}
@media (max-width: 700px) {
    .exp-bar-outer {
        width: 98vw !important;
        max-width: 420px;
        min-width: 100px;
        display: block !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box;
    }
    .exp-bar-inner {
        min-width: 0 !important;
        /* width wird nur per Inline-Style gesetzt! */
    }
    .exp-bar-label {
        font-size: 0.98rem;
    }
}
/* Navigation Buttons */
.nav-area {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    align-content: flex-start;
    margin-top: 0;
    margin-bottom: 18px;
    position: absolute;
    top: 95px;
    left: 0;
    width: 100vw;
    z-index: 1;
}
.mobile-menu-btn {
    width: 44px; height: 36px; border: none; background: transparent; cursor: pointer; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; padding: 4px; transform: rotate(90deg);
}
.mobile-menu-btn .burger-line {
    display: inline-block; width: 3px; height: 20px; background: #fff; margin: 0 3px; border-radius: 2px;
}
.mobile-menu-btn:focus { outline: 2px solid rgba(255,255,255,0.8); outline-offset: 2px; }
.menu-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.35); z-index: 199; opacity: 0; pointer-events: none; transition: opacity 0.2s ease; }
.menu-backdrop.visible { opacity: 1; pointer-events: auto; }
.mobile-drawer { transition: transform 0.2s ease; }
.nav-area .smartlogo-nav {
    display: none;
}
.nav-btn {
    background: #FE2D0E;
    color: #fff;
    border: none;
    border-radius: 0 0 0.45rem 0.45rem;
    padding: 0.55rem 1.2rem;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    transition: background 0.2s, color 0.2s;
    cursor: pointer;
    display: inline-block;
    margin: 0;
}
.nav-btn:hover {
    background: #c8230a;
    color: #fff;
}
@media (max-width: 700px) {
    /* Header fixieren und über allem halten */
    .main-header { position: fixed !important; top: 0; left: 0; width: 100vw; z-index: 300; }

    /* Hamburger-Button immer oben links sichtbar, unabhängig vom Scroll */
    #menu-toggle.mobile-menu-btn {
        position: fixed;
        top: max(8px, env(safe-area-inset-top));
        left: max(8px, env(safe-area-inset-left));
        z-index: 310; /* über Header-Inhalt und Backdrop */
    }

    html, body {
        width: 100vw;
        min-width: 100vw;
        max-width: 100vw;
        overflow-x: hidden;
    }
    body {
        flex-direction: row;
        align-items: flex-start;
        justify-content: flex-start;
        margin: 0;
        padding: 0;
        /* Platz für fixen Header dynamisch, via CSS-Variable gesetzt durch JS */
        padding-top: calc(var(--header-offset, 95px) + 12px);
    }
    /* Sicherer Abstand der Haupt-Container unterhalb des dynamischen Headers */
    .container { margin-top: calc(var(--header-offset, 95px) + 8px) !important; }
    .nav-area {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        top: 0;
        left: 0;
        position: fixed;
        width: 240px;
        max-width: 78vw;
        z-index: 200;
        background: #FE2D0E;
        border-radius: 0 8px 8px 0;
        overflow-y: auto;
        height: 100vh;
        box-shadow: 2px 0 12px rgba(0,0,0,0.2);
        display: flex;
        transform: translateX(-100%); /* hidden by default */
    }
    .nav-area.open { transform: translateX(0); }
    .nav-area .nav-btn {
        width: 100%;
        max-width: 100%;
        text-align: left;
        font-size: 1rem;
        padding: 0.9rem 0.7rem 0.9rem 1.1rem;
        border-radius: 0;
        margin: 0;
        border-bottom: 1px solid #fff2;
        border-right: none;
        box-sizing: border-box;
        display: block;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        background: transparent;
    }
    /* Smartphone-Logo oben in der Nav-Leiste */
    .nav-area .smartlogo-nav {
        width: 60px;
        height: 60px;
        margin: 8px 0 18px 10px;
        display: block;
        border-radius: 50%;
        background: #fff2;
        object-fit: contain;
        align-self: flex-start;
        position: absolute;
        top: 0;
        left: 0;
        z-index: 210;
    }
    .nav-area .nav-btn:last-child {
        border-bottom: none;
    }
    .main-header { z-index: 10; position: fixed; width: 100vw; left: 0; top: 0; box-sizing: border-box; padding-left: 12px !important; background: #FE2D0E; display: flex; flex-direction: row; align-items: center; justify-content: space-between; }
    .header-login-area {
        z-index: 20;
        position: relative;
        background: none;
        width: auto !important;
        min-width: 0;
        max-width: 100vw;
        display: flex;
        flex-direction: column;
        flex-wrap: wrap;
        align-items: flex-start;
        justify-content: flex-start;
        margin-left: auto;
        margin-right: 0;
    }
    .container { z-index: 1; position: relative; margin: 8px 0 8px 0 !important; width: 100vw; max-width: 100vw; box-sizing: border-box; border-radius: 0; box-shadow: none; overflow-x: hidden; font-size: 0.95rem; }
    .container * { overflow-wrap: anywhere; word-break: break-word; }
    .container table { width: 100%; font-size: 0.9rem; }
    .container th, .container td { padding: 4px 6px; }
    .container h2 { font-size: 1.2rem; }
    .container h3 { font-size: 1.05rem; }
    .container button { font-size: 0.98rem; padding: 0.7rem; }
    .container img, .container table, .container svg, .container canvas { max-width: 100% !important; height: auto; }
}
@media (max-width: 700px) {
    .main-header {
        flex-direction: row;
        align-items: center;
        padding: 8px 2vw 8px 2vw;
    }
    .user-stats { gap: 6px !important; }
    .stat-badge { display:inline-flex; align-items:center; gap:4px; background:#ffffff22; color:#fff; border-radius: 999px; padding: 2px 8px; font-size: 0.95rem; line-height: 1; }
    .stat-badge svg { display:inline-block; width:16px; height:16px; }
    .stat-badge .stat-value { font-weight: 600; }
    .logo-img {
        height: 48px;
        margin-bottom: 0;
        margin-right: 10px;
    }
    .header-login-area {
        gap: 6px;
    }
    .header-login-area form, .header-login-area span {
        width: auto;
        justify-content: flex-start;
    }
    .header-login-area input, .header-login-area button {
        width: 70px;
        min-width: 0;
        font-size: 0.92rem;
        margin-bottom: 0;
        padding-left: 2px;
        padding-right: 2px;
    }
}
/* Header Responsive Styles */
.main-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: #FE2D0E;
    z-index: 2;
    height: 95px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: visible;
    padding: 0 24px;
    box-sizing: border-box;
}
.logo-img {
    height: 65px;
    background: transparent;
}
.header-login-area {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Language Selector */
.language-selector {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    margin-right: 16px;
}
.lang-flag {
    text-decoration: none;
    font-size: 1.5rem;
    opacity: 0.5;
    transition: opacity 0.2s;
    cursor: pointer;
}
.lang-flag:hover {
    opacity: 0.75;
}
.lang-flag.active {
    opacity: 1;
}

/* Login Form */
.header-login-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
}
.header-login-form > div {
    display: flex;
    gap: 6px;
}
.header-login-form input {
    padding: 6px 10px;
    border-radius: 5px;
    border: 1px solid #fff;
    font-size: 0.85rem;
    width: 120px;
    height: 32px;
    box-sizing: border-box;
    background: #fff;
    color: #333;
    font-weight: 400;
}
.header-login-form input::placeholder {
    color: #999;
    font-weight: 400;
}
.header-login-form input:focus {
    outline: none;
    border-color: #FFD700;
}
.header-login-form button {
    background: #fff;
    color: #FE2D0E;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    padding: 6px 14px;
    cursor: pointer;
    white-space: nowrap;
    height: 32px;
    width: 246px;
    box-sizing: border-box;
    font-size: 0.85rem;
    transition: all 0.2s;
}
.header-login-form button:hover {
    background: #FFD700;
    color: #000;
}

@media (max-width: 700px) {
    .main-header {
        flex-direction: column;
        height: auto;
        padding: 12px 4vw 8px 4vw;
        align-items: flex-start;
    }
    .logo-img {
        height: 45px;
        margin-bottom: 8px;
    }
    .header-login-area {
        width: 100%;
        justify-content: flex-start;
        gap: 8px;
        margin-top: 4px;
        flex-wrap: wrap;
    }
    .header-login-area form, .header-login-area span {
        width: auto !important;
        min-width: 0;
        max-width: 100vw;
        justify-content: flex-start;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }
    .header-login-area input, .header-login-area button {
        width: auto !important;
        min-width: 0;
        max-width: 100vw;
        margin-bottom: 6px;
        flex: 0 0 auto;
    }
}
/* style.css */

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(120deg, #f0f4f8 0%, #c9e7fa 100%);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
}
    html, body { height: 100%; }
    /* Platz für festen Footer freihalten (dynamisch via JS gesetzte CSS-Variable) */
    body { padding-bottom: 50px; }

/* Footer */
.main-footer {
    width: 100%;
    background: #FE2D0E;
    color: #fff;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    transition: transform 0.3s ease;
}
.main-footer .footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 8px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
}
.main-footer a { color: #fff; text-decoration: underline; }
.footer-brand { font-weight: 700; font-size: 0.9rem; }
.footer-links { display: flex; gap: 10px; flex-wrap: wrap; }
.footer-copy { opacity: 0.9; font-size: 0.8rem; }
.footer-spacer { height: 45px; width: 100%; flex-shrink: 0; }

/* Footer Toggle Tab (nur auf kleinen Bildschirmen) */
.footer-toggle-tab {
    display: none;
    position: absolute;
    top: -36px;
    left: 50%;
    transform: translateX(-50%);
    background: #FE2D0E;
    color: #fff;
    padding: 8px 20px;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.2);
    z-index: 1;
    user-select: none;
    gap: 6px;
    align-items: center;
}
.footer-toggle-icon {
    font-size: 0.8rem;
    display: inline-block;
    transition: transform 0.3s ease;
}

/* Responsive: Auf Tablets und kleineren Bildschirmen */
@media (max-width: 1024px) {
    /* Footer standardmäßig minimiert */
    .main-footer {
        transform: translateY(calc(100% - 0px));
    }
    
    .footer-toggle-tab {
        display: flex;
    }
}

/* Auf Smartphones: Button nach links */
@media (max-width: 768px) {
    .footer-toggle-tab {
        left: 12px;
        transform: translateX(0);
        border-radius: 8px 8px 0 0;
    }
}

@media (max-width: 1024px) {
    
    /* Wenn erweitert */
    .main-footer.footer-expanded {
        transform: translateY(0);
    }
    
    .main-footer .footer-inner {
        justify-content: center;
        text-align: center;
        flex-direction: column;
    }
    
    .footer-links {
        width: 100%;
        justify-content: center;
        row-gap: 8px;
    }
    
    .footer-spacer {
        height: 50px; /* Weniger Platz wenn minimiert */
    }
}

/* Auf sehr kleinen Bildschirmen (Smartphones) */
@media (max-width: 700px) {
    .main-footer .footer-inner {
        padding: 12px 16px;
    }
    
    .footer-links {
        gap: 10px;
        font-size: 0.9rem;
    }
}

/* Genug Abstand unter Header+Nav auf Desktop */
.container { margin-top: 170px !important; }

.container {
    background: #fff;
    padding: 2rem 2.5rem;
    border-radius: 1.2rem;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    max-width: 500px;
    width: 100%;
    margin: 2rem auto;
}

/* Login-Überschrift in Projektfarbe */
h2 {
    text-align: center;
    color: #FE2D0E;
    margin-bottom: 1.5rem;
}

form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

label {
    font-size: 1rem;
    color: #333;
}

input[type="text"],
input[type="email"],
    body {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        margin: 0;
        padding: 0;
    transition: border 0.2s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
    border: 1.5px solid #1a73e8;
    outline: none;
}

button {
    padding: 0.8rem;
    background: #FE2D0E;
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

button:hover {
    background: #c8230a;
}

p {
    margin: 0.5rem 0 0 0;
    text-align: center;
}

/* Notification Dropdown - Mobile Optimierung */
@media (max-width: 768px) {
    .notification-dropdown {
        position: fixed !important;
        top: 60px !important;
        right: 10px !important;
        left: 10px !important;
        max-width: none !important;
        min-width: auto !important;
    }
    
    /* Header feste Höhe auf Mobile */
    .main-header {
        height: 60px !important;
        padding: 0 12px !important;
    }
    
    .logo-img {
        height: 40px !important;
    }
    
    /* Benachrichtigungsglocke in gleicher Zeile */
    .user-stats {
        flex-wrap: nowrap !important;
    }
    
    .notification-bell-container {
        display: inline-flex !important;
    }
    
    .notification-bell {
        padding: 4px !important;
    }
    
    .notification-bell svg {
        width: 20px !important;
        height: 20px !important;
    }
    
    .notification-badge {
        width: 14px !important;
        height: 14px !important;
        font-size: 9px !important;
    }
    
    /* Reduziere margin-top für Container auf Mobile */
    .container[style*="margin-top:120px"],
    .container[style*="margin-top: 120px"],
    div[style*="margin-top:120px"],
    div[style*="margin-top: 120px"] {
        margin-top: 70px !important;
    }
}

@media (max-width: 500px) {
    .container { padding: 12px 10px; }
    .container h2 { font-size: 1.1rem; }
    .container h3 { font-size: 0.98rem; }
    .container table { font-size: 0.88rem; }
    .container button { font-size: 0.92rem; padding: 0.65rem; }
}
