
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Microsoft YaHei', Arial, sans-serif;
            background: linear-gradient(135deg, #87CEEB 0%, #98FB98 50%, #F0E68C 100%);
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 10px;
            user-select: none;
        }

        /* 顶部Logo区域 */
        .logo-header {
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(255, 255, 255, 0.9);
            padding: 10px 20px;
            border-radius: 20px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
            margin-bottom: 15px;
            width: 100%;
            max-width: 500px;
        }

        .logo {
            font-size: 32px;
            margin-right: 10px;
            color: #2E8B57;
        }

        .logo-text {
            font-size: 20px;
            font-weight: bold;
            color: #2E8B57;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
        }

        .header {
            text-align: center;
            margin-bottom: 20px;
            background: rgba(255, 255, 255, 0.9);
            padding: 15px;
            border-radius: 20px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
            width: 100%;
            max-width: 500px;
        }

        .title {
            font-size: 28px;
            color: #2E8B57;
            font-weight: bold;
            margin-bottom: 10px;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
        }

        .game-info {
            display: flex;
            justify-content: space-around;
            align-items: center;
            flex-wrap: wrap;
            gap: 15px;
            margin-bottom: 15px;
        }

        .info-item {
            background: #FFD700;
            padding: 8px 15px;
            border-radius: 15px;
            font-weight: bold;
            color: #2E8B57;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            font-size: 16px;
        }

        .teacher {
            position: absolute;
            top: 20px;
            right: 20px;
            font-size: 40px;
            animation: bounce 2s infinite;
        }

        @keyframes bounce {
            0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
            40% { transform: translateY(-10px); }
            60% { transform: translateY(-5px); }
        }

        .game-container {
            background: rgba(255, 255, 255, 0.95);
            border-radius: 20px;
            padding: 20px;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
            max-width: 500px;
            width: 100%;
        }

        .grid {
            display: grid;
            grid-template-columns: repeat(6, 1fr);
            gap: 8px;
            margin-bottom: 20px;
            aspect-ratio: 1;
        }

        .cell {
            background: linear-gradient(145deg, #FF6B6B, #FF8E8E);
            border: 3px solid #FFF;
            border-radius: 15px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 18px;
            font-weight: bold;
            color: white;
            cursor: pointer;
            transition: all 0.3s ease;
            position: relative;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
        }

        .cell:hover {
            transform: scale(1.05);
            box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
        }

        .cell.selected {
            background: linear-gradient(145deg, #32CD32, #90EE90);
            transform: scale(1.1);
            border-color: #FFD700;
            border-width: 4px;
            animation: pulse 0.5s ease-in-out;
        }

        .cell.factor {
            background: linear-gradient(145deg, #4169E1, #6495ED);
        }

        .cell.product {
            background: linear-gradient(145deg, #FF6347, #FF7F7F);
        }

        @keyframes pulse {
            0% { transform: scale(1.1); }
            50% { transform: scale(1.2); }
            100% { transform: scale(1.1); }
        }

        @keyframes eliminate {
            0% { transform: scale(1); opacity: 1; }
            50% { transform: scale(1.3) rotate(180deg); opacity: 0.5; }
            100% { transform: scale(0) rotate(360deg); opacity: 0; }
        }

        .cell.eliminating {
            animation: eliminate 0.8s ease-out forwards;
        }

        .controls {
            display: flex;
            justify-content: space-around;
            align-items: center;
            flex-wrap: wrap;
            gap: 10px;
            margin-bottom: 15px;
        }

        .btn {
            background: linear-gradient(145deg, #32CD32, #90EE90);
            color: white;
            border: none;
            padding: 12px 20px;
            border-radius: 25px;
            font-size: 16px;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        }

        .btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
        }

        .btn:active {
            transform: translateY(0);
        }

        .btn.hint {
            background: linear-gradient(145deg, #FFD700, #FFF8DC);
            color: #2E8B57;
        }

        .btn.refresh {
            background: linear-gradient(145deg, #FF6347, #FF7F7F);
        }

        .message {
            text-align: center;
            font-size: 18px;
            font-weight: bold;
            min-height: 25px;
            margin-bottom: 15px;
            color: #2E8B57;
        }

        .formula-display {
            background: #2F4F4F;
            color: #FFD700;
            padding: 10px;
            border-radius: 10px;
            text-align: center;
            font-size: 20px;
            font-weight: bold;
            margin-bottom: 15px;
            min-height: 50px;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.3);
        }

        .progress-bar {
            width: 100%;
            height: 20px;
            background: #E0E0E0;
            border-radius: 10px;
            overflow: hidden;
            margin-bottom: 15px;
        }

        .progress-fill {
            height: 100%;
            background: linear-gradient(90deg, #32CD32, #90EE90);
            transition: width 0.3s ease;
            border-radius: 10px;
        }

        .level-info {
            text-align: center;
            font-size: 16px;
            color: #2E8B57;
            font-weight: bold;
            margin-bottom: 10px;
        }

        .game-over {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 1000;
        }

        .game-over-content {
            background: white;
            padding: 30px;
            border-radius: 20px;
            text-align: center;
            max-width: 400px;
            width: 90%;
        }

        .game-over h2 {
            color: #2E8B57;
            margin-bottom: 20px;
            font-size: 24px;
        }

        .game-over p {
            margin-bottom: 15px;
            font-size: 18px;
            color: #333;
        }

        /* 底部版权信息 */
        .footer {
            text-align: center;
            margin-top: 20px;
            padding: 10px;
            color: #2E8B57;
            font-size: 14px;
            background: rgba(255, 255, 255, 0.8);
            border-radius: 10px;
            width: 100%;
            max-width: 500px;
        }

        @media (max-width: 600px) {
            .title { font-size: 24px; }
            .cell { font-size: 16px; }
            .info-item { font-size: 14px; padding: 6px 12px; }
            .btn { font-size: 14px; padding: 10px 16px; }
            .grid { gap: 6px; }
            .logo-text { font-size: 16px; }
            .logo { font-size: 28px; }
        }

        .hint-highlight {
            animation: hintGlow 1s ease-in-out 3;
        }

        @keyframes hintGlow {
            0%, 100% { box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); }
            50% { box-shadow: 0 0 20px #FFD700, 0 0 30px #FFD700; }
        }

        .success-animation {
            animation: successPop 0.6s ease-out;
        }

        @keyframes successPop {
            0% { transform: scale(1); }
            50% { transform: scale(1.2); }
            100% { transform: scale(1); }
        }
