/* =========================================================
   EPICA: DASHBOARD & BURG STYLES (VOLLSTÄNDIG GEKAPSELT)
========================================================= */

/* --- GLOBALES LAYOUT --- */
#dashboard {
    display: none; /* Wird über JS auf flex/block gesteuert */
    position: relative;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    background-color: var(--bg-color);
}

#dashboard .dashboard-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    z-index: 1;
    background: transparent !important;
}

/* =========================================================
   EDIT BUTTON (OBEN RECHTS)
========================================================= */
#dashboard .top-right-ui {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 900;
    display: none;
}

#dashboard .btn-edit-mode-round {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid #fff;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    transition: transform 0.2s;
    position: relative;
    color: transparent !important;
    font-size: 0 !important;
    overflow: hidden;
}

#dashboard .btn-edit-mode-round::before {
    content: " 🏰 ";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    color: #000;
}

#dashboard .btn-edit-mode-round:hover {
    transform: scale(1.1);
}

/* =========================================================
   HAUPTMENÜ (UNTEN RECHTS)
========================================================= */
#dashboard .bottom-right-menu {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: row-reverse;
    align-items: flex-end;
    gap: 15px;
    z-index: 900;
}

#dashboard .menu-btn-round {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid var(--primary);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background 0.2s;
    position: relative;
}

#dashboard .menu-btn-round:hover {
    transform: scale(1.1);
    background: var(--primary);
    color: #000;
}

#dashboard .menu-btn-world {
    width: 70px;
    height: 70px;
    font-size: 32px;
}

@keyframes dashboardWiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-15deg); }
    50% { transform: rotate(15deg); }
    75% { transform: rotate(-15deg); }
}

#dashboard .mail-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 14px;
    height: 14px;
    background: #e74c3c;
    border-radius: 50%;
    border: 2px solid #000;
    display: none;
}

#dashboard .has-mail .mail-badge {
    display: block;
}

#dashboard .has-mail-wiggle {
    animation: dashboardWiggle 0.6s ease-in-out;
}

/* =========================================================
   BURG-LAYER (STATISCHE BRÜCKE & GEBÄUDE)
========================================================= */
#dashboard .castle-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 70vh;
    margin: 0 auto;
    border: 2px solid var(--primary);
    border-radius: 8px;
    overflow: hidden;
    background-color: #0c120e;
    box-shadow: 0 0 30px rgba(0,0,0,0.8);
}

#dashboard .layer-1-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
    transition: background-image 0.5s ease-in-out;
}

body.fantasy #dashboard .layer-1-bg { background-image: url('../../assets/fantasy/castle/castle_fantasy.png'); }
body.scifi #dashboard .layer-1-bg { background-image: url('../../assets/scifi/castle/castle_scifi.png'); }

#dashboard .layer-2-hotspots {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

#dashboard .hotspot {
    position: absolute;
    pointer-events: auto;
    background: rgba(0, 0, 0, 0.4);
    border: 1px dashed transparent;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

#dashboard .hotspot:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    transform: scale(1.02);
}

#dashboard .hotspot strong {
    font-size: 1.2vw;
    color: var(--primary);
    text-shadow: 1px 1px 2px #000;
}

#dashboard .hotspot span {
    font-size: 0.9vw;
    color: #fff;
    text-shadow: 1px 1px 2px #000;
    margin-top: 5px;
}

#dashboard .building-img {
    position: absolute;
    pointer-events: auto;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center bottom;
    cursor: pointer;
    transition: transform 0.2s, filter 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding-bottom: 10px;
}

#dashboard .building-img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 10px var(--primary)) brightness(1.2);
}

#dashboard .building-img strong {
    font-size: 1.2vw;
    color: var(--primary);
    text-shadow: 1px 1px 3px #000, -1px -1px 3px #000;
}

#dashboard .building-img span {
    font-size: 0.9vw;
    color: #fff;
    text-shadow: 1px 1px 3px #000, -1px -1px 3px #000;
    background: rgba(0,0,0,0.5);
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 2px;
}

/* Gebäude Grafiken Fantasy */
body.fantasy #dashboard .bldg-kaserne { background-image: url('../../assets/fantasy/buildings/kaserne_fantasy.png'); }
body.fantasy #dashboard .bldg-schmiede { background-image: url('../../assets/fantasy/buildings/schmiede_fantasy.png'); }
body.fantasy #dashboard .bldg-taverne { background-image: url('../../assets/fantasy/buildings/taverne_fantasy.png'); }
body.fantasy #dashboard .bldg-tower { background-image: url('../../assets/fantasy/buildings/tower_fantasy.png'); }
body.fantasy #dashboard .bldg-rathaus { background-image: url('../../assets/fantasy/buildings/rathaus_fantasy.png'); }
body.fantasy #dashboard .bldg-lagerstaette { background-image: url('../../assets/fantasy/buildings/lagerstaette_fantasy.png'); }
body.fantasy #dashboard .bldg-mauer { background-image: url('../../assets/fantasy/buildings/mauer_fantasy.png'); }
body.fantasy #dashboard .bldg-brunnen { background-image: url('../../assets/fantasy/buildings/brunnen_fantasy.png'); }
body.fantasy #dashboard .bldg-wolke { background-image: url('../../assets/fantasy/buildings/wolke_fantasy.png'); }
body.fantasy #dashboard .bldg-arena { background-image: url('../../assets/fantasy/buildings/arena_fantasy.png'); }

/* Gebäude Grafiken Sci-Fi */
body.scifi #dashboard .bldg-kaserne { background-image: url('../../assets/scifi/buildings/kaserne_scifi.png'); }
body.scifi #dashboard .bldg-schmiede { background-image: url('../../assets/scifi/buildings/schmiede_scifi.png'); }
body.scifi #dashboard .bldg-taverne { background-image: url('../../assets/scifi/buildings/taverne_scifi.png'); }
body.scifi #dashboard .bldg-tower { background-image: url('../../assets/scifi/buildings/tower_scifi.png'); }
body.scifi #dashboard .bldg-rathaus { background-image: url('../../assets/scifi/buildings/rathaus_scifi.png'); }
body.scifi #dashboard .bldg-lagerstaette { background-image: url('../../assets/scifi/buildings/lagerstaette_scifi.png'); }
body.scifi #dashboard .bldg-mauer { background-image: url('../../assets/scifi/buildings/mauer_scifi.png'); }
body.scifi #dashboard .bldg-brunnen { background-image: url('../../assets/scifi/buildings/brunnen_scifi.png'); }
body.scifi #dashboard .bldg-wolke { background-image: url('../../assets/scifi/buildings/wolke_scifi.png'); }
body.scifi #dashboard .bldg-arena { background-image: url('../../assets/scifi/buildings/arena_scifi.png'); }