/* ========== RESET & BASIS ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Open Sans', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    background: #f0f2f5;
    color: #222;
}

a {
    color: #3366cc;
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    text-decoration: underline;
}

.section {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 2rem;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* ========== BUTTONS ========== */
button,
.btn {
  background: linear-gradient(to right, #0040a0, #0068ff);
  color: #fff !important;
  border: none;
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  display: inline-block;
  text-align: center;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
}

button:hover,
.btn:hover {
  background: linear-gradient(to right, #003080, #005fe0);
}

button:disabled,
.btn:disabled {
  background: #ccc !important;
  color: #666 !important;
  cursor: not-allowed;
}

/* ========== BUTTON VARIANTEN ========== */
.btn.primary {
  background: linear-gradient(to right, #0040a0, #0068ff);
  color: #fff !important;
}

.btn.primary:hover {
  background: linear-gradient(to right, #003080, #005fe0);
}

.btn.secondary {
  background: linear-gradient(to right, #777, #999);
  color: #fff !important;
}

.btn.secondary:hover {
  background: linear-gradient(to right, #555, #777);
}

.btn.success {
  background: linear-gradient(to right, #198754, #28a745);
  color: #fff !important;
}

.btn.success:hover {
  background: linear-gradient(to right, #157347, #218838);
}

.btn.danger {
  background: linear-gradient(to right, #c82333, #e74c3c);
  color: #fff !important;
}

.btn.danger:hover {
  background: linear-gradient(to right, #a71d2a, #c0392b);
}

.btn.warning {
  background: linear-gradient(to right, #ffc107, #ffcd39);
  color: #000 !important;
}

.btn.warning:hover {
  background: linear-gradient(to right, #e0a800, #f0b429);
}

.btn.dark {
  background: linear-gradient(to right, #222, #444);
  color: #fff;
}

.btn.dark:hover {
  background: linear-gradient(to right, #111, #333);
}

/* ========== STATUSBAR ========== */
.statusbar {
    background: linear-gradient(to right, #004080, #0066cc);
    color: white;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0.3rem 1rem;
    gap: 1rem;
    font-size: 0.9rem;
    border-bottom: 2px solid #002855;
}

.statusbar span,
.statusbar a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: white;
    padding: 0.3rem 0.6rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    font-weight: 500;
    text-decoration: none;
}

.statusbar a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.statusbar .switch-label {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 22px;
}

.statusbar .switch-label input {
    opacity: 0;
    width: 0;
    height: 0;
}

.statusbar .slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    border-radius: 34px;
    transition: .4s;
}

.statusbar .slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.statusbar input:checked + .slider {
    background-color: #3e64ff;
}

.statusbar input:checked + .slider:before {
    transform: translateX(20px);
}

/* ========== NAVIGATION ========== */
.main-nav {
    background-color: #1e1e1e;
    padding: 0.6rem 1rem;
    box-shadow: inset 0 -1px 0 rgba(255,255,255,0.05);
    font-size: 0.95rem;
    border-bottom: 3px solid #000;
}

.main-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.main-nav li {
    position: relative;
}

.main-nav a {
    color: white;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.3s;
}

.main-nav a:hover,
.main-nav a.active {
    background-color: #3e64ff;
}

.main-nav li:hover > ul {
    display: block;
}

/* Dropdown nach rechts begrenzen */
.main-nav li ul {
    display: none;
    position: absolute;
    top: 100%;
    right: 0; /* statt left: 0 */
    background: #2c3e50;
    padding: 0.5rem 0;
    border-radius: 6px;
    min-width: 180px;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    white-space: nowrap;
}

.main-nav li ul li a {
    padding: 0.5rem 1rem;
    color: white;
    display: block;
}

.main-nav li ul li a:hover {
    background-color: #3e64ff;
}

/* ========== RESPONSIVE NAVIGATION ========== */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.nav-brand a {
    font-weight: bold;
    color: white;
    font-size: 1.2rem;
    text-decoration: none;
    padding: 0.3rem 0.5rem;
}

.nav-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    display: none;
    cursor: pointer;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-links li {
    position: relative;
}

.nav-links a {
    color: white;
    font-weight: 500;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.nav-links a:hover,
.nav-links a.active {
    background-color: #3e64ff;
}

.has-dropdown:hover .dropdown {
    display: block;
}

.dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0; /* Wichtig: verhindert Überlauf nach rechts */
    background: #2c3e50;
    border-radius: 6px;
    padding: 0.5rem 0;
    min-width: 180px;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    white-space: nowrap;
}

.dropdown li a {
    display: block;
    padding: 0.5rem 1rem;
    color: white;
}

.dropdown li a:hover {
    background: #3e64ff;
}


/* ========== HEADER-BANNER ========== */
.site-header .banner {
    background: linear-gradient(to bottom right, #004080, #0074d9);
    color: white;
    padding: 3rem 1rem;
    text-align: center;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.site-header h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.site-header p {
    font-size: 1.2rem;
    font-weight: 300;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

/* ========== FOOTER ========== */
footer {
  background-color: #111;
  color: #eee;
  padding: 2rem 1rem;
  text-align: center;
  font-size: 0.95rem;
  border-top: 3px solid #3eb489;
}

footer .footer-container {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

footer .footer-left,
footer .footer-right {
  flex: 1 1 300px;
}

footer a {
  color: #0068ff;
  text-decoration: none;
  transition: color 0.2s ease;
}

footer a:hover {
  color: white;
  text-decoration: underline;
}

footer .social-icons {
  margin-top: 0.5rem;
}

footer .social-icons a {
  margin: 0 0.5rem;
  font-size: 1.2rem;
  display: inline-block;
}

@media (max-width: 600px) {
  footer .footer-container {
    flex-direction: column;
    text-align: center;
  }

  footer .footer-left,
  footer .footer-right {
    flex: 1 1 100%;
  }

  footer .social-icons {
    margin-top: 1rem;
  }
}

/* ========== DARKMODE ========== */
body.dark {
    background-color: #121212;
    color: #e0e0e0;
}

/* Bereich .section */
body.dark .section {
    background-color: #1e1e1e;
    color: #ddd;
}

/* Links */
body.dark a {
    color: #90caf9;
}

body.dark a:hover {
    color: #ffffff;
}

/* Buttons */
body.dark .btn,
body.dark button {
    background: linear-gradient(to right, #333, #555);
    color: #fff !important;
}

body.dark .btn:hover,
body.dark button:hover {
    background: linear-gradient(to right, #222, #444);
}

/* Button Varianten */
body.dark .btn.primary {
    background: linear-gradient(to right, #3366cc, #5588ff);
}

body.dark .btn.danger {
    background: linear-gradient(to right, #b71c1c, #c62828);
}

body.dark .btn.danger:hover {
    background: linear-gradient(to right, #7f0000, #b71c1c);
}

/* Statusbar */
body.dark .statusbar {
    background: linear-gradient(to right, #222, #333);
    border-bottom: 2px solid #000;
}

body.dark .statusbar span,
body.dark .statusbar a {
    background-color: rgba(255, 255, 255, 0.05);
    color: #ddd;
}

/* Navigation */
body.dark .main-nav {
    background-color: #181818;
    border-bottom: 3px solid #000;
}

body.dark .main-nav a {
    color: #ddd;
}

body.dark .main-nav a:hover,
body.dark .main-nav a.active {
    background-color: #3e64ff;
}

/* Dropdown-Menü */
body.dark .main-nav li ul,
body.dark .dropdown {
    background: #222;
}

body.dark .dropdown li a {
    color: #ccc;
}

body.dark .dropdown li a:hover {
    background-color: #3e64ff;
    color: white;
}

/* Banner */
body.dark .site-header .banner {
    background: linear-gradient(to bottom right, #0d47a1, #1565c0);
    color: white;
}

/* Footer */
body.dark footer {
    background-color: #1a1a1a;
    color: #ccc;
    border-top-color: #3e64ff;
}

body.dark footer a {
    color: #90caf9;
}

body.dark footer a:hover {
    color: white;
}
