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

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: #1A1A1A;
            min-height: 100vh;
            color: #ffffff;
            padding-bottom: 80px; /* 为固定footer留出空间 */
        }

        .container {
            background: #2D2D2D;
            border-radius: 12px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
            padding: 0;
            max-width: 1400px;
            width: 95%;
            margin: 20px auto;
            position: relative;
            overflow: hidden;
        }

        /* Header Styles */
        .header {
            background: #2D2D2D;
            padding: 20px 40px;
            border-bottom: 1px solid #404040;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .logo-section {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .logo {
            width: 40px;
            height: 40px;
            background: #3B82F6;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 18px;
            color: white;
            font-weight: bold;
            transform: rotate(45deg);
        }

        .brand-text {
            font-size: 24px;
            font-weight: bold;
            color: #ffffff;
        }

        .nav-links {
            display: flex;
            gap: 20px;
            align-items: center;
        }

        .nav-link {
            color: #ffffff;
            text-decoration: none;
            font-size: 16px;
            font-weight: 500;
            transition: color 0.3s ease;
            padding: 8px 16px;
            border-radius: 6px;
        }

        .nav-link:hover {
            color: #3B82F6;
            background: rgba(59, 130, 246, 0.1);
        }


        .user-profile {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: #3B82F6;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 14px;
            font-weight: bold;
        }

        /* 用户下拉按钮样式 */
        .user-profile-btn {
            display: none;
            align-items: center;
            gap: 8px;
            background: #404040;
            border: 1px solid #555;
            color: #ffffff;
            padding: 8px 12px;
            border-radius: 6px;
            cursor: pointer;
            font-size: 14px;
            transition: all 0.2s ease;
        }

        .user-profile-btn:hover {
            background: #505050;
            border-color: #666;
        }

        .user-profile-icon {
            font-size: 18px;
        }

        .user-profile-dropdown .dropdown-item:hover {
            background-color: #505050 !important;
        }

        .main-content {
            padding: 40px;
        }

        .page-title {
            color: #ffffff;
            margin-bottom: 30px;
            font-size: 32px;
            font-weight: bold;
        }

        .subtitle {
            color: #B0B0B0;
            margin-bottom: 30px;
            font-size: 16px;
        }

        .btn {
            background: #3B82F6;
            color: white;
            border: none;
            padding: 12px 24px;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            text-decoration: none;
            display: inline-block;
            margin: 5px;
        }

        .btn:hover {
            background: #2563EB;
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
        }

        .btn-secondary {
            background: #6B7280;
            color: #ffffff;
        }

        .btn-secondary:hover {
            background: #4B5563;
        }

        /* Dashboard Layout */
        .dashboard-layout {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 30px;
            margin-top: 20px;
        }

        .dashboard-left,
        .dashboard-right {
            display: flex;
            flex-direction: column;
            gap: 20px;
        }

        .dashboard-card {
            background: #404040;
            border-radius: 12px;
            padding: 24px;
            border: 1px solid #555555;
        }

        .card-title {
            color: #ffffff;
            font-size: 18px;
            font-weight: bold;
            margin-bottom: 20px;
        }

        /* Strava Data Styles */
        .strava-connection {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 20px;
            padding: 12px;
            background: #2D2D2D;
            border-radius: 8px;
        }

        .strava-icon {
            font-size: 20px;
        }

        .data-cards {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 16px;
        }

        .data-card {
            text-align: center;
            padding: 16px;
            background: #2D2D2D;
            border-radius: 8px;
            border: 1px solid #555555;
        }

        .data-label {
            color: #B0B0B0;
            font-size: 12px;
            margin-bottom: 8px;
            font-weight: 500;
        }

        .data-value {
            color: #ffffff;
            font-size: 24px;
            font-weight: bold;
            margin-bottom: 4px;
        }

        .data-unit {
            font-size: 16px;
            color: #B0B0B0;
        }

        .data-change {
            font-size: 12px;
            font-weight: 500;
            margin-top: 4px;
        }

        .data-change.positive {
            color: #10B981;
        }

        /* Activity List Styles */
        .activity-tabs {
            display: flex;
            gap: 0;
            margin-bottom: 20px;
        }

        .activity-tabs .tab-btn {
            padding: 8px 16px;
            border: none;
            background: #2D2D2D;
            color: #B0B0B0;
            cursor: pointer;
            border-bottom: 2px solid transparent;
            transition: all 0.3s ease;
        }

        .activity-tabs .tab-btn.active {
            color: #3B82F6;
            border-bottom-color: #3B82F6;
        }

        .activity-list {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .activity-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px;
            background: #2D2D2D;
            border-radius: 8px;
        }

        .activity-icon {
            font-size: 20px;
            color: #3B82F6;
        }

        .activity-info {
            flex: 1;
        }

        .activity-name {
            color: #ffffff;
            font-weight: 500;
            margin-bottom: 4px;
        }

        .activity-date {
            color: #B0B0B0;
            font-size: 12px;
            margin-bottom: 2px;
        }

        .activity-stats {
            color: #B0B0B0;
            font-size: 12px;
        }

        /* Goal Settings */
        .goal-setting {
            display: flex;
            flex-direction: column;
            gap: 16px;
        }

        .goal-setting label {
            color: #B0B0B0;
            font-size: 14px;
            font-weight: 500;
        }

        .input-group {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .unit-label {
            color: #B0B0B0;
            font-size: 14px;
            background: #2D2D2D;
            padding: 4px 8px;
            border-radius: 4px;
            border: 1px solid #555555;
        }

        .progress-section {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .progress-bar {
            width: 100%;
            height: 8px;
            background: #2D2D2D;
            border-radius: 4px;
            overflow: hidden;
        }

        .progress-fill {
            height: 100%;
            background: #3B82F6;
            transition: width 0.3s ease;
        }

        .progress-text {
            color: #B0B0B0;
            font-size: 12px;
            text-align: right;
        }

        .btn-admin {
            background: #dc3545;
            color: white;
        }

        .btn-admin:hover {
            background: #c82333;
        }

        .user-role-badge {
            display: inline-block;
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: bold;
            margin: 5px 0;
        }

        .user-role-badge.admin {
            background: #dc3545;
            color: white;
        }

        .user-role-badge.pro {
            background: #ffc107;
            color: #212529;
        }

        .user-role-badge.user {
            background: #6c757d;
            color: white;
        }

        .user-actions-header {
            display: flex;
            gap: 10px;
            justify-content: center;
            margin-top: 10px;
        }

        #user-management-section {
            max-height: 80vh;
            overflow-y: auto;
            padding: 20px;
            background: #2D2D2D;
            border-radius: 10px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
            border: 1px solid #555555;
            max-width: 1400px;
            margin: 0 auto;
            width: 95%;
        }

        .management-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            padding-bottom: 10px;
            border-bottom: 2px solid #555555;
            position: sticky;
            top: 0;
            background: #404040;
            z-index: 10;
        }

        .management-stats {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
            gap: 15px;
            margin-bottom: 30px;
        }

        .users-table-container {
            background: #404040;
            border-radius: 10px;
            padding: 20px;
            margin-top: 20px;
            border: 1px solid #555555;
            max-height: 60vh;
            overflow-y: auto;
            width: 100%;
        }

        .table-controls {
            margin-bottom: 15px;
            text-align: right;
        }

        .users-table-wrapper {
            overflow-x: auto;
        }

        .users-table {
            width: 100%;
            border-collapse: collapse;
            background: #2D2D2D;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
            border: 1px solid #555555;
        }

        .users-table th {
            background: #007bff;
            color: white;
            padding: 12px 8px;
            text-align: left;
            font-weight: bold;
            font-size: 14px;
        }
        
        .users-table th:nth-child(1) { width: 8%; }  /* ID */
        .users-table th:nth-child(2) { width: 25%; } /* 邮箱 */
        .users-table th:nth-child(3) { width: 15%; } /* 用户名 */
        .users-table th:nth-child(4) { width: 12%; } /* 姓名 */
        .users-table th:nth-child(5) { width: 10%; } /* 角色 */
        .users-table th:nth-child(6) { width: 8%; }  /* 状态 */
        .users-table th:nth-child(7) { width: 12%; } /* 注册时间 */
        .users-table th:nth-child(8) { width: 10%; } /* 操作 */

        .users-table td {
            padding: 10px 8px;
            border-bottom: 1px solid #eee;
            font-size: 13px;
        }

        .users-table tr:hover {
            background: #404040;
        }

        .loading-row {
            text-align: center;
            padding: 20px;
        }

        .role-badge {
            display: inline-block;
            padding: 2px 8px;
            border-radius: 12px;
            font-size: 11px;
            font-weight: bold;
        }

        .role-badge.admin {
            background: #dc3545;
            color: white;
        }

        .role-badge.pro {
            background: #ffc107;
            color: #212529;
        }

        .role-badge.user {
            background: #6c757d;
            color: white;
        }

        .status-badge {
            display: inline-block;
            padding: 2px 8px;
            border-radius: 12px;
            font-size: 11px;
            font-weight: bold;
        }

        .status-badge.active {
            background: #28a745;
            color: white;
        }

        .status-badge.inactive {
            background: #dc3545;
            color: white;
        }

        .strava-badge {
            display: inline-block;
            padding: 2px 8px;
            border-radius: 12px;
            font-size: 11px;
            font-weight: bold;
        }

        .strava-badge.bound {
            background: #FC4C02;
            color: white;
        }

    .strava-badge.unbound {
        background: #6c757d;
        color: white;
    }

    /* 邮箱验证状态标签 */
    .email-verified-badge {
        padding: 4px 8px;
        border-radius: 4px;
        font-size: 12px;
        font-weight: 500;
        text-transform: uppercase;
    }

    .email-verified-badge.verified {
        background: #10B981;
        color: white;
    }

    .email-verified-badge.unverified {
        background: #EF4444;
        color: white;
    }

    /* 登录按钮loading动效 */
    .btn.loading {
        position: relative;
        pointer-events: none;
        opacity: 0.8;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .loading-spinner {
        display: inline-block;
        width: 20px;
        height: 20px;
        border: 2px solid #ffffff;
        border-radius: 50%;
        border-top-color: transparent;
        animation: spin 1s ease-in-out infinite;
        vertical-align: middle;
    }

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

        .action-buttons {
            display: flex;
            gap: 4px;
            flex-wrap: wrap;
            justify-content: flex-start;
        }

        .btn-small {
            padding: 4px 8px;
            font-size: 11px;
            border-radius: 4px;
        }

        .btn-danger {
            background: #dc3545;
            color: white;
        }

        .btn-danger:hover {
            background: #c82333;
        }

        .btn-warning {
            background: #ffc107;
            color: #212529;
        }

        .btn-warning:hover {
            background: #e0a800;
        }

        .btn-success {
            background: #28a745;
            color: white;
        }

        .btn-success:hover {
            background: #218838;
        }

        .management-tabs {
            display: flex;
            gap: 10px;
            margin: 0 20px;
        }

        .management-tabs .tab-btn {
            padding: 8px 16px;
            border: 1px solid #555555;
            background: #404040;
            color: #ffffff;
            border-radius: 4px;
            cursor: pointer;
            transition: all 0.3s;
        }

        .management-tabs .tab-btn.active {
            background: #007bff;
            color: white;
            border-color: #007bff;
        }

        .management-tabs .tab-btn:hover {
            background: #e9ecef;
        }

        .management-tabs .tab-btn.active:hover {
            background: #0056b3;
        }

        .management-tab-content {
            margin-top: 20px;
        }

        .device-id-stats {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
            gap: 15px;
            margin-bottom: 30px;
        }

        .device-id-controls {
            background: #404040;
            border-radius: 10px;
            padding: 20px;
            margin-bottom: 20px;
            border: 1px solid #555555;
        }

        .control-group {
            margin-bottom: 20px;
        }

        .control-group:last-child {
            margin-bottom: 0;
        }

        .control-group h4 {
            margin-bottom: 10px;
            color: #ffffff;
        }

        .form-row {
            display: flex;
            gap: 10px;
            align-items: center;
            flex-wrap: wrap;
        }

        .form-row input {
            padding: 8px 12px;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-size: 14px;
        }

        .form-row input:focus {
            outline: none;
            border-color: #007bff;
            box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
        }

        .device-ids-table-container {
            background: #404040;
            border-radius: 10px;
            padding: 20px;
            max-height: 60vh;
            border: 1px solid #555555;
            overflow-y: auto;
            width: 100%;
        }

        .table-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
        }

        .table-header h4 {
            margin: 0;
            color: #ffffff;
        }

        .device-ids-table {
            width: 100%;
            border-collapse: collapse;
            background: #2D2D2D;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
            border: 1px solid #555555;
        }

        .device-ids-table th {
            background: #007bff;
            color: white;
            padding: 12px 8px;
            text-align: left;
            font-weight: bold;
            font-size: 14px;
        }
        
        .device-ids-table th:nth-child(1) { width: 25%; } /* 设备ID */
        .device-ids-table th:nth-child(2) { width: 15%; } /* 设备名称 */
        .device-ids-table th:nth-child(3) { width: 20%; } /* 设备描述 */
        .device-ids-table th:nth-child(4) { width: 15%; } /* 用户信息 */
        .device-ids-table th:nth-child(5) { width: 8%; }  /* 状态 */
        .device-ids-table th:nth-child(6) { width: 8%; }  /* 访问次数 */
        .device-ids-table th:nth-child(7) { width: 9%; }  /* 最后访问 */
        .device-ids-table th:nth-child(8) { width: 9%; }  /* 创建时间 */
        .device-ids-table th:nth-child(9) { width: 11%; } /* 操作 */

        .device-ids-table td {
            padding: 10px 8px;
            border-bottom: 1px solid #eee;
            font-size: 13px;
        }

        .device-ids-table tr:hover {
            background: #404040;
        }

        .device-id-cell {
            font-family: 'Courier New', monospace;
            font-size: 12px;
            background: #404040;
            padding: 4px 8px;
            border-radius: 4px;
            word-break: break-all;
            color: #ffffff;
            max-width: 300px;
            display: inline-block;
        }

        .device-id-actions {
            display: flex;
            gap: 5px;
        }

        .btn-tiny {
            padding: 2px 6px;
            font-size: 10px;
            border-radius: 3px;
        }

        .help-text {
            font-size: 12px;
            color: #6c757d;
            margin-top: 5px;
            font-style: italic;
        }

        /* 自定义滚动条样式 */
        #user-management-section::-webkit-scrollbar,
        .device-ids-table-container::-webkit-scrollbar,
        .users-table-container::-webkit-scrollbar {
            width: 8px;
        }

        #user-management-section::-webkit-scrollbar-track,
        .device-ids-table-container::-webkit-scrollbar-track,
        .users-table-container::-webkit-scrollbar-track {
            background: #f1f1f1;
            border-radius: 4px;
        }

        #user-management-section::-webkit-scrollbar-thumb,
        .device-ids-table-container::-webkit-scrollbar-thumb,
        .users-table-container::-webkit-scrollbar-thumb {
            background: #c1c1c1;
            border-radius: 4px;
        }

        #user-management-section::-webkit-scrollbar-thumb:hover,
        .device-ids-table-container::-webkit-scrollbar-thumb:hover,
        .users-table-container::-webkit-scrollbar-thumb:hover {
            background: #a8a8a8;
        }

        /* 设备管理模态框滚动条样式 */
        #deviceModal .modal-content::-webkit-scrollbar,
        #device-list::-webkit-scrollbar {
            width: 8px;
        }

        #deviceModal .modal-content::-webkit-scrollbar-track,
        #device-list::-webkit-scrollbar-track {
            background: #f1f1f1;
            border-radius: 4px;
        }

        #deviceModal .modal-content::-webkit-scrollbar-thumb,
        #device-list::-webkit-scrollbar-thumb {
            background: #c1c1c1;
            border-radius: 4px;
        }

        #deviceModal .modal-content::-webkit-scrollbar-thumb:hover,
        #device-list::-webkit-scrollbar-thumb:hover {
            background: #a8a8a8;
        }

        .users-section {
            margin-top: 40px;
            text-align: left;
        }

        .user-card {
            background: #404040;
            border-radius: 10px;
            padding: 20px;
            margin: 15px 0;
            border: 1px solid #555555;
            border-left: 4px solid #FC4C02;
        }

        .user-name {
            font-weight: 600;
            color: #ffffff;
            margin-bottom: 5px;
        }

        .user-info {
            color: #B0B0B0;
            font-size: 14px;
            margin-bottom: 10px;
        }

        .user-actions {
            display: flex;
            gap: 10px;
        }

        .btn-small {
            padding: 8px 16px;
            font-size: 14px;
            border-radius: 20px;
        }

        .btn-danger {
            background: #dc3545;
        }

        .btn-danger:hover {
            background: #c82333;
        }

        .alert {
            padding: 15px;
            border-radius: 10px;
            margin: 20px 0;
            font-weight: 500;
        }

        .alert-success {
            background: #d4edda;
            color: #155724;
            border: 1px solid #c3e6cb;
        }

        .alert-error {
            background: #f8d7da;
            color: #721c24;
            border: 1px solid #f5c6cb;
        }

        .loading {
            display: none;
            margin: 20px 0;
        }

        .spinner {
            border: 3px solid #f3f3f3;
            border-top: 3px solid #FC4C02;
            border-radius: 50%;
            width: 30px;
            height: 30px;
            animation: spin 1s linear infinite;
            margin: 0 auto;
        }

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

        .refresh-log {
            background: #404040;
            border-radius: 10px;
            padding: 15px;
            margin-top: 15px;
            border: 1px solid #555555;
            max-height: 200px;
            overflow-y: auto;
        }

        .log-entry {
            padding: 5px 0;
            border-bottom: 1px solid #dee2e6;
            font-size: 12px;
        }

        .log-entry:last-child {
            border-bottom: none;
        }

        .log-success {
            color: #28a745;
        }

        .log-error {
            color: #dc3545;
        }

        /* 登录区域标题 */
        #login-section h3 {
            text-align: center;
            color: #ffffff;
            font-size: 28px;
            font-weight: 600;
            margin-bottom: 30px;
            background: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        /* 认证表单样式 */
        .auth-forms {
            background: #2D2D2D;
            border-radius: 12px;
            padding: 40px;
            margin: 20px auto;
            border: 1px solid #3B82F6;
            box-shadow: 0 8px 32px rgba(59, 130, 246, 0.15);
            max-width: 480px;
        }

        .form-tabs {
            display: flex;
            margin-bottom: 30px;
            gap: 10px;
        }

        .tab-btn {
            flex: 1;
            padding: 12px;
            border: none;
            background: #404040;
            color: #B0B0B0;
            cursor: pointer;
            border-radius: 8px;
            font-size: 15px;
            font-weight: 500;
            transition: all 0.3s ease;
            border: 1px solid #555555;
        }

        .tab-btn:hover {
            background: #505050;
            color: #ffffff;
            border-color: #666666;
        }

        .tab-btn.active {
            background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
            color: white;
            border-color: #3B82F6;
            box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
        }

        .form-content input {
            width: 100%;
            padding: 14px 16px;
            margin: 10px 0;
            border: 2px solid #404040;
            border-radius: 8px;
            font-size: 15px;
            background: #1A1A1A;
            color: #ffffff;
            transition: all 0.3s ease;
        }

        .form-content input::placeholder {
            color: #666666;
        }

        .form-content input:focus {
            outline: none;
            border-color: #3B82F6;
            background: #2D2D2D;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
        }

        .form-content button[type="submit"] {
            width: 100%;
            padding: 14px;
            margin-top: 20px;
            background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
            border: none;
            border-radius: 8px;
            color: white;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
        }

        .form-content button[type="submit"]:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
        }

        .form-content button[type="submit"]:active {
            transform: translateY(0);
        }
        
        .form-description {
            color: #B0B0B0;
            font-size: 14px;
            margin-bottom: 20px;
            text-align: center;
            line-height: 1.6;
        }
        
        .forgot-password-link {
            text-align: center;
            margin-top: 16px;
        }
        
        .forgot-password-link a {
            color: #3B82F6 !important;
            text-decoration: none;
            font-size: 14px;
            display: inline-block;
            padding: 8px 16px;
            background: rgba(59, 130, 246, 0.1);
            border-radius: 6px;
            border: 1px solid rgba(59, 130, 246, 0.3);
            transition: all 0.3s ease;
        }
        
        .forgot-password-link a:hover {
            background: rgba(59, 130, 246, 0.2);
            border-color: #3B82F6;
            text-decoration: none;
        }
        
        .back-to-login-link {
            text-align: center;
            margin-top: 20px;
        }
        
        .back-to-login-link a {
            color: #B0B0B0;
            text-decoration: none;
            font-size: 14px;
            transition: color 0.3s ease;
        }
        
        .back-to-login-link a:hover {
            color: #3B82F6;
            text-decoration: none;
        }

        /* 用户信息样式 */
        .user-info {
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: #404040;
            padding: 20px;
            border-radius: 10px;
            border: 1px solid #555555;
            margin: 20px 0;
            flex-wrap: wrap;
            gap: 15px;
        }
        
        .user-info h3 {
            margin: 0;
            flex: 1;
            text-align: left;
        }
        
        .user-info .user-role-badge {
            margin: 0;
        }

        .devices-section {
            background: #404040;
            padding: 28px;
            border-radius: 10px;
            margin: 20px 0;
            border: 1px solid #555555;
        }

        .devices-section h4 {
            margin-bottom: 24px;
            color: #ffffff;
            font-size: 18px;
        }

        .devices-section-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 24px;
        }

        .devices-section-title {
            margin: 0;
            color: #ffffff;
            font-size: 18px;
        }

        .add-device-btn {
            background: #28a745;
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 6px;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .add-device-btn:hover {
            background: #218838;
            transform: translateY(-1px);
        }

        .devices-grid {
            display: flex;
            flex-direction: column;
            gap: 16px;
            margin-bottom: 20px;
        }

        .device-table {
            width: 100%;
            border-collapse: collapse;
            margin-bottom: 15px;
        }

        .device-table th {
            color: #B0B0B0;
            font-size: 12px;
            font-weight: 500;
            text-align: left;
            padding: 8px 0;
            border-bottom: 1px solid #555555;
        }

        .device-table td {
            padding: 8px 0;
            color: #ffffff;
            font-size: 14px;
        }

        .device-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 8px 0;
            border-bottom: 1px solid #555555;
        }

        .device-card {
            background: #2D2D2D;
            border-radius: 12px;
            padding: 24px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
            border-left: 4px solid #3B82F6;
            border: 1px solid #555555;
            transition: transform 0.2s ease, box-shadow 0.2s ease;
            margin-bottom: 0;
        }

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

        .device-card-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 18px;
            padding-bottom: 12px;
            border-bottom: 1px solid #404040;
        }

        .device-card-name {
            font-weight: 600;
            color: #ffffff;
            font-size: 16px;
            margin: 0;
        }

        .device-card-status {
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 500;
        }

        .device-card-status.active {
            background: #d4edda;
            color: #155724;
        }

        .device-card-status.inactive {
            background: #f8d7da;
            color: #721c24;
        }

        .device-card-info {
            margin-bottom: 16px;
        }

        .device-card-info-item {
            display: flex;
            justify-content: space-between;
            margin-bottom: 10px;
            font-size: 14px;
        }

        .device-card-info-item:last-child {
            margin-bottom: 0;
        }

        .device-card-info-label {
            color: #B0B0B0;
            font-weight: 500;
        }

        .device-card-info-value {
            color: #ffffff;
            font-family: monospace;
        }

        .device-card-description {
            color: #B0B0B0;
            font-size: 14px;
            margin-bottom: 18px;
            font-style: italic;
            line-height: 1.5;
        }

    

        .device-card-actions {
            display: flex;
            gap: 10px;
            margin-top: 4px;
        }

        .device-card-btn {
            padding: 6px 12px;
            font-size: 12px;
            border-radius: 6px;
            border: none;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .device-card-btn-copy {
            background: #007bff;
            color: white;
        }

        .device-card-btn-copy:hover {
            background: #0056b3;
        }

        .device-card-btn-toggle {
            background: #28a745;
            color: white;
        }

        .device-card-btn-toggle:hover {
            background: #1e7e34;
        }

        .device-card-btn-toggle.inactive {
            background: #6c757d;
        }

        .device-card-btn-toggle.inactive:hover {
            background: #545b62;
        }

        .device-card-btn-delete {
            background: #dc3545;
            color: white;
        }

        .device-card-btn-delete:hover {
            background: #c82333;
        }

        .no-devices {
            text-align: center;
            color: #B0B0B0;
            font-style: italic;
            padding: 40px 20px;
        }

        .strava-section {
            background: #404040;
            padding: 25px;
            border-radius: 10px;
            margin: 20px 0;
            border: 1px solid #555555;
        }

        .strava-section h4 {
            color: #ffffff;
        }

        /* 桌面端两列布局 */
        .dashboard-main-content {
            display: grid;
            grid-template-columns: 400px 1fr;
            gap: 30px;
            margin: 20px 0;
            align-items: start;
        }

        .dashboard-left-column {
            display: flex;
            flex-direction: column;
            gap: 20px;
            max-width: 400px;
            height: 100%;
        }

        .dashboard-right-column {
            display: flex;
            flex-direction: column;
            gap: 20px;
            min-width: 0; /* 允许内容收缩 */
            height: 100%;
        }

        /* 确保左右列内的section填充父容器 */
        .dashboard-left-column .devices-section,
        .dashboard-right-column .strava-section {
            flex: 1;
            display: flex;
            flex-direction: column;
        }

        .user-actions {
            display: flex;
            gap: 10px;
            margin: 20px 0;
        }

        /* 模态框样式 */
        .modal {
            display: none;
            position: fixed;
            z-index: 1000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0,0,0,0.5);
        }

        .modal-content {
            background-color: #2D2D2D;
            margin: 5% auto;
            padding: 20px;
            border-radius: 10px;
            width: 90%;
            max-width: 500px;
            max-height: 90vh;
            overflow-y: auto;
            border: 1px solid #555555;
            color: #ffffff;
        }

        .close {
            color: #B0B0B0;
            float: right;
            font-size: 28px;
            font-weight: bold;
            cursor: pointer;
        }

        .close:hover {
            color: #ffffff;
        }

        .modal h3 {
            margin-bottom: 20px;
            color: #ffffff;
        }

        .modal input {
            width: 100%;
            padding: 10px;
            margin: 10px 0;
            border: 1px solid #555555;
            border-radius: 5px;
            background: #2D2D2D;
            color: #ffffff;
        }

        .modal-buttons {
            display: flex;
            gap: 10px;
            margin-top: 20px;
        }

        /* 设备ID选择样式 */
        .device-id-section {
            margin: 15px 0;
            padding: 15px;
            border: 1px solid #555555;
            border-radius: 5px;
            background: #404040;
        }

        .device-id-section label {
            display: block;
            margin: 8px 0;
            cursor: pointer;
            font-weight: normal;
            color: #ffffff;
        }

        .device-id-section input[type="radio"] {
            margin-right: 8px;
        }

        #custom-device-id-container {
            margin-top: 15px;
            padding: 15px;
            border: 1px solid #555555;
            border-radius: 5px;
            background: #2D2D2D;
        }

        .device-id-hint {
            margin: 8px 0;
            color: #B0B0B0;
        }

        .device-id-hint small {
            font-size: 12px;
        }

        .btn-small {
            padding: 6px 12px;
            font-size: 12px;
            margin-top: 8px;
        }

        #device-id-validation-result {
            margin-top: 8px;
            padding: 8px;
            border-radius: 4px;
            font-size: 14px;
        }

        .validation-success {
            background: #d4edda;
            color: #155724;
            border: 1px solid #c3e6cb;
        }

        .validation-error {
            background: #f8d7da;
            color: #721c24;
            border: 1px solid #f5c6cb;
        }

        /* 运动数据样式 */
        .activity-stats {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 20px;
            margin: 20px 0;
        }

        .stat-card {
            background: #2D2D2D;
            border-radius: 10px;
            padding: 20px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
            border-left: 4px solid #3B82F6;
            border: 1px solid #555555;
        }

        .stat-card h5 {
            margin: 0 0 15px 0;
            color: #ffffff;
            font-size: 16px;
        }

        .activity-info {
            font-size: 14px;
            line-height: 1.6;
            color: #B0B0B0;
        }

        .activity-info .activity-name {
            font-weight: 600;
            color: #ffffff;
            margin-bottom: 8px;
        }

        .activity-info .activity-details {
            color: #B0B0B0;
        }

        .activity-info .activity-details div {
            margin: 4px 0;
            color: #B0B0B0;
        }

        .activity-info .activity-details strong {
            color: #ffffff;
            font-weight: 600;
        }

        .distance-highlight {
            font-size: 24px;
            font-weight: bold;
            color: #FC4C02;
            text-align: center;
            margin: 10px 0;
        }

        .year-info {
            text-align: center;
            color: #666;
            font-size: 14px;
            margin-top: 10px;
        }

        .target-highlight {
            font-size: 20px;
            font-weight: bold;
            color: #28a745;
            text-align: center;
            margin: 10px 0;
        }

        .target-progress {
            background: #e9ecef;
            border-radius: 10px;
            height: 8px;
            margin: 8px 0;
            overflow: hidden;
        }

        .target-progress-bar {
            background: linear-gradient(90deg, #28a745, #20c997);
            height: 100%;
            transition: width 0.3s ease;
        }

        .target-info {
            text-align: center;
            color: #666;
            font-size: 12px;
            margin-top: 5px;
        }

        .refresh-controls {
            text-align: center;
            margin-top: 20px;
        }

        .btn-small {
            padding: 8px 16px;
            font-size: 14px;
        }

        .loading-small {
            text-align: center;
            padding: 20px;
        }

        .spinner-small {
            border: 2px solid #f3f3f3;
            border-top: 2px solid #FC4C02;
            border-radius: 50%;
            width: 20px;
            height: 20px;
            animation: spin 1s linear infinite;
            margin: 0 auto;
        }

        .no-data {
            text-align: center;
            color: #666;
            font-style: italic;
            padding: 20px;
        }

        .update-time {
            font-size: 12px;
            color: #666;
            text-align: center;
            margin-top: 8px;
            padding: 4px 8px;
            background-color: #404040;
            border-radius: 4px;
            border-left: 3px solid #007bff;
        }

        .error-message {
            color: #dc3545;
            font-size: 12px;
            text-align: center;
            padding: 10px;
        }

        @media (max-width: 768px) {
            .container {
                width: 98%;
                padding: 20px;
                margin: 10px auto;
            }
            
            .data-cards {
                grid-template-columns: 1fr;
            }

            /* 移动端登录表单优化 */
            .auth-forms {
                padding: 30px 24px;
                margin: 10px auto;
            }

            #login-section h3 {
                font-size: 24px;
                margin-bottom: 24px;
            }

            .tab-btn {
                padding: 10px;
                font-size: 14px;
            }

            .form-content input {
                padding: 12px 14px;
                font-size: 14px;
            }

            .form-content button[type="submit"] {
                padding: 12px;
                font-size: 15px;
            }

            /* 移动端单列布局 */
            .dashboard-main-content {
                grid-template-columns: 1fr;
                gap: 20px;
            }

            .dashboard-left-column {
                max-width: none;
            }

            .dashboard-left-column,
            .dashboard-right-column {
                gap: 15px;
            }

            .nav-links {
                gap: 10px;
            }

            .nav-link {
                font-size: 14px;
                padding: 6px 12px;
            }
            
            .user-info {
                flex-direction: column;
                align-items: flex-start;
                text-align: center;
            }
            
            .user-info h3 {
                text-align: center;
                width: 100%;
            }
            
            .devices-grid {
                gap: 14px;
            }
            
            .device-card {
                padding: 15px;
            }
            
            .device-card-actions {
                flex-wrap: wrap;
            }
            
            .devices-section-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 15px;
            }
            
            .add-device-btn {
                width: 100%;
                text-align: center;
            }
            
            .user-actions-header {
                width: 100%;
                justify-content: center;
            }
            
            #user-management-section {
                width: 98%;
                padding: 15px;
                margin: 0 auto;
            }
            
            .device-ids-table-container,
            .users-table-container {
                padding: 15px;
                overflow-x: auto;
            }
            
            .device-ids-table,
            .users-table {
                min-width: 800px;
            }
        }

        /* 添加设备模态框样式 */
        .device-form {
            margin-top: 0;
            padding-top: 0;
            border-top: none;
        }

        .device-form h4 {
            margin-bottom: 15px;
            color: #333;
        }

        /* 添加设备模态框特定样式 */
        #deviceModal .modal-content {
            max-width: 600px;
            max-height: 80vh;
            overflow-y: auto;
        }

        #device-list {
            max-height: 50vh;
            overflow-y: auto;
            margin-bottom: 20px;
        }

        .device-item {
            background: #404040;
            border-radius: 8px;
            padding: 15px;
            margin: 10px 0;
            border: 1px solid #555555;
            border-left: 4px solid #FC4C02;
        }

        .device-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
        }

        .device-name {
            font-weight: 600;
            color: #ffffff;
            font-size: 16px;
        }

        .device-id {
            font-family: monospace;
            background: #2D2D2D;
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 12px;
            color: #B0B0B0;
        }

        .device-info {
            color: #B0B0B0;
            font-size: 14px;
            margin: 5px 0;
        }

        .device-actions {
            display: flex;
            gap: 10px;
            margin-top: 10px;
        }

        .device-status {
            display: inline-block;
            padding: 2px 8px;
            border-radius: 12px;
            font-size: 12px;
            font-weight: 500;
        }

        .device-status.active {
            background: #d4edda;
            color: #155724;
        }

        .device-status.inactive {
            background: #f8d7da;
            color: #721c24;
        }

        
        .strava-connect-btn {
            display: inline-block;
            text-decoration: none;
            margin-top: 10px;
        }
        
        .strava-connect-btn img {
            border: none;
            outline: none;
        }
        
        /* Strava branding separation */
        .strava-section {
            border: 1px solid #555555;
            border-radius: 8px;
            padding: 20px;
            margin: 20px 0;
            background: #404040;
        }
        
        .strava-section h4 {
            color: #ffffff;
            margin-bottom: 15px;
            font-size: 18px;
        }
        
        /* Ensure Strava links are clearly identifiable */
        a[href*="strava.com"] {
            color: #FC5200 !important;
            font-weight: bold;
        }
        
        a[href*="strava.com"]:hover {
            text-decoration: underline;
        }
        
        /* 邮箱验证结果页面样式 */
        .verification-result {
            text-align: center;
            padding: 40px 20px;
        }

        .verification-icon {
            width: 80px;
            height: 80px;
            margin: 0 auto 20px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 40px;
            font-weight: bold;
        }

        .verification-icon.success {
            background: #10B981;
            color: white;
        }

        .verification-icon.error {
            background: #EF4444;
            color: white;
        }

        .verification-icon.success::before {
            content: '✓';
        }

        .verification-icon.error::before {
            content: '✗';
        }

        .verification-title {
            font-size: 24px;
            font-weight: 600;
            margin-bottom: 15px;
            color: #ffffff;
        }

        .verification-message {
            font-size: 16px;
            color: #B0B0B0;
            margin-bottom: 30px;
            line-height: 1.6;
        }

        .verification-actions {
            display: flex;
            gap: 15px;
            justify-content: center;
            flex-wrap: wrap;
        }

        .verification-actions .btn {
            min-width: 120px;
        }

        /* 响应式设计 - 邮箱验证 */
        @media (max-width: 768px) {
            .verification-result {
                padding: 30px 15px;
            }

            .verification-icon {
                width: 60px;
                height: 60px;
                font-size: 30px;
            }

            .verification-title {
                font-size: 20px;
            }

            .verification-message {
                font-size: 14px;
            }

            .verification-actions {
                flex-direction: column;
                align-items: center;
            }

            .verification-actions .btn {
                width: 100%;
                max-width: 200px;
            }
        }

        /* 语言下拉菜单样式 */
        .dropdown-item:hover {
            background-color: #f8f9fa !important;
        }
        
        .dropdown button:hover {
            background-color: #e9ecef !important;
        }