/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f4f7f9;
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

h1 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.2em;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

h2 {
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

h3 {
    color: #2c3e50;
    margin: 20px 0 10px;
}

/* 按钮样式 */
.btn {
    padding: 5px 10px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9em;
    margin: 2px;
    display: inline-block;
}

.btn-edit {
    background: #f39c12;
    color: white;
}

.btn-delete {
    background: #e74c3c;
    color: white;
}

.btn-add {
    background: #2ecc71;
    color: white;
    padding: 8px 15px;
}

.btn-save {
    background: #3498db;
    color: white;
}

.btn-submit {
    background: #3498db;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.btn-discord {
    background: #5865F2;
    color: white;
}

.btn-discord:hover {
    background: #4752C4;
}

/* 菜单网格 */
.menu-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.menu-btn {
    display: inline-block;
    padding: 15px 30px;
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    min-width: 150px;
    text-align: center;
}

.menu-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

/* 表单样式 */
input[type="text"], 
input[type="number"], 
textarea, 
select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 5px;
}

input[type="text"] {
    width: 200px;
}

input[type="number"] {
    width: 60px;
}

textarea {
    width: 400px;
    height: 80px;
}

select {
    width: 150px;
}

/* 卡片样式 */
.position-card {
    background: #f9f9f9;
    border-left: 4px solid #3498db;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
}

.position-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.position-name {
    font-size: 1.2em;
    font-weight: bold;
    color: #2c3e50;
}

.permission-item {
    margin: 10px 0;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 5px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.permission-info {
    flex-grow: 1;
}

.guild-id {
    font-weight: bold;
    color: #2c3e50;
}

.role-id {
    color: #7f8c8d;
    font-size: 0.9em;
}

.badge {
    background: #3498db;
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.8em;
}

.note {
    color: #7f8c8d;
    font-size: 0.9em;
    margin-top: 5px;
}

.role-detail {
    background: #f0f0f0;
    padding: 5px 10px;
    border-radius: 3px;
    margin-top: 5px;
    font-size: 12px;
}

.template-item {
    margin: 10px 0;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.template-name {
    font-weight: bold;
}

/* 武器列表 */
ul {
    list-style: none;
    padding-left: 20px;
}

li {
    margin: 10px 0;
    padding: 10px;
    background: white;
    border-radius: 5px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.weapon-name {
    font-weight: bold;
    min-width: 100px;
}

.weapon-controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-left: 20px;
}

.weapon-controls input,
.weapon-controls select {
    margin: 0;
}

/* 链接 */
.back-link {
    margin-bottom: 20px;
}

.back-link a {
    color: #3498db;
    text-decoration: none;
}

.back-link a:hover {
    text-decoration: underline;
}

.form-inline {
    display: inline;
}

hr {
    border: 0;
    border-top: 1px solid #eee;
    margin: 20px 0;
}

.description-box {
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 5px;
}

/* 响应式设计 */
@media (max-width: 600px) {
    .menu-btn {
        min-width: 100%;
    }
    
    .container {
        padding: 20px;
    }
    
    input[type="text"],
    textarea,
    select {
        width: 100%;
    }
}
