/* --- ALLGEMEINES BODY-STYLING --- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #121212;
    color: #fff;
    margin: 0;
}

/* --- DIE TOP-NAVIGATIONSLEISTE --- */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 25px;
    background-color: #1e1e1e;
    border-bottom: 1px solid #2a2a2a;
}

.left-section { display: flex; align-items: center; gap: 40px; }
.logo a { color: #fff; text-decoration: none; font-size: 1.5em; font-weight: bold; }
.navigation { display: flex; gap: 25px; }

.navigation a {
    color: #aaa;
    text-decoration: none;
    font-weight: 600;
    padding: 10px 5px;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-bottom-color 0.2s;
}
.navigation a:hover { color: #fff; }
.navigation a.active { color: #fff; border-bottom-color: #e60000; }

/* --- BENUTZER-BEREICH RECHTS --- */
.user-area { display: flex; align-items: center; gap: 15px; }
.user-area .profile-picture { width: 40px; height: 40px; border-radius: 50%; border: 2px solid #333; }
.user-area .username { font-weight: 600; }
.user-area .balance { color: #aaa; font-size: 0.9em; }
.user-area .logout-button { display: inline-block; padding: 8px 15px; background-color: #d92828; color: white; text-decoration: none; border-radius: 5px; transition: background-color 0.2s; }
.user-area .logout-button:hover { background-color: #b02121; }

/* --- HAUPTINHALT DER SEITE --- */
.main-content { padding: 40px; max-width: 1200px; margin: 0 auto; }

/* --- KISTEN-STYLING --- */
.case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 40px 25px;
}

.case-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: #fff;
}

.case-item img {
    width: 250px;
    height: 150px;
    object-fit: contain;
    margin-bottom: 15px;
    transition: transform 0.2s ease-in-out;
}

.case-item:hover img {
    transform: scale(1.02);
}

.case-item .case-name {
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 15px;
}

.case-open-button {
    display: inline-block;
    background-color: #50c878;
    color: #121212;
    font-weight: bold;
    text-decoration: none;
    padding: 10px 30px;
    border-radius: 5px;
    transition: background-color 0.2s, transform 0.2s;
    cursor: pointer;
}

.case-item:hover .case-open-button {
    background-color: #6aff9b;
    transform: scale(1.05);
}

/* --- MODAL-STYLING --- */
#case-opening-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#case-opening-modal .modal-content {
    width: 850px;
    height: 450px;
    background-color: #1e1e1e;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.reelin-container, .multi-reelin-container {
    width: 100%;
    height: 200px;
    position: relative;
    margin-bottom: 20px;
}

.reelin-container {
    overflow: hidden;
    border-top: 2px solid #444;
    border-bottom: 2px solid #444;
}

.pointer-vertical {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background-color: #e60000;
    box-shadow: 0 0 10px #e60000;
    z-index: 10;
}

.pointer-horizontal {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 100%;
    height: 4px;
    background-color: #e60000;
    box-shadow: 0 0 10px #e60000;
    z-index: 10;
}

.multi-reelin-container {
    display: flex;
    justify-content: space-around;
}

.vertical-reelin-container {
    width: 160px;
    height: 100%;
    overflow: hidden;
    position: relative;
    border-left: 2px solid #444;
    border-right: 2px solid #444;
}

.vertical-item-reelin {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 0;
    width: 100%;
}

.item-reelin {
    display: flex;
    position: absolute;
    left: 0;
    height: 100%;
}

/* Anpassung für die Namensanzeige */
.reelin-item, .vertical-reelin-item {
    position: relative;
    overflow: hidden;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(60,60,60,1) 0%, rgba(30,30,30,1) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 5px;
    box-sizing: border-box;
}

.vertical-reelin-item {
    margin: 5px;
    border-left: 5px solid transparent;
}

.reelin-item {
    margin: 25px 5px;
    border-bottom: 5px solid transparent;
}

.reelin-item img, .vertical-reelin-item img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.reelin-item-fallback {
    color: white;
    font-size: 14px;
    font-weight: 600;
    padding: 5px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- STILE FÜR DEN ITEM-NAMEN --- */
.reelin-item-name {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: transparent; /* Geändert: Hintergrundfarbe entfernt */
    color: white;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    padding: 5px;
    box-sizing: border-box;
    transform: translateY(100%);
    transition: transform 0.4s ease-out;
    opacity: 0;
    pointer-events: none;
    z-index: 20;
}

.reelin-item-name.visible {
    transform: translateY(0);
    opacity: 1;
}

/* --- STILE FÜR DEN ITEM-PREIS --- */
.reelin-item-price {
    position: absolute;
    bottom: 25px;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.75); /* Hier bleibt der Hintergrund wie zuvor */
    color: #FFD700;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    padding: 5px;
    box-sizing: border-box;
    transform: translateY(100%);
    transition: transform 0.4s ease-out, opacity 0.4s ease-out;
    opacity: 0;
    pointer-events: none;
    z-index: 20;
}

.reelin-item-price.visible {
    transform: translateY(0);
    opacity: 1;
}

/* --- KISTEN-ANZAHL-AUSWAHL --- */
.case-quantity-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.case-quantity-selector button {
    padding: 10px 20px;
    background-color: #333;
    color: white;
    border: 1px solid #555;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-weight: bold;
}

.case-quantity-selector button.active {
    background-color: #50c878;
    color: #121212;
}