body {
    margin: 0;
    font-family: system-ui, sans-serif;
    background-color: #121212;
    color: #fff;
    /* kein flex! */
    min-height: 100vh;
}
body.login {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}
body.dashboard {
    display: block;
    min-height: 100vh;
    background: #121212;
    color: #fff;
}

.logo-fixed {
    position: absolute;
    top: 18px;
    left: 20px;
    z-index: 1000;
}
.logo-small { width: 300px; }
@media (max-width: 768px) { .logo-small { width: 160px; } }

/* Box für Login, Registrierung, Admin-Form */
.login-box {
    width: 90%;
    max-width: 420px;
    background-color: #1e1e1e;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.4);
}

/* Formularfelder mit Icon */
.input-group {
    position: relative;
    margin-bottom: 1.5rem;
}
.input-group i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
}
.input-group input,
.input-group select {
    width: 100%;
    padding: 0.8rem 0.8rem 0.8rem 2.2rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    background-color: #2a2a2a;
    color: white;
    box-sizing: border-box;
}

/* Buttons */
button {
    width: 100%;
    padding: 0.8rem;
    background-color: #2979ff;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
}
button:hover {
    background-color: #1565c0;
}

/* Erfolg / Fehler */
.success-msg {
    color: #66ff66;
    text-align: center;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}
.error-msg {
    color: #ff5252;
    text-align: center;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* Link unter Formularen */
.register-link {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
}
.register-link a {
    color: #2979ff;
    text-decoration: none;
}

/* Top-Buttons (Admin/Logout) */
.top-right {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.8rem;
}
.admin-button, .logout-button {
    background: linear-gradient(90deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    padding: 0.7rem 1.3rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    border: none;
    transition: filter 0.2s, box-shadow 0.2s;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(80,100,255,0.10);
}
.logout-button {
    background: linear-gradient(90deg, #c0392b 0%, #ff5f6d 100%);
}
.admin-button:hover, .logout-button:hover {
    filter: brightness(1.12);
    box-shadow: 0 4px 20px rgba(80,100,255,0.18);
}

/* Tabs */
.tabs {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 6rem;
    margin-bottom: 2rem;
    z-index: 10;
}
.tab {
    padding: 0.7rem 2.3rem;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    background: #2a2a2a;
    color: #b0b8f0;
    text-decoration: none;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(70,60,140,0.08);
}
.tab.active {
    background: #39399a;
    color: #fff;
    box-shadow: 0 4px 20px rgba(100,100,255,0.20);
}
.tab:hover:not(.active) {
    background: #39399a;
    color: #fff;
    transform: scale(1.04);
}

/* Kachel-Container */
.dashboard-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 1.5rem;
}
.tiles-grid {
    display: grid;
    gap: 1.3rem;
    margin-top: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
/* Desktop: 6 Spalten */
@media (min-width: 1200px) {
    .tiles-grid { grid-template-columns: repeat(6, 1fr); }
}
.tile {
    background: #39399a;
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100px;
    cursor: pointer;
    box-shadow: 0 0 12px rgba(40,60,120,0.17);
    text-align: center;
    font-size: 1.03rem;
    font-weight: 500;
    color: #b8bffe;
    border: 1px solid #232376;
    position: relative;
}
.tile:hover {
    transform: scale(1.04);
    box-shadow: 0 7px 26px 0 rgba(110,120,255,0.19);
    background: linear-gradient(135deg, #3843a0 65%, #7c37fe 100%);
    color: #fff;
}
.tile-label { word-break: break-word; text-align: center; }

/* ========== Upload-Button unter Tabs ========= */
.upload-link-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 1.2rem;
    margin-top: -1.1rem; /* Überlappt den Bereich zu den Tabs leicht */
}

.upload-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
    font-size: 0.97rem;
    color: #73b4ff;
    text-decoration: none;
    background: none;
    border: none;
    padding: 0.18rem 0.8rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.14s, color 0.15s;
}
.upload-link:hover {
    color: #fff;
    background: #2979ff;
    text-decoration: underline;
}
.upload-link i {
    font-size: 1em;
    margin-right: 0.34em;
}

/* ========== Upload-Modal und DragArea ========= */
.modal-bg {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0; top: 0; width: 100vw; height: 100vh;
    background: rgba(14,20,40,0.77);
    backdrop-filter: blur(1.5px);
}
.modal {
    background: #23233a;
    border-radius: 14px;
    max-width: 340px;
    width: 93vw;
    padding: 28px 22px 20px 22px;
    margin: 120px auto 0 auto;
    position: relative;
    box-shadow: 0 8px 32px rgba(36,44,130,0.23);
    color: #fff;
}
.close-modal {
    position: absolute;
    right: 18px; top: 10px;
    font-size: 1.6em;
    color: #79aaff;
    cursor: pointer;
    transition: color 0.15s;
}
.close-modal:hover { color: #ffb0b0; }

.drag-area {
    border: 2px dashed #488cd8;
    background: #1a2233;
    padding: 28px 10px 28px 10px;
    border-radius: 9px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.23s, background 0.17s;
    margin-bottom: 14px;
    font-size: 1.08rem;
}
.drag-area.dragover {
    border-color: #3fddff;
    background: #192f46;
    color: #8eeaff;
}

#drag-text i {
    font-size: 2.3em;
    color: #38c7ff;
    margin-bottom: 8px;
    display: block;
}

.upload-message {
    color: #78ff7b;
    margin-top: 10px;
    font-size: 1.05em;
    text-align: center;
    min-height: 20px;
}

/* Responsive Upload-Modal */
@media (max-width: 500px) {
    .modal { padding: 17px 6px 13px 6px; margin: 70px auto 0 auto; }
    .close-modal { right: 6px; top: 7px; }
}

/* Fehler- / Ladeanzeige */
#error {
    text-align: center;
    color: #ff6666;
    margin-top: 2rem;
}

/* Responsive Anpassung: TABS kleiner */
@media (max-width: 800px) {
    .tabs { gap: 0.4rem; margin-top: 3.5rem; }
    .tab { padding: 0.55rem 1.1rem; font-size: 0.97rem; }
    .dashboard-container { padding: 0 0.5rem; }
}
@media (max-width: 500px) {
    .logo-fixed { top: 7px; left: 7px; }
    .logo-small { width: 105px; }
    .tabs { margin-top: 2.1rem; margin-bottom: 1.2rem; }
    .tab { border-radius: 18px; padding: 0.35rem 0.5rem; }
}
