/* ============================================================
   传奇挂机网页游戏 - 基础样式
   ============================================================ */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    font-family: 'Microsoft YaHei', 'SimHei', Arial, sans-serif;
    background: #0a0500;
    color: #f0d6a0;
    font-size: 14px;
    line-height: 1.5;
    overflow-x: hidden;
}

a { color: #ffd700; text-decoration: none; }
a:hover { color: #ffec80; }

input, button, textarea, select {
    font-family: inherit;
    font-size: inherit;
    outline: none;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 10px 14px;
    background: #1a0a00;
    border: 1px solid #5a3a0a;
    border-radius: 4px;
    color: #f0d6a0;
    transition: border-color 0.2s;
}

input[type="text"]:focus,
input[type="password"]:focus {
    border-color: #8B6914;
    box-shadow: 0 0 8px rgba(139, 105, 20, 0.3);
}

::placeholder { color: #6a4a2a; }

/* 按钮 */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border: 1px solid #8B6914;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-align: center;
    transition: all 0.2s;
    user-select: none;
}

.btn-primary {
    background: linear-gradient(180deg, #8b5a1a, #5a3a0a);
    color: #ffd700;
}

.btn-primary:hover {
    background: linear-gradient(180deg, #a06a2a, #6a4a1a);
    box-shadow: 0 0 12px rgba(139, 105, 20, 0.4);
}

.btn-block { width: 100%; }

.btn-sm {
    padding: 5px 12px;
    font-size: 12px;
}

.btn-link {
    background: none;
    border: none;
    color: #8B6914;
    cursor: pointer;
    padding: 8px;
}

.btn-link:hover { color: #ffd700; }

/* 认证页面 */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: radial-gradient(ellipse at center, #1a0a00 0%, #050200 100%);
}

.auth-box {
    width: 400px;
    padding: 40px;
    background: #1a0a00;
    border: 1px solid #5a3a0a;
    border-radius: 8px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5), inset 0 0 40px rgba(90, 58, 10, 0.05);
}

.auth-logo {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo h1 {
    font-size: 36px;
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
    letter-spacing: 8px;
}

.auth-logo p {
    color: #8B6914;
    font-size: 12px;
    margin-top: 8px;
}

.auth-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #5a3a0a;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    color: #8B6914;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
}

.tab-btn.active {
    color: #ffd700;
    border-bottom-color: #ffd700;
}

.tab-btn:hover { color: #f0d6a0; }

.auth-form { display: none; }
.auth-form.active { display: block; }

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #c0a070;
    font-size: 13px;
}

.error-msg {
    color: #ff4444;
    font-size: 13px;
    margin-top: 8px;
    min-height: 20px;
}

/* 角色选择 */
.char-select-container,
.char-create-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: radial-gradient(ellipse at center, #1a0a00 0%, #050200 100%);
}

.char-select-box,
.char-create-box {
    width: 600px;
    padding: 30px;
    background: #1a0a00;
    border: 1px solid #5a3a0a;
    border-radius: 8px;
    text-align: center;
}

.char-select-box h2,
.char-create-box h2 {
    color: #ffd700;
    margin-bottom: 20px;
}

.char-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.char-card {
    display: flex;
    align-items: center;
    padding: 16px;
    background: #2a1a0a;
    border: 1px solid #5a3a0a;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.char-card:hover {
    border-color: #8B6914;
    background: #3a2a1a;
}

.char-card-icon {
    font-size: 32px;
    width: 50px;
    text-align: center;
}

.char-card-info {
    flex: 1;
    text-align: left;
    margin-left: 16px;
}

.char-card-name {
    font-size: 18px;
    color: #ffd700;
}

.char-card-detail {
    font-size: 12px;
    color: #8B6914;
    margin-top: 4px;
}

/* 职业选择 */
.class-select {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.class-card {
    flex: 1;
    padding: 20px 12px;
    background: #2a1a0a;
    border: 2px solid #5a3a0a;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}

.class-card:hover {
    border-color: #8B6914;
}

.class-card.selected {
    border-color: #ffd700;
    background: #3a2a0a;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
}

.class-icon {
    font-size: 36px;
    margin-bottom: 8px;
}

.class-card h3 {
    color: #ffd700;
    margin-bottom: 4px;
}

.class-card p {
    font-size: 12px;
    color: #8B6914;
}

.tag-warrior { color: #ff6b35; }
.tag-mage { color: #3399ff; }
.tag-taoist { color: #44cc44; }
