/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.4;
    font-size: 13px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
}

/* 标题样式 */
h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 22px;
}

h2 {
    color: #34495e;
    margin-bottom: 15px;
    font-size: 16px;
}

/* 导航栏样式 */
.nav {
    margin-bottom: 20px;
    text-align: right;
}

.nav a {
    display: inline-block;
    padding: 6px 12px;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 3px;
    margin-left: 8px;
    font-size: 12px;
}

.nav a:hover {
    background-color: #2980b9;
}

/* 表单样式 */
.form-group {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.form-group label {
    width: 80px;
    margin-right: 8px;
    font-size: 13px;
}

input[type="text"],
input[type="password"],
textarea {
    padding: 5px 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 13px;
}

textarea {
    height: 80px;
}

button {
    background-color: #2ecc71;
    color: white;
    padding: 5px 15px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
}

button:hover {
    background-color: #27ae60;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-size: 13px;
}

th, td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f8f9fa;
    font-weight: bold;
}

tr:hover {
    background-color: #f5f5f5;
}

/* 搜索表单样式 */
.search-form {
    background-color: white;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

/* 登录表单样式 */
.login-form {
    max-width: 400px;
    margin: 0 auto;
    background-color: white;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.login-form .form-group {
    margin-bottom: 15px;
}

.login-form button {
    width: 100%;
    margin-top: 10px;
}

/* 错误信息样式 */
.error {
    color: #e74c3c;
    background-color: #fde8e7;
    padding: 8px;
    border-radius: 4px;
    margin-bottom: 15px;
    text-align: center;
    font-size: 13px;
}

/* 添加表单样式 */
.add-form {
    background-color: white;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

/* 删除按钮样式 */
button[type="submit"] {
    background-color: #e74c3c;
}

button[type="submit"]:hover {
    background-color: #c0392b;
}

/* 编辑按钮样式 */
button.edit {
    background-color: #f39c12;
}

button.edit:hover {
    background-color: #d35400;
}

/* 成功信息样式 */
.success {
    color: #27ae60;
    background-color: #e8f6e9;
    padding: 8px;
    border-radius: 4px;
    margin-bottom: 15px;
    text-align: center;
    font-size: 13px;
}

/* 表格列宽设置 */
table th:nth-child(1), /* 所在国家 */
table td:nth-child(1) {
    min-width: 85px;
    word-break: break-all;
}

table th:nth-child(2), /* 机房名称 */
table td:nth-child(2) {
    min-width: 95px;
    word-break: break-all;
}

table th:nth-child(3), /* 机房网址 */
table td:nth-child(3) {
    min-width: 310px;
    word-break: break-all;
} 