:root {
    --primary-color: #1a73e8;
    --secondary-color: #4285f4;
    --accent-color: #34a853;
    --background-color: #f8f9fa;
    --sidebar-bg: #ffffff;
    --text-primary: #202124;
    --text-secondary: #5f6368;
    --border-color: #e0e0e0;
    --sidebar-width: 240px;
}

body {
    min-height: 100vh;
    background-color: var(--background-color);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    overflow-x: hidden;
    padding: 0;
    margin: 0;
}

/* 布局容器 */
.layout-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 主容器 */
.main-container {
    display: flex;
    flex: 1;
    padding-top: 64px; /* 导航栏高度 */
}

/* 内容区域 */
.content {
    flex: 1;
    padding: 1.5rem;
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    transition: margin-left 0.3s ease;
    padding-bottom: 60px; /* 为页脚预留空间 */
}

.content-header {
    margin-bottom: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #eeeeee;
    position: relative;
}

.content-header::before,
.content-header::after {
    content: none;
}

@keyframes headerGlow {
    0%, 100% { transform: rotate(0deg) scale(1); opacity: 0.3; }
    50% { transform: rotate(180deg) scale(1.1); opacity: 0.1; }
}

@keyframes float {
    0%, 100% { transform: translate(30px, -30px) rotate(0deg); }
    50% { transform: translate(20px, -40px) rotate(180deg); }
}

.content-header h1 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
    letter-spacing: 0.2px;
}

/* 页面标题图标样式 */
.page-title-icon {
    font-size: 1rem !important;
    margin-right: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: rgba(26, 115, 232, 0.08);
    box-shadow: none;
}

.page-title-icon::before { content: none; }

/* 跑步相关页面标题样式 */
.running-header { background: #ffffff; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }

/* 活动管理页面标题样式 */
.activity-header { background: #ffffff; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }

/* 统计页面标题样式 */
.stats-header { background: #ffffff; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }

/* 用户管理页面标题样式 */
.user-header { background: #ffffff; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }

/* 管理页面标题样式 */
.admin-header { background: #ffffff; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }

/* 跑步装饰元素 */
.running-decoration { display: none; }

@keyframes runningPulse {
    0%, 100% { opacity: 0.3; transform: translateY(-50%) scale(1); }
    50% { opacity: 0.6; transform: translateY(-50%) scale(1.1); }
}

@keyframes runningMove {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
}

/* 活动装饰元素 */
.activity-decoration { display: none; }

@keyframes activityBounce {
    0%, 100% { opacity: 0.3; transform: translateY(-50%); }
    50% { opacity: 0.6; transform: translateY(-60%); }
}

@keyframes activityRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 统计装饰元素 */
.stats-decoration { display: none; }

@keyframes statsGlow {
    0%, 100% { opacity: 0.3; filter: brightness(1); }
    50% { opacity: 0.6; filter: brightness(1.3); }
}

@keyframes statsPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* 用户装饰元素 */
.user-decoration { display: none; }

@keyframes userFloat {
    0%, 100% { opacity: 0.3; transform: translateY(-50%); }
    50% { opacity: 0.6; transform: translateY(-55%); }
}

@keyframes userWave {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(5deg); }
    75% { transform: rotate(-5deg); }
}

/* 管理装饰元素 */
.admin-decoration { display: none; }

@keyframes adminShine {
    0%, 100% { opacity: 0.3; filter: brightness(1); }
    50% { opacity: 0.6; filter: brightness(1.5); }
}

@keyframes adminSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 移动端优化 */
@media (max-width: 768px) {
    .content-header {
        padding: 0.5rem 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .content-header h1 {
        font-size: 1.3rem;
    }
    
    .page-title-icon {
        width: 2rem;
        height: 2rem;
        font-size: 1.2rem !important;
        margin-right: 0.5rem;
    }
    
    .running-decoration,
    .activity-decoration,
    .stats-decoration,
    .user-decoration,
    .admin-decoration {
        right: 0.75rem;
        font-size: 1rem;
    }
    
    .content-header::after {
        width: 40px;
        height: 40px;
    }
}

.content-body {
    margin-bottom: 2rem;
}

/* 导航栏样式 */
.navbar {
    background: var(--primary-color) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    height: 64px;
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
}

.navbar-brand {
    font-weight: 600;
    letter-spacing: 0.5px;
}

.navbar-brand img {
    filter: brightness(1.2);
    transition: transform 0.3s ease;
}

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

/* 侧边栏样式 */
.sidebar {
    min-height: calc(100vh - 64px);
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    transition: all 0.3s ease;
    box-shadow: 2px 0 8px rgba(0,0,0,0.05);
    padding: 0.75rem;
    position: fixed;
    width: var(--sidebar-width);
    top: 64px;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 1020;
}

.list-group-item {
    border: none;
    border-radius: 8px !important;
    margin-bottom: 2px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
}

.list-group-item i {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    font-size: 1rem;
}

.list-group-item span {
    vertical-align: middle;
}

.list-group-item:hover {
    background-color: rgba(26, 115, 232, 0.08);
    color: var(--primary-color);
    transform: translateX(2px);
}

.list-group-item.active {
    background-color: rgba(26, 115, 232, 0.12);
    color: var(--primary-color);
    font-weight: 500;
    border: none;
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* 按钮样式 */
.btn {
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.shadow-sm {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
}

/* 表单样式 */
.form-control {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 0.625rem 1rem;
    transition: all 0.2s ease;
}

.form-control-lg {
    font-size: 1rem;
    padding: 0.75rem 1.25rem;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

.input-group .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.alerts-container .alert {
    margin-bottom: 0.75rem;
}

.alerts-container .alert:last-child {
    margin-bottom: 0;
}

/* 警告框样式 */
.alert {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* 下拉菜单样式 */
.dropdown-menu {
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: 6px;
    padding: 0.625rem 1rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: rgba(26, 115, 232, 0.08);
    color: var(--primary-color);
}

/* 页脚样式 */
.footer {
    background-color: var(--sidebar-bg);
    padding: 1rem 0;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    text-align: center;
    position: relative;
    z-index: 10;
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
}

.footer .container {
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* 移动端优化 */
@media (max-width: 767.98px) {
    .sidebar {
        left: -250px; /* 确保完全隐藏 */
        box-shadow: 0 0 20px rgba(0,0,0,0.15);
        z-index: 1030; /* 确保侧边栏在移动端显示在顶部 */
        top: 64px;
        position: fixed;
        transition: left 0.3s ease;
        height: calc(100vh - 64px);
        overflow-y: auto;
        width: 240px;
        background-color: #ffffff;
    }

    .sidebar.show {
        left: 0 !important;
        display: block !important;
    }

    .content {
        margin-left: 0;
        width: 100%;
    }

    .content-overlay {
        display: none;
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.3);
        z-index: 1025;
        backdrop-filter: blur(2px);
    }

    .content-overlay.show {
        display: block !important;
    }
    
    .content.blur {
        filter: blur(2px);
    }
    
    .footer {
        margin-left: 0;
        width: 100%;
    }
}

/* 认证布局样式 */
.auth-layout {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 2rem 0;
}

.auth-background {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("../images/running-bg.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: brightness(0.7);
    z-index: -1;
}

.auth-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26, 115, 232, 0.7) 0%, rgba(66, 133, 244, 0.7) 100%);
    z-index: 0;
}

.auth-card {
    border-radius: 16px;
    border: none;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

.auth-header {
    padding-top: 1rem;
}

.auth-header h2 {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.25rem;
}

/* Logo样式 */
.login-logo {
    height: 56px;
    width: auto;
    filter: brightness(1.1);
}

/* 标题样式 */
.login-title {
    font-size: 24px;
    font-weight: 500;
    letter-spacing: 1px;
}

.login-subtitle {
    font-size: 16px;
    font-weight: normal;
}

/* 输入组样式 */
.login-input-group {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.login-input-group .input-group-text {
    color: #6c757d;
    padding: 0.75rem 1rem;
    font-size: 14px;
    min-width: 100px;
    justify-content: flex-start;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
}

.login-input-group .form-control {
    padding: 0.75rem 1rem;
    font-size: 14px;
    border: 1px solid #dee2e6;
}

.login-input-group .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(26, 115, 232, 0.1);
}

.login-input-group .form-control::placeholder {
    font-size: 14px;
    color: #adb5bd;
}

/* 登录按钮样式 */
.login-btn {
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 14px;
}

/* 条款文本样式 */
.terms-text {
    font-size: 12px;
    color: #6c757d;
}

.terms-link {
    font-size: 12px;
    color: var(--primary-color);
    font-weight: 500;
}

.terms-link:hover {
    color: var(--secondary-color);
    text-decoration: underline !important;
}

/* 验证码图片样式 */
.captcha-image {
    cursor: pointer;
    height: 60px;
    border-radius: 6px;
    max-width: 100%; /* 确保不超过容器宽度 */
}

/* 在移动端调整验证码大小 */
@media (max-width: 767.98px) {
    .captcha-image {
        height: 40px; /* 在移动端减小高度 */
    }
    
    .login-input-group {
        flex-wrap: nowrap; /* 防止验证码换行 */
    }
}

/* 统计卡片样式 */
.stat-card {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

/* 统计卡片样式（与users页面保持一致） */
.card h3 {
    font-weight: 600;
    color: #2c3e50;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .card-body {
        padding: 1rem 0.5rem;
    }

    .card h3 {
        font-size: 1.5rem;
    }
}

/* 活动卡片样式 */
.activity-card {
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.activity-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.activity-card .card-header {
    background: linear-gradient(135deg, #3498db 0%, #2c3e50 100%);
    color: white;
    padding: 1rem;
}

.activity-card .card-footer {
    background: #f8f9fa;
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
}

/* 记录卡片样式 */
.record-card {
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.record-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.record-card .card-header {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
    padding: 1rem;
}

.record-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.record-detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.record-card .card-footer {
    background: #f8f9fa;
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
}

/* 空状态样式 */
.empty-state {
    padding: 3rem 1rem;
    text-align: center;
    color: #6c757d;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state p {
    font-size: 1.1rem;
    margin: 0;
}

.page-header-container {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* 表格样式 */
.table {
    font-size: 0.95rem;
}

.table thead {
    font-weight: 500;
}

.table-light th {
    color: var(--text-secondary);
    font-weight: 600;
    border-bottom-width: 1px;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s;
}

.table tbody tr:hover {
    background-color: rgba(26, 115, 232, 0.04);
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-start;
}

.action-buttons .btn {
    padding: 0.375rem 0.5rem;
}

.avatar-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(26, 115, 232, 0.15);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
}

.bg-primary-light {
    background-color: rgba(26, 115, 232, 0.15);
} 


/* 图表加载样式 */
.chart-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    flex-direction: column;
}

.chart-loading .spinner-border {
    width: 2.5rem;
    height: 2.5rem;
    color: #6ec1ff; /* 淡蓝色 */
    border-color: #6ec1ff;
    border-right-color: transparent;
}

.chart-loading .loading-text {
    margin-top: 0.5rem;
    font-size: 1rem;
    color: #333;
} 

/* 登录页面动画效果 */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spin {
    animation: spin 1s linear infinite;
}

/* 登录页面特殊样式 */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.1)"/><circle cx="10" cy="60" r="0.5" fill="rgba(255,255,255,0.1)"/><circle cx="90" cy="40" r="0.5" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* 验证码样式增强 */
.captcha-container {
    position: relative;
}

.captcha-refresh {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.captcha-refresh:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.1);
}

/* 记住我复选框样式 */
.remember-me-checkbox {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #667eea;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.remember-me-checkbox:checked {
    background: #667eea;
    border-color: #667eea;
}

.remember-me-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.remember-me-checkbox:hover {
    border-color: #764ba2;
    transform: scale(1.05);
}

/* 登录按钮加载状态 */
.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .login-container {
        padding: 1rem;
    }
    
    .login-card {
        margin: 0 1rem;
    }
    
    .captcha-group {
        flex-direction: column;
    }
    
    .captcha-image {
        width: 100%;
        height: 60px;
        margin-top: 0.5rem;
    }
    
    .remember-me-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* 错误提示动画 */
.alert-danger {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* 成功提示动画 */
.alert-success {
    animation: slideIn 0.5s ease-out;
}

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