/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

.app-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* 登录/注册容器 */
.login-container {
    width: 100%;
    max-width: 400px;
}

.login-form, .register-form {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px 30px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.logo img {
    width: 50px;
    height: 50px;
    object-fit: cover;
}

.login-header h1 {
    color: #333;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 10px;
}

.login-header p {
    color: #666;
    font-size: 16px;
}

/* 表单元素 */
.input-group {
    margin-bottom: 20px;
    position: relative;
}

.input-group input {
    width: 100%;
    padding: 15px 20px;
    border: 1px solid #e0e0e0;
    border-radius: 50px;
    font-size: 16px;
    background: #f9f9f9;
    transition: all 0.3s ease;
}

.input-group input:focus {
    border-color: #667eea;
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #666;
}

.checkbox input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 1px solid #ddd;
    border-radius: 3px;
    margin-right: 8px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox input:checked + .checkmark {
    background: #667eea;
    border-color: #667eea;
}

.checkbox input:checked + .checkmark:after {
    content: "";
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.login-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.login-btn:active {
    transform: translateY(0);
}

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

.form-footer p {
    color: #666;
    font-size: 14px;
}

.form-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.error-message {
    background: #ffeded;
    color: #f44336;
    padding: 12px 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    text-align: center;
}

/* 主页样式 */
.home-container {
    width: 100%;
    min-height: 100vh;
    background: #f5f5f5;
}

/* 顶部用户信息区 */
.user-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    color: white;
    display: flex;
    align-items: center;
}

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    margin-right: 15px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-details {
    flex: 1;
}

.user-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
}

.user-phone {
    font-size: 14px;
    opacity: 0.8;
}

.user-level {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    margin-top: 5px;
}

/* 活跃度显示区 */
.activity-section {
    padding: 20px;
    background: white;
    margin-bottom: 10px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.section-title i {
    margin-right: 8px;
    color: #667eea;
}

.activity-ball-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.activity-ball {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: conic-gradient(#4CAF50 0deg, #4CAF50 var(--activity), #e0e0e0 var(--activity));
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.3);
    transition: all 0.5s ease;
}

.activity-ball::before {
    content: "";
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: white;
}

.activity-value {
    position: relative;
    z-index: 1;
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

/* 功能菜单 */
.menu-section {
    background: white;
    margin-bottom: 10px;
}

.menu-list {
    list-style: none;
}

.menu-item {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
    transition: background-color 0.3s;
}

.menu-item:hover {
    background-color: #f9f9f9;
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 20px;
}

.menu-icon.profile {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.menu-icon.message {
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
}

.menu-icon.password {
    background: rgba(255, 152, 0, 0.1);
    color: #FF9800;
}

.menu-icon.logout {
    background: rgba(244, 67, 54, 0.1);
    color: #f44336;
}

.menu-text {
    flex: 1;
    font-size: 16px;
}

.menu-arrow {
    color: #ccc;
}

/* 通知点 */
.notification-dot {
    width: 8px;
    height: 8px;
    background: #f44336;
    border-radius: 50%;
    margin-left: 10px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 公告弹窗 */
.announcement-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.announcement-content {
    background: white;
    border-radius: 15px;
    width: 100%;
    max-width: 400px;
    padding: 25px;
    position: relative;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.announcement-header {
    margin-bottom: 15px;
}

.announcement-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.announcement-body {
    margin-bottom: 20px;
}

.announcement-text {
    font-size: 16px;
    line-height: 1.5;
    color: #555;
}

.announcement-close {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 14px;
    cursor: pointer;
    display: block;
    margin: 0 auto;
}

/* 个人设置页面 */
.settings-container {
    width: 100%;
    min-height: 100vh;
    background: #f5f5f5;
}

.settings-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    color: white;
    text-align: center;
    position: relative;
}

.back-btn {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

.settings-title {
    font-size: 18px;
    font-weight: 600;
}

.settings-section {
    background: white;
    margin-bottom: 10px;
}

.settings-item {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.settings-item:last-child {
    border-bottom: none;
}

.settings-label {
    font-size: 16px;
    color: #333;
}

.settings-value {
    font-size: 14px;
    color: #666;
    max-width: 200px;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.edit-btn {
    background: none;
    border: none;
    color: #667eea;
    font-size: 14px;
    cursor: pointer;
}

/* 表单样式 */
.form-container {
    padding: 20px;
}

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

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    background: #f9f9f9;
    transition: all 0.3s ease;
}

.form-input:focus {
    border-color: #667eea;
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    background: #f9f9f9;
    min-height: 100px;
    resize: vertical;
    transition: all 0.3s ease;
}

.form-textarea:focus {
    border-color: #667eea;
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

/* 头像上传 */
.avatar-upload {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.current-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #f0f0f0;
    margin-right: 20px;
    overflow: hidden;
    border: 2px solid #e0e0e0;
}

.current-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-upload-btn {
    padding: 8px 15px;
    background: #f0f0f0;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
}

/* 消息页面 */
.message-container {
    width: 100%;
    min-height: 100vh;
    background: #f5f5f5;
    display: flex;
    flex-direction: column;
}

.message-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 15px 20px;
    color: white;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10;
}

.back-btn {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    padding: 5px;
    margin-right: 15px;
    cursor: pointer;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.message-title {
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
}

.header-menu {
    width: 36px;
    display: flex;
    justify-content: flex-end;
}

.menu-btn {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    padding: 5px;
    cursor: pointer;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.menu-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.message-list {
    flex: 1;
    padding: 20px 15px;
    overflow-y: auto;
    background: #f0f0f0;
    background-image: linear-gradient(to bottom, #f0f0f0, #e8e8e8);
}

/* 消息气泡样式 */
.message-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message-bubble {
    display: flex;
    margin-bottom: 5px;
}

.message-bubble.message-user {
    justify-content: flex-end;
}

.message-bubble.message-admin {
    justify-content: flex-start;
}

.bubble-content {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 18px;
    position: relative;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    word-wrap: break-word;
}

.message-user .bubble-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.message-admin .bubble-content {
    background: white;
    color: #333;
    border-bottom-left-radius: 4px;
}

.bubble-text {
    font-size: 16px;
    line-height: 1.4;
    margin-bottom: 5px;
}

.bubble-image {
    max-width: 200px;
    max-height: 200px;
    border-radius: 12px;
    margin-top: 8px;
    display: block;
}

.bubble-time {
    font-size: 11px;
    opacity: 0.7;
    text-align: right;
}

.message-admin .bubble-time {
    text-align: left;
}

/* 系统消息 */
.system-message {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    margin: 15px 0;
    border-radius: 20px;
    font-size: 14px;
    max-width: 80%;
    margin-left: auto;
    margin-right: auto;
}

.system-message.error {
    background: rgba(244, 67, 54, 0.1);
    color: #d32f2f;
}

.system-message.success {
    background: rgba(76, 175, 80, 0.1);
    color: #388e3c;
}

.system-message i {
    margin-right: 8px;
}

/* 空状态 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.empty-icon {
    font-size: 48px;
    color: #ccc;
    margin-bottom: 15px;
}

.empty-text {
    color: #999;
    font-size: 16px;
}

/* 消息发送区 */
.message-compose {
    background: white;
    padding: 10px 15px;
    border-top: 1px solid #e0e0e0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.compose-toolbar {
    display: flex;
    margin-bottom: 8px;
}

.tool-btn {
    background: none;
    border: none;
    color: #666;
    font-size: 20px;
    padding: 8px;
    margin-right: 15px;
    cursor: pointer;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.tool-btn:hover {
    background: #f0f0f0;
    color: #667eea;
}

.compose-area {
    position: relative;
}

.input-container {
    display: flex;
    align-items: flex-end;
    background: #f5f5f5;
    border-radius: 24px;
    padding: 8px 12px;
}

.message-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 16px;
    line-height: 1.4;
    padding: 8px 5px;
    resize: none;
    max-height: 120px;
    min-height: 20px;
    font-family: inherit;
}

.message-input:focus {
    outline: none;
}

.send-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-left: 8px;
}

.send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.send-btn:active {
    transform: scale(0.95);
}

.image-preview-container {
    margin-top: 10px;
}

.preview-item {
    position: relative;
    display: inline-block;
}

.preview-item img {
    max-width: 100px;
    max-height: 100px;
    border-radius: 8px;
    object-fit: cover;
}

.remove-preview {
    position: absolute;
    top: -5px;
    right: -5px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
}

/* 旧样式保持兼容性 */
.message-item {
    background: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.message-user {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f0f0f0;
    margin-right: 10px;
    overflow: hidden;
}

.message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.message-content {
    flex: 1;
}

.message-info {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.message-sender {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-right: 10px;
}

.message-time {
    font-size: 12px;
    color: #999;
}

.message-text {
    font-size: 15px;
    color: #333;
    line-height: 1.5;
}

.message-image {
    max-width: 100%;
    border-radius: 8px;
    margin-top: 10px;
}

.message-admin {
    background: #f0f7ff;
}

.message-admin .message-sender {
    color: #667eea;
}

.message-reply {
    margin-left: 50px;
    margin-top: 10px;
    border-left: 2px solid #e0e0e0;
    padding-left: 15px;
}

.compose-form {
    display: flex;
    align-items: flex-end;
}

.compose-input {
    flex: 1;
    margin-right: 10px;
}

.compose-btn {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 14px;
    cursor: pointer;
}

.image-upload {
    margin-bottom: 10px;
}

.image-preview {
    max-width: 100px;
    max-height: 100px;
    border-radius: 8px;
    margin-top: 10px;
    display: none;
}

/* 实名认证状态 */
.verification-status {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 20px;
}

.verification-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.verification-text {
    font-size: 16px;
    font-weight: 600;
}

/* 响应式调整 */
@media (max-width: 480px) {
    .login-form, .register-form {
        padding: 30px 20px;
    }
    
    .login-header h1 {
        font-size: 24px;
    }
    
    .activity-ball {
        width: 120px;
        height: 120px;
    }
    
    .activity-ball::before {
        width: 90px;
        height: 90px;
    }
    
    .activity-value {
        font-size: 20px;
    }
}