        :root {
            /* 暗黑模式 */
            --bg: #fff;
            --bg-color: #fff;
            --text: #000;
            --primary-color: #3498db;
            --text-color: #333;
            --light-gray: #f5f5f5;
            --border-color: #e0e0e0;
            --card-bg: #ffffff;
            --answer-bg: #f9f9f9;
            --safe-area-inset-bottom: env(safe-area-inset-bottom, 16px);
            --footer-height: 64px;
            --danger-color: #e74c3c;
            --bar--color: #e0e0e0;
            --bg-modal: #fff;
        }
        

        /* 暗黑模式 */
        @media (prefers-color-scheme: dark) {
            :root {
                --bg: #121212;
                --text: #f5f5f5;
                --bg-color: #121212;
                --text-color: #e0e0e0;
                --card-bg: #000000;
                --answer-bg: #000000;
                --bar--color: #e0e0e0;
                --bg-modal: #121212;
                --border-color: #555555;
            }
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }
        
        body {
            font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", STHeiti, sans-serif;

            /* 暗黑模式 */
            background: var(--bg); color: var(--text);

            height: 100vh;
            overflow: hidden;
            touch-action: pan-y;
            -webkit-tap-highlight-color: transparent;
            padding-bottom: calc(var(--footer-height) + var(--safe-area-inset-bottom));
        }

        a {
          /* 基础样式 */
          color: #3498db; /* 默认颜色 */
          text-decoration: none; /* 移除默认下划线 */
          transition: all 0.3s ease; /* 平滑过渡效果 */
          padding: 5px;
          position: relative;
          display: inline-block;
        }
        
        /* 鼠标悬停效果 */
        a:hover {
          color: #e74c3c; /* 悬停颜色 */
        }
        
        /* 添加下划线动画效果 */
        a::after {
          content: '';
          position: absolute;
          bottom: 0;
          left: 0;
          width: 0;
          height: 2px;
          background-color: #e74c3c;
          transition: width 0.3s ease;
        }
        
        a:hover::after {
          width: 100%;
        }
        
        /* 额外添加的缩放效果（可选） */
        a:hover {
          transform: scale(1.05);
        }
        
        .container {
            display: flex;
            flex-direction: column;
            height: 100%;
            position: relative;
            padding-top: env(safe-area-inset-top);
        }
        
        .header {
            padding: 10px 16px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
            z-index: 10;
            display: flex;
            flex-direction: column;
        }
        
        .header-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 8px;
        }
        
        .reset-container {
            position: relative;
            flex-shrink: 0;
            margin-left: 10px;
        }
        
        .reset-btn {
            color: var(--text);
            background: var(--bg--color);
            padding: 6px 10px;
            border-radius: 15px;
            border: 1px solid var(--border-color);
            -background: white;
            -color: var(--primary-color);
            font-size: 12px;
            cursor: pointer;
        }
        
        .logout-btn {
            color: var(--text);
            background: var(--bg-color);
            padding: 6px 10px;
            border-radius: 15px;
            border: 1px solid var(--border-color);
            -background: white;
            -color: var(--danger-color);
            -font-size: 12px;
            font-size: 0.8rem;
            cursor: pointer;
        }

        .search-container {
            position: relative;
            z-index:99999;
            flex: 1;
        }
        
        .search-container input {
            width: 100%;
            padding: 10px 15px 10px 40px;
            border-radius: 20px;
            border: 1px solid var(--border-color);
            -background: #f9f9f9;
            color: var(--text);
            background: var(--bg-color);
            font-size: 16px;
            transition: all 0.3s;
        }
        
        .search-container input:focus {
            color: var(--text);
            border-color: var(--primary-color);
            box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
            outline: none;
        }
        
        .search-icon {
            position: absolute;
            left: 15px;
            top: 50%;
            transform: translateY(-50%);
            color: #999;
        }
        
        .progress-container {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 14px;
        }
        
        .progress-bar {
            flex: 1;
            height: 6px;
            -background: #e0e0e0;
            -color: var(--text);
            background: var(--bar--color);
            border-radius: 3px;
            margin: 0 10px;
            overflow: hidden;
        }
        
        .progress {
            height: 100%;
            background: var(--primary-color);
            border-radius: 3px;
            transition: width 0.3s ease;
        }
        
        .card-viewport {
            flex: 1;
            position: relative;
            overflow: hidden;
            perspective: 1000px;
        }
        
        .card-container {
            position: absolute;
            width: 100%;
            -height: 100%;
            display: flex;
            align-items: center;
            transition: transform 0.5s ease;
        }
        
        .card {
            width: calc(100% - 8px);
            max-width: 480px;
            margin: 0 auto;
            background: var(--card-bg);
            border-radius: 12px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.1);
            overflow: hidden;
            touch-action: manipulation;
            transform-style: preserve-3d;
            transition: transform 0.5s;
        }
        
        .card-header {
            padding: 20px 20px 0;
            position: relative;
        }
        
        .card-number {
            position: absolute;
            top: 5px;
            right: 20px;
            color: #666;
            font-size: 14px;
        }
        
        .question {
            padding: 5px 2px;
            font-size: 18px;
            line-height: 1.1;
            font-weight: 400;
            min-height: 50px;
        }
        
        .card-body {
            padding: 10px 15px;
            background: var(--answer-bg);
            border-top: 1px dashed var(--border-color);
            display: none;
        }
        
        .answer {
            font-size: 18px;
            line-height: 1.4;
        }

        .mnemonic {
            font-family: 'Courier New', Courier, monospace;
            font-size: 16px;
            line-height: 1.2;
        }


        /* 在行间添加虚线 */
        .line-break {
            display: block;
            position: relative;
            margin-top: 0.35em;
        }

        .line-break::before {
            content: "";
            position: absolute;
            top: -0.25em;
            left: 0;
            width: 100%;
            height: 1px;
            -border-bottom: 1px dashed #20c57d;
            border-bottom: 1px dashed var(--border-color);
        }

        /* 隐藏最后一个换行后的虚线（空行不显示） */
        .card.show-answer .card-body {
            display: block;
        }
        
        .footer {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            padding: 16px;
            -background: white;
            box-shadow: 0 -1px 3px rgba(0,0,0,0.1);
            display: flex;
            justify-content: space-between;
            gap: 15px;
            height: var(--footer-height);
            padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px) + 24px);
        }
        
        .btn {
            flex: 1;
            padding: 16px;
            border-radius: 8px;
            background: var(--bg-color);
            border: 1px solid var(--border-color);
            font-size: 16px;
            color: var(--text-color);
            cursor: pointer;
            text-align: center;
            transition: all 0.3s;
            touch-action: manipulation;
            user-select: none;
        }
        
        .btn:active {
            background: #f0f0f0;
        }
        
        .prev-btn, .next-btn {
            width: 45px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .icon {
            font-size: 20px;
            line-height: 1;
        }
        
        .toggle-btn {
            font-size: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .no-results {
            text-align: center;
            padding: 40px 20px;
            color: #666;
        }
        
        .search-results {
            position: absolute;
            top: 90px;
            left: 0;
            width: 100%;
            height: 100%;
            background: var(--bg);
            overflow-y: auto;
            z-index: 0;
            display: none;
        }
        
        .search-results.show {
            display: block;
        }
        
        .search-result-header {
            padding: 15px 16px;
            padding-top: calc(15px + env(safe-area-inset-top, 0));
            border-bottom: 1px solid var(--border-color);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .close-results {
            font-size: 24px;
            width: 30px;
            height: 30px;
            text-align: center;
            line-height: 30px;
            cursor: pointer;
        }
        
        .result-list {
            padding: 0;
            padding-bottom: calc(env(safe-area-inset-bottom, 0) + 20px);
        }
        
        .result-item {
            padding: 15px 16px;
            border-bottom: 1px solid var(--border-color);
        }
        
        .result-question {
            font-family: 'Courier New', Courier, monospace;
            font-size: 15px;
            margin-bottom: 4px;
        }
        
        .result-answer {
            font-size: 14px;
            color: var(--text);
            display: none;
        }
        
        .result-item.expanded .result-answer {
            display: block;
        }
        
        .safe-area-bottom {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            height: var(--safe-area-inset-bottom);
            -background-color: white;
        }
        
        .notification {
            position: fixed;
            bottom: 80px;
            left: 50%;
            transform: translateX(-50%);
            background: var(--bg);
            color: var(--text);
            padding: 8px 16px;
            border-radius: 20px;
            font-size: 14px;
            z-index: 500;
            opacity: 0;
            transition: opacity 0.3s;
        }
        
        .notification.show {
            opacity: 1;
        }
        
        .last-position-marker {
            background-color: rgba(52, 152, 219, 0.3);
            position: fixed;
            top: 0;
            height: 5px;
            width: 100%;
            z-index: 450;
            display: none;
        }
        
        .loading-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(255, 255, 255, 0.8);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 1000;
        }
        
        .loading-spinner {
            width: 40px;
            height: 40px;
            border: 4px solid rgba(52, 152, 219, 0.3);
            border-top: 4px solid #3498db;
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }
        
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
        
        .error-message {
            text-align: center;
            padding: 20px;
            color: #e74c3c;
            background: #f9f9f9;
            border-radius: 8px;
            margin: 20px;
        }
        
        .retry-btn {
            margin-top: 15px;
            padding: 10px 20px;
            -background: #3498db;
            -color: white;
            background: var(--bg--color);
            padding: 2px 5px;
            border: none;
            border-radius: 5px;
            cursor: pointer;
        }


        /* 大头钉 */
        .xtoggle-btn {
            color: var(--text);
            background: var(--bg--color);
            padding: 2px 5px;
            font-size: 16px;
            font-weight: 100;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        }

        .xtoggle-btn.zero {
            -background: white;
            -color: grey;
        }

        .xtoggle-btn.one {
            -background: linear-gradient(135deg, #ff6b6b, #ffa647);
            font-style: italic;
            -color: white;
        }

        .xtoggle-btn:hover {
            -transform: scale(1.05);
            -color: var(--text);
            -background: linear-gradient(135deg, #ff6b6b, #ffa647);
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
        }

        .xtoggle-btn:active {
            transform: scale(0.98);
        }

        
        /* 模态框样式 */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: var(--bg-color);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 1000;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
        }
        
        .modal-overlay.active {
            opacity: 1;
            visibility: visible;
        }
        
        .modal-content {
            background: var(--bg-color);
            width: 90%;
            max-width: 500px;
            max-height: 85vh;
            border-radius: 20px;
            overflow: hidden;
            transform: translateY(30px);
            transition: transform 0.4s ease;
            display: flex;
            flex-direction: column;
        }
        
        .modal-overlay.active .modal-content {
            transform: translateY(0);
        }
        
        .modal-header {
            background: linear-gradient(to right, #3498db, #8e44ad);
            -color: white;
            padding: 20px;
            text-align: center;
            position: relative;
        }
        
        .modal-title {
            font-size: 1.6rem;
            margin: 0;
        }
        
        .close-btn {
            position: absolute;
            top: 15px;
            right: 20px;
            background: none;
            border: none;
            -color: white;
            font-size: 1.8rem;
            cursor: pointer;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background 0.2s;
        }
        
        .close-btn:hover {
            background: rgba(255,255,255,0.2);
        }
        
        .modal-body {
            padding: 25px;
            background: var(--bg-modal);
            overflow-y: auto;
            flex-grow: 1;
        }
        
        .features-list {
            list-style: none;
            margin-bottom: 25px;
        }
        
        .features-list li {
            padding: 12px 0;
            border-bottom: 1px solid #eee;
            display: flex;
            align-items: flex-start;
        }
        
        .features-list li:last-child {
            border-bottom: none;
        }
        
        .feature-icon {
            background: #e3f2fd;
            color: #3498db;
            width: 28px;
            height: 28px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 15px;
            flex-shrink: 0;
            font-size: 0.9rem;
        }
        
        .feature-text {
            text-align: left;
            line-height: 1.5;
        }
        
        .price-tag {
            background: #f8f9fa;
            border-radius: 12px;
            padding: 20px;
            text-align: center;
            margin-top: 10px;
            border: 1px solid #eee;
        }
        
        .price {
            font-size: 1.5rem;
            color: #e74c3c;
            font-weight: bold;
            margin: 8px 0;
        }
        
        .price-note {
            color: #7f8c8d;
            font-size: 0.95rem;
        }
        
        .footer {
            color: rgba(255,255,255,0.7);
            font-size: 0.9rem;
            margin-top: 20px;
            text-align: center;
        }
        
        #numberSelect {
          padding: 6px 10px;
          border-radius: 15px;
          border: 1px solid var(--border-color);
          background: var(--bg);
          color: var(--text);
          font-size: 0.9rem;
          -font-size: 12px;
          -padding: 8px;
          -border-radius: 15px;
          -border: 1px solid #ccc;
        }

        @media (max-width: 480px) {
            .modal-title {
                font-size: 1.4rem;
            }
            
            .features-list li {
                font-size: 0.95rem;
            }

        }

        /* 自定义控件容器 */
        .custom-controls {
          bottom: 10;
          left: 100;
          right: 100;
          padding: 12px 50px;
          display: flex;
          align-items: center;
          justify-content: space-between;
          z-index: 10;
          touch-action: none;
        }

        .control-btn.active {
            background-color: var(--primary-color);
            color: var(--text);
        }

        /* 按钮通用样式 */
        .control-btn {
          width: 80px;  /* 最小触摸尺寸 */
          height: 30px;
          border-radius: 15px;
          background: var(--bg);
          border: 1px solid var(--border-color);
          color: var(--text);
          font-size: 16px;
          display: flex;
          align-items: center;
          justify-content: center;
          -webkit-tap-highlight-color: transparent;
          touch-action: manipulation;
          cursor: pointer;
        }

        .counter {
            font-size: 18px;
            font-weight: bold;
            color: #333;
            margin: 20px 0;
        }

        #changeBookBtn {
            padding: 6px 10px;
            font-size: 0.8rem;
            cursor: pointer;
        }

        .-rate-container {
            -background: rgba(255,255,255,0.2);
            border: none;
            border-radius: 50%;
            width: 36px;
            height: 36px;
            color: var(--bg);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
        }

        .playback-rate {
            margin: 0 8px;
            border: none;
            border-radius: 18px;
            background: var(--bg);
            border: 1px solid var(--border-color);
            color: var(--text);
            padding: 6px 12px;
            font-size: 14px;
            cursor: pointer;
        }

        .playback-rate.active {
            background: var(--primary-color);
            color: var(--text);
        }
