/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overscroll-behavior: none; /* Verhindert das Verschieben der Seite */
    overflow-x: hidden; /* Verhindert horizontales Scrollen */
    margin: 0;
    padding: 0;
    width: 100%;
    font-family: system-ui, sans-serif;
    background: linear-gradient(to bottom, #2a9d8f, #264653);    
    color: #222;
    min-height: 100%; /* Stellt sicher, dass die Seite mindestens die Höhe des Viewports einnimmt */
}

/* Basis */
body {
    display: flex;
    flex-direction: column;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    min-height: 100vh;
}

main {
    width: 100%;
    flex: 1;
}

/* Navbar */
.navbar {
    background: #1f2933;
    padding: 1rem 2rem;
}

.nav-container {
    width: 100%;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
}

.logo {
    display: flex;
    align-items: center; /* Zentriert das Logo und den Text vertikal */
    gap: 0.5rem; /* Abstand zwischen Logo und Text */
    font-weight: 700;
    font-size: 1.3rem;
    color: white;
}

.svg-logo {
    width: 40px; /* Breite des Logos */
    height: 40px; /* Höhe des Logos */
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.8)); /* Glüheffekt entlang der Konturen */
    transition: filter 0.3s ease; /* Sanfter Übergang */
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 1rem;
}

.nav-links a {
    color: #d1d5db;
    text-decoration: none;
}

.nav-links a:hover {
    color: white;
}

.nav-links.active {
    pointer-events: auto; /* Klicks aktivieren */
}

/* Burger-Menü-Button */
.burger-menu {
    display: none; /* Standardmäßig ausgeblendet */
    flex-direction: column;
    justify-content: space-between;
    width: 2rem;
    height: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1100; /* Sicherstellen, dass es über anderen Elementen liegt */
}

.burger-menu span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: white; /* Farbe der Linien */
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease; /* Sanfte Übergänge */
}

/* Animation für das geöffnete Menü */
.burger-menu.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg); /* Erste Linie dreht sich */
}

.burger-menu.active span:nth-child(2) {
    opacity: 0; /* Zweite Linie wird unsichtbar */
}

.burger-menu.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg); /* Dritte Linie dreht sich */
}

/* Hero */
.hero {
    text-align: center;
    padding: 2rem 1rem;
    margin: 3rem;
    background: white;
    border-radius: 20px;
    border: none;
}

.hero h1 {
    font-size: 50px;
}

.hero p {
    margin: 1rem 0 2rem;
    color: #555;
}

.primary-btn {
    padding: 0.75rem 2rem;
    font-size: 1rem;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.primary-btn:hover {
    background: #1d4ed8;
}

.hero-upload-button {
    margin-left: 0.75rem;
    padding: 0.6rem 1rem;
    font-size: 1rem;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.hero-upload-button:hover {
    background: #1d4ed8;
}

.shifted {
    transform: translateY(250px); /* Verschiebe das Element um 100px nach unten */
    transition: transform 0.3s ease; /* Sanfte Animation */
}

/* Content */
.content {
    flex: 1;
}

/* Grid */
.semester-grid {
    display: flex;
    justify-content: space-evenly;
    flex-wrap: wrap;
}

/* Card */

.upload {
    margin: 3rem;
    color: black;
    margin-top: 0rem;
    background: white;
    flex: 1 1 30%;
    min-width: 300px;
    height: 300px;
    border-radius: 12px;
    border: none; /* Kein äußerer Rand */
    text-align: center;
    cursor: pointer;
    position: relative; /* Für die Platzierung der Pseudo-Elemente */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Gestrichelter Rand mit Abstand nach innen */
.upload::before {
    content: "";
    position: absolute;
    top: 10px; /* Abstand vom oberen Rand */
    left: 10px; /* Abstand vom linken Rand */
    right: 10px; /* Abstand vom rechten Rand */
    bottom: 10px; /* Abstand vom unteren Rand */
    border: 4px dashed gray; /* Grau gestrichelter Rand */
    border-radius: 10px; /* Gleiche Rundung wie der Button */
    pointer-events: none; /* Verhindert, dass der Rand klickbar ist */
    z-index: 1; /* Unterhalb des Kreises */
}

/* Kreis in der Mitte */
.upload::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px; /* Größe des Kreises */
    height: 100px;
    border: 4px dashed gray; /* Grau gestrichelter Kreis */
    border-radius: 50%; /* Macht den Kreis rund */
    background: white; /* Hintergrundfarbe des Kreises */
    z-index: 2; /* Über dem gestrichelten Rand */
}

/* Plus-Symbol im Kreis */
.upload span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem; /* Größe des Plus-Symbols */
    color: gray; /* Farbe des Plus-Symbols */
    font-weight: 300; /* Dünnere Schriftstärke */
    font-family: Arial, sans-serif; /* Optionale Schriftart für ein klares Plus-Symbol */
    z-index: 3; /* Über dem Kreis */
}

.card {
    margin: 3rem;
    color: black;
    margin-top: 0rem;
    background: white;
    flex: 1 1 30%;
    min-width: 300px;
    height: 300px;
    border-radius: 12px;
    border: none;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Sanfter Übergang */
}

.card h2 {
    font-size: 2rem;
}

.card p {
    font-size: 1rem;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.card.in-view {
    transform: scale(1.1); /* Leichtes Zoomen */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2); /* Optional: Schatten hinzufügen */
}

/* Datei-Upload-Bereich */
.file-drop-area {
    border: 2px dashed #ccc;
    border-radius: 5px;
    padding: 20px;
    text-align: center;
    background-color: #f9f9f9;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    margin-bottom: 15px; /* Abstand unter dem Bereich */
}

.file-drop-area:hover {
    background-color: #f1f1f1;
    border-color: #aaa;
}

.file-drop-area p {
    margin: 0;
    font-size: 1rem;
    color: #555;
}

.file-select-label {
    color: #007BFF;
    text-decoration: underline;
    cursor: pointer;
}

.file-input {
    display: none; /* Versteckt das Standard-Dateiauswahlfeld */
}

/* Datei-Name-Anzeige */
.file-name {
    font-size: 1rem;
    color: #333;
    margin-top: 10px;
    text-align: center;
}

/* Login Box */
.login-box {
    text-align: center;
    padding: 2rem 1rem;
    margin: 3rem auto;
    background: white;
    border-radius: 20px;
    border: none;
    max-width: 400px; /* Begrenze die Breite */
    max-height: 470px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* Schatten für die Box */
}
#backButton {
    font-size: 16px; /* Größe des Pfeils */
    padding: 10px;
    background: #555;
}
.login-box h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.login-box label {
    display: block;
    margin: 0.5rem 0 0.25rem;
    font-weight: bold;
    color: #333;
}

.login-box input {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
}

.login-box p {
    margin: 1rem 0;
    font-size: 0.9rem;
    color: #555;
}

.login-box p a {
    color: #2563eb;
    text-decoration: none;
}

.login-box p a:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem;
    background: #1f2933;
    color: white;
    margin-top: auto;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .nav-links.active {
        display: flex; /* Navigation anzeigen */
    }

    .burger-menu {
        display: flex; /* Burger-Menü anzeigen */
    }

    .logo {
        text-align: center; /* Logo bleibt zentriert */
    }
}

@media (orientation: landscape) {
    body {
        margin: 0;
        padding: 0;
        width: 100vw; /* Stellt sicher, dass die Breite 100% des Viewports beträgt */
        height: 100vh; /* Stellt sicher, dass die Höhe 100% des Viewports beträgt */
    }
}

/* Navigation anzeigen, wenn aktiv */
.nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute; /* Absolut positioniert */
    top: 60px; /* Abstand von der oberen Kante (Höhe der Navbar) */
    right: 10px; /* Abstand von der rechten Kante */
    background-color: #f5f5f5; /* Hintergrundfarbe der Box */
    width: 200px; /* Schmalere Breite */
    padding: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Schatten für die Box */
    border-radius: 8px; /* Abgerundete Ecken */
    z-index: 1000; /* Sicherstellen, dass die Box über anderen Elementen liegt */
}

.nav-links.active li {
    margin: 0.5rem 0; /* Abstand zwischen den Links */
    text-align: center; /* Zentrierte Links */
}

.nav-links.active a {
    color: black; /* Links im Burger-Menü schwarz machen */
    text-decoration: none;
}

.nav-links.active a:hover {
    color: #555; /* Optional: Dunkleres Grau beim Hover */
}

.hidden {
    display: none !important; /* Versteckt das Element */
}

/* Modal */
.modal {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

/* Modal-Inhalt */
.modal-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    max-width: 400px;
    width: 100%;
}

/* Abstand zwischen Überschrift, Text und Buttons */
.modal-content h2 {
    margin-bottom: 20px; /* Abstand unter der Überschrift */
}

.modal-content p {
    margin-bottom: 20px; /* Abstand unter dem Text */
}

/* Button für den E-Mail-Provider */
.button {
    display: flex;
    padding: 10px 20px;
    color: white;
    background-color: #007BFF;
    text-decoration: none;
    border: none;
    border-radius: 5px;
    margin-bottom: 20px; /* Abstand unter dem Button */
}

/* Schließen-Button */
.close-button {
    display: flex;
    padding: 10px 20px;
    color: white;
    background-color: #FF0000; /* Rot */
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

/* Hintergrund für das neue Modal */
.customModal {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6); /* Dunklerer Hintergrund */
    z-index: 1100;
}

.customModal.hidden {
    display: none;
}

/* Inhalt des neuen Modals */
.customModal-content {
    background: #ffffff;
    padding: 25px;
    border-radius: 10px;
    text-align: left; /* Links ausrichten */
    max-width: 450px;
    width: 100%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); /* Schatten für das Modal */
    display: flex;
    flex-direction: column; /* Elemente untereinander anordnen */
    gap: 20px; /* Einheitlicher Abstand zwischen den Elementen */
}

.customModal-content h2 {
    margin: 0;
    text-align: center;
}

/* Zentrierte Überschriften (Labels) */
.customModal-content label {
    display: block; /* Block-Layout für Labels */
    text-align: center; /* Text zentrieren */
    font-weight: bold; /* Optional: Fett für bessere Sichtbarkeit */
    margin-bottom: 5px; /* Abstand unter der Überschrift */
}

/* Eingabefeld und Dropdowns */
.customModal-content input,
.customModal-content select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    margin-bottom: 15px; /* Abstand unter jedem Eingabefeld */
}

.customModal-content input:focus,
.customModal-content select:focus {
    border-color: #2a9d8f;
    outline: none;
    box-shadow: 0 0 0 3px rgba(42, 157, 143, 0.16);
}

.customModal-content input[type="color"] {
    height: 46px;
    padding: 4px;
    cursor: pointer;
}

.tag-button-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 4px 0 14px;
    min-height: 34px;
}

.tag-pill {
    --tag-color: #64748b;
    border: 1px solid var(--tag-color);
    border-radius: 999px;
    background: color-mix(in srgb, var(--tag-color) 13%, #ffffff);
    color: #18212f;
    padding: 8px 14px;
    min-height: 34px;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.tag-pill:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12);
}

.tag-pill.selected {
    background: var(--tag-color);
    color: #ffffff;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--tag-color) 22%, transparent);
}

.tag-pill-empty {
    --tag-color: #64748b;
    background: #ffffff;
    border-style: dashed;
}

#createGroupForm {
    display: flex;
    flex-direction: column;
}

#createGroupModal .customModal-content {
    border-radius: 12px;
}

#createGroupModal input {
    border-radius: 8px;
}

/* Buttons */
.customModal-buttons {
    display: flex;
    justify-content: space-between; /* Abstand zwischen den Buttons */
    gap: 15px; /* Abstand zwischen den Buttons */
}

.customModal-buttons .customModal-close-button,
.customModal-buttons .customModal-save-button {
    flex: 1; /* Beide Buttons gleich groß machen */
    padding: 12px 0;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    text-align: center;
}

/* Abbrechen-Button */
.customModal-buttons .customModal-close-button {
    background-color: #e63946; /* Rot für Abbrechen */
    color: white;
    transition: background-color 0.3s ease; /* Sanfter Übergang */
}

.customModal-buttons .customModal-close-button:hover {
    background-color: #d62839; /* Dunkleres Rot beim Hover */
}

/* Speichern-Button */
.customModal-buttons .customModal-save-button {
    background-color: #2a9d8f; /* Grün für Speichern */
    color: white;
    transition: background-color 0.3s ease; /* Sanfter Übergang */
}

.customModal-buttons .customModal-save-button:hover {
    background-color: #21867a; /* Dunkleres Grün beim Hover */
}

/* Hintergrund für das neue Modal */
.custom-modal {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6); /* Dunklerer Hintergrund */
    z-index: 1100;
}

.custom-modal.hidden {
    display: none;
}

/* Inhalt des neuen Modals */
.custom-modal-content {
    background: #ffffff;
    padding: 25px;
    border-radius: 10px;
    text-align: left; /* Links ausrichten */
    max-width: 450px;
    width: 100%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); /* Schatten für das Modal */
    display: flex;
    flex-direction: column;
    gap: 20px; /* Abstand zwischen den Elementen */
}

/* Eingabefeld und Dropdowns */
.custom-modal-content input,
.custom-modal-content select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    margin-bottom: 15px; /* Abstand unter jedem Eingabefeld */
}

/* Buttons */
.custom-modal-buttons {
    display: flex;
    justify-content: space-between; /* Abstand zwischen den Buttons */
    gap: 15px; /* Abstand zwischen den Buttons */
}

.custom-modal-buttons .custom-close-button,
.custom-modal-buttons .custom-save-button {
    flex: 1; /* Beide Buttons gleich groß machen */
    padding: 12px 0;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    text-align: center;
}

.custom-modal-buttons .custom-close-button {
    background-color: #e63946; /* Rot für Abbrechen */
    color: white;
}

.custom-modal-buttons .custom-save-button {
    background-color: #2a9d8f; /* Grün für Speichern */
    color: white;
}

#privateFilesSection {
    text-align: center;
    padding: 2rem 1rem;
    margin: 3rem;
    background: white;
    border-radius: 20px;
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* Optional: Schatten für die Box */
}

#privateFilesSection h2 {
    font-size: 50px; /* Gleiche Schriftgröße wie im Hero */
    margin-bottom: 20px;
    color: #555; /* Optional: Gleiche Farbe wie im Hero */
}

#filesContainer {
    display: flex; /* Flexbox aktivieren */
    flex-wrap: wrap; /* Zeilenumbruch bei Platzmangel */
    gap: 20px; /* Abstand zwischen den Elementen */
    justify-content: center; /* Zentriert die Elemente horizontal */
    align-items: flex-start; /* Elemente oben ausrichten */
}

.file-tag-filter {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 4px 0 18px;
}

.file-item {
    display: block;
    width: 100%;
    margin: 10px 0;
    padding: 10px;
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.file-item:hover {
    background-color: #e0e0e0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Optional: Schatten beim Hover */
}

.file-button {
    display: flex;
    flex-direction: column; /* Elemente untereinander anordnen */
    align-items: center; /* Zentriert das SVG und den Text */
    justify-content: flex-start;
    background: none;
    border: none;
    border-radius: 20px;
    padding: 10px;
    margin: 10px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 138px;
    height: 230px;
    box-sizing: border-box;
}

.file-button:hover {
    transform: translateY(-4px); /* Leichter Hover-Effekt */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Schatten beim Hover */
}

.file-icon {
    width: 96px; /* Größe des SVGs */
    height: 96px;
    margin-bottom: 10px; /* Abstand zwischen SVG und Text */
}

.file-name {
    font-size: 14px; /* Schriftgröße des Dateinamens */
    line-height: 1.25;
    color: #333; /* Textfarbe */
    text-align: center; /* Zentriert den Text */
    overflow-wrap: anywhere;
    width: 112px;
    min-height: 35px;
    max-height: 35px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.file-tag-badge {
    --tag-color: #64748b;
    margin-top: 8px;
    max-width: 118px;
    border-radius: 999px;
    background: var(--tag-color);
    color: #ffffff;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.file-tag-edit {
    margin-top: 8px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #1f2937;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
}

.file-tag-edit:hover {
    background: #e2e8f0;
}

#private {
    display: flex;
    flex-direction: column; /* Elemente untereinander anordnen */
    align-items: center; /* Zentriert die Inhalte horizontal */
    justify-content: center; /* Zentriert die Inhalte vertikal */
    gap: 10px; /* Abstand zwischen Bild und Text */
    cursor: pointer; /* Zeigt den Mauszeiger als Hand an */
}

#private:hover {
    transform: translateY(-4px); /* Leichter Hover-Effekt */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Schatten beim Hover */
}

.card-icon {
    width: 200px; /* Breite des Bildes */
    height: 200px; /* Höhe des Bildes */
}
