/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* 容器 */
.container {
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* 页面切换 */
.page {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.page.active {
    display: block;
}

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

/* 头部 */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding-top: 40px;
}

.header h1 {
    font-size: 2.5em;
    color: white;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    font-weight: 300;
    letter-spacing: 2px;
}

.header h2 {
    font-size: 1.8em;
    color: white;
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.header p {
    color: rgba(255,255,255,0.9);
    font-size: 1.1em;
    margin-bottom: 20px;
}

/* 搜索框 */
.search-box {
    margin-bottom: 30px;
}

.search-box input {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    background: white;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.search-box input::placeholder {
    color: #999;
}

/* 按钮 */
.button-group {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.btn {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn.primary {
    background: linear-gradient(45deg, #ff6b6b, #ee5a52);
    color: white;
    box-shadow: 0 4px 15px rgba(238, 90, 82, 0.3);
}

.btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(238, 90, 82, 0.4);
}

.btn.secondary {
    background: rgba(255,255,255,0.9);
    color: #333;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.btn.secondary:hover {
    transform: translateY(-2px);
    background: white;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* 管理员链接 */
.admin-link {
    text-align: center;
    margin-top: 40px;
}

.admin-link a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.admin-link a:hover {
    color: white;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: white;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    background: white;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

/* 查询结果 */
#result-content {
    margin-bottom: 30px;
}

.result-card {
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    text-align: center;
}

.result-card h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.3em;
}

.result-card p {
    margin-bottom: 12px;
    color: #666;
    font-size: 1.1em;
}

.result-card .level-container {
    margin: 15px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.result-card .level {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 20px;
    font-size: 1em;
    font-weight: 500;
    text-align: center;
    min-width: 80px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.level.代理 { background: #e3f2fd; color: #1976d2; }
.level.合伙人 { background: #f3e5f5; color: #7b1fa2; }
.level.联创 { background: #fff3e0; color: #f57c00; }
.level.董事 { background: #e8f5e8; color: #388e3c; }
.level.创始 { background: #ffebee; color: #d32f2f; }

.no-result {
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    color: #666;
}

/* 后台管理 */
.admin-tabs {
    display: flex;
    margin-bottom: 30px;
    background: rgba(255,255,255,0.2);
    border-radius: 25px;
    padding: 5px;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 20px;
    background: transparent;
    color: rgba(255,255,255,0.8);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: white;
    color: #333;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 统计卡片 */
.stats {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.stat-card {
    flex: 1;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.stat-card h3 {
    margin-bottom: 10px;
    color: #666;
    font-size: 0.9em;
}

.stat-card span {
    font-size: 2em;
    font-weight: bold;
    color: #333;
}

/* 用户列表 */
.user-list {
    margin-bottom: 30px;
}

.user-list h3 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.2em;
}

.user-item {
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-info {
    flex: 1;
}

.user-info h4 {
    margin-bottom: 5px;
    color: #333;
    font-size: 1.1em;
}

.user-info p {
    color: #666;
    font-size: 0.9em;
}

.user-level {
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255,255,255,0.7);
}

/* 消息提示 */
.message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 25px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.message.success {
    background: linear-gradient(45deg, #4caf50, #45a049);
    color: white;
}

.message.error {
    background: linear-gradient(45deg, #f44336, #d32f2f);
    color: white;
}

.message.show {
    display: block;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from { transform: translateX(-50%) translateY(-20px); opacity: 0; }
    to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

/* 响应式设计 */
@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 2em;
    }
    
    .button-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn {
        width: 100%;
    }
    
    .stats {
        flex-direction: column;
    }
    
    .user-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .user-level {
        align-self: flex-end;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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