body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f9;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding-top: 40px;
}

.container {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    margin-bottom: 20px;
}

.slider-container {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
}

input[type="range"] {
    width: 100%;
}

span {
    display: inline-block;
    margin-left: 10px;
    font-weight: bold;
}

/* 基础功能样式 */
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

.picker-gradient {
    background: linear-gradient(180deg, 
        rgba(255,255,255,1) 0%, 
        rgba(255,255,255,0) 25%, 
        rgba(255,255,255,0) 75%, 
        rgba(255,255,255,1) 100%);
}

.picker-highlight {
    background: rgba(13, 110, 253, 0.1);
    pointer-events: none;
    border-radius: 8px;
}

.snap-y {
    scroll-snap-type: y mandatory;
}

.snap-center {
    scroll-snap-align: center;
}

/* 自定义 Bootstrap 样式 */
.nav-tabs .nav-link {
    border: none;
    color: #6c757d;
}

.nav-tabs .nav-link.active {
    border-bottom: 2px solid #0d6efd;
    color: #0d6efd;
}

/* 卡片样式 */
.card {
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.pace-card {
    background-color: rgba(13, 110, 253, 0.1);
}

/* 按钮样式 */
.btn-adjust {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
    transition: all 0.2s ease-in-out;
}

.btn-adjust:hover {
    background-color: #e9ecef;
    color: #212529;
}

/* 配速调整按钮样式 */
#adjustPaceBtn,
#adjustPaceBtnMile {
    border: 1px solid #dee2e6;
}

/* 输入框样式 */
.form-control-pace {
    width: 4rem;
    text-align: center;
    font-size: 1.25rem;
    padding: 0.375rem 0.5rem;
    border-radius: 0.375rem;
}

/* 切换按钮样式 */
.unit-toggle {
    width: 3rem;
    height: 1.5rem;
    background-color: #0d6efd;
    border-radius: 1rem;
    position: relative;
    cursor: pointer;
    transition: background-color 0.2s;
}

.unit-toggle.active {
    background-color: #198754;
}

.toggle-handle {
    width: 1.25rem;
    height: 1.25rem;
    background-color: white;
    border-radius: 50%;
    position: absolute;
    top: 0.125rem;
    left: 0.125rem;
    transition: transform 0.2s;
}

.toggle-handle.active {
    transform: translateX(1.5rem);
}

/* 速度指标样式 */
.speed-indicator {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

.speed-ms {
    background-color: rgba(255, 193, 7, 0.2);
}

.speed-kmh {
    background-color: rgba(108, 117, 125, 0.2);
}

.speed-mph {
    background-color: rgba(25, 135, 84, 0.2);
}

/* 速度指标 badge 文字居中 */
.badge.bg-warning,
.badge.bg-secondary,
.badge.bg-success {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin: 0;
    margin-left: 0 !important;
}

/* 去掉速度指标内部 span 的 margin */
#kmPaceSpeedMS,
#kmPaceSpeedKMH,
#kmPaceSpeedMPH,
#milePaceSpeedMS,
#milePaceSpeedKMH,
#milePaceSpeedMPH {
    margin-left: 0 !important;
    margin-right: 4px;
}

/* 表格样式 */
.table-pace {
    --bs-table-striped-bg: rgba(0, 0, 0, 0.02);
}

.table-pace th {
    background-color: var(--bs-gray-100);
    font-weight: 500;
    padding: 0.75rem 1rem;
    white-space: nowrap;
}

.table-pace td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
}

/* Modal 样式 */
.modal-picker {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1050;
}

.modal-picker.show {
    display: flex;
}

.modal-picker-content {
    background-color: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    width: 90%;
    max-width: 24rem;
}

/* 选择器样式 */
#minutesPicker,
#secondsPicker {
    padding: 0 !important;
    margin: 0 !important;
    scroll-padding: 0;
    line-height: 0; /* 移除行高导致的额外空间 */
}

#minutesPicker > *:first-child,
#secondsPicker > *:first-child {
    margin-top: 0;
}

.picker-item {
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    scroll-snap-align: center;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    line-height: 48px; /* 确保行高等于高度，避免额外空间 */
}

.picker-item.selected {
    color: var(--bs-primary);
    font-weight: 500;
}

/* Toggle 切换按钮样式 */
.toggle-container {
    width: 48px;
    height: 24px;
}

.toggle-button {
    width: 100%;
    height: 100%;
    padding: 0;
    border: none;
    background: none;
    position: relative;
    cursor: pointer;
}

.toggle-background {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    background-color: var(--bs-primary);
    transition: background-color 0.3s ease;
}

.toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background-color: white;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transform: translateX(0);
    transition: transform 0.3s ease;
}

/* MI 状态的样式 */
.toggle-button[data-state="MI"] .toggle-background {
    background-color: var(--bs-success);
}

.toggle-button[data-state="MI"] .toggle-slider {
    transform: translateX(24px);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .table-responsive {
        margin: 0 -1rem;
    }
    
    .table-pace th,
    .table-pace td {
        padding: 0.5rem;
        font-size: 0.875rem;
    }
} 