body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: 'CustomFont', sans-serif;
    position: relative;
    background-image: url('/images/newDarkStone.png');
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/images/newLightStone.png');
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: -1;
}

body.lightStoneBackground::before {
    opacity: 1;
}

@font-face {
    font-family: 'CustomFont';
    src: url('../fonts/MinecraftRegular-Bmg3.otf');
    font-weight: normal;
    font-style: normal;
}

.main {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

h1 {
    color: rgb(255, 217, 229);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.status-indicator {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 2rem;
    transition: all 0.3s ease;
}

.status-indicator.online {
    background: #2ecc71;
    box-shadow: 0 0 20px rgba(46, 204, 113, 0.4);
}

.status-indicator.offline {
    background: #e74c3c;
    box-shadow: 0 0 20px rgba(231, 76, 60, 0.4);
}

.status-indicator.loading {
    background: #f1c40f;
    animation: pulse 1.5s infinite;
}

.result {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    font-size: 1.1rem;
    min-height: 3.2em;
    /* Enough height for two lines of text */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
    width: 100%;
}

.result.success {
    color: #27ae60;
}

.result.error {
    color: #c0392b;
}

.result.loading {
    color: #f39c12;
}

.check-button {
    display: block;
    margin: 1rem auto;
    padding: 0.8rem 1.5rem;
    background: rgb(255, 217, 229);
    border: none;
    border-radius: 5px;
    color: #333;
    cursor: pointer;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8rem;
    transition: transform 0.2s;
}

.check-button:hover {
    transform: scale(1.05);
}

.theme-toggle-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 10px;
    width: 40px;
    height: 40px;
    border: 2px solid rgba(106, 90, 205, 0.8);
    border-radius: 0.5em;
    background: rgba(170, 131, 179, 0.9);
    box-shadow: 0 0 10px rgba(106, 90, 205, 0.6);
    color: rgb(255, 217, 229);
    cursor: pointer;
}

.rotate {
    animation: rotate 0.5s ease-in-out;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 0 auto 2rem;
}

.status-item {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    min-height: 200px;
    box-sizing: border-box;
}

.status-item h2 {
    color: rgb(255, 217, 229);
    font-size: 1.2rem;
    margin: 1rem 0;
}

.details {
    width: 100%;
    padding: 0.8rem;
    margin-top: auto;
    font-size: 0.8rem;
}

.details p {
    margin: 0.3rem 0;
    color: rgb(255, 217, 229);
    opacity: 0.8;
}

.service-details {
    margin-top: auto;
}

.service-item {
    display: flex;
    justify-content: space-between;
    padding: 0.3rem 0;
}

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

.service-status {
    font-weight: bold;
}

.last-check {
    text-align: center;
    color: rgb(255, 217, 229);
    margin-top: 1rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

@media (max-width: 480px) {
    .main {
        padding: 1rem;
    }

    h1 {
        font-size: 1.2rem;
    }

    .status-indicator {
        width: 80px;
        height: 80px;
    }
}

@media (max-width: 768px) {
    .main {
        padding: 1rem;
    }

    .status-grid {
        grid-template-columns: 1fr;
    }

    .status-item {
        min-height: 180px;
        padding: 1rem;
    }

    .details {
        padding: 0.5rem;
    }

    .details p {
        font-size: 0.7rem;
    }

    .result {
        min-height: 3.8em;
        /* Slightly taller on mobile for better text wrapping */
        font-size: 0.9rem;
    }
}

@media (max-height: 800px) {
    body {
        align-items: flex-start;
    }

    .main {
        margin-top: 2rem;
    }
}