body, header, .section, .card {
  transition:   
        background-color 0.4s ease, 
        color 0.4s ease, 
        box-shadow 0.4s ease;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
    background: #f4f6fb;
    color: #222;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 6rem;
    background: #f4f6fb;
    box-shadow: 0 2px 8px #0001;
    display: flex;
    align-items: center;
    padding: 0 1rem;
    box-sizing: border-box;
    z-index: 1000;
}

header h1 {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    font-size: 3.5rem;
    font-weight: 800;
    color: #1a2947;
    letter-spacing: 1px;
    user-select: none;
}

.toggle-switch {
    margin-left: auto;
    position: relative;
    width: 48px;
    height: 26px;
    background-color: #ddd;
    border-radius: 26px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.toggle-switch::before {
    content: '🌞';
    position: absolute;
    top: 50%;
    left: 4px;
    transform: translateY(-50%);
    font-size: 1rem;
    transition: transform 0.3s ease, content 0.3s ease;
}

body.dark-mode .toggle-switch {
    background-color: #444;
}

body.dark-mode .toggle-switch::before {
    content: '🌙';
    transform: translate(20px, -50%);
}

/* --- STATUS INDICATOR --- */
.status-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #aaa;
    box-shadow: none;
    transition: background-color 0.3s ease;
    z-index: 10;
}

.status-indicator.online {
    background-color: #4caf50;
    box-shadow: 0 0 6px #4caf5080;
}

/* Section styles */
.section:first-of-type {
    margin-top: 8rem;
}

.section {
    background: #fff;
    padding: 2.5rem 1rem;
    border-radius: 18px;
    margin: 2.5rem auto 0rem auto;
    box-shadow: 0 4px 24px #0001;
    max-width: 700px;
}

h2 {
    margin-top: 0.2em;
    margin-bottom: 1.4em;
    color: #284071;
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
}

.card-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
}

.card {
    background: #f7f9fc;
    border-radius: 14px;
    box-shadow: 0 2px 8px #0001;
    padding: 1.2em 2em;
    display: flex;
    align-items: center;
    gap: 2.2em;
    text-decoration: none;
    color: #1a2947;
    font-size: 1.15em;
    font-weight: 500;
    min-width: 180px;
    border: 1px solid #e3e8f0;
    transition: all 0.2s;
    position: relative;
}

.card i {
    font-size: 1.7em;
    color: #2980b9;
    transition: color 0.2s;
}

.card span {
    color: #284071;
    font-size: 1.1em;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.card:hover {
    box-shadow: 0 8px 24px #0002;
    transform: translateY(-3px) scale(1.04);
    background: #eaf1fb;
    border-color: #b6c7e6;
    text-decoration: none;
}

.card:hover i {
    color: #1a2947;
}

.section a:hover {
    text-decoration: none;
}

@media (max-width: 600px) {
    .card-list {
        flex-direction: column;
        gap: 1em;
    }
    .section {
        padding: 1em 0.5em;
        margin: 3rem auto 0rem auto;
    }
    header h1 {
        font-size: 2.2rem;
    }
    h2 {
        font-size: 1.2rem;
    }
}

footer {
    text-align: center;
    margin-bottom: 1rem;
    color: #555;
}

/* --- DARK MODE STYLES --- */
body.dark-mode {
    background-color: #121212;
    color: #f5f5f5;
}

body.dark-mode header {
    background-color: #1e1e1e;
    box-shadow: 0 2px 8px #0005;
}

body.dark-mode header h1 {
    color: #e0e0e0;
}

body.dark-mode .section {
    background-color: #1e1e1e;
    box-shadow: 0 4px 24px #0005;
}

body.dark-mode .card {
    background: #252525;
    color: #f0f0f0;
    border-color: #333;
    box-shadow: 0 2px 8px #0005;
}

body.dark-mode .card span {
    color: #ddd;
}

body.dark-mode .card:hover {
    background-color: #333;
    border-color: #555;
}

body.dark-mode .card:hover i {
    color: #90caf9;
}
/* Zurück-Button im Admin Panel */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    background: linear-gradient(90deg, #6dd5fa 60%, #2980b9 100%);
    color: #fff;
    border-radius: 22px;
    padding: 0.7em 1.4em;
    font-size: 1.1em;
    font-weight: 600;
    box-shadow: 0 2px 8px #2980b940;
    border: none;
    outline: none;
    transition: background 0.3s, box-shadow 0.3s, color 0.3s;
    text-decoration: none;
    margin-right: 1rem;
}

.back-button i {
    font-size: 1.2em;
    margin-right: 0.3em;
}

.back-button:hover {
    background: linear-gradient(90deg, #2980b9 60%, #1a2947 100%);
    color: #ffd700;
    box-shadow: 0 4px 16px #2980b980;
    text-decoration: none;
}
/* Admin-Link im Header */
.admin-link {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7f9fc;
    color: #2980b9;
    border-radius: 14px;
    width: 44px;
    height: 44px;
    font-size: 1.6em;
    box-shadow: 0 2px 8px #0001;
    border: 1px solid #e3e8f0;
    transition: all 0.2s;
    margin-right: 1rem;
    outline: none;
    text-decoration: none;
}

.admin-link:hover {
    background: #eaf1fb;
    border-color: #b6c7e6;
    color: #1a2947;
    box-shadow: 0 8px 24px #0002;
    text-decoration: none;
}

body.dark-mode .admin-link {
    background: #252525;
    color: #90caf9;
    border-color: #333;
    box-shadow: 0 2px 8px #0005;
}

body.dark-mode .admin-link:hover {
    background: #333;
    border-color: #555;
    color: #fff;
}

