/* =============================================
   小米运动刷步数系统 - 主样式文件
   ============================================= */

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-color: #38a169;
    --danger-color: #e53e3e;
    --warning-color: #d69e2e;
    --info-color: #3182ce;
}

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

body {
    background: #f0f2f5;
    font-family: 'Segoe UI', system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', Roboto, sans-serif;
    color: #2d3748;
    line-height: 1.6;
}

/* 导航栏 */
.navbar {
    background: white !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    padding: 0.8rem 0;
}

.navbar-brand {
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
    font-size: 1.5rem;
    transition: transform 0.2s;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.navbar-toggler {
    border: 1px solid #667eea !important;
    background-color: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
    padding: 0.4rem 0.6rem;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23667eea' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

.nav-link {
    font-weight: 500;
    color: #4a5568 !important;
    transition: all 0.2s;
    font-size: 1rem;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
}

.nav-link:hover {
    color: #667eea !important;
    background: rgba(102, 126, 234, 0.1);
}

.nav-link.active {
    color: #667eea !important;
    background: rgba(102, 126, 234, 0.1);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #f0f4ff 0%, #e6f0ff 100%);
    border-radius: 20px;
    margin-top: 1rem;
}

/* 卡片样式 */
.card-modern {
    background: white;
    border: none;
    border-radius: 24px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.card-modern:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1);
}

/* 按钮 */
.btn-primary {
    background: var(--primary-gradient);
    border: none;
    border-radius: 40px;
    padding: 8px 24px;
    font-weight: 500;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a6fd6 0%, #6a3d8f 100%);
}

.btn-outline-primary {
    border: 2px solid #667eea;
    color: #667eea;
    border-radius: 40px;
    padding: 6px 22px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-outline-primary:hover {
    background: var(--primary-gradient);
    border-color: transparent;
    color: white;
    transform: translateY(-2px);
}

/* 功能图标 */
.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f4ff 0%, #e6f0ff 100%);
    border-radius: 20px;
}

/* 步骤项 */
.step-item {
    text-align: center;
    padding: 1.5rem;
    border-radius: 16px;
    background: linear-gradient(135deg, #f0f4ff 0%, #e6f0ff 100%);
    transition: all 0.3s;
}

.step-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.2);
}

.step-number {
    width: 50px;
    height: 50px;
    margin: 0 auto 1rem;
    background: var(--primary-gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
}

/* 统计数字 */
.stat-number {
    font-size: 2rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Footer */
.footer {
    background: white;
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 1px solid #e2e8f0;
}

/* 表单样式 */
.form-control {
    border-radius: 12px;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    transition: all 0.2s;
}

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

.form-label {
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 0.5rem;
}

/* 表格样式 */
.table {
    border-radius: 12px;
    overflow: hidden;
}

.table thead {
    background: linear-gradient(135deg, #f0f4ff 0%, #e6f0ff 100%);
}

.table tbody tr {
    transition: all 0.2s;
}

.table tbody tr:hover {
    background: rgba(102, 126, 234, 0.05);
}

/* 徽章 */
.badge {
    padding: 0.5em 1em;
    border-radius: 20px;
    font-weight: 500;
}

/* 警告框 */
.alert {
    border: none;
    border-radius: 16px;
    padding: 1rem 1.5rem;
}

.alert-info {
    background: linear-gradient(135deg, #e6f7ff 0%, #d6f4ff 100%);
    color: #0052cc;
}

.alert-success {
    background: linear-gradient(135deg, #e6ffed 0%, #d6ffe6 100%);
    color: #00875a;
}

.alert-danger {
    background: linear-gradient(135deg, #ffebe6 0%, #ffd6d6 100%);
    color: #de350b;
}

/* 积分卡片 */
.points-card {
    background: var(--primary-gradient);
    color: white;
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.points-card .points-value {
    font-size: 3rem;
    font-weight: 800;
}

.points-card .points-label {
    opacity: 0.9;
    font-size: 1rem;
}

/* 用户中心侧边栏 */
.sidebar {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 100px;
}

.sidebar .nav-link {
    color: #4a5568 !important;
    padding: 0.75rem 1rem !important;
    margin-bottom: 0.5rem;
    border-radius: 12px;
}

.sidebar .nav-link:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea !important;
}

.sidebar .nav-link.active {
    background: var(--primary-gradient);
    color: white !important;
}

/* 响应式 */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .card-modern {
        border-radius: 16px;
    }
    
    .points-card .points-value {
        font-size: 2rem;
    }
    
    .sidebar {
        position: static;
        margin-bottom: 1.5rem;
    }
}

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

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

/* 淡入动画 */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #667eea;
}

/* 打印样式 */
@media print {
    .navbar, .footer, .sidebar {
        display: none;
    }
    
    .card-modern {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
