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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f5;
    height: 100vh;
    overflow: hidden;
}

/* 弹窗 */
.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    width: 400px;
    max-width: 90%;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 15px; right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.close-btn:hover { color: #333; }

/* 登录注册 */
.auth-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 16px;
    color: #666;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

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

.auth-form h3 {
    margin-bottom: 20px;
    text-align: center;
    color: #333;
}

.auth-form input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.auth-form input:focus {
    outline: none;
    border-color: #1890ff;
}

.btn-primary {
    width: 100%;
    padding: 12px;
    background: #1890ff;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: #40a9ff;
}

.tip {
    text-align: center;
    margin-top: 15px;
    color: #666;
    font-size: 14px;
}

.tip a {
    color: #1890ff;
    text-decoration: none;
}

/* 主界面 */
.header {
    height: 60px;
    background: white;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.logo {
    font-size: 20px;
    font-weight: bold;
    color: #1890ff;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info span {
    color: #666;
    font-size: 14px;
}

.btn-recharge {
    padding: 6px 16px;
    background: #52c41a;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.btn-logout {
    padding: 6px 16px;
    background: #ff4d4f;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.container {
    display: flex;
    height: calc(100vh - 60px);
}

.sidebar {
    width: 260px;
    background: white;
    border-right: 1px solid #eee;
    display: flex;
    flex-direction: column;
    padding: 15px;
}

.btn-create {
    width: 100%;
    padding: 12px;
    background: #1890ff;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    margin-bottom: 15px;
}

.room-list {
    flex: 1;
    overflow-y: auto;
}

.room-item {
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 5px;
    transition: background 0.2s;
    font-size: 14px;
    color: #333;
}

.room-item:hover {
    background: #f0f0f0;
}

.room-item.active {
    background: #e6f7ff;
    color: #1890ff;
}

.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f5f5f5;
}

.chat-header {
    padding: 15px 20px;
    background: white;
    border-bottom: 1px solid #eee;
    font-weight: 500;
}

.message-area {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.message {
    margin-bottom: 15px;
    max-width: 70%;
}

.message.self {
    margin-left: auto;
    text-align: right;
}

.msg-info {
    font-size: 12px;
    color: #999;
    margin-bottom: 4px;
}

.msg-content {
    background: white;
    padding: 12px 16px;
    border-radius: 12px;
    display: inline-block;
    word-break: break-all;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.message.self .msg-content {
    background: #1890ff;
    color: white;
}

.input-area {
    padding: 15px 20px;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

.input-area textarea {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    resize: none;
    font-size: 14px;
}

.input-area textarea:focus {
    outline: none;
    border-color: #1890ff;
}

.btn-send {
    padding: 12px 24px;
    background: #1890ff;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
}

/* 充值弹窗 */
.recharge-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.amount-option {
    padding: 15px;
    border: 2px solid #eee;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 18px;
    font-weight: 500;
}

.amount-option:hover {
    border-color: #1890ff;
    color: #1890ff;
}

.amount-option.selected {
    border-color: #1890ff;
    background: #e6f7ff;
    color: #1890ff;
}

.pay-type {
    margin: 15px 0;
    display: flex;
    gap: 20px;
}

.pay-type label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}
