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

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

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

*, *::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: 380px;
    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.78);
    padding: 7px 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    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: 920px;
    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, Rules, 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 35%, rgba(0, 0, 0, 0.78) 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: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    width: 100%;
    max-width: 720px;
    margin-bottom: 12px;
    position: relative;
    z-index: 2;
}

.mc-tabs.tabs-3 {
    grid-template-columns: repeat(3, 1fr);
}

.mc-tabs.tabs-2 {
    grid-template-columns: repeat(2, 1fr);
}

.mc-tab-btn {
    font-size: 13px;
    padding: 10px 6px;
    opacity: 0.75;
    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: 720px;
    padding: 20px 18px;
    position: relative;
    z-index: 2;
    margin-bottom: 14px;
}

.mc-dialog-footer {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 720px;
    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.45;
    color: #ffff55;
    word-break: break-word;
}

.mc-section-header {
    font-family: 'Minecraft', sans-serif;
    color: #55ffff;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin: 0 0 12px 0;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(85, 255, 255, 0.25);
    text-shadow: 1px 1px 0 #000000;
}

.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: 13.5px;
    line-height: 1.55;
    color: #dddddd;
    margin: 0;
}

.mc-tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.mc-tag {
    display: inline-block;
    font-family: 'Minecraft', monospace;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #e5e5e5;
}

.mc-tag.green {
    background: rgba(0, 160, 0, 0.25);
    border-color: #55ff55;
    color: #55ff55;
}

.mc-tag.gold {
    background: rgba(234, 179, 8, 0.22);
    border-color: #facc15;
    color: #facc15;
}

.mc-tag.red {
    background: rgba(185, 28, 28, 0.28);
    border-color: #ff5555;
    color: #ff5555;
}

.mc-tag.aqua {
    background: rgba(6, 182, 212, 0.22);
    border-color: #55ffff;
    color: #55ffff;
}

.mc-alert-box {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid #555555;
    border-left: 4px solid #ffff55;
    padding: 12px 14px;
    border-radius: 3px;
    margin-bottom: 14px;
    text-align: left;
}

.mc-alert-box.danger {
    border-left-color: #ff5555;
    background: rgba(120, 0, 0, 0.25);
}

.mc-alert-box.success {
    border-left-color: #55ff55;
    background: rgba(0, 100, 0, 0.22);
}

.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.48);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 10px 12px;
    border-radius: 3px;
    word-break: break-word;
    text-align: left;
}

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

.status-metric-label {
    font-size: 11px;
    color: #999999;
    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: 8px 0;
    font-size: 13px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

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

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

.service-sub {
    display: block;
    font-family: 'Regular', sans-serif;
    font-size: 11.5px;
    color: #999999;
    margin-top: 2px;
}

.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;
    white-space: pre-line;
}

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

/* Rank & Minigame Cards */
.game-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.game-card {
    background: rgba(0, 0, 0, 0.52);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 4px;
    padding: 12px;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

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

.game-card-desc {
    font-family: 'Regular', sans-serif;
    font-size: 12.5px;
    line-height: 1.45;
    color: #d4d4d4;
    margin: 0 0 8px 0;
}

.rank-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin-bottom: 8px;
    text-align: left;
}

.rank-row:last-child {
    margin-bottom: 0;
}

.rank-prefix {
    font-family: 'Minecraft', monospace;
    font-size: 13px;
    white-space: nowrap;
}

.rank-perks {
    font-family: 'Regular', sans-serif;
    font-size: 12.5px;
    color: #cccccc;
    text-align: right;
}

/* Rule List Formatting */
.rule-list {
    margin: 6px 0 0 0;
    padding-left: 18px;
    font-family: 'Regular', sans-serif;
    font-size: 13px;
    line-height: 1.55;
    color: #dddddd;
}

.rule-list li {
    margin-bottom: 4px;
}

.rule-list li:last-child {
    margin-bottom: 0;
}
