* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    min-height: 100vh;
}

/* 首页样式 */
.index-body {
    text-align: center;
    padding: 80px 50px 50px 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.container {
    background: white;
    margin: 0 auto;
    padding: 45px 0;
    width: 300px;
    border-radius: 0px;
    display: inline-block;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

h1 { color: #333; margin-bottom: 20px; }

.btn-primary {
    padding: 15px 50px;
    font-size: 20px;
    cursor: pointer;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 0px;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(76,175,80,0.4);
}

.user-info {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.9);
    padding: 10px 20px;
    border-radius: 0px;
}

.user-info a {
    color: #2196F3;
    text-decoration: none;
    margin: 0 5px;
    cursor: pointer;
}

.hidden { display: none; }

/* 登录注册页公共样式 */
.auth-body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.form {
    background: white;
    padding: 50px;
    border-radius: 0px;
    width: 350px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.form h2 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
}

.form input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 2px solid #e0e0e0;
    border-radius: 0px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form input:focus {
    outline: none;
}

.form button {
    width: 100%;
    padding: 14px;
    color: white;
    border: none;
    border-radius: 0px;
    cursor: pointer;
    font-size: 18px;
    margin-top: 10px;
    transition: transform 0.3s;
}

.form button:hover { transform: translateY(-2px); }

.link {
    text-align: center;
    margin-top: 20px;
    color: #666;
}

.error {
    color: #f44336;
    text-align: center;
    margin-top: 10px;
    display: none;
}

/* 登录页渐变 */
.login-body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-body .form input:focus {
    border-color: #667eea;
}

.login-body .form button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-body .link a { color: #667eea; }

/* 注册页渐变 */
.register-body {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.register-body .form input:focus {
    border-color: #11998e;
}

.register-body .form button {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.register-body .link a { color: #11998e; }

/* ========== 控制面板 ========== */
.control-panel {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 20px 0;
}

.control-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.control-group label {
    font-size: 13px;
    color: #666;
}

.control-group input {
    width: 70px;
    padding: 8px;
    border: 2px solid #e0e0e0;
    font-size: 16px;
    text-align: center;
    outline: none;
}

.control-group input:focus {
    border-color: #667eea;
}

/* ========== 骰子容器 ========== */
.dice-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    min-height: 50px;
    margin: 20px 0;
    padding: 10px;
}

/* ========== 单个骰子 ========== */
.dice {
    width: 50px;
    height: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: white;
    border: 2px solid #333;
    font-size: 16px;
    font-weight: bold;
    border-radius: 15px;
    color: #333;
    line-height: 1;
}

.dice span {
    font-size: 12px;
    color: #666;
    font-weight: normal;
}

/* ========== 结果统计 ========== */
.result-info {
    margin: 10px 0 20px;
    font-size: 14px;
    color: #555;
    min-height: 40px;
}

.result-info strong {
    color: #4CAF50;
    font-size: 20px;
}