body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    padding: 0;
    margin-bottom: 0px;
    background-color: #FFF7F7;
    /* Very light, subtle background to make reds stand out */
    color: #580C1F;
    /* Deep Maroon for main text */
}

.body-dragging .tower.drag-over .head {
    box-shadow: 0 0 10px 4px #A51C30;
    /* Bright Crimson for drag over */
    transition: box-shadow 0.3s ease, transform 0.5s ease;
    transform: translateY(-6px);
}

.body-dragging .hauptwache.drag-over .head {
    box-shadow: 0 0 10px 4px #A7333F;
    /* Deep Rosy Red for drag over */
    transition: box-shadow 0.3s ease, transform 0.5s ease;
    transform: translateY(-6px);
}

* {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-sizing: border-box;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    padding: 10px 20px;
    width: 100%;
    max-height: 70px;
    background-color: #580C1F;
    /* background: linear-gradient(90deg, #580C1F, #74121D); */
    /* Dark gradient from palette */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

header img {
    height: 25px;
    object-fit: contain;
    filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.2)) grayscale(1) brightness(2);
}

header a {
    color: #FFF7F7;
    /* Very light background color for links on dark header */
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    opacity: 0.8;
}

header a:hover {
    opacity: 1;
}

header svg {
    height: 24px;
    width: auto;
}

#app {
    margin-top: 40px;
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
    gap: 10px;
    max-width: unset;
    margin-left: auto;
    margin-right: auto;
    overflow-x: auto;
    padding: 20px 15px;
    padding-bottom: 20px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin-bottom: 0px;
}

#app::-webkit-scrollbar {
    display: none;
}

/* @media (max-width: 1024px) {
    #app {
        flex-wrap: wrap;
        justify-content: center;
        padding: 0 10px;
        gap: 10px;
    }
} */

#app #content {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    width: 90%;
    margin: auto;
    overflow-x: auto;
    gap: 16px;
}

.tower,
.hauptwache {
    border-radius: 18px;
    padding: 15px 5px;
    margin: 0;
    text-align: center;
    flex-grow: 1;
    width: 0;
    min-width: 150px;
    flex-shrink: 1;
    min-height: 80vh;
    background: #ffffff;
    /* Still white for distinct cards */
    box-shadow: 0 8px 10px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: inline-block;
    align-items: center;
    min-height: calc(90vh - 90px);
}

.tower .head,
.hauptwache .head {
    background-color: #A51C30;
    /* Rich Red for general tower heads */
    padding: 15px 2px;
    border-radius: 18px;
    margin-bottom: 15px;
    color: #FFF7F7;
    /* Very light background color for head text */
    font-weight: 700;
    letter-spacing: 0.03em;
    box-shadow: 0 6px 12px rgba(165, 28, 48, 0.4);
    transition: box-shadow 0.3s ease, transform 0.5s ease;
    width: calc(100% - 30px);
    margin-left: 15px;
    margin-right: 15px;
    position: relative;
    overflow: hidden;
}

.hauptwache .head {
    background-color: #A7333F;
    /* Deep Rosy Red for Hauptwache head - distinct */
    box-shadow: 0 6px 12px #A7333Fb3;
    /* Adjusted shadow for slightly different shade */
    color: #FFF7F7;
    /* Very light background color for contrast on this head */
}

.hauptwache {
    flex-grow: 1.5;
    min-width: 270px;
    min-height: 80vh;
    position: relative;
}

#group-hauptwache {
    min-height: calc(80vh - 130px);
    width: 100%;
    display: inline-block;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: center;
    padding: 0 15px;
    gap: 8px;
    margin-bottom: 20px;
}

h3 {
    margin-top: 0;
    padding-top: 0;
    font-weight: 800;
    letter-spacing: 0.03em;
    color: inherit;
    /* Inherit color from parent (.head) */
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.person-count {
    font-size: 24px;
    font-weight: 800;
    color: #FFF7F7;
    /* Very light background color for count */
    background: rgba(255, 247, 247, 0.2);
    /* Transparent very light background */
    padding: 6px 12px;
    border-radius: 8px;
    margin: 0px 0 0 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: inline-block;
}

.hauptwache .person-count {
    color: #FFF7F7;
    /* Consistent color for count on Hauptwache head */
    background: rgba(255, 247, 247, 0.1);
    /* Slightly more subtle background for count on this head */
}

.person {
    border-radius: 50%;
    margin: 8px 3px;
    cursor: grab;
    vertical-align: middle;
    box-sizing: border-box;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), filter 0.5s ease, opacity 0.5s ease;
    text-align: center;
    justify-items: center;
    text-overflow: ellipsis;
    overflow: hidden;
    position: relative;
    font-size: 13px;
    font-weight: 600;
    color: #580C1F;
    /* Deep Maroon for person text */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;

    background-color: #C52233;
    /* Bright Crimson for standard persons */
    width: 60px;
    height: 60px;
}

.person .tooltip {
    position: absolute;
    top: 0px;
    left: 50%;
    width: auto;
    padding: 14px 30px;
    box-sizing: border-box;
    background: #580C1F;
    /* Deep Maroon for tooltip background */
    color: #FFF7F7;
    /* Very light background color for tooltip text */
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 999999;
    backdrop-filter: blur(5px);
    transform: translateX(-50%) translateY(50px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    transition-delay: 0s;
}

.person.att:hover .tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-1px);
    transition-delay: 0.5s;
}

.person:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(197, 34, 51, 0.5);
    box-shadow: 0 10px 20px #a94852b3;
    /* Hover shadow using Bright Crimson */
}

.person.wg {
    display: inline-flex;
    height: 42px;
    width: 42px;
    min-width: 42px;
    font-size: 13px;
    background-color: #C52233;
    background-color: #a94852;
    color: #FFF7F7;
    /* Bright Crimson for WG */
}

.person.wg:hover {
    transform: scale(1.05);
}

.person.t6er {
    background-color: #A7333F;
    background-color: #7d131e;
    /* Deep Rosy Red for 6er - distinct from others */
    padding: 4px 2px;
    box-sizing: border-box;
    color: #FFF7F7;
    /* Very light background color for text */
    height: 55px;
    width: 70px;
    border-radius: 10px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 15px rgba(167, 51, 63, 0.45);
    font-size: 13px;
    line-height: 1.3;
}

.person.t6er:hover {
    transform: scale(1.08);
}

.person.t9er {
    background-color: #A51C30;
    /* Rich Red for 9er */
    padding: 10px 18px;
    border-radius: 8px;
    aspect-ratio: unset;
    min-width: 110px !important;
    box-shadow: 0 6px 18px rgba(165, 28, 48, 0.4);
    transition: box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    color: #FFF7F7;
    /* Very light background color for text */
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 8px auto;
}

.person.t9er:hover {
    box-shadow: 0 10px 25px rgba(165, 28, 48, 0.6);
    transform: scale(1.03);
}

#group-hauptwache .person.t9er {
    min-width: 100px !important;
    width: calc(100% - 8px) !important;
}

.person.tRTW {
    background-color: #580C1F;
    /* Deep Maroon for RTW */
    color: #FFF7F7;
    /* Very light background color for text */
    font-weight: 700;
    padding: 18px 24px 18px 28px;
    border-radius: 12px;
    aspect-ratio: unset;
    border-top-right-radius: 8px;
    border-top-left-radius: 40px;
    box-shadow: 0 8px 25px rgba(88, 12, 31, 0.5);
    transition: box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 4px;
}

.person.tRTW:hover {
    box-shadow: 0 12px 35px rgba(88, 12, 31, 0.7);
    transform: scale(1.1);
}

.person.t78er {
    background: #C52233;
    /* Bright Crimson for 78er */
    border: none;
    border-radius: 70px;
    border-top-left-radius: 180px;
    border-bottom-left-radius: 180px;
    max-width: fit-content;
    padding: 12px 4px 12px 10px;
    aspect-ratio: unset;
    min-width: 100px;
    width: calc(100% - 8px);
    box-shadow: 0 6px 20px rgba(197, 34, 51, 0.45);
    transition: box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    color: #FFF7F7;
    /* Very light background color for text */
    font-weight: 700;
    display: block;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
}

.person.t78er:hover {
    box-shadow: 0 10px 30px rgba(197, 34, 51, 0.7);
    transform: scale(1.05);
}

.person.away,
.person.wasser {
    opacity: 0.5;
    filter: grayscale(100%);
    transform: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.person.away:hover,
.person.wasser:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: scale(1.02);
}

.person.dragging {
    opacity: 0.4;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.bottom-dropzone {
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 9999999;
    width: 100%;
    box-sizing: border-box;
    background-color: #FFF7F7;
    /* background-color: #FFF7F7; */
    /* Subtle background for dropzone */
    border-top: 1px solid #a51c3170;
    border-top: 1px solid #a51c315b;
    /* Rich Red for border */
    padding-top: 0px;
    padding-bottom: 40px;

    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    transition: padding 0.3s ease, bottom 0.3s ease, background-color 0.3s ease;
    /* transition-delay: 0.18s; */
    cursor: pointer;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.08);
}

.bottom-dropzone:has(> .person) {
    padding-top: 30px;
    height: 165px;
    bottom: -125px;
    transition-delay: 0.18s;
}

.bottom-dropzone.drag-over {
    padding: 85px;
    bottom: 0;
    box-shadow: 0 -6px 25px rgba(178, 58, 72, 0.2);
    /* Softer shadow when dragged over */
}

.bottom-dropzone .t6er,
.bottom-dropzone .t78er,
.bottom-dropzone .t9er,
.bottom-dropzone .tRTW,
.bottom-dropzone .wg {
    display: inline-flex;
    margin: auto 10px;
    text-align: center;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.bottom-dropzone .t6er:hover,
.bottom-dropzone .t78er:hover,
.bottom-dropzone .t9er:hover,
.bottom-dropzone .tRTW:hover,
.bottom-dropzone .wg:hover {
    transform: scale(1.18);
}

.bottom-dropzone::before {
    content: "Abwesend";
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 17px;
    color: #6a2c337e;
    color: #9e656c;
    /* Dark Red-Brown for "Abwesend" text */
    font-weight: 600;
    letter-spacing: 0.02em;
}

.toweralert .head {
    animation: blinkAnimation 2.1s infinite;
    /* color: #FFF7F7; */
    font-weight: 700;
    /* text-shadow: 0 0 8px rgba(255, 247, 247, 0.9); */
    /* border: 2px solid rgba(255, 247, 247, 0.5); */
}

.toweralert .person-count {
    background: rgba(255, 247, 247, 0.3);
    color: #FFF7F7;
}

.toweralert .head div,
.toweralert .head h3,
.toweralert .head svg {
    color: #FFF7F7;
}

@keyframes blinkAnimation {

    0%,
    100% {
        background-color: #A51C30;
    }

    50% {
        background-color: #36305a;
        box-shadow: 0 6px 12px #36305ab3;
    }
}

@media (max-width: 1024px) {

    .tower .head,
    .hauptwache .head {
        width: calc(100% - 10px);
        margin-left: 5px;
        margin-right: 5px;
    }

    .person.wg,
    .person.t6er,
    .person.t9er,
    .person.tRTW,
    .person.t78er {
        margin-top: 4px !important;
        margin-bottom: 4px !important;
    }

    .person.wg {
        height: 40px;
        width: 40px;
        min-width: 40px;
        font-size: 14px;
    }
}


/* SweetAlert2 custom position for toasts */
.swal2-container.swal2-top-end {
    top: 40px !important;
    margin-top: 0 !important;
}

.swal2-container.swal2-bottom-end {
    bottom: 70px !important;
    margin-bottom: 0 !important;
}

.swal2-popup {
    margin-top: 40px;
    border-radius: 12px;
    /* Consistent rounded corners */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    background-color: #FFF7F7;
    /* Very light background from palette */
    color: #580C1F;
    /* Deep Maroon for text */
}

.swal2-title {
    color: #580C1F !important;
    /* Deep Maroon for title */
}

.swal2-html-container {
    color: #580C1F !important;
    /* Deep Maroon for message content */
}

.swal2-confirm.swal2-styled {
    background-color: #A51C30 !important;
    /* Bright Crimson for confirm button */
    color: #FFF7F7 !important;
    border-radius: 8px !important;
    /* Consistent rounded corners */
    padding: 10px 20px !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 10px rgba(165, 28, 48, 0.3) !important;
}

.swal2-cancel.swal2-styled {
    background-color: #7d131e !important;
    color: #FFF7F7 !important;
    border-radius: 8px !important;
    /* Consistent rounded corners */
    padding: 10px 20px !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 10px rgba(125, 19, 30, 0.3) !important;
}

/* SweetAlert2 Icon Styling */
.swal2-icon {
    border-color: rgba(88, 12, 31, 0.5) !important;
    /* Deep Maroon with transparency for border */
    color: #A51C30 !important;
    /* Bright Crimson for the icon itself */
}

.swal2-success [class^=swal2-success-line][class$=long],
.swal2-success [class^=swal2-success-line][class$=tip] {
    background-color: #A51C30 !important;
    /* Bright Crimson for success checkmark */
}

.swal2-error [class^=swal2-x-mark-line] {
    background-color: #A51C30 !important;
    /* Bright Crimson for error 'x' */
}

.swal2-warning {
    color: #A7333F !important;
    /* Deep Rosy Red for warning exclamation */
    border-color: rgba(167, 51, 63, 0.5) !important;
}

.swal2-info {
    color: #580C1F !important;
    /* Deep Maroon for info 'i' */
    border-color: rgba(88, 12, 31, 0.5) !important;
}

.swal2-question {
    color: #74121D !important;
    /* Dark gradient color for question mark */
    border-color: rgba(116, 18, 29, 0.5) !important;
}

/* Ensure the icon's primary color is applied to its internal SVG paths */
.swal2-icon .swal2-icon-content {
    color: inherit;
    /* Inherit color from parent (.swal2-icon) */
}

.swal2-icon.swal2-success .swal2-success-ring {
    border-color: rgba(165, 28, 48, 0.3) !important;
    /* Lighter shade of red for success ring */
}

.swal2-icon.swal2-error .swal2-error-ring {
    border-color: rgba(165, 28, 48, 0.3) !important;
    /* Lighter shade of red for error ring */
}