body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f7f6;
    color: #333;
}

.container {
    width: 85%;
    max-width: 1200px;
    margin: 30px auto;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

header {
    background-color: #4CAF50;
    color: white;
    padding: 25px 0;
    text-align: center;
    font-size: 2.2em;
    font-weight: bold;
    letter-spacing: 1px;
    border-bottom: 5px solid #388E3C;
}

.notice-board {
    background-color: #fff3e0;
    color: #e65100;
    padding: 15px 25px;
    font-size: 1.1em;
    text-align: center;
    border-bottom: 1px solid #ffe0b2;
    animation: fadeInDown 0.8s ease-out;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    display: table; /* Default table display */
}

table th, table td {
    padding: 18px 25px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

table th {
    background-color: #f0f2f5;
    color: #555;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

table tr:hover {
    background-color: #f8f8f8;
}

table td a {
    color: #007bff;
    text-decoration: none;
    word-break: break-all; /* Ensure long links wrap */
    transition: color 0.3s ease;
}

table td a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Server name red color */
.server-name {
    color: #dc3545; /* Bootstrap's red color, you can choose any red */
    font-weight: bold;
}

/* Verification area styling */
.verification-area {
    text-align: center;
    padding: 20px;
    background-color: #f9f9f9;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    margin-top: 20px;
    margin-bottom: 20px; /* Add spacing to the table */
}
.verification-area input[type="text"] {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-right: 10px;
    width: 200px;
    max-width: 70%;
}
.verification-area button {
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.verification-area button:hover {
    background-color: #0056b3;
}
.verification-area .message {
    margin-top: 10px;
    font-weight: bold;
    color: #333;
}
.verification-area .message.success {
    color: #4CAF50;
}
.verification-area .message.error {
    color: #f44336;
}

/* --- Optimized Responsive Design --- */

/* For medium screens (tablets, max-width 768px) */
@media (max-width: 768px) {
    .container {
        width: 95%;
        margin: 20px auto;
    }
    table th, table td {
        padding: 12px 15px;
        font-size: 0.9em;
    }
    header {
        font-size: 1.8em;
        padding: 20px 0;
    }
    .notice-board {
        font-size: 1em;
        padding: 10px 15px;
    }
    .verification-area input[type="text"] {
        width: calc(100% - 100px); /* Adjust width for smaller screens */
        margin-right: 0;
        margin-bottom: 10px;
        display: block; /* Make input full width */
        max-width: 100%;
    }
    .verification-area button {
        width: 100%;
        display: block;
    }
}

/* For small screens (mobile, max-width 576px for card layout) */
@media (max-width: 576px) {
    table, thead, tbody, th, td, tr {
        display: block; /* Set table elements to block display */
    }

    /* Hide table headers */
    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    /* Make each row a card */
    table tr {
        border: 1px solid #ddd;
        border-radius: 8px;
        margin-bottom: 15px; /* Spacing between cards */
        background-color: #fff;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        padding: 15px; /* Card inner padding */
        display: flex; /* Use Flexbox for content layout */
        flex-direction: column; /* Stack content vertically */
    }

    /* Each cell acts as a row within the card */
    table td {
        border: none; /* Remove cell borders */
        position: relative;
        padding-left: 100px; /* Space for pseudo-element label */
        text-align: right; /* Align value to the right */
        font-size: 1em; /* Ensure content font size */
        padding: 8px 10px; /* Adjust spacing within each item in card */
    }

    /* Use pseudo-elements to display item labels (from data-label) */
    table td::before {
        content: attr(data-label); /* Use data-label attribute for content */
        position: absolute;
        left: 10px;
        width: 90px; /* Width for the label */
        padding-right: 10px;
        white-space: nowrap; /* Prevent label from wrapping */
        text-align: left;
        font-weight: bold;
        color: #666;
    }
    /* Specific data-label content for each column */
    table td:nth-of-type(1)::before { content: "序号:"; }
    table td:nth-of-type(2)::before { content: "区服:"; }
    table td:nth-of-type(3)::before { content: "开服:"; }
    table td:nth-of-type(4)::before { content: "下载:"; }
    table td:nth-of-type(5)::before { content: "联系:"; }

    /* Ensure long links display well */
    table td a {
        display: block; /* Link takes full width */
        word-break: break-all; /* Force wrap */
        text-align: right;
    }

    /* Ensure server name wraps and is visible */
    .server-name {
        display: inline-block; /* Allows wrapping */
        word-break: break-all; /* Force break long words/names */
        text-align: right; /* Aligns with the value */
        width: auto; /* Take natural width */
    }

    /* Optimize header and notice board for mobile */
    header {
        font-size: 1.6em;
        padding: 15px 0;
    }
    .notice-board {
        font-size: 0.95em;
        padding: 10px 15px;
    }
}

/* Further fine-tuning for even smaller screens (especially for ultra-long links/names) */
@media (max-width: 375px) {
    table td {
        padding-left: 80px; /* More space for label */
        font-size: 0.95em;
    }
    table td::before {
        width: 70px;
    }
}