:root {
    --primary-color: #6c5ce7;
    --secondary-color: #a29bfe;
    --accent-color: #fd79a8;
    --dark-color: #2d3436;
    --light-color: #f7f7f7;
    --success-color: #00b894;
    --warning-color: #fdcb6e;
    --error-color: #e17055;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 420px;
}

.card {
    background: white;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: all 0.3s ease;
}

.card-header {
    background: var(--primary-color);
    color: white;
    padding: 24px;
    text-align: center;
}

.card-header h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.card-header p {
    opacity: 0.9;
    font-size: 14px;
}

.card-body {
    padding: 32px;
}

.tabs {
    display: flex;
    margin-bottom: 24px;
    border-radius: 8px;
    overflow: hidden;
    background: #f1f2f6;
}

.tab {
    flex: 1;
    text-align: center;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.tab.active {
    background: var(--primary-color);
    color: white;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-color);
    font-size: 14px;
}

.input-group {
    position: relative;
}

input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.form-footer {
    margin-top: 24px;
    text-align: center;
}

.btn {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn:hover {
    background: #5b4bd4;
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--secondary-color);
}

.btn-secondary:hover {
    background: #9188fd;
}

.optional {
    color: #7f8c8d;
    font-size: 12px;
    margin-left: 5px;
}

.error-message {
    color: var(--error-color);
    font-size: 13px;
    margin-top: 5px;
    display: none;
}

.success-message {
    color: var(--success-color);
    font-size: 13px;
    margin-top: 5px;
    display: none;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    padding: 24px;
    box-shadow: var(--card-shadow);
}

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

.modal-title {
    font-size: 20px;
    font-weight: 600;
}

.close-modal {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--dark-color);
}

.character-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.character-card {
    border: 2px solid #eee;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.character-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

.character-card.selected {
    border-color: var(--primary-color);
    background: rgba(108, 92, 231, 0.05);
}

.character-name {
    font-weight: 600;
    margin-top: 8px;
}

.character-uid {
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 4px;
}

@media (max-width: 480px) {
    .card-body {
        padding: 24px 20px;
    }
    
    .character-list {
        grid-template-columns: 1fr;
    }
}

/* 区服选择下拉框样式 */
select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    background-color: white;
    transition: all 0.3s ease;
    appearance: none; /* 去除默认样式 */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
}

select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

/* 针对区服选择的特殊样式 */
#register-server {
    cursor: pointer;
}