@import url('https://fonts.googleapis.com/css2?family=Jost:ital,wght@0,100..900;1,100..900&display=swap');
:root {
    --bg-color: #551864; /* Dunkler Hintergrund */
    --text-color: #ffffff; /* Helle Textfarbe */
    --primary-color: #5f72e1; /* Akzentfarbe (rot/pink) */
    --secondary-color: #0f3460; /* Sekundäre Farbe */
    --box-bg: #141414; /* Hintergrund für Boxen */
    --border-color: #626262; /* Rahmenfarbe */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Jost', sans-serif;
    --header-height: 60px;
}

body {
    font-family: var(--font-body);
    min-height: 100vh;
    margin: 0;
    background-image: linear-gradient(rgba(0,0,0,0.55), rgba(0,0,0,0.75)), url(../media/images/background.png);
    background-size: cover;
    background-position: center;
    background-color: var(--bg-color);
    color: var(--text-color);
    padding: 0; /* Hier auf 0 setzen */
    overflow: hidden; /* <-- Scrollbar komplett ausblenden */
}

.container {
    margin: 0 auto;
    background-color: var(--box-bg);
    padding: 20px; /* Padding bleibt hier */
    border-radius: 4px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    position: relative;
    border: 1px solid var(--border-color);
    max-width: 500px;
    width: 80vw;
    transition: max-height 0.4s;
    max-height: 400px;
}

.center-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: calc(100vh - var(--header-height)); /* statt min-height */
}

h1 {
    font-family: "Jost";
    color: #d8d8d8;
    line-height: 0;
    font-weight: 500;
}

.container p {
    font-family: "Jost";
    color: #444444;
}

h2 {
    font-family: "Jost";
    color: #696969;
    font-weight: 300;
    font-size: medium;
    line-height: 1.3;
    flex-wrap: nowrap;
}

.profile {
    height: 150px;
    width: 150px;
    border-radius: 5px;
    border: 2px solid #373737;
}

.box-top {
    display: flex;
    align-items: center;
    gap: 20px;
}

 .boxes {
    display: flex;
    gap: 1rem;
    margin: 20px auto 0px auto;
    justify-content: center;
    max-width: 500px;
    width: 100%;
    flex-wrap: wrap; /* <--- Ergänzen! */
}

.boxes span {
    display: inline-block;
    color: var(--text-color);
    font-family: var(--font-body);
    margin: 10px;
}

.boxes button {
    height: 30px;
    width: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 5px;
    background-color: #242424;
    border: 0px;
}
.boxes button:hover {
    background-color: #1d1d1d;
}
.boxes button:active {
    background-color: #101010;
}

.btn-icon {
    width: 17px;
}

header {
    /* moderner "glass"-Look, passend zur Library */
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.12));
    backdrop-filter: blur(6px);
    border-bottom: 1px solid rgba(255,255,255,0.03);
    position: sticky;
    top: 10px;
    z-index: 30;
    padding: 10px 0;
    margin: 0 0 18px 0;
}

header .header-inner {
    max-width: 700px; /* gleiche Breite wie library-shell */
    width: 90vw;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 16px;
}

header h3 {
    margin: 0;
    font-family: var(--font-heading);
    color: var(--text-color);
    font-size: 1.05rem;
    font-weight: 700;
}

header nav {
    margin-left: auto;
    display: flex;
    gap: 10px;
    align-items: center;
}

header nav a {
    text-decoration: none;
    font-size: 0.95rem;
    color: #c1c1c1;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: background .15s, color .15s, transform .08s;
}

header nav a.active,
header nav a:hover {
    background: linear-gradient(90deg, rgba(95,114,225,0.12), rgba(95,114,225,0.04));
    color: var(--text-color);
    border-color: rgba(95,114,225,0.18);
    transform: translateY(-1px);
}

/* sicherstellen, dass Header über dem Hintergrund-Overlay liegt */
header, header .header-inner {
    position: relative;
    z-index: 31;
}

.library-shell {
    max-width: 700px;
    width: 90vw;
    margin: 0 auto;
}

.library-sections {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 12px auto 18px auto;
    background: transparent;
    border-radius: 8px;
}

.library-sections ul {
    display: flex;
    width: 100%;
    justify-content: center;
    padding: 0;
    align-items: center;
    gap: 20px;
}

.library-sections li {
    list-style: none;
}

.library-sections button {
    background: rgba(255,255,255,0.03);
    color: var(--text-color);
    border: 1px solid transparent;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font-body);
    transition: background 0.15s, transform 0.08s;
}
.library-sections button[aria-selected="true"] {
    background: linear-gradient(90deg, rgba(95,114,225,0.15), rgba(95,114,225,0.06));
    border-color: rgba(95,114,225,0.25);
}

.library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-top: 8px;
}

.library-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.18));
    border: 1px solid rgba(255,255,255,0.04);
    backdrop-filter: blur(6px);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    gap: 14px;
    align-items: center;
    transition: transform 180ms cubic-bezier(.2,.9,.2,1), box-shadow 180ms;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0,0,0,0.45);
    overflow: hidden;
}
.library-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 46px rgba(0,0,0,0.6);
}
.library-card img.library-card-icon {
    width: 64px;
    height: 64px;
    border-radius: 10px;
}
.library-card h3 {
    margin: 0;
    font-family: var(--font-heading);
    color: #e8e8e8;
    font-size: 0.8rem;
    line-height: 1.1;
}
.library-card .meta {
    font-size: 0.85rem;
    color: #9ea6ad;
    margin-top: 6px;
}

/* Helfer: Inhaltsspalte, funktioniert auch ohne HTML-Änderung */
.library-card .content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

/* Responsive Anpassungen */
@media (max-width: 520px) {
    .library-card {
        padding: 12px;
        gap: 12px;
    }
    .library-card img.library-card-icon {
        width: 56px;
        height: 56px;
    }
}
@media (max-width: 380px) {
    .library-card {
        flex-direction: row;
        gap: 10px;
        align-items: center;
    }
    .library-card h3 {
        font-size: 0.98rem;
    }
}

.library-content {
    max-width: 700px;
    width: 90vw;
}

.library-content h1 {
    margin-bottom: 30px;
}

.library-element {
    background-color: #080808;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin: 0 auto;
    margin-top: 10px;
    margin-bottom: 10px;
    padding: 10px;
    width: 80%;
    font-size: small;
}

.library-element:hover {
    cursor: pointer;
    background-color: #0e0e0e;
}

.library-element-header {
    display: flex;
    align-items: center;
    gap: 20px;
}

.library-element-header img {
    height: 32px;
    width: 32px;
    margin: 0 20px;
}

.library-content-section.hidden {
    display: none;
}

.library-content-section.visible {
    display: block;
}

.game-title {
    font-family: "Jost";
    color: #d8d8d8;
    font-weight: 700;
    font-size: xx-large;
    text-align: center;
    display: block;
    margin: 0 auto;
    margin-top: 30px;
    width: 100%;
}

#playerName {
    font-family: "Jost";
    color: #5f72e1;
    background: #080808;
    border: 0px;
    border-radius: 5px;
    padding: 5px 20px;
}

#playerAdd {
    height: 30px;
    width: auto;
    justify-content: center;
    align-items: center;
    border-radius: 5px;
    background-color: #242424;
    border: 0px;
    width: 25px;
    height: 25px;
}
#playerAdd img {
    width: 12px;
    height: 12px;
}

@media (max-width: 600px) {
    .container {
        width: 80vw;
        max-height: 1000px;
    }
    .box-top {
        display: flex;
        flex-direction: row; /* Profilbild und Text nebeneinander */
        align-items: center;
        gap: 20px;
    }
    .boxes {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        width: 100%;
        margin-top: 20px; /* Abstand nach oben */
    }
    .boxes button {
        display: flex;
        align-items: center;
        width: 100%;
        padding: 12px 16px;
        font-size: 1rem;
    }
    .boxes span {
        display: inline-block;
        color: var(--text-color);
        font-family: var(--font-body);
        margin: 10px;
    }
}