  :root {
            --primary-color: #4361ee;
            --secondary-color: #3f37c9;
            --success-color: #4cc9f0;
            --warning-color: #f8961e;
            --danger-color: #f94144;
            --light-color: #f8f9fa;
            --dark-color: #212529;
            --gold-color: #ffd700;
            --silver-color: #c0c0c0;
            --bronze-color: #cd7f32;
        }
        
        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }
        
        body {
            font-family: 'Microsoft YaHei', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            max-width: 1000px;
            margin: 0 auto;
            padding: 20px;
            background-color: #f5f7fa;
            color: var(--dark-color);
            line-height: 1.6;
            min-width: 320px;
        }
        
        .container {
            background-color: white;
            border-radius: 15px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
            padding: 30px;
            margin-top: 20px;
            position: relative;
            overflow: hidden;
            width: 100%;
        }
        
        .container::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 5px;
            background: linear-gradient(90deg, var(--primary-color), var(--success-color));
        }
        
        .back-button {
            position: absolute;
            top: 25px;
            left: 25px;
            color: var(--primary-color);
            text-decoration: none;
            font-weight: 600;
            display: flex;
            align-items: center;
            transition: all 0.3s ease;
            background-color: rgba(67, 97, 238, 0.1);
            padding: 8px 15px;
            border-radius: 50px;
        }
        
        .back-button i {
            margin-right: 8px;
            font-size: 18px;
        }
        
        .back-button:hover {
            background-color: rgba(67, 97, 238, 0.2);
            transform: translateX(-5px);
        }
        
        h1 {
            color: var(--primary-color);
            text-align: center;
            margin-bottom: 10px;
            font-weight: 700;
            font-size: 2.2rem;
            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }
        
        h2 {
            color: var(--secondary-color);
            text-align: center;
            margin-bottom: 30px;
            font-weight: 500;
            font-size: 1.2rem;
            opacity: 0.8;
        }
        
        .loading-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: rgba(255, 255, 255, 0.9);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 1000;
            flex-direction: column;
        }
        
        .loading-spinner {
            width: 50px;
            height: 50px;
            border: 5px solid rgba(67, 97, 238, 0.2);
            border-radius: 50%;
            border-top-color: var(--primary-color);
            animation: spin 1s ease-in-out infinite;
            margin-bottom: 20px;
        }
        
        .loading-message {
            font-size: 1.2rem;
            color: var(--primary-color);
            font-weight: 500;
        }
        
        @keyframes spin {
            to { transform: rotate(360deg); }
        }
        
        .image-select-prompt {
            text-align: center;
            margin-bottom: 10px;
            color: #6c757d;
            font-style: italic;
            font-size: 1.1rem;
        }
        
        .current-image {
            text-align: center;
            margin-bottom: 15px;
            font-weight: 500;
            color: var(--primary-color);
            font-size: 1.1rem;
            background-color: rgba(67, 97, 238, 0.05);
            padding: 10px;
            border-radius: 8px;
            display: inline-block;
            margin: 0 auto 25px;
            width: auto;
            display: flex;
            justify-content: center;
            align-items: center;
        }
        
        .current-image i {
            margin-right: 10px;
            color: var(--primary-color);
        }
        
        .image-options {
            display: flex;
            justify-content: center;
            flex-wrap: wrap;
            gap: 15px;
            margin-bottom: 20px;
        }
        
        .image-option {
            padding: 12px 25px;
            border: 2px solid #e9ecef;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.3s ease;
            min-width: 150px;
            text-align: center;
            font-weight: 500;
            background-color: white;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
        }
        
        @media (max-width: 768px) {
            .image-option {
                padding: 12px 25px;
                font-size: 0.8rem;
            }
        }

        @media (max-width: 480px) {
            .image-option, #start-test {
                min-width: 120px;
                padding: 10px 15px;
                font-size: 0.7rem;
            }
        }
        
        .image-option:hover {
            border-color: var(--primary-color);
            transform: translateY(-3px);
            box-shadow: 0 5px 15px rgba(67, 97, 238, 0.1);
        }
        
        .image-option.selected {
            border-color: var(--primary-color);
            background-color: rgba(67, 97, 238, 0.1);
            color: var(--primary-color);
            font-weight: 600;
            box-shadow: 0 5px 15px rgba(67, 97, 238, 0.2);
        }
        
        .top-records {
            margin-top: 30px;
            background: linear-gradient(135deg, rgba(76, 201, 240, 0.1), rgba(67, 97, 238, 0.1));
            border-radius: 12px;
            padding: 20px;
            margin-bottom: 30px;
            border: 1px solid rgba(67, 97, 238, 0.2);
        }
        
        .top-records-title {
            font-size: 1.2rem;
            font-weight: 600;
            color: var(--primary-color);
            margin-bottom: 15px;
            text-align: center;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .top-records-title i {
            margin-right: 10px;
            color: var(--gold-color);
        }
        
        .top-record {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
            font-size: 1rem;
            padding: 10px 15px;
            border-radius: 8px;
            background-color: rgba(255, 255, 255, 0.7);
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
        }
        
        .top-record:nth-child(1) {
            border-left: 4px solid var(--gold-color);
        }
        
        .top-record:nth-child(2) {
            border-left: 4px solid var(--silver-color);
        }
        
        .top-record:nth-child(3) {
            border-left: 4px solid var(--bronze-color);
        }
        
        .rank-icon {
            margin-right: 10px;
            font-size: 1.2rem;
        }
        
        .gold {
            color: var(--gold-color);
        }
        
        .silver {
            color: var(--silver-color);
        }
        
        .bronze {
            color: var(--bronze-color);
        }
        
        .card {
            background-color: var(--light-color);
            border-radius: 8px;
            padding: 20px;
            margin-bottom: 20px;
        }
        
        .card-title {
            font-size: 1.2rem;
            font-weight: 500;
            color: var(--primary-color);
            margin-bottom: 10px;
        }
        
        .info-item {
            display: flex;
            justify-content: space-between;
            margin-bottom: 8px;
            padding-bottom: 8px;
            border-bottom: 1px solid #e9ecef;
        }
        
        .info-label {
            font-weight: 500;
            color: #6c757d;
        }
        
        .info-value {
            font-weight: 600;
        }
        
        #test-image {
            max-width: 100%;
            height: auto;
            margin: 20px 0;
            display: none;
            border-radius: 6px;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }
        
        #start-test {
            padding: 12px 30px;
            background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
            color: white;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            font-size: 1.1rem;
            font-weight: 600;
            display: block;
            margin: 0 auto;
            transition: all 0.3s ease;
            box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
        }
        
        #start-test:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 25px rgba(67, 97, 238, 0.4);
        }
        
        #start-test:disabled {
            background: #e9ecef;
            color: #6c757d;
            cursor: not-allowed;
            transform: none;
            box-shadow: none;
        }
        
        .progress-container {
            width: 100%;
            height: 10px;
            background-color: #e9ecef;
            border-radius: 5px;
            margin-top: 20px;
            overflow: hidden;
            display: none;
        }
        
        #progress-bar {
            height: 100%;
            background: linear-gradient(90deg, var(--success-color), var(--primary-color));
            width: 0%;
            transition: width 0.3s ease;
        }
        
        .loading-text {
            text-align: center;
            margin-top: 10px;
            font-style: italic;
            color: #6c757d;
            display: none;
        }
        
        #result {
            margin-top: 30px;
            padding: 20px;
            background-color: #e8f4fd;
            border-radius: 8px;
            display: none;
        }
        
        .result-title {
            font-size: 1.2rem;
            font-weight: 600;
            color: var(--primary-color);
            margin-bottom: 15px;
            text-align: center;
        }
        
        .result-item {
            display: flex;
            justify-content: space-between;
            margin-bottom: 10px;
            font-size: 1rem;
        }
        
        .result-label {
            font-weight: 500;
        }
        
        .result-value {
            font-weight: 600;
            color: var(--secondary-color);
        }
        
        /* 历史记录表格优化 */
        .history-section {
            margin-top: 40px;
        }

        .history-title {
            font-size: 1.2rem;
            font-weight: 600;
            color: var(--primary-color);
            margin-bottom: 15px;
            text-align: center;
        }

        .history-table-container {
            width: 100%;
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
            margin-bottom: 20px;
            border: 1px solid #eee;
            border-radius: 8px;
        }

        .history-table {
            width: 100%;
            min-width: 100%;
            border-collapse: collapse;
        }

        .history-table th {
            background-color: var(--primary-color);
            color: white;
            padding: 12px 10px;
            text-align: left;
            position: sticky;
            top: 0;
        }

        .history-table td {
            padding: 10px;
            border-bottom: 1px solid #ddd;
        }

        .history-table tr:nth-child(even) {
            background-color: #f2f2f2;
        }

        .pagination {
            display: flex;
            justify-content: center;
            gap: 10px;
            margin-top: 20px;
            flex-wrap: wrap;
        }

        .page-btn {
            padding: 5px 10px;
            border: 1px solid #ddd;
            background-color: white;
            cursor: pointer;
            border-radius: 4px;
            font-size: 0.9rem;
            min-width: 30px;
            text-align: center;
        }

        .page-btn.active {
            background-color: var(--primary-color);
            color: white;
            border-color: var(--primary-color);
        }
        
        .footer {
            text-align: center;
            margin-top: 30px;
            color: #6c757d;
            font-size: 0.9rem;
        }
        
        .footer a {
            color: var(--primary-color);
            text-decoration: none;
        }
        
        /* 手机端样式调整 */
        @media (max-width: 768px) {
            body {
                transform: scale(1);
                transform-origin: top center;
                width: 100%;
                overflow-x: hidden;
                padding: 10px;
            }
            
            .container {
                padding: 25px;
                margin-top: 10px;
            }
            
            .back-button {
                position: static;
                margin: 0 auto 15px;
                display: flex;
                justify-content: center;
                width: fit-content;
            }
            
            h1 {
                margin-top: 0;
            }
            
            /* 调整按钮大小 */
            #start-test {
                padding: 12px 25px;
            }
            
            /* 调整卡片内边距 */
            .card {
                padding: 15px;
            }
            
            /* 历史记录表格调整 */
            .history-section {
                margin-top: 30px;
            }
            
            .history-title {
                font-size: 1.1rem;
            }
            
            .history-table th {
                padding: 10px 8px;
                font-size: 0.85rem;
            }
            
            .history-table td {
                padding: 8px;
                font-size: 0.8rem;
            }
            
            .page-btn {
                padding: 4px 8px;
                font-size: 0.8rem;
                min-width: 25px;
            }
        }
        
        /* 超小屏幕额外优化 */
        @media (max-width: 535px) {
            body {
                transform: scale(1);
                padding: 5px;
            }
            
            .top-record {
                font-size: 0.65rem;
            }
            
            .container {
                padding: 20px;
            }
            
            /* 确保所有内容都能显示 */
            .image-option, #start-test {
                min-width: 120px;
                padding: 10px 15px;
            }
            
            /* 历史记录表格调整 */
            .history-section {
                margin-top: 20px;
            }
            
            .history-title {
                font-size: 1rem;
                margin-bottom: 10px;
            }
            
            /* 优化列宽 */
            .history-table th:nth-child(1),
            .history-table td:nth-child(1) {
                max-width: 120px;
                overflow: hidden;
                text-overflow: ellipsis;
            }
            
            .history-table th:nth-child(2),
            .history-table td:nth-child(2) {
                max-width: 100px;
                overflow: hidden;
                text-overflow: ellipsis;
            }
            
            .history-table th:nth-child(3),
            .history-table td:nth-child(3) {
                max-width: 80px;
            }
            
            .history-table th,
            .history-table td {
                padding: 8px 6px;
                font-size: 0.6rem;
            }
            
            .page-btn {
                padding: 3px 6px;
                font-size: 0.75rem;
                min-width: 20px;
            }
        }