:root {
    --theme-color: #88BDFF;
}

.server-container * {
    position: relative;
    box-sizing: border-box;
}

.server-container {
    padding: 1rem 0;
    display: flex;
    flex-direction: row;
    gap: 1rem;
}

.server-list {
    gap: 1rem;
    width: 80%;
    display: flex;
    flex-direction: column;
}

.sidebar {
    width: 20%;
}

.server-list-logo {
    overflow: hidden;
    border-radius: .25rem;
}

.server-card {
    width: 100%;
    display: block;
    border: 1px solid #dee2e6;
    border-radius: .25rem;
    padding: 1rem;
    background-color: #f8f9fa;
    position: relative;
    text-decoration: none;
}

.server-card-header {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-bottom: .75rem;
}

.server-card-header-item {
    gap: .5rem;
    display: flex;
    padding: .25rem .5rem;
    align-items: center;
    border-radius: .25rem;
    background-color: rgb(238, 238, 238);
}

.server-card-header-item .fa {
    color: rgba(0, 0, 0, .5);
}

.server-card-logo {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: .25rem;
    background-color: #fff;
    border: 1px solid #dee2e6;
}

.server-card-info {
    gap: .75rem;
    display: flex;
}

.server-card-info-content {
    gap: .75rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.server-card-info-content-title {
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: .5rem;
}

.server-online-players {
    top: 1rem;
    right: 1rem;
    font-size: 1.75rem;
    color: rgba(0, 0, 0, .125);
    position: absolute;
}

.server-card-info-content-address {
    padding: .25rem .5rem;
    border-radius: .25rem;
    background-color: #fff;
    border: 1px solid #dee2e6;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin: 30px 0;
}

.pagination a,
.pagination span {
    display: block;
    padding: 8px 12px;
    margin: 5px 3px;
    border: 1px solid #ddd;
    color: var(--theme-color);
    text-decoration: none;
    border-radius: 4px;
    background-color: #f8f9fa;
}

.pagination a:hover {
    background-color: #f1f1f1;
}

.pagination .current-page {
    background-color: var(--theme-color);
    color: #fff;
    border-color: var(--theme-color);
}

/* 侧边栏样式 */
.sidebar {
    padding: 1rem;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: .25rem;
    margin-bottom: 1rem;
}

.sidebar .sidebar-section {
    margin-bottom: 1rem;
}

.sidebar .sidebar-section h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    border-bottom: 1px solid var(--theme-color);
    padding-bottom: .5rem;
}

.sidebar .sidebar-section ul {
    list-style: none;
    padding: 0;
}

.sidebar .sidebar-section ul li {
    margin-bottom: .5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar .sidebar-section ul li a {
    color: var(--theme-color);
    text-decoration: none;
}

.sidebar .sidebar-section ul li a:hover {
    text-decoration: underline;
}

.sidebar .badge {
    background-color: var(--theme-color);
    color: #fff;
    padding: .25rem .5rem;
    border-radius: .25rem;
    font-size: .75rem;
}

.server-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.server-header h4 {
    margin: 0;
    font-size: 18px;
    color: #2c3e50;
    font-weight: 600;
}

.server-meta {
    background: #f8f9fa;
    padding: 6px 12px;
    border-radius: 20px;
    color: #27ae60;
    border: 1px solid #e9ecef;
    font-weight: 500;
}

.server-message {
    padding: 12px 16px;
    border-left: 4px solid;
    border-radius: .25rem;
    margin: 12px 0;
    display: flex;
    align-items: center;
}

.server-message-error {
    background: #fff5f5;
    color: #dc3545;
    border-color: #dc3545;
}

.server-message-success {
    background: #f0fff4;
    color: #28a745;
    border-color: #28a745;
}

.server-row {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
}

.server-logo {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: .375rem;
    background-color: #fff;
    border: 1px solid #dee2e6;
}

.server-main {
    flex: 1;
}

.server-name {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.server-address {
    color: #666;
    font-family: monospace;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 12px;
}

.server-stats {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.server-stat {
    padding: 8px 16px;
    background: #f8f9fa;
    border-left: 3px solid var(--theme-color);
}

.server-stat-label {
    font-size: 13px;
    color: #666;
    margin-bottom: 4px;
}

.server-stat-value {
    font-weight: 600;
    color: #2c3e50;
}

.server-desc {
    background: #f8f9fa;
    padding: 1rem;
    border-left: 3px solid var(--theme-color);
    margin-bottom: 20px;
}

.server-details {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.server-detail-label {
    font-weight: 500;
    color: #444;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
}

.server-detail-label i {
    margin-right: 8px;
    color: var(--theme-color);
}

.server-detail-value {
    color: #333;
    word-break: break-all;
}

.server-actions {
    display: flex;
    gap: 10px;
}

.server-actions .btn {
    width: 100%;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border-radius: 0.25rem;
    background-color: var(--theme-color);
    color: #fff;
    border: none;
}

.server-actions .btn:active {
    box-shadow: 0 0 3px 3px rgba(136, 189, 255, .125), 0 0 3px 3px rgba(0, 0, 0, .05) inset;
}

.server-form-group {
    margin-bottom: 16px;
}

.server-form-group label {
    display: block;
    font-size: 14px;
    margin-bottom: 6px;
    color: #444;
    font-weight: 500;
}

.server-form-group input[type="text"],
.server-form-group input[type="password"],
.server-form-group textarea {
    width: 100%;
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
}

.server-form-group input:focus,
.server-form-group textarea:focus {
    outline: none;
    border-color: var(--theme-color);
    box-shadow: 0 0 3px 3px rgba(136, 189, 255, .125);
}

@media (max-width: 768px) {
    .server-row {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .server-details {
        grid-template-columns: 1fr;
    }

    .server-container {
        padding: 1rem;
        flex-direction: column;
    }

    .server-list,
    .sidebar {
        width: 100%;
    }

    .header-content {
        flex-direction: column;
    }

    .header-content h1 {
        font-size: 24px;
        margin-bottom: 10px;
    }

    .header-content .nav-buttons {
        margin-left: 0;
    }

    .header-content .nav-buttons a {
        font-size: 12px;
        padding: 6px 10px;
        margin-left: 5px;
    }

    /* 调整侧边栏在移动端的位置 */
    .sidebar {
        margin-top: 20px;
    }
}