/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 加载动画 */
#loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent-start);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 卡片样式 */
.card {
    background: rgba(45, 45, 45, 0.7);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 255, 136, 0.3);
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color);
    font-weight: bold;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-start);
    box-shadow: 0 0 0 2px rgba(0, 255, 136, 0.2);
}

/* 关系图容器 */
.relation-container {
    width: 100%;
    height: calc(100vh - 140px);
    position: relative;
    overflow: hidden;
}

#relation-canvas {
    width: 100%;
    height: 100%;
    background: transparent;
}

/* 头像样式 */
.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid transparent;
    background: linear-gradient(45deg, var(--accent-start), var(--accent-end)) border-box;
}

/* 消息样式 */
.message-item {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.message-item.unread {
    background: rgba(0, 255, 136, 0.1);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }
    
    .card {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .crystal-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .avatar {
        width: 40px;
        height: 40px;
    }
}