/**
 * ============================================================================
 * @copyright  Copyright (c) 2025 CodeAE Platform Inc. (http://www.codeae.com)
 * ============================================================================ 
 */


        * {
            box-sizing: border-box;
            user-select: none;
            -webkit-tap-highlight-color: transparent;
            margin: 0;
            padding: 0;
        }
        
        html, body {
            width: 100%;
            min-height: 100vh;
            height: auto;
            overflow-x: hidden;
            overflow-y: auto;
        }
        
        body {
            background: linear-gradient(145deg, #0b1a2e 0%, #1a2f3f 100%);
            display: flex;
            align-items: flex-start;
            justify-content: center;
            font-family: 'Segoe UI', Roboto, system-ui, -apple-system, sans-serif;
            padding: 16px;
            -webkit-overflow-scrolling: touch;
        }
        
        .stopwatch-card {
            background: rgba(18, 28, 40, 0.85);
            backdrop-filter: blur(12px);
            border-radius: clamp(32px, 8vw, 48px);
            padding: clamp(1.2rem, 5vw, 2.2rem) clamp(1.2rem, 5vw, 2.5rem);
            box-shadow: 0 35px 68px rgba(0, 0, 0, 0.55), inset 0 -2px 4px rgba(255, 255, 255, 0.1), inset 0 4px 8px rgba(255, 255, 255, 0.06);
            border: 1px solid rgba(120, 180, 255, 0.2);
            width: min(98vw, 900px);
            max-width: 100%;
            transition: box-shadow 0.2s;
            position: relative;
            margin: auto;
            z-index: 1;
        }
        
        .display-wrap {
            background: #0e1a24;
            border-radius: clamp(40px, 10vw, 60px);
            padding: 0.2rem clamp(1rem, 4vw, 2rem) 0.2rem clamp(1.5rem, 5vw, 3rem);
            box-shadow: inset 0 8px 12px rgba(0, 0, 0, 0.6), inset 0 -2px 4px rgba(255, 255, 255, 0.05);
            margin-bottom: clamp(0.8rem, 3vw, 1.5rem);
            border: 1px solid #2f4b5c;
            width: 100%;
            position: relative;
            z-index: 20;
        }
        
        .time-display {
            font-family: 'Fira Mono', 'JetBrains Mono', 'Cascadia Code', 'Segoe UI Mono', monospace;
            font-size: clamp(2.8rem, 15vw, 5.8rem);
            font-weight: 500;
            letter-spacing: 2px;
            text-align: center;
            color: #b9f2ff;
            text-shadow: 0 0 12px #3ec1ff, 0 0 30px #0077ff;
            line-height: 1.3;
            word-break: break-word;
        }
        
        .sub-labels {
            display: flex;
            justify-content: space-between;
            font-size: clamp(0.8rem, 3vw, 1rem);
            color: #9bbad0;
            padding: 0 0.8rem 0.2rem 0.8rem;
            letter-spacing: 1px;
            font-weight: 400;
            text-transform: uppercase;
            opacity: 0.7;
            width: 100%;
            position: relative;
            z-index: 20;
        }
        
        .indicator-panel {
            display: flex;
            align-items: center;
            justify-content: space-between;
            background: #0f1e28;
            border-radius: clamp(40px, 8vw, 60px);
            padding: clamp(0.4rem, 2vw, 0.6rem) clamp(1rem, 4vw, 2rem);
            margin: clamp(0.8rem, 3vw, 1.2rem) 0 clamp(1.2rem, 4vw, 1.8rem) 0;
            border: 1px solid #2d4a5a;
            box-shadow: inset 0 1px 4px #00000055, 0 10px 20px -10px black;
            flex-wrap: wrap;
            gap: 8px;
            position: relative;
            z-index: 20;
            width: 100%;
        }
        
        .status-badge {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .led {
            width: clamp(14px, 4vw, 18px);
            height: clamp(14px, 4vw, 18px);
            border-radius: 50%;
            background: #4e4e4e;
            box-shadow: 0 0 8px #00000099;
            transition: background 0.15s, box-shadow 0.2s;
            flex-shrink: 0;
        }
        
        .led.active {
            background: #49ffa0;
            box-shadow: 0 0 20px #1eff8e, 0 0 40px #0aff60;
        }
        
        .led.paused {
            background: #ffe570;
            box-shadow: 0 0 18px #ffd966, 0 0 30px #ffb347;
        }
        
        .status-text {
            font-weight: 600;
            font-size: clamp(1.2rem, 5vw, 1.5rem);
            letter-spacing: 1px;
            color: #c2e2ff;
            text-shadow: 0 2px 5px black;
            min-width: 70px;
            white-space: nowrap;
        }
        
        .hint-badge {
            background: #1f3b4a;
            padding: 0.3rem clamp(0.8rem, 3vw, 1.4rem);
            border-radius: 40px;
            color: #bfe2ff;
            font-weight: 500;
            font-size: clamp(0.9rem, 3.5vw, 1.2rem);
            border: 1px solid #3487b0;
            box-shadow: inset 0 1px 3px #8fcbff33, 0 4px 8px black;
            display: flex;
            gap: clamp(6px, 2vw, 12px);
            flex-wrap: wrap;
            justify-content: center;
        }
        
        .hint-badge kbd {
            background: #2b4d5e;
            border-radius: 6px;
            padding: 0.1rem clamp(0.5rem, 2vw, 0.9rem);
            font-size: clamp(1rem, 4vw, 1.3rem);
            font-weight: 700;
            color: #ddf0ff;
            border: 1px solid #6fbbff;
            box-shadow: 0 2px 0 #0e1f2a;
            white-space: nowrap;
        }
        
        /* 按钮容器 - 现在只有两个按钮 */
        .button-bar {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            justify-content: center;
            gap: clamp(12px, 4vw, 20px); /* 增加间距，因为只有两个按钮 */
            margin: clamp(12px, 4vw, 20px) 0 clamp(16px, 5vw, 24px) 0;
            position: relative;
            z-index: 30;
            width: 100%;
        }
        
        .btn {
            background: #1d3643;
            border: none;
            border-bottom: 4px solid #0e1f2c;
            color: #d9f0ff;
            font-size: clamp(1.3rem, 5.5vw, 1.8rem); /* 按钮稍微变大 */
            font-weight: 600;
            padding: clamp(0.7rem, 3.5vw, 1rem) clamp(1.2rem, 5vw, 2rem);
            min-width: clamp(120px, 35vw, 260px); /* 按钮宽度增加 */
            border-radius: 50px;
            cursor: pointer;
            box-shadow: 0 12px 20px -12px black, inset 0 1px 3px #9ad4ff7a;
            transition: transform 0.07s, border-color 0.1s, background 0.1s, box-shadow 0.1s;
            letter-spacing: 1px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            flex: 0 1 auto; /* 不强制拉伸 */
            touch-action: manipulation;
            -webkit-touch-callout: none;
            position: relative;
            z-index: 31;
            pointer-events: auto !important;
        }
        
        .btn:active {
            transform: translateY(3px);
            border-bottom-width: 2px;
            background: #17323f;
        }
        
        .btn.reset-btn {
            background: #2e2e42;
            border-bottom-color: #191927;
        }
        
        .btn.reset-btn:active {
            background: #40405c;
        }
        
        .btn:focus-visible {
            outline: 3px solid white;
            outline-offset: 4px;
        }
        
        .lap-panel {
            background: #0b1921e0;
            border-radius: clamp(24px, 6vw, 36px);
            padding: clamp(0.8rem, 3vw, 1.2rem) clamp(1rem, 4vw, 1.5rem);
            border: 1px solid #2e5568;
            box-shadow: inset 0 2px 6px #00000080, 0 8px 20px #0000004d;
            max-height: min(300px, 45vh); /* 增加高度，因为少了一个按钮 */
            overflow-y: auto;
            scrollbar-width: thin;
            scrollbar-color: #3d7085 #10232e;
            -webkit-overflow-scrolling: touch;
            position: relative;
            z-index: 20;
            width: 100%;
            margin-bottom: 10px;
        }
        
        .lap-panel::-webkit-scrollbar {
            width: 6px;
        }
        
        .lap-panel::-webkit-scrollbar-track {
            background: #10232e;
            border-radius: 10px;
        }
        
        .lap-panel::-webkit-scrollbar-thumb {
            background: #3d7085;
            border-radius: 10px;
            border: 1px solid #173e4d;
        }
        
        .lap-title {
            display: flex;
            justify-content: space-between;
            color: #9fc9de;
            font-weight: 500;
            letter-spacing: 1px;
            border-bottom: 1px solid #2b4d5e;
            padding-bottom: 6px;
            margin-bottom: 4px;
            font-size: clamp(0.9rem, 3.5vw, 1.1rem);
        }
        
        .lap-list {
            list-style: none;
            margin: 0;
            padding: 0;
        }
        
        .lap-item {
            display: flex;
            justify-content: space-between;
            font-family: 'Fira Mono', 'JetBrains Mono', monospace;
            font-size: clamp(1rem, 4vw, 1.2rem);
            padding: clamp(4px, 2vw, 6px) clamp(8px, 3vw, 12px);
            border-bottom: 1px dashed #1f404f;
            color: #cde1ed;
        }
        
        .lap-item span:first-child {
            color: #8fcbff;
            font-weight: 400;
        }
        
        .lap-item span:last-child {
            font-weight: 500;
            letter-spacing: 1px;
            color: #b4edff;
        }
        
        .empty-lap-message {
            color: #607e8b;
            font-style: italic;
            text-align: center;
            padding: clamp(16px, 5vw, 24px) 0; /* 增加内边距 */
            font-size: clamp(1rem, 4vw, 1.2rem);
        }
        
        .footer-note {
            text-align: center;
            margin-top: clamp(12px, 4vw, 18px);
            color: #5f899b;
            font-size: clamp(0.9rem, 3.5vw, 1.1rem);
            border-top: 1px dashed #2f5568;
            padding-top: clamp(12px, 4vw, 16px);
            padding-bottom: clamp(10px, 3vw, 20px);
            line-height: 1.6;
            position: relative;
            z-index: 20;
            width: 100%;
        }
        
        .footer-note kbd {
            background: #1c3340;
            border-radius: 6px;
            padding: 0.1rem clamp(0.5rem, 2vw, 0.9rem);
            font-size: clamp(1rem, 3.8vw, 1.2rem);
            color: #c3e5ff;
            border: 1px solid #44758b;
            white-space: nowrap;
            margin: 0 2px;
        }
        
        /* 小屏幕优化 */
        @media (max-width: 600px) {
            body {
                padding: 12px;
                align-items: flex-start;
            }
            
            .stopwatch-card {
                margin: 0 auto;
                width: 100%;
            }
            
            .footer-note {
                display: flex;
                flex-wrap: wrap;
                justify-content: center;
                gap: 6px;
            }
            
            .btn {
                min-width: 0;
                flex: 1 1 40%; /* 两个按钮各占40% */
                font-size: clamp(1.1rem, 4.5vw, 1.4rem);
                padding: clamp(0.6rem, 3vw, 0.8rem) clamp(1rem, 4vw, 1.4rem);
            }
            
            .hint-badge {
                font-size: clamp(0.8rem, 3vw, 1rem);
            }
            
            .hint-badge kbd {
                font-size: clamp(0.9rem, 3.5vw, 1.1rem);
            }
            
            .lap-panel {
                max-height: min(250px, 40vh);
            }
