* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.container {
    width: 100%;
    max-width: 400px;
    margin: 20px auto;
    padding-top: 10px;
    padding-bottom: 30px;
}

/* 通用卡片样式 */
.welcome-card, .login-card, .invite-card, .home-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transform: translateY(20px);
    animation: slideUp 0.6s ease forwards;
}

@keyframes slideUp {
    to {
        transform: translateY(0);
    }
}

/* Logo样式 */
.logo {
    margin-bottom: 30px;
}

.logo-icon {
    font-size: 60px;
    margin-bottom: 10px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* 标题样式 */
h1 {
    color: #333;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 15px;
}

.subtitle {
    color: #666;
    font-size: 16px;
    margin-bottom: 30px;
    line-height: 1.5;
}

/* 按钮样式 */
.wechat-btn, .retry-btn, .submit-btn, .primary-btn {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #07c160 0%, #00ae56 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.wechat-btn:hover, .retry-btn:hover, .submit-btn:hover, .primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(7, 193, 96, 0.3);
}

.wechat-btn:active, .retry-btn:active, .submit-btn:active, .primary-btn:active {
    transform: translateY(0);
}

.secondary-btn {
    width: 100%;
    padding: 16px 24px;
    background: transparent;
    color: #666;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.secondary-btn:hover {
    border-color: #ccc;
    color: #333;
}

.wechat-icon {
    font-size: 20px;
}

/* 输入框样式 */
.input-group, .form-group {
    margin-bottom: 25px;
}

.input-group input, .form-group input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
}

.input-group input:focus, .form-group input:focus {
    outline: none;
    border-color: #07c160;
    box-shadow: 0 0 0 3px rgba(7, 193, 96, 0.1);
}

.form-group label {
    display: block;
    text-align: left;
    margin-bottom: 8px;
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* 登录方式切换样式 */
.login-tabs {
    display: flex;
    margin-bottom: 25px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    background: #f5f5f5;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
}

.tab-btn.active {
    background: #07c160;
    color: white;
}

.tab-btn:first-child {
    border-right: 1px solid #e0e0e0;
}

.login-panel {
    display: none;
    animation: fadeIn 0.3s ease forwards;
}

.login-panel.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 错误信息样式 */
.error-message {
    background: rgba(255, 59, 48, 0.1);
    color: #ff3b30;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 15px;
    border-left: 4px solid #ff3b30;
}

/* 返回链接 */
.back-link {
    display: inline-block;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    margin-top: 20px;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: #333;
}

/* 首页特殊样式 */
.home-card {
    max-width: 500px;
    padding: 30px;
    min-height: 500px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(7, 193, 96, 0.1);
    border-radius: 15px;
}

.avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #07c160;
}

.user-details h2 {
    font-size: 20px;
    color: #333;
    margin-bottom: 5px;
}

.user-meta {
    color: #666;
    font-size: 14px;
}

.welcome-section {
    margin-bottom: 30px;
}

.welcome-icon {
    font-size: 50px;
    margin-bottom: 20px;
}

.welcome-text {
    color: #666;
    line-height: 1.6;
    margin-bottom: 30px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.feature-item {
    background: rgba(255, 255, 255, 0.8);
    padding: 20px 15px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.feature-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 30px;
    margin-bottom: 10px;
}

.feature-item h3 {
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
}

.feature-item p {
    font-size: 12px;
    color: #666;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 加载状态 */
.loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 响应式设计 */
@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .welcome-card, .login-card, .invite-card, .home-card {
        padding: 30px 20px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
}

/* 微信浏览器优化 */
@media screen and (max-width: 414px) {
    body {
        padding: 10px;
    }
    
    .welcome-card, .login-card, .invite-card, .home-card {
        border-radius: 15px;
        padding: 25px 20px;
    }
}