body {
    font-family: Arial, sans-serif;
    margin: 20px;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
    width: 80%;
    margin: 20px auto;
    border: 1px solid #ddd;
}

th,
td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

th {
    background-color: #f5f5f5;
}

.status-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

.available {
    background-color: #28a745;
}

.unavailable {
    background-color: #dc3545;
}

.status-text {
    font-weight: bold;
    opacity: 0.8;
}

.dns-resolving {
    color: #666;
}

/* 响应式设计 - 移动优先 */
@media (max-width: 480px) {
    table {
        width: 100%;
        display: block;
        overflow-x: auto;
        border: 0;
    }

    table thead,
    table tbody,
    table th,
    table td,
    table tr {
        display: block;
    }

    table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    table tr {
        border-bottom: 1px solid #ddd;
        margin-bottom: 10px;
        position: relative;
    }

    table tr::before {
        content: '?';
        position: absolute;
        left: 25%;
        top: 50%;
        height: 50%;
        aspect-ratio: 1 / 1;
        background-color: #727272;
        color: white;
        font-size: 18px;
        text-align: center;
        line-height: calc(50% + 42px);
        font-weight: bold;
        transform: translate(-50%, -50%);
        border-radius: 10px;
    }

    table tr:has(td>.available)::before {
        content: '在线';
        position: absolute;
        left: 25%;
        top: 50%;
        height: 50%;
        aspect-ratio: 1 / 1;
        background-color: #28a745;
        color: white;
        font-size: 18px;
        text-align: center;
        line-height: calc(50% + 42px);
        font-weight: bold;
        transform: translate(-50%, -50%);
        border-radius: 10px;
    }

    table tr:has(td>.unavailable)::before {
        content: '离线';
        position: absolute;
        left: 25%;
        top: 50%;
        height: 50%;
        aspect-ratio: 1 / 1;
        background-color: #a72828;
        color: white;
        font-size: 18px;
        text-align: center;
        line-height: calc(50% + 42px);
        font-weight: bold;
        transform: translate(-50%, -50%);
        border-radius: 10px;
    }

    table td {
        border: none;
        position: relative;
        padding-left: 50%;
    }

    table td::before {
        content: attr(data-label);
        position: absolute;
        left: 8px;
        top: 8px;
        width: 45%;
        white-space: nowrap;
        font-weight: bold;
        color: #666;
    }

    body {
        margin: 10px;
    }

    th,
    td {
        padding: 8px;
        font-size: 14px;
    }

    .status-text {
        margin-top: 4px;
    }
}

/* 响应式设计 - 平板及以上 */
@media (min-width: 768px) {
    table {
        width: 90%;
        margin: 20px auto;
    }

    th, td {
        padding: 14px;
    }

    body {
        margin: 30px;
    }
}

/* 响应式设计 - 桌面及以上 */
@media (min-width: 1024px) {
    table {
        width: 80%;
    }

    th, td {
        padding: 16px;
    }

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