        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        @font-face {
            font-family: "Jolly";
            src: url('https://www.xiaozhangyu.vip/fonts/jollyregular.woff') format('woff');
        }

        @font-face {
            font-family: "Jolly";
            src: url('https://www.xiaozhangyu.vip/fonts/jollybold.woff') format('woff');
            font-weight: bold;
        }

        @font-face {
            font-family: "Jolly";
            src: url('https://www.xiaozhangyu.vip/fonts/jollyitalic.woff') format('woff');
            font-style: italic;
        }

        body {
            font-family: Jolly, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: linear-gradient(135deg, #1DB799, #26B88B, #2FB97C);
            color: #fff;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            padding: 15px;
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
            -webkit-touch-callout: none;
            -webkit-tap-highlight-color: transparent;
            touch-action: manipulation;
            overflow-x: hidden;
        }

        /* 顶部菜单样式 */
        .top-navbar {
            background: rgba(255, 255, 255, 0.2);
            -webkit-backdrop-filter: blur(10px);
            backdrop-filter: blur(10px);
            border-radius: 12px;
            margin-bottom: 20px;
            padding: 12px 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
            overflow: visible;
            position: fixed;
            top: 15px;
            left: 15px;
            right: 15px;
            z-index: 1000;
            transition: all 0.3s ease;
        }

        .top-navbar.scrolled {
            flex-direction: column;
            width: auto;
            right: 15px;
            left: auto;
            padding: 10px;
            align-items: flex-end;
            gap: 5px;
        }

        .top-navbar.scrolled .nav-left, 
        .top-navbar.scrolled .nav-right {
            flex-direction: column;
            gap: 5px;
            width: 100%;
        }

        .top-navbar.scrolled .nav-left a, 
        .top-navbar.scrolled .nav-right a {
            justify-content: flex-end;
            padding: 8px 10px;
        }

        .nav-left, .nav-right {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .nav-left a, .nav-right a {
            color: #f0f8ff;
            text-decoration: none;
            font-size: 16px;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
            padding: 8px 12px;
            border-radius: 8px;
        }

        .nav-left a:hover, .nav-right a:hover {
            color: #ffd700;
            background: rgba(255, 255, 255, 0.25);
            transform: translateY(-2px);
        }

        .nav-icon {
            font-size: 22px;
            width: 20px;
            text-align: center;
        }

        .nav-left a span, .nav-right a span {
            display: none;
        }

        /* 难度下拉菜单 */
        .difficulty-dropdown {
            position: relative;
            display: inline-block;
        }

        .difficulty-btn {
            background: transparent;
            border: none;
            color: #f0f8ff;
            padding: 8px 12px;
            font-size: 16px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 8px;
            transition: all 0.3s;
            border-radius: 8px;
        }

        .difficulty-btn:hover {
            color: #ffd700;
            background: rgba(255, 255, 255, 0.25);
        }

        .dropdown-content {
            display: none;
            position: absolute;
            background: rgba(255, 255, 255, 0.95);
            min-width: 160px;
            box-shadow: 0 8px 16px rgba(0,0,0,0.2);
            z-index: 1100;
            border-radius: 8px;
            overflow: hidden;
            top: 100%;
            right: 0;
            margin-top: 5px;
        }

        .dropdown-content a {
            color: #333;
            padding: 12px 16px;
            text-decoration: none;
            display: block;
            transition: all 0.3s;
        }

        .dropdown-content a:hover {
background-color: rgba(29, 183, 153, 0.3);
    color: #1DB799;
    font-weight: bold;
        }

        .dropdown-content a.active {
background-color: rgba(29, 183, 153, 0.3);
    color: #1DB799;
    font-weight: bold;
        }

        .dropdown-content.show {
            display: block;
        }

        /* 游戏容器样式 */
        .container {
            max-width: 1050px;
            width: 100%;
            background-color: hsl(147deg 30.77% 84.71%);
            border-radius: 12px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.3);
            overflow: hidden;
            margin: 80px auto 20px;
            padding: 20px;
            position: relative;
        }

        .container::before,
        .container::after {
            content: '';
            position: absolute;
            width: 25px;
            height: 25px;
            border-radius: 5px 15px 5px 15px;
            z-index: 1;
            opacity: 0.8;
            filter: blur(0.5px);
            animation: float 6s ease-in-out infinite;
        }

        .container::before {
            top: -8px;
            right: -8px;
            background: #ffd700;
        }

        .container::after {
            bottom: -8px;
            left: -8px;
            background: #ff6b6b;
            border-radius: 5px 15px 5px 15px;
        }

        @keyframes float {
            0%, 100% {
                transform: translateY(0) scale(1);
            }
            50% {
                transform: translateY(-3px) scale(1.1);
            }
        }

        header {
            text-align: center;
            margin-bottom: 20px;
        }

        h1 {
            font-size: 2.5rem;
            margin-bottom: 10px;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
            color: #1a73d9;
        }

        .game-info,  .original-image {
            display: none;
        }

        .instructions {
            text-align: center;
            margin-bottom: 20px;
            font-size: 1.2rem;
            background-color: rgba(255, 255, 255, 0.1);
            padding: 15px;
            border-radius: 10px;
            color: #1a73d9;
        }

        .game-area {
            position: relative;
            width: 100%;
            height: 600px;
            background-color: rgba(0, 0, 0, 0.2);
            border-radius: 10px;
            overflow: hidden;
            margin-bottom: 20px;
        }

        .puzzle-container {
            position: relative;
            width: 100%;
            height: 100%;
            margin: 0 auto;
            background-color: rgba(255, 255, 255, 0.9);
            border: 2px solid rgba(255, 255, 255, 0.2);
            border-radius: 8px;
            overflow: hidden;
        }

        .puzzle-piece {
            position: absolute;
            cursor: pointer;
            transition: transform 0.2s, box-shadow 0.2s, left 0.3s, top 0.3s;
            background-size: cover;
            box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
            user-select: none;
            touch-action: none;
            transform-origin: center;
            will-change: transform;
        }

        .puzzle-piece.selected {
            box-shadow: 0 0 0 3px #ffd700;
            z-index: 50;
        }

        .puzzle-piece.correct {
            box-shadow: 0 0 0 3px #47b47d;
            cursor: default;
            opacity: 0.9;
        }

        .puzzle-piece.swapping {
            transition: left 0.5s, top 0.5s;
            z-index: 100;
        }

        .controls {
            display: flex;
            justify-content: center;
            gap: 15px;
            margin-top: 20px;
            flex-wrap: wrap;
        }

        button {
            background: linear-gradient(to right, #47b47d, #3a9c69);
            border: none;
            color: white;
            padding: 12px 25px;
            font-size: 1.1rem;
            border-radius: 50px;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
            min-width: 120px;
        }

        button:hover {
            transform: translateY(-3px);
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
        }

        button:active {
            transform: translateY(1px);
        }

        /* 提示文本样式 */
        .hint-text {
            position: absolute;
            top: 90%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: white;
            font-size: 1.4rem;
            text-align: center;
            padding: 15px 30px;
            border-radius: 50px;
            z-index: 10;
            animation: pulse 2s infinite;
            pointer-events: none;
            background-color: rgba(0, 0, 0, 0.5);
        }

        @keyframes pulse {
            0%, 100% { opacity: 0.7; }
            50% { opacity: 1; }
        }

        /* 成功动画样式 */
        .success-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.7);
            z-index: 2000;
            display: none;
            justify-content: center;
            align-items: center;
            animation: fadeIn 0.5s ease-out;
        }

        .success-content {
            background: linear-gradient(135deg, #47b47d, #3a9c69);
            padding: 40px;
            border-radius: 20px;
            text-align: center;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
            max-width: 500px;
            width: 90%;
            position: relative;
            z-index: 2001;
            animation: popIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
        }

        .success-checkmark {
            width: 100px;
            height: 100px;
            margin: 0 auto 20px;
            position: relative;
        }

        .success-checkmark__circle {
            stroke-dasharray: 166;
            stroke-dashoffset: 166;
            stroke-width: 3;
            stroke-miterlimit: 10;
            stroke: #fff;
            fill: none;
            animation: stroke 0.8s cubic-bezier(0.65, 0, 0.45, 1) forwards;
        }

        .success-checkmark__check {
            transform-origin: 50% 50%;
            stroke-dasharray: 48;
            stroke-dashoffset: 48;
            animation: stroke 0.5s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
        }

        .success-text {
            font-size: 2rem;
            margin-bottom: 10px;
            color: white;
        }

        .success-subtext {
            font-size: 1.2rem;
            margin-bottom: 20px;
            color: rgba(255, 255, 255, 0.9);
        }

        .success-stats {
            display: flex;
            justify-content: space-around;
            margin-bottom: 25px;
            font-size: 1.1rem;
            flex-wrap: wrap;
            gap: 10px;
        }

        .success-stats div {
            background: rgba(255, 255, 255, 0.2);
            padding: 10px 15px;
            border-radius: 10px;
            min-width: 120px;
        }

        .success-close {
            background: rgba(255, 255, 255, 0.2);
            color: white;
            border: none;
            padding: 12px 25px;
            border-radius: 50px;
            font-size: 1.1rem;
            cursor: pointer;
            transition: all 0.3s;
        }

        .success-close:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: translateY(-3px);
        }

        /* 粒子效果样式 */
        .confetti {
            position: fixed;
            top: 0;
            left: 0;
            pointer-events: none;
            z-index: 2002;
        }

        @keyframes stroke {
            100% {
                stroke-dashoffset: 0;
            }
        }

        @keyframes popIn {
            0% { transform: scale(0.8); opacity: 0; }
            100% { transform: scale(1); opacity: 1; }
        }

        @keyframes fadeIn {
            0% { opacity: 0; }
            100% { opacity: 1; }
        }

        footer {
            margin-top: 30px;
            text-align: center;
            font-size: 0.9rem;
            opacity: 0.7;
        }

        /* 方格编号位置 */
        .piece-number {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background-color: rgba(41, 184, 133, 0.7);
            color: white;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 25px;
            font-weight: bold;
            pointer-events: none;
            opacity: 0;
            transition: opacity 0.3s;
            z-index: 10;
        }

        .piece-number.show {
            opacity: 1;
        }

        .complete-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-size: cover;
            background-position: center;
            display: none;
            z-index: 5;
        }

        /* 翻页按钮样式 */
        .page-nav-buttons {
            position: fixed;
            bottom: 30px;
            left: 0;
            right: 0;
            display: flex;
            justify-content: space-between;
            padding: 0 30px;
            z-index: 999;
            pointer-events: none;
        }

        .page-nav-btn {
            width: 60px;
            height: 60px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            color: #fff;
            cursor: pointer;
            opacity: 0.7;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
            pointer-events: auto;
            background: linear-gradient(145deg, #47b47d, #3a9c69);
        }

        .page-nav-btn:hover {
            opacity: 1;
            transform: scale(1.1);
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
        }

        .page-nav-btn a {
            color: white;
            text-decoration: none;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 100%;
            height: 100%;
        }

        /* 帮助弹窗样式 */
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.7);
            z-index: 2000;
            justify-content: center;
            align-items: center;
            backdrop-filter: blur(5px);
        }

        .modal-content {
            background: linear-gradient(135deg, #418577, #5ba897);
            padding: 30px;
            border-radius: 18px;
            width: 90%;
            max-width: 500px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
            position: relative;
            border: 1px solid rgba(255, 255, 255, 0.2);
            animation: modalFadeIn 0.3s ease-out;
            overflow: hidden;
            font-family: 'Jolly Lodger', sans-serif;
        }

        @keyframes modalFadeIn {
            from { opacity: 0; transform: scale(0.9); }
            to { opacity: 1; transform: scale(1); }
        }

        .modal-content h2 {
            color: #ffd700;
            margin-bottom: 15px;
            border-bottom: 2px solid rgba(255, 255, 255, 0.3);
            padding-bottom: 10px;
            text-align: center;
        }

        .modal-content p {
            margin-bottom: 15px;
            line-height: 1.6;
            color: #f0f8ff;
        }

        .close-help {
            position: absolute;
            top: -20px;
            right: 20px;
            font-size: 80px;
            cursor: pointer;
            color: #f0f8ff;
            transition: color 0.3s;
            font-family: "Jolly";
        }

        .close-help:hover {
            color: #ffd700;
        }

        /* 优化按钮样式 */
        .controls button {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            background: linear-gradient(to right, #47b47d, #3a9c69);
            border: none;
            color: white;
            padding: 12px 25px;
            font-size: 1.1rem;
            border-radius: 50px;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        }
        
        .controls button i {
            font-size: 1.2rem;
        }
        
        .controls button:hover {
            transform: translateY(-3px);
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
            background: linear-gradient(to right, #3a9c69, #47b47d);
        }
        
        .controls button:active {
            transform: translateY(1px);
        }

        /* 旋转开关样式 */
        .rotate-toggle {
            background: linear-gradient(to right, #47b47d, #3a9c69);
            border: none;
            color: white;
            padding: 12px 25px;
            font-size: 1.1rem;
            border-radius: 50px;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }
        
        .rotate-toggle:hover {
            transform: translateY(-3px);
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
        }
        
        .rotate-toggle.active {
            background: linear-gradient(to right, #ff6b6b, #ff5252);
        }
        
        .rotate-toggle.active i {
            animation: spin 2s linear infinite;
        }
        
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        /* 移动端旋转按钮 - 在选中图块中心显示 */
        .mobile-rotate-btn {
            position: absolute;
            width: 60px;
            height: 60px;
            border-radius: 50%;
            background: rgba(255, 107, 107, 0.85);
            color: white;
            border: none;
            font-size: 24px;
            cursor: pointer;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
            z-index: 60;
            transition: all 0.3s ease;
            transform: translate(-50%, -50%);
            animation: fadeInScale 0.3s ease-out;
            justify-content: center;
            align-items: center;
            display: flex;
        }

        @keyframes fadeInScale {
            from {
                opacity: 0;
                transform: translate(-50%, -50%) scale(0.5);
            }
            to {
                opacity: 1;
                transform: translate(-50%, -50%) scale(1);
            }
        }

        .mobile-rotate-btn:hover {
            transform: translate(-50%, -50%) scale(1.1);
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
        }

        .mobile-rotate-btn.active {
            background: rgba(255, 107, 107, 0.95);
            animation: pulse 1.5s infinite;
        }

        /* 旋转提示样式 */
        .rotate-hint {
            position: absolute;
            bottom: 100px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(0, 0, 0, 0.7);
            color: white;
            padding: 8px 15px;
            border-radius: 20px;
            font-size: 14px;
            z-index: 100;
            display: none;
            pointer-events: none;
        }
        
        /* 禁用状态样式 */
        .rotate-toggle.disabled {
            background: linear-gradient(to right, #cccccc, #aaaaaa);
            cursor: not-allowed;
        }
        
        .rotate-toggle.disabled:hover {
            transform: none;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        }

        /* 移动端样式 */
        @media (max-width: 768px) {
            /* 显示移动端旋转按钮 */
            .mobile-rotate-btn {
                display: flex;
            }
            
            .top-navbar {
                padding: 10px 15px;
            }
            
            .nav-left a, .nav-right a {
                padding: 10px;
                width: 44px;
                height: 44px;
                justify-content: center;
            }
            
            .nav-left, .nav-right {
                gap: 10px;
            }
            
            .container {
                margin-top: 70px;
                padding: 15px;
            }
            
            .game-area {
                height: 400px;
            }
            
            .controls {
                flex-direction: row;
                align-items: center;
                flex-wrap: wrap;
                gap: 10px;
            }
            
            button {
                width: auto;
                padding: 12px 16px;
                border-radius: 50px;
                font-size: 15px;
                min-width: 100px;
            }
            
            .page-nav-buttons {
                padding: 0 15px;
            }
            
            .page-nav-btn {
                width: 50px;
                height: 50px;
                font-size: 20px;
            }
            
            .success-checkmark {
                width: 90px;
                height: 90px;
            }
            
            .success-text {
                font-size: 24px;
            }
            
            .container::before,
            .container::after {
                width: 20px;
                height: 20px;
            }
            
            .container::before {
                top: -6px;
                right: -6px;
            }
            
            .container::after {
                bottom: -6px;
                left: -6px;
            }
            
            .hint-text {
                font-size: 1.2rem;
                padding: 10px 20px;
            }
            
            /* 优化移动端下拉菜单 */
            .dropdown-content {
                min-width: 140px;
                right: -10px;
            }
            
            .dropdown-content a {
                padding: 10px 14px;
                font-size: 14px;
                width: 100%;
            }
        }

        @media (max-width: 480px) {
            .top-navbar {
                padding: 8px 10px;
            }
            
            .nav-left a, .nav-right a {
                padding: 8px;
                width: 40px;
                height: 40px;
            }
            
            .container {
                margin-top: 60px;
                padding: 10px;
            }
            
            .game-area {
                height: 350px;
            }
            
            .controls {
                gap: 8px;
            }
            
            button {
                padding: 10px 12px;
                font-size: 15px;
                min-width: 90px;
            }
            
            .top-navbar.scrolled {
                flex-direction: column;
                width: 40px;
                right: 5px;
                left: auto;
                padding: 10px;
                align-items: flex-end;
                gap: 5px;
            }

            .page-nav-buttons {
                padding: 0 10px;
            }

            .page-nav-btn {
                width: 45px;
                height: 45px;
                font-size: 18px;
            }

            .success-checkmark {
                width: 70px;
                height: 70px;
            }

            .success-text {
                font-size: 20px;
            }
            
            .container::before,
            .container::after {
                width: 18px;
                height: 18px;
            }
            
            .container::before {
                top: -5px;
                right: -5px;
            }
            
            .container::after {
                bottom: -5px;
                left: -5px;
            }
            
            .hint-text {
                font-size: 1rem;
                padding: 8px 15px;
                width: 100%;
            }
            
            /* 优化小屏幕下拉菜单 */
            .dropdown-content {
                min-width: 120px;
                right: -15px;
            }
            
            .dropdown-content a {
                padding: 8px 12px;
                font-size: 13px;
                width: 100%;
            }
            
            .mobile-rotate-btn {
                width: 50px;
                height: 50px;
                font-size: 20px;
            }
        }

        /* 背景音乐播放器样式 */
        .music-player {
            display: none;
        }

        .copyright {
            text-align: center;
            color: #3F786B;
            font-size: 20px;
            margin-top: 20px;
            font-family: Jolly;
        }

        .bianhao {
            text-align:left;
            color:#f0f8ff;
            font-size:16px;
            font-family:Jolly;
        }
        
        /* 极窄屏幕适配 */
        @media (max-width: 360px) {
            .container {
                margin-top: 55px;
                padding: 8px;
            }
            
            .game-area {
                height: 300px;
            }
            
            .controls {
                flex-direction: column;
                align-items: center;
            }
            
            button {
                width: 100%;
                margin-bottom: 5px;
                min-width: auto;
            }
            
            .page-nav-btn {
                width: 40px;
                height: 40px;
                font-size: 16px;
            }
            
            .hint-text {
                font-size: 0.9rem;
                padding: 6px 12px;
            }
            
            .mobile-rotate-btn {
                width: 45px;
                height: 45px;
                font-size: 18px;
            }
        }
        
        /* 横屏适配 */
        @media (max-height: 500px) and (orientation: landscape) {
            .container {
                margin-top: 60px;
            }
            
            .game-area {
                height: 300px;
            }
            
            .page-nav-buttons {
                bottom: 15px;
            }
            
            .controls {
                margin-top: 10px;
            }
        }
        
        /* 超大屏幕适配 */
        @media (min-width: 1200px) {
            .container {
                max-width: 1050px;
            }
            
            .game-area {
                height: 576px;
            }
        }
        
        /* 超小屏幕适配 */
        @media (max-width: 320px) {
            .top-navbar {
                padding: 6px 8px;
            }
            
            .nav-left a, .nav-right a {
                padding: 6px;
                width: 36px;
                height: 36px;
            }
            
            .container {
                margin-top: 50px;
                padding: 5px;
            }
            
            .game-area {
                height: 280px;
            }
            
            button {
                padding: 8px 10px;
                font-size: 14px;
                min-width: 80px;
            }
        }
        
        /* 音乐播放动画 */
        @keyframes blink {
            0%, 100% { 
                color: #f0f8ff; 
                text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
            }
            50% { 
                color: #ffd700; 
                text-shadow: 0 0 15px #ffd700, 0 0 25px #ffd700;
            }
        }

        .music-playing {
            animation: blink 0.8s infinite;
        }

        /* 优化触摸设备交互 */
        @media (hover: none) and (pointer: coarse) {
            .puzzle-piece {
                cursor: pointer;
            }
            
            button:hover, .nav-left a:hover, .nav-right a:hover {
                transform: none;
            }
            
            .rotate-toggle.active i {
                animation: none;
            }
        }