/* UI Windows - 9-Slice System für skalierbare Fenster */

/* Exaktes 9-Slice Grid für 127x90px Slices */
.ui-window {
    display: grid;
    grid-template-columns: 127px auto 127px;
    grid-template-rows: 90px auto 90px;
    width: 600px; /* Beispielgröße, kann angepasst werden */
    min-width: 254px;
    min-height: 180px;
    background: transparent;
    position: relative;
    box-sizing: border-box;
    padding: 0;
    margin: 0 auto;
    box-shadow: 0 8px 32px 0 rgba(60,40,10,0.18), 0 1.5px 8px 0 rgba(60,40,10,0.10); /* sanfter Schatten */
    border-radius: 18px;
    transition: box-shadow 0.3s;
}

.ui-window:hover {
    box-shadow: 0 16px 48px 0 rgba(60,40,10,0.22), 0 3px 16px 0 rgba(60,40,10,0.13);
}

.ui-window-slice {
    width: 127px;
    height: 90px;
    background-size: 127px 90px;
    background-repeat: no-repeat;
    background-position: top left;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

/* Ecken */
.ui-window-top-left      { grid-area: 1 / 1; background-image: url('../ui/1/1.png'); }
.ui-window-top-right     { grid-area: 1 / 3; background-image: url('../ui/1/3.png'); }
.ui-window-bottom-left   { grid-area: 3 / 1; background-image: url('../ui/1/7.png'); }
.ui-window-bottom-right  { grid-area: 3 / 3; background-image: url('../ui/1/9.png'); }

/* Kanten */
.ui-window-top    {
    grid-area: 1 / 2;
    background-image: url('../ui/1/2.png');
    background-size: auto 90px;
    background-repeat: repeat-x;
    width: 100%;
    height: 90px;
}
.ui-window-bottom {
    grid-area: 3 / 2;
    background-image: url('../ui/1/8.png');
    background-size: auto 90px;
    background-repeat: repeat-x;
    width: 100%;
    height: 90px;
}
.ui-window-left   {
    grid-area: 2 / 1;
    background-image: url('../ui/1/4.png');
    background-size: 127px auto;
    background-repeat: repeat-y;
    width: 127px;
    height: 100%;
}
.ui-window-right  {
    grid-area: 2 / 3;
    background-image: url('../ui/1/6.png');
    background-size: 127px auto;
    background-repeat: repeat-y;
    width: 127px;
    height: 100%;
}

/* Mitte */
.ui-window-center {
    grid-area: 2 / 2;
    background-image: url('../ui/1/5.png');
    background-size: auto auto;
    background-repeat: repeat;
    width: 100%;
    height: 100%;
    position: relative;
}

/* Überschrift im Top-Bereich (immer mittig im hellen Bereich) */
.ui-window-title {
    position: absolute;
    left: 50%;
    top: 22px;
    transform: translateX(-50%);
    width: auto;
    height: 32px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    color: #3a2200;
    font-weight: bold;
    font-size: 1.3em;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 8px #fff, 0 1px 0 #fff8;
    z-index: 2;
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0;
}

/* Verschiedene Fenstergrößen */
.ui-window-small {
    width: 300px;
    height: 200px;
    min-width: 250px;
    min-height: 150px;
}

.ui-window-medium {
    width: 500px;
    height: 350px;
    min-width: 400px;
    min-height: 250px;
}

.ui-window-large {
    width: 800px;
    height: 600px;
    min-width: 600px;
    min-height: 400px;
}

.ui-window-full {
    width: 100%;
    height: 100vh;
    min-width: 800px;
    min-height: 600px;
}

/* Fenster-Inhalt */
.ui-window-content {
    grid-area: 2 / 2;
    padding: 20px;
    overflow: unset !important;
    overflow-y: unset !important;
    overflow-x: unset !important;
    color: #2c3e50;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: none !important;
    border-radius: 5px;
    margin: 5px;
    /* backdrop-filter: blur(5px); entfernt */
}

/* Rahmen und Hintergrund für kleine Info-Boxen entfernen */
.ui-window.ui-window-small,
.ui-window.ui-window-small .ui-window-content {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}
.ui-window.ui-window-small .ui-window-content {
    color: #fff !important;
    font-size: 1.1em !important;
    font-weight: bold !important;
    text-shadow: none !important;
}
.ui-window.ui-window-small .ui-window-title {
    color: #3a2200 !important;
    font-size: 1.2em !important;
    font-weight: bold !important;
    background: none !important;
    border: none !important;
    text-shadow: 1px 1px 4px #fff8 !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ui-window {
        grid-template-columns: 15px 1fr 15px;
        grid-template-rows: 15px 1fr 15px;
    }
    
    .ui-window-small,
    .ui-window-medium,
    .ui-window-large {
        width: 95vw;
        height: 80vh;
        min-width: 250px;
        min-height: 200px;
    }
}

/* Animationen */
.ui-window {
    animation: windowFadeIn 0.5s ease-out;
}

@keyframes windowFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Backend-Button */
.backend-button {
    position: fixed;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 15px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: bold;
    z-index: 1000;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.backend-button:hover {
    background: rgba(52, 152, 219, 0.9);
    transform: translateY(-2px);
}

/* 9-Slice Buttons - zurück auf Originalhöhe 47px */
.ui-btn-blau, .ui-btn-braun, .ui-btn-gelb, .ui-btn-grün, .ui-btn-rot {
    display: grid;
    grid-template-columns: 117px auto 117px;
    grid-template-rows: 47px auto 47px;
    background: transparent;
    position: relative;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px 0 rgba(60,40,10,0.10);
    border-radius: 7px;
    font-family: inherit;
    overflow: hidden;
    transition: box-shadow 0.2s, filter 0.2s;
}
.ui-btn-blau:hover, .ui-btn-braun:hover, .ui-btn-gelb:hover, .ui-btn-grün:hover, .ui-btn-rot:hover {
    filter: brightness(1.13);
    box-shadow: 0 4px 16px 0 rgba(60,40,10,0.18);
}

/* Slices für Blau */
.ui-btn-blau-top-left      { grid-area: 1 / 1; width: 117px; height: 47px; background-image: url('../ui/2/button_blau/button_blau1.png'); background-size: 117px 47px; background-repeat: no-repeat; }
.ui-btn-blau-top           { grid-area: 1 / 2; height: 47px; background-image: url('../ui/2/button_blau/button_blau2.png'); background-size: auto 47px; background-repeat: repeat-x; }
.ui-btn-blau-top-right     { grid-area: 1 / 3; width: 117px; height: 47px; background-image: url('../ui/2/button_blau/button_blau3.png'); background-size: 117px 47px; background-repeat: no-repeat; }
.ui-btn-blau-left          { grid-area: 2 / 1; width: 117px; background-image: url('../ui/2/button_blau/button_blau4.png'); background-size: 117px auto; background-repeat: repeat-y; }
.ui-btn-blau-center        { grid-area: 2 / 2; background-image: url('../ui/2/button_blau/button_blau5.png'); background-size: auto auto; background-repeat: repeat; display: flex; align-items: center; justify-content: center; }
.ui-btn-blau-right         { grid-area: 2 / 3; width: 117px; background-image: url('../ui/2/button_blau/button_blau6.png'); background-size: 117px auto; background-repeat: repeat-y; }
.ui-btn-blau-bottom-left   { grid-area: 3 / 1; width: 117px; height: 47px; background-image: url('../ui/2/button_blau/button_blau7.png'); background-size: 117px 47px; background-repeat: no-repeat; }
.ui-btn-blau-bottom        { grid-area: 3 / 2; height: 47px; background-image: url('../ui/2/button_blau/button_blau8.png'); background-size: auto 47px; background-repeat: repeat-x; }
.ui-btn-blau-bottom-right  { grid-area: 3 / 3; width: 117px; height: 47px; background-image: url('../ui/2/button_blau/button_blau9.png'); background-size: 117px 47px; background-repeat: no-repeat; }

/* Slices für Gelb */
.ui-btn-gelb-top-left      { grid-area: 1 / 1; width: 117px; height: 47px; background-image: url('../ui/2/button_gelb/button_gelb1.png'); background-size: 117px 47px; background-repeat: no-repeat; }
.ui-btn-gelb-top           { grid-area: 1 / 2; height: 47px; background-image: url('../ui/2/button_gelb/button_gelb2.png'); background-size: auto 47px; background-repeat: repeat-x; }
.ui-btn-gelb-top-right     { grid-area: 1 / 3; width: 117px; height: 47px; background-image: url('../ui/2/button_gelb/button_gelb3.png'); background-size: 117px 47px; background-repeat: no-repeat; }
.ui-btn-gelb-left          { grid-area: 2 / 1; width: 117px; background-image: url('../ui/2/button_gelb/button_gelb4.png'); background-size: 117px auto; background-repeat: repeat-y; }
.ui-btn-gelb-center        { grid-area: 2 / 2; background-image: url('../ui/2/button_gelb/button_gelb5.png'); background-size: auto auto; background-repeat: repeat; display: flex; align-items: center; justify-content: center; }
.ui-btn-gelb-right         { grid-area: 2 / 3; width: 117px; background-image: url('../ui/2/button_gelb/button_gelb6.png'); background-size: 117px auto; background-repeat: repeat-y; }
.ui-btn-gelb-bottom-left   { grid-area: 3 / 1; width: 117px; height: 47px; background-image: url('../ui/2/button_gelb/button_gelb7.png'); background-size: 117px 47px; background-repeat: no-repeat; }
.ui-btn-gelb-bottom        { grid-area: 3 / 2; height: 47px; background-image: url('../ui/2/button_gelb/button_gelb8.png'); background-size: auto 47px; background-repeat: repeat-x; }
.ui-btn-gelb-bottom-right  { grid-area: 3 / 3; width: 117px; height: 47px; background-image: url('../ui/2/button_gelb/button_gelb9.png'); background-size: 117px 47px; background-repeat: no-repeat; }

/* Slices für Grün */
.ui-btn-grün-top-left      { grid-area: 1 / 1; width: 117px; height: 47px; background-image: url('../ui/2/button_grün/button_grün1.png'); background-size: 117px 47px; background-repeat: no-repeat; }
.ui-btn-grün-top           { grid-area: 1 / 2; height: 47px; background-image: url('../ui/2/button_grün/button_grün2.png'); background-size: auto 47px; background-repeat: repeat-x; }
.ui-btn-grün-top-right     { grid-area: 1 / 3; width: 117px; height: 47px; background-image: url('../ui/2/button_grün/button_grün3.png'); background-size: 117px 47px; background-repeat: no-repeat; }
.ui-btn-grün-left          { grid-area: 2 / 1; width: 117px; background-image: url('../ui/2/button_grün/button_grün4.png'); background-size: 117px auto; background-repeat: repeat-y; }
.ui-btn-grün-center        { grid-area: 2 / 2; background-image: url('../ui/2/button_grün/button_grün5.png'); background-size: auto auto; background-repeat: repeat; display: flex; align-items: center; justify-content: center; }
.ui-btn-grün-right         { grid-area: 2 / 3; width: 117px; background-image: url('../ui/2/button_grün/button_grün6.png'); background-size: 117px auto; background-repeat: repeat-y; }
.ui-btn-grün-bottom-left   { grid-area: 3 / 1; width: 117px; height: 47px; background-image: url('../ui/2/button_grün/button_grün7.png'); background-size: 117px 47px; background-repeat: no-repeat; }
.ui-btn-grün-bottom        { grid-area: 3 / 2; height: 47px; background-image: url('../ui/2/button_grün/button_grün8.png'); background-size: auto 47px; background-repeat: repeat-x; }
.ui-btn-grün-bottom-right  { grid-area: 3 / 3; width: 117px; height: 47px; background-image: url('../ui/2/button_grün/button_grün9.png'); background-size: 117px 47px; background-repeat: no-repeat; }

/* Slices für Rot */
.ui-btn-rot-top-left      { grid-area: 1 / 1; width: 117px; height: 47px; background-image: url('../ui/2/button_rot/button_rot1.png'); background-size: 117px 47px; background-repeat: no-repeat; }
.ui-btn-rot-top           { grid-area: 1 / 2; height: 47px; background-image: url('../ui/2/button_rot/button_rot2.png'); background-size: auto 47px; background-repeat: repeat-x; }
.ui-btn-rot-top-right     { grid-area: 1 / 3; width: 117px; height: 47px; background-image: url('../ui/2/button_rot/button_rot3.png'); background-size: 117px 47px; background-repeat: no-repeat; }
.ui-btn-rot-left          { grid-area: 2 / 1; width: 117px; background-image: url('../ui/2/button_rot/button_rot4.png'); background-size: 117px auto; background-repeat: repeat-y; }
.ui-btn-rot-center        { grid-area: 2 / 2; background-image: url('../ui/2/button_rot/button_rot5.png'); background-size: auto auto; background-repeat: repeat; display: flex; align-items: center; justify-content: center; }
.ui-btn-rot-right         { grid-area: 2 / 3; width: 117px; background-image: url('../ui/2/button_rot/button_rot6.png'); background-size: 117px auto; background-repeat: repeat-y; }
.ui-btn-rot-bottom-left   { grid-area: 3 / 1; width: 117px; height: 47px; background-image: url('../ui/2/button_rot/button_rot7.png'); background-size: 117px 47px; background-repeat: no-repeat; }
.ui-btn-rot-bottom        { grid-area: 3 / 2; height: 47px; background-image: url('../ui/2/button_rot/button_rot8.png'); background-size: auto 47px; background-repeat: repeat-x; }
.ui-btn-rot-bottom-right  { grid-area: 3 / 3; width: 117px; height: 47px; background-image: url('../ui/2/button_rot/button_rot9.png'); background-size: 117px 47px; background-repeat: no-repeat; }

/* Button-Inhalt */
.ui-btn-label {
    font-size: 1.7em;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 2px 8px #000a, 0 1px 0 #fff8;
    letter-spacing: 0.5px;
    user-select: none;
    pointer-events: none;
    z-index: 2;
    padding: 0 10px;
    white-space: nowrap;
}

/* Kleine Buttons (halbe Größe) */
.ui-btn-blau-s, .ui-btn-rot-s {
    display: grid;
    grid-template-columns: 58px auto 58px;
    grid-template-rows: 23px auto 23px;
    width: 180px;
    height: 23px;
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    overflow: visible;
}

/* Kleine Button Slices für Blau */
.ui-btn-blau-s .ui-btn-blau-top-left      { grid-area: 1 / 1; width: 58px; height: 23px; background-image: url('../ui/2/button_blau/button_blau1.png'); background-size: 58px 23px; background-repeat: no-repeat; }
.ui-btn-blau-s .ui-btn-blau-top           { grid-area: 1 / 2; height: 23px; background-image: url('../ui/2/button_blau/button_blau2.png'); background-size: auto 23px; background-repeat: repeat-x; }
.ui-btn-blau-s .ui-btn-blau-top-right     { grid-area: 1 / 3; width: 58px; height: 23px; background-image: url('../ui/2/button_blau/button_blau3.png'); background-size: 58px 23px; background-repeat: no-repeat; }
.ui-btn-blau-s .ui-btn-blau-left          { grid-area: 2 / 1; width: 58px; background-image: url('../ui/2/button_blau/button_blau4.png'); background-size: 58px auto; background-repeat: repeat-y; }
.ui-btn-blau-s .ui-btn-blau-center        { grid-area: 2 / 2; background-image: url('../ui/2/button_blau/button_blau5.png'); background-size: auto auto; background-repeat: repeat; display: flex; align-items: center; justify-content: center; }
.ui-btn-blau-s .ui-btn-blau-right         { grid-area: 2 / 3; width: 58px; background-image: url('../ui/2/button_blau/button_blau6.png'); background-size: 58px auto; background-repeat: repeat-y; }
.ui-btn-blau-s .ui-btn-blau-bottom-left   { grid-area: 3 / 1; width: 58px; height: 23px; background-image: url('../ui/2/button_blau/button_blau7.png'); background-size: 58px 23px; background-repeat: no-repeat; }
.ui-btn-blau-s .ui-btn-blau-bottom        { grid-area: 3 / 2; height: 23px; background-image: url('../ui/2/button_blau/button_blau8.png'); background-size: auto 23px; background-repeat: repeat-x; }
.ui-btn-blau-s .ui-btn-blau-bottom-right  { grid-area: 3 / 3; width: 58px; height: 23px; background-image: url('../ui/2/button_blau/button_blau9.png'); background-size: 58px 23px; background-repeat: no-repeat; }

/* Kleine Button Slices für Rot */
.ui-btn-rot-s .ui-btn-rot-top-left      { grid-area: 1 / 1; width: 58px; height: 23px; background-image: url('../ui/2/button_rot/button_rot1.png'); background-size: 58px 23px; background-repeat: no-repeat; }
.ui-btn-rot-s .ui-btn-rot-top           { grid-area: 1 / 2; height: 23px; background-image: url('../ui/2/button_rot/button_rot2.png'); background-size: auto 23px; background-repeat: repeat-x; }
.ui-btn-rot-s .ui-btn-rot-top-right     { grid-area: 1 / 3; width: 58px; height: 23px; background-image: url('../ui/2/button_rot/button_rot3.png'); background-size: 58px 23px; background-repeat: no-repeat; }
.ui-btn-rot-s .ui-btn-rot-left          { grid-area: 2 / 1; width: 58px; background-image: url('../ui/2/button_rot/button_rot4.png'); background-size: 58px auto; background-repeat: repeat-y; }
.ui-btn-rot-s .ui-btn-rot-center        { grid-area: 2 / 2; background-image: url('../ui/2/button_rot/button_rot5.png'); background-size: auto auto; background-repeat: repeat; display: flex; align-items: center; justify-content: center; }
.ui-btn-rot-s .ui-btn-rot-right         { grid-area: 2 / 3; width: 58px; background-image: url('../ui/2/button_rot/button_rot6.png'); background-size: 58px auto; background-repeat: repeat-y; }
.ui-btn-rot-s .ui-btn-rot-bottom-left   { grid-area: 3 / 1; width: 58px; height: 23px; background-image: url('../ui/2/button_rot/button_rot7.png'); background-size: 58px 23px; background-repeat: no-repeat; }
.ui-btn-rot-s .ui-btn-rot-bottom        { grid-area: 3 / 2; height: 23px; background-image: url('../ui/2/button_rot/button_rot8.png'); background-size: auto 23px; background-repeat: repeat-x; }
.ui-btn-rot-s .ui-btn-rot-bottom-right  { grid-area: 3 / 3; width: 58px; height: 23px; background-image: url('../ui/2/button_rot/button_rot9.png'); background-size: 58px 23px; background-repeat: no-repeat; }

/* Kleine Button Labels */
.ui-btn-blau-s .ui-btn-label, .ui-btn-rot-s .ui-btn-label {
    font-size: 0.9em;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 2px 8px #000a, 0 1px 0 #fff8;
    letter-spacing: 0.5px;
    user-select: none;
    pointer-events: none;
    z-index: 2;
    padding: 0 5px;
    white-space: nowrap;
}

/* Entferne display:none für .register-button */
.register-button { display: initial !important; }

/* Zentrale Container-Breite für Spielfeldmitte, exakt mittig wie das Hintergrundbild */
.info-boxes-container {
    position: fixed;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: 1400px;
    min-height: 100vh;
    z-index: 10;
    /* margin: 0 auto; entfernt */
}

/* Exakte Positionierung für jede Box mit vertikalem Abstand 10px und außen, aber 50px wieder zur Mitte */
.info-boxes-container .info-box:nth-child(1) {
    position: absolute !important;
    left: -180px !important;
    top: 220px !important;
}
.info-boxes-container .info-box:nth-child(2) {
    position: absolute !important;
    left: -180px !important;
    top: calc(220px + 340px + 10px) !important;
}
.info-boxes-container .info-box:nth-child(3) {
    position: absolute !important;
    left: -180px !important;
    top: calc(220px + 2 * (340px + 10px)) !important;
}
.info-boxes-container .info-box:nth-child(4) {
    position: absolute !important;
    right: -180px !important;
    top: 220px !important;
}
.info-boxes-container .info-box:nth-child(5) {
    position: absolute !important;
    right: -180px !important;
    top: calc(220px + 340px + 10px) !important;
}
.info-boxes-container .info-box:nth-child(6) {
    position: absolute !important;
    right: -180px !important;
    top: calc(220px + 2 * (340px + 10px)) !important;
}

/* Box-Größe und Rahmen immer sichtbar */
.info-box {
    width: 340px !important;
    min-width: 340px !important;
    max-width: 340px !important;
    box-sizing: border-box;
    overflow: visible !important;
    margin: 0 !important;
    /* Entferne alle position/display/flex Regeln, die absolute Positionierung verhindern könnten */
}

.ui-window.ui-window-small {
    width: 340px !important;
    min-width: 340px !important;
    max-width: 340px !important;
    margin: 0 auto;
    box-sizing: border-box;
    min-height: 340px !important;
    height: auto !important;
    overflow: visible !important;
}

.ui-window-content {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    text-align: center !important;
    margin: 0 !important;
    padding: 15px !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0 !important;
    overflow: visible !important;
}

.ui-window-title {
    width: 100% !important;
    text-align: center !important;
    left: 50%;
    transform: translateX(-50%);
    justify-content: center;
}

/* Flexbox/Spalten-Layout komplett entfernen */
.spielfeld-mitte, .info-boxes-left-col, .info-boxes-right-col {
    display: block !important;
    width: auto !important;
    min-width: unset !important;
    max-width: unset !important;
    gap: 0 !important;
    flex: unset !important;
    align-items: unset !important;
    justify-content: unset !important;
    flex-direction: unset !important;
}

/* Doppelte/alte Positionierungsregeln überschreiben */
.info-box {
    position: static !important;
}

.sprite-btn, .sprite-btn-blau, .sprite-btn-rot {
    width: 100% !important;
    max-width: 300px !important;
    margin: 0 auto 0 auto !important;
    display: block !important;
    padding: 0 !important;
    box-sizing: border-box;
    overflow: hidden;
}

.sprite-btn img, .sprite-btn-blau img, .sprite-btn-rot img {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    margin: 0 auto !important;
    padding: 0 !important;
    box-sizing: border-box;
    overflow: hidden;
}

.ui-window-content > * {
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
    overflow: hidden;
}

/* Slices für Braun */
.ui-btn-braun-top-left      { grid-area: 1 / 1; width: 117px; height: 47px; background-image: url('../ui/2/button_braun/button_braun1.png'); background-size: 117px 47px; background-repeat: no-repeat; }
.ui-btn-braun-top           { grid-area: 1 / 2; height: 47px; background-image: url('../ui/2/button_braun/button_braun2.png'); background-size: auto 47px; background-repeat: repeat-x; }
.ui-btn-braun-top-right     { grid-area: 1 / 3; width: 117px; height: 47px; background-image: url('../ui/2/button_braun/button_braun3.png'); background-size: 117px 47px; background-repeat: no-repeat; }
.ui-btn-braun-left          { grid-area: 2 / 1; width: 117px; background-image: url('../ui/2/button_braun/button_braun4.png'); background-size: 117px auto; background-repeat: repeat-y; }
.ui-btn-braun-center        { grid-area: 2 / 2; background-image: url('../ui/2/button_braun/button_braun5.png'); background-size: auto auto; background-repeat: repeat; display: flex; align-items: center; justify-content: center; }
.ui-btn-braun-right         { grid-area: 2 / 3; width: 117px; background-image: url('../ui/2/button_braun/button_braun6.png'); background-size: 117px auto; background-repeat: repeat-y; }
.ui-btn-braun-bottom-left   { grid-area: 3 / 1; width: 117px; height: 47px; background-image: url('../ui/2/button_braun/button_braun7.png'); background-size: 117px 47px; background-repeat: no-repeat; }
.ui-btn-braun-bottom        { grid-area: 3 / 2; height: 47px; background-image: url('../ui/2/button_braun/button_braun8.png'); background-size: auto 47px; background-repeat: repeat-x; }
.ui-btn-braun-bottom-right  { grid-area: 3 / 3; width: 117px; height: 47px; background-image: url('../ui/2/button_braun/button_braun9.png'); background-size: 117px 47px; background-repeat: no-repeat; } 

.ui-btn-braun-center { min-width: 120px; min-height: 32px; font-size: 1.1em; }
.ui-btn-label { white-space: nowrap; font-size: 1.1em; } 

.info-boxes-flex {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100vw;
    max-width: 100vw;
    margin: 220px auto 0 auto;
    position: relative;
    gap: 0;
} 

.sprite-btn-large {
    width: 240px !important;
    height: 60px !important;
    max-width: 260px !important;
    margin: 0 auto 0 auto !important;
    display: block !important;
    padding: 0 !important;
    box-sizing: border-box;
    overflow: hidden;
}
.sprite-btn-img-large {
    width: 100% !important;
    height: 60px !important;
    max-width: 240px !important;
    display: block !important;
    margin: 0 auto !important;
    padding: 0 !important;
    box-sizing: border-box;
    overflow: hidden;
} 

.ui-btn-account {
    width: 100% !important;
    max-width: 220px !important;
    height: 47px !important;
    display: grid !important;
    grid-template-columns: 117px auto 117px;
    grid-template-rows: 47px auto 47px;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
    overflow: hidden;
    cursor: pointer;
}
.ui-btn-account .ui-btn-label {
    font-size: 1.15em !important;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 2px 8px #000a, 0 1px 0 #fff8;
    letter-spacing: 0.5px;
    user-select: none;
    pointer-events: none;
    z-index: 2;
    padding: 0 10px;
    white-space: nowrap;
    width: 100%;
    text-align: center;
} 

/* Geräte-Produktions-UI Styles */
.device-production-container {
    padding: 20px;
    color: white;
}

.device-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(52, 73, 94, 0.8);
    border-radius: 10px;
}

.device-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.device-details h3 {
    margin: 0 0 10px 0;
    color: #3498db;
}

.device-stats {
    display: flex;
    gap: 15px;
    font-size: 14px;
}

.device-stats span {
    background: rgba(52, 152, 219, 0.3);
    padding: 5px 10px;
    border-radius: 5px;
}

.device-actions {
    display: flex;
    gap: 10px;
}

.production-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.production-tabs .tab-button {
    padding: 10px 20px;
    background: rgba(52, 73, 94, 0.8);
    border: none;
    border-radius: 5px;
    color: white;
    cursor: pointer;
    transition: background 0.3s;
}

.production-tabs .tab-button.active {
    background: #3498db;
}

.production-tabs .tab-button:hover {
    background: #2980b9;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-height: 500px;
    overflow-y: auto;
}

.product-card {
    background: rgba(52, 73, 94, 0.8);
    border-radius: 10px;
    padding: 15px;
    border: 2px solid #3498db;
    transition: all 0.3s;
}

.product-card.unavailable {
    border-color: #e74c3c;
    opacity: 0.7;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.product-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.product-header h4 {
    margin: 0;
    color: #3498db;
}

.product-details {
    margin-bottom: 15px;
}

.product-details p {
    margin: 0 0 10px 0;
    font-size: 14px;
    opacity: 0.9;
}

.requirements {
    margin-bottom: 10px;
}

.requirements strong {
    color: #f39c12;
    display: block;
    margin-bottom: 5px;
}

.requirements-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.requirements-list span {
    background: rgba(243, 156, 18, 0.3);
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
}

.production-info {
    display: flex;
    gap: 15px;
    font-size: 14px;
    opacity: 0.8;
}

.product-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.quantity-input {
    width: 80px !important;
    padding: 8px !important;
    border: 1px solid #3498db !important;
    border-radius: 5px !important;
    background: rgba(52, 73, 94, 0.8) !important;
    color: white !important;
    text-align: center !important;
}

.quantity-input:focus {
    outline: none !important;
    border-color: #f39c12 !important;
}

.empty-area-container {
    text-align: center;
    padding: 40px;
    color: white;
}

.empty-area-container h3 {
    color: #3498db;
    margin-bottom: 20px;
}

.empty-area-container p {
    margin-bottom: 30px;
    opacity: 0.8;
}

/* Produktions-Warteschlange */
.production-queue {
    max-height: 400px;
    overflow-y: auto;
}

.queue-item {
    background: rgba(52, 73, 94, 0.8);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    border-left: 4px solid #3498db;
}

.queue-item.current {
    border-left-color: #27ae60;
    background: rgba(39, 174, 96, 0.2);
}

.queue-item h4 {
    margin: 0 0 10px 0;
    color: #3498db;
}

.queue-item .queue-details {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    opacity: 0.8;
}

.queue-item .progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(52, 73, 94, 0.5);
    border-radius: 4px;
    margin-top: 10px;
    overflow: hidden;
}

.queue-item .progress-fill {
    height: 100%;
    background: #3498db;
    transition: width 0.3s;
}

.queue-item.current .progress-fill {
    background: #27ae60;
}

/* Responsive Design */
@media (max-width: 768px) {
    .device-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .device-info {
        flex-direction: column;
        text-align: center;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .product-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .quantity-input {
        width: 100% !important;
    }
} 

/* ====== CURSOAI PATCH: Geldanzeige wie im Backup ====== */
.topbar-money-value {
    position: absolute;
    right: 302px;
    top: -80px;
    width: 99px;
    text-align: left;
    font-size: 2em;
    color: #f39c12;
    font-weight: bold;
    text-shadow: 0 2px 6px #000, 0 0 2px #fff;
    pointer-events: none;
    z-index: 211;
    letter-spacing: 1px;
    padding: 0;
}
.topbar-money-value .money-amount {
    display: inline;
    text-align: left;
    font-size: 1.6em;
    color: #f39c12;
    font-weight: bold;
    margin-left: 136px;
    position: relative;
    top: -73px;
} 