@font-face {
    font-family: 'Minecraft';
    src: url('../fonts/Minecraft-font.otf');
}

@font-face {
    font-family: 'Regular';
    src: url('../fonts/Acumin.otf');
}

@font-face {
    font-family: 'Bold';
    src: url('../fonts/Acumin-Bold.otf');
}

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-width: 320px;
    max-width: 100vw;
    overflow-x: hidden;
    font-family: 'Minecraft', sans-serif;
    color: #ffffff;
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

/* ==========================================================================
   STARTSEITE (Hauptmenü)
   ========================================================================== */

.mainmenubody {
    background: url('../assets/shots/mainbg.png') center center / cover no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    position: relative;
    padding: 16px 12px;
    padding-top: calc(16px + env(safe-area-inset-top));
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
}

.mcm-titlebar {
    position: relative;
    text-align: center;
    margin-top: 3vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.mcm-title-wrapper {
    position: relative;
    display: inline-block;
    max-width: 90vw;
}

.mcm-title-wrapper .gametitle {
    display: block;
    width: 480px;
    max-width: 86vw;
    height: auto;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.8));
}

.mcm-title-wrapper .yellow {
    font-family: 'Minecraft', monospace;
    color: #ffff55;
    text-shadow: 2px 2px 0 #3f3f00;
    font-size: 16px;
    position: absolute;
    bottom: -10px;
    right: 4%;
    transform-origin: center center;
    animation: mc-splash 1.8s infinite ease-in-out alternate;
    pointer-events: none;
    white-space: nowrap;
}

@keyframes mc-splash {
    0% { transform: scale(1) rotate(-10deg); }
    100% { transform: scale(1.08) rotate(-10deg); }
}

.mc-menu-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 360px;
    padding: 10px 0;
    margin: auto 0;
}

.mc-btn-row {
    display: flex;
    gap: 8px;
    width: 100%;
}

.mc-btn {
    background: url('../assets/button-texture.png') repeat-x center center;
    background-size: auto 100%;
    color: #e0e0e0;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 14px;
    width: 100%;
    min-height: 42px;
    border: 2px solid #000000;
    box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.25), inset -1px -1px 0 rgba(0, 0, 0, 0.4);
    font-family: 'Minecraft', sans-serif;
    font-size: 15px;
    text-shadow: 2px 2px 0 #000000;
    cursor: pointer;
    user-select: none;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
}

.mc-btn:hover {
    background-image: url('../assets/button-texture-hover.png');
    color: #ffffa0;
}

.mc-btn:active {
    transform: translateY(1px);
    background-image: url('../assets/button-texture-hover.png');
    color: #ffffa0;
}

.mc-btn-half {
    flex: 1;
}

.mc-status-live {
    font-family: 'Minecraft', monospace;
    font-size: 12px;
    color: #55ff55;
    text-shadow: 1px 1px 0 #000000;
    background: rgba(0, 0, 0, 0.75);
    padding: 6px 14px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 4px;
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    max-width: 100%;
    text-align: center;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #55ff55;
    box-shadow: 0 0 8px #55ff55;
    flex-shrink: 0;
}

/* Footer & Corner Labels */
.mc-footer-meta {
    width: 100%;
    max-width: 900px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.mc-corner-left, .mc-corner-right {
    font-size: 12px;
    color: #ffffff;
    text-shadow: 1px 1px 0 #000000;
    opacity: 0.85;
}

/* ==========================================================================
   UNTERSEITEN (Play, Info, About)
   ========================================================================== */

.mcsplashscreen {
    background: url('../assets/dirt.jpg') repeat;
    background-size: 64px 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 24px 12px;
    padding-top: calc(20px + env(safe-area-inset-top));
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
    position: relative;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

.mcsplashscreen::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle, transparent 40%, rgba(0, 0, 0, 0.75) 100%);
    pointer-events: none;
    z-index: 1;
}

.mcsplashscreen h1 {
    font-family: 'Minecraft', sans-serif;
    color: #ffffff;
    font-size: 26px;
    font-weight: normal;
    text-shadow: 3px 3px 0 #333333;
    text-align: center;
    margin: 0 0 16px 0;
    position: relative;
    z-index: 2;
}

.mc-tabs {
    display: flex;
    gap: 8px;
    width: 100%;
    max-width: 620px;
    margin-bottom: 12px;
    position: relative;
    z-index: 2;
}

.mc-tab-btn {
    flex: 1;
    font-size: 13px;
    padding: 10px 8px;
    opacity: 0.7;
    white-space: nowrap;
}

.mc-tab-btn.active {
    opacity: 1;
    border-color: #ffffff;
    color: #ffff55;
    box-shadow: inset 0 0 8px rgba(255, 255, 85, 0.3);
}

.mc-dialog-box {
    background: rgba(0, 0, 0, 0.88);
    border: 2px solid #555555;
    border-radius: 4px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.9);
    width: 100%;
    max-width: 620px;
    padding: 20px 16px;
    position: relative;
    z-index: 2;
    margin-bottom: 14px;
}

.mc-dialog-footer {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 620px;
    display: flex;
    gap: 8px;
}

.mc-field-group {
    margin-bottom: 14px;
    text-align: left;
}

.mc-field-label {
    display: block;
    font-size: 12px;
    color: #aaaaaa;
    margin-bottom: 6px;
    text-shadow: 1px 1px 0 #000000;
}

.mc-input {
    width: 100%;
    background-color: #000000;
    border: 2px solid #666666;
    color: #ffffff;
    font-family: 'Minecraft', monospace;
    font-size: 14px;
    padding: 10px 12px;
    text-shadow: 1px 1px 0 #222222;
    outline: none;
}

.mc-input:focus {
    border-color: #ffffff;
}

.mc-input-highlight {
    color: #55ff55;
}

.mc-info-display {
    background-color: #000000;
    border: 2px solid #555555;
    padding: 10px 12px;
    font-family: 'Minecraft', monospace;
    font-size: 13px;
    line-height: 1.4;
    color: #ffff55;
    word-break: break-word;
}

.mc-info-card {
    border-bottom: 1px dashed rgba(255, 255, 255, 0.15);
    padding-bottom: 12px;
    margin-bottom: 12px;
    text-align: left;
}

.mc-info-card:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.mc-info-title {
    font-family: 'Minecraft', sans-serif;
    color: #ffff55;
    font-size: 15px;
    margin: 0 0 6px 0;
    text-shadow: 1px 1px 0 #000000;
}

.mc-info-desc {
    font-family: 'Regular', sans-serif;
    font-size: 13px;
    line-height: 1.5;
    color: #dddddd;
    margin: 0;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    border-radius: 3px;
    font-family: 'Minecraft', monospace;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    flex-shrink: 0;
}

.status-badge.online {
    background: rgba(0, 150, 0, 0.4);
    border: 1px solid #55ff55;
    color: #55ff55;
}

.status-badge.maintenance {
    background: rgba(234, 179, 8, 0.4);
    border: 1px solid #eab308;
    color: #facc15;
}

.status-badge.restarting {
    background: rgba(220, 140, 0, 0.4);
    border: 1px solid #ffaa00;
    color: #ffaa00;
}

.status-badge.offline {
    background: rgba(180, 0, 0, 0.4);
    border: 1px solid #ff5555;
    color: #ff5555;
}

.status-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: currentColor;
    flex-shrink: 0;
}

.status-badge.restarting .status-badge-dot,
.status-badge.maintenance .status-badge-dot {
    animation: badge-pulse 1s infinite alternate;
}

@keyframes badge-pulse {
    0% { opacity: 0.3; }
    100% { opacity: 1; }
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.status-metric {
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 12px;
    border-radius: 3px;
    word-break: break-word;
}

.status-metric.full-width {
    grid-column: 1 / -1;
}

.status-metric-label {
    font-size: 11px;
    color: #888888;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-metric-value {
    font-size: 14px;
    color: #ffffff;
    font-family: 'Minecraft', monospace;
}

.services-list {
    margin-top: 14px;
    border-top: 1px dashed rgba(255, 255, 255, 0.15);
    padding-top: 12px;
}

.service-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 7px 0;
    font-size: 13px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.service-row:last-child {
    border-bottom: none;
}

.service-row > span {
    word-break: break-word;
}

.motd-box {
    background: #000000;
    border: 1px solid #444444;
    padding: 10px 12px;
    border-radius: 3px;
    font-family: 'Minecraft', monospace;
    font-size: 12px;
    color: #cccccc;
    margin-top: 10px;
    text-align: center;
    word-break: break-word;
}

.refresh-info {
    font-size: 11px;
    color: #888888;
    text-align: right;
    margin-top: 8px;
    font-family: 'Minecraft', monospace;
}

/* ==========================================================================
   MOBILE & RESPONSIVE BREAKPOINTS (Strikte Mobile Optimierung)
   ========================================================================== */

@media screen and (max-width: 768px) {
    .mainmenubody {
        padding: 14px 10px;
        padding-top: calc(14px + env(safe-area-inset-top));
        padding-bottom: calc(14px + env(safe-area-inset-bottom));
    }

    .mcm-titlebar {
        margin-top: 1.5vh;
    }

    .mcm-title-wrapper .gametitle {
        width: 330px;
        max-width: 86vw;
    }

    .mcm-title-wrapper .yellow {
        font-size: 12px;
        bottom: -6px;
        right: 2%;
        text-shadow: 1.5px 1.5px 0 #3f3f00;
    }

    .mc-menu-container {
        max-width: 320px;
        width: 92%;
        gap: 7px;
    }

    .mc-btn {
        padding: 11px 8px;
        font-size: 14px;
        min-height: 42px;
    }

    .mc-btn-row {
        gap: 6px;
    }

    .mc-status-live {
        font-size: 11px;
        padding: 5px 10px;
    }

    .mc-footer-meta {
        flex-direction: column;
        gap: 4px;
        text-align: center;
        margin-top: 8px;
    }

    .mc-corner-left, .mc-corner-right {
        font-size: 11px;
        opacity: 0.8;
    }

    /* Sub-pages */
    .mcsplashscreen {
        padding: 16px 10px;
        padding-top: calc(14px + env(safe-area-inset-top));
        padding-bottom: calc(14px + env(safe-area-inset-bottom));
    }

    .mcsplashscreen h1 {
        font-size: 20px;
        margin-bottom: 12px;
    }

    .mc-dialog-box {
        width: 96%;
        max-width: 600px;
        padding: 16px 12px;
        margin-bottom: 12px;
    }

    .mc-tabs {
        width: 96%;
        max-width: 600px;
        gap: 6px;
        margin-bottom: 10px;
    }

    .mc-tab-btn {
        font-size: 12px;
        padding: 9px 4px;
    }

    .mc-dialog-footer {
        width: 96%;
        max-width: 600px;
        gap: 6px;
    }
}

@media screen and (max-width: 540px) {
    .grid-2 {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

@media screen and (max-width: 440px) {
    .mcm-title-wrapper .gametitle {
        width: 270px;
        max-width: 88vw;
    }

    .mcm-title-wrapper .yellow {
        font-size: 10.5px;
        bottom: -5px;
        right: 1%;
    }

    .mc-menu-container {
        max-width: 295px;
        width: 94%;
    }

    .mc-btn {
        font-size: 13px;
        padding: 10px 4px;
    }

    .mc-tabs {
        gap: 4px;
    }

    .mc-tab-btn {
        font-size: 11px;
        padding: 8px 3px;
        letter-spacing: -0.2px;
    }

    .status-metric {
        padding: 8px 10px;
    }

    .status-metric-label {
        font-size: 10px;
    }

    .status-metric-value {
        font-size: 13px;
    }

    .service-row {
        font-size: 12px;
        padding: 6px 0;
    }

    .status-badge {
        font-size: 10px;
        padding: 2px 6px;
    }

    .mc-info-title {
        font-size: 14px;
    }

    .mc-info-desc {
        font-size: 12px;
        line-height: 1.45;
    }

    .mc-dialog-box {
        padding: 14px 10px;
    }

    .mc-dialog-footer {
        flex-direction: row;
        gap: 6px;
    }

    .mc-dialog-footer .mc-btn {
        font-size: 13px;
        padding: 10px 4px;
    }
}
