        /* Base styles */
        :root {
            --primary-color: #3498db;
            --secondary-color: #e74c3c;
            --text-color: #2c3e50;
            --bg-color: #f5f5f5;
            --card-shadow: 0 2px 4px rgba(0,0,0,0.1);
            --hover-shadow: 0 4px 8px rgba(0,0,0,0.2);
        }

                body {
            font-family: 'Rubik', sans-serif;
            line-height: 1.6;
            color: var(--text-color);
            margin: 0;
            padding: 0;
            background-color: var(--bg-color);
        }

                /* Header Styles */
                .header {
                    background: #fff;
                    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
                    position: sticky;
                    top: 0;
                    z-index: 1000;
                }
                .nav-container {
                    display: flex;
                    justify-content: space-between;
                    align-items: center;
                    padding: 1rem 2rem;
                    max-width: 1200px;
                    margin: 0 auto;
                }
                .logo {
                    color: #2c3e50;
                    text-decoration: none;
                    font-size: 1.5rem;
                    font-weight: bold;
                }
                .nav-links {
                    display: flex;
                    gap: 2rem;
                    list-style: none;
                    margin: 0;
                    padding: 0;
                }
                .nav-links a {
                    color: #2c3e50;
                    text-decoration: none;
                    transition: color 0.3s ease;
                }
                .nav-links a:hover {
                    color: #3498db;
                }
                .nav-links a.active {
                    color: #3498db;
                    font-weight: 500;
                }
        
        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px;
            width: 90%;
        }
        
        /* Hero Section */
        .hero {
            background: linear-gradient(135deg, var(--primary-color), #2980b9);
            color: white;
            padding: 80px 0;
            text-align: center;
            position: relative;
            overflow: hidden;
        }

        .hero::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect fill="rgba(255,255,255,0.1)" x="0" y="0" width="50" height="50"/><rect fill="rgba(255,255,255,0.1)" x="50" y="50" width="50" height="50"/></svg>');
            background-size: 30px 30px;
            opacity: 0.3;
        }

        /* Sections */
        .section {
            padding: 80px 0;
            background-color: white;
            margin-bottom: 30px;
            border-radius: 12px;
            box-shadow: var(--card-shadow);
        }

        .section h2 {
            margin-bottom: 25px;
            padding: 0 40px;
        }

        .section p {
            padding: 0 40px;
            line-height: 1.8;
            color: #555;
            font-size: 1.1em;
        }

        @media (max-width: 768px) {
            .section h2 {
                padding: 0 25px;
            }

            .section p {
                padding: 0 25px;
            }
        }

        @media (max-width: 480px) {
            .section h2 {
                padding: 0 20px;
            }

            .section p {
                padding: 0 20px;
            }
        }

        /* Features Grid */
        .features {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 30px;
            padding: 20px;
        }
        
        .feature-card {
            background: #fff;
            padding: 30px;
            border-radius: 12px;
            box-shadow: var(--card-shadow);
            transition: all 0.3s ease;
            text-align: center;
            position: relative;
            overflow: hidden;
        }
        
        .feature-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 4px;
            background: var(--primary-color);
            transform: scaleX(0);
            transition: transform 0.3s ease;
        }
        
        .feature-card:hover::before {
            transform: scaleX(1);
        }
        
        .feature-card:hover {
            transform: translateY(-5px);
            box-shadow: var(--hover-shadow);
        }

        .feature-card .icon {
            font-size: 2.5em;
            margin-bottom: 20px;
            color: var(--primary-color);
            transition: transform 0.3s ease;
        }

        .feature-card:hover .icon {
            transform: scale(1.1);
        }

        /* Testimonials */
        .testimonial-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 30px;
            padding: 20px;
        }
        
        .testimonial-card {
            background: #fff;
            padding: 30px;
            border-radius: 12px;
            box-shadow: var(--card-shadow);
            position: relative;
        }

        .testimonial-card::before {
            content: '"';
            position: absolute;
            top: 20px;
            left: 20px;
            font-size: 4em;
            color: var(--primary-color);
            opacity: 0.2;
            font-family: Georgia, serif;
        }

        /* FAQ Section */
        .faq-section {
            max-width: 100%;
            margin: 0 auto;
            padding: 80px 0;
        }

        .faq-section h2 {
            text-align: center;
            margin-bottom: 40px;
        }

        .faq-container {
            max-width: 800px;
            margin: 0 auto;
            padding: 0 20px;
        }
        
        .faq-item {
            margin-bottom: 30px;
            background: white;
            border-radius: 8px;
            padding: 20px;
            box-shadow: var(--card-shadow);
        }

        .faq-item h3 {
            margin: 0 0 15px 0;
            color: var(--text-color);
            font-weight: 600;
        }

        .faq-item p {
            margin: 0;
            color: #666;
            line-height: 1.6;
        }

        @media (max-width: 768px) {
            .faq-container {
                padding: 0 15px;
            }
        }

        @media (max-width: 480px) {
            .faq-container {
                padding: 0 10px;
            }
        }

        /* CTA Button */
        .cta-button {
            display: inline-block;
            padding: 15px 40px;
            background-color: var(--secondary-color);
            color: white;
            text-decoration: none;
            border-radius: 50px;
            margin-top: 20px;
            transition: all 0.3s ease;
            font-weight: bold;
            text-transform: uppercase;
            letter-spacing: 1px;
            box-shadow: 0 4px 15px rgba(231, 76, 60, 0.2);
            cursor: pointer;
            border: none;
            outline: none;
            user-select: none;
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
        }
        
        .cta-button:hover {
            background-color: #c0392b;
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(231, 76, 60, 0.3);
        }

        .cta-button:active {
            transform: translateY(1px);
            box-shadow: 0 2px 10px rgba(231, 76, 60, 0.2);
        }

        .calculate-btn {
            background-color: var(--primary-color);
        }

        .calculate-btn:hover {
            background-color: #2980b9;
        }

        .clear-btn {
            background-color: #95a5a6;
        }

        .clear-btn:hover {
            background-color: #7f8c8d;
        }

        /* Game Board Styles */
        .game-section {
            background: #f5f6fa;
            padding: 60px 0;
            margin-bottom: 30px;
            border-bottom: 1px solid #dcdde1;
        }

        .game-title {
            color: #2c3e50;
            text-align: center;
            margin-bottom: 40px;
        }

        .game-title h1 {
            font-size: 3.5em;
            font-weight: 700;
            letter-spacing: -0.5px;
            margin-bottom: 15px;
            color: #2c3e50;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
        }

        .game-title p {
            font-size: 1.2em;
            font-weight: 400;
            color: #576574;
            max-width: 600px;
            margin: 0 auto;
        }

        .game-board {
            background: white;
            padding: 40px;
            border-radius: 15px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
            max-width: 800px;
            margin: 0 auto;
        }

        /* Responsive adjustments */
        @media (max-width: 768px) {
            .game-title h1 {
                font-size: 2.5em;
            }

            .game-title p {
                font-size: 1.1em;
                padding: 0 20px;
            }

            .game-board {
                padding: 20px;
                margin: 0 15px;
            }
        }

        @media (max-width: 480px) {
            .game-title h1 {
                font-size: 2em;
            }

            .game-board {
                padding: 15px;
            }
        }

        .game-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 20px;
        }

        .board-grid {
            display: grid;
            grid-template-columns: repeat(8, 1fr);
            gap: 2px;
            width: 384px; /* 默认网页端尺寸 */
            background: #f8f9fa;
            padding: 10px;
            border-radius: 8px;
            margin: 0 auto;
            aspect-ratio: 1;
            box-sizing: border-box;
        }

        .shape-grids {
            display: flex;
            justify-content: center;
            gap: 20px;
            margin: 20px 0;
            flex-wrap: wrap;
        }

        .shape-grid {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 2px;
            width: 120px;
            background: #f8f9fa;
            padding: 8px;
            border-radius: 6px;
            aspect-ratio: 1;
        }

        .board-cell {
            aspect-ratio: 1;
            background: #fff;
            border-radius: 4px;
            cursor: pointer;
            transition: all 0.2s ease;
            border: 2px solid #ddd;
            border-style: solid;
        }
        
        .shape-grid .board-cell.selected {
            border-style: solid;
        }

        .shape-grid:nth-child(1) .board-cell.selected {
            background-color: #e74c3c;
            border-color: #e74c3c;
        }

        .shape-grid:nth-child(2) .board-cell.selected {
            background-color: #2ecc71;
            border-color: #2ecc71;
        }

        .shape-grid:nth-child(3) .board-cell.selected {
            background-color: #3498db;
            border-color: #3498db;
        }

        /* Hover effects */
        .shape-grid:nth-child(1) .board-cell:hover {
            border-color: #e74c3c;
            background: rgba(231, 76, 60, 0.1);
        }

        .shape-grid:nth-child(2) .board-cell:hover {
            border-color: #2ecc71;
            background: rgba(46, 204, 113, 0.1);
        }

        .shape-grid:nth-child(3) .board-cell:hover {
            border-color: #3498db;
            background: rgba(52, 152, 219, 0.1);
        }

        .board-cell.selected {
            transform: scale(0.95);
        }

        .board-controls {
            display: flex;
            gap: 15px;
            margin-top: 20px;
        }

        .board-controls .cta-button {
            padding: 10px 20px;
            font-size: 0.9em;
            margin: 0;
        }

        .calculate-btn {
            background-color: var(--primary-color);
        }

        .clear-btn {
            background-color: #95a5a6;
        }

        .clear-btn:hover {
            background-color: #7f8c8d;
        }

        /* How to Use Section */
        .how-to-use {
            padding: 80px 0;
        }

        .how-to-use ol {
            padding: 0 40px;
            margin: 30px 40px;
            counter-reset: item;
            list-style-type: none;
        }

        .how-to-use li {
            position: relative;
            padding: 15px 0 15px 45px;
            color: #555;
            line-height: 1.6;
            counter-increment: item;
            border-bottom: 1px solid #eee;
        }

        .how-to-use li:last-child {
            border-bottom: none;
        }

        .how-to-use li::before {
            content: counter(item);
            position: absolute;
            left: 0;
            top: 50%;
            transform: translateY(-50%);
            width: 30px;
            height: 30px;
            background-color: var(--primary-color);
            color: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            font-size: 0.9em;
        }

        .how-to-use p {
            padding: 0 40px;
            color: #555;
            line-height: 1.8;
            margin-top: 25px;
        }

        @media (max-width: 768px) {
            .how-to-use ol {
                margin: 25px 25px;
                padding: 0 25px;
            }
            
            .how-to-use p {
                padding: 0 25px;
            }
        }

        @media (max-width: 480px) {
            .how-to-use ol {
                margin: 20px 20px;
                padding: 0 20px;
            }
            
            .how-to-use p {
                padding: 0 20px;
            }
        }

        .how-to-use-steps {
            list-style: none;
            padding: 0;
            margin: 0;
            max-width: 800px;
            margin: 0 auto;
        }

        .how-to-use-steps li {
            margin-bottom: 40px;
            text-align: center;
        }

        .step-content {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 20px;
        }

        .step-text {
            font-size: 1.2em;
            color: #555;
            line-height: 1.6;
            margin-bottom: 15px;
            padding: 0 20px;
        }

        .step-image {
            width: 100%;
            max-width: 600px;
            height: auto;
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        }

        .step-image img {
            width: 100%;
            height: auto;
            display: block;
        }

        @media (max-width: 768px) {
            .step-image {
                max-width: 90%;
            }
            
            .step-text {
                font-size: 1.1em;
            }
        }

        /* Tips Section */
        .tips-section {
            margin-top: 40px;
        }

        .tips-section ul {
            padding: 0 40px;
            list-style-type: none;
        }

        .tips-section li {
            position: relative;
            padding: 15px 0 15px 35px;
            border-bottom: 1px solid #eee;
            color: #555;
            line-height: 1.6;
        }

        .tips-section li:last-child {
            border-bottom: none;
        }

        .tips-section li::before {
            content: '\f058';
            font-family: 'Font Awesome 5 Free';
            font-weight: 900;
            color: var(--primary-color);
            position: absolute;
            left: 0;
            top: 50%;
            transform: translateY(-50%);
        }

        /* Footer Styles */
        .footer {
            background-color: #2c3e50;
            color: white;
            padding: 60px 0 30px;
            margin-top: 40px;
        }

        .footer-content {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 40px;
            margin-bottom: 40px;
        }

        .footer-section {
            padding: 0 20px;
        }

        .footer-section h3 {
            color: white;
            margin-bottom: 20px;
            font-size: 1.2em;
        }

        .footer-links {
            list-style: none;
            padding: 0;
            margin: 0;
        }

        .footer-links li {
            margin-bottom: 12px;
        }

        .footer-links a {
            color: rgba(255, 255, 255, 0.8);
            text-decoration: none;
            transition: color 0.3s ease;
        }

        .footer-links a:hover {
            color: white;
        }

        .footer-bottom {
            text-align: center;
            padding-top: 30px;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            color: rgba(255, 255, 255, 0.6);
            font-size: 0.9em;
        }

        .social-links {
            display: flex;
            gap: 15px;
            margin-top: 15px;
        }

        .social-links a {
            color: rgba(255, 255, 255, 0.8);
            font-size: 1.5em;
            transition: color 0.3s ease;
        }

        .social-links a:hover {
            color: white;
        }

        @media (max-width: 768px) {
            .footer-content {
                gap: 30px;
            }

            .footer-section {
                padding: 0 15px;
            }
        }

        /* Features Section */
        .section.features {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 30px;
            padding: 40px;
            background: white;
            margin: 40px auto;
            max-width: 1200px;
            border-radius: 15px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }
        
        .feature-card {
            background: white;
            padding: 30px;
            border-radius: 12px;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
            transition: all 0.3s ease;
            text-align: center;
            position: relative;
            overflow: hidden;
            border: 1px solid #eee;
        }
        
        .feature-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 4px;
            background: var(--primary-color);
            transform: scaleX(0);
            transition: transform 0.3s ease;
        }
        
        .feature-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
        }
        
        .feature-card:hover::before {
            transform: scaleX(1);
        }

        .feature-card .icon {
            font-size: 2.5em;
            margin-bottom: 20px;
            color: var(--primary-color);
            transition: transform 0.3s ease;
            display: inline-block;
        }

        .feature-card:hover .icon {
            transform: scale(1.1);
        }

        .feature-card h3 {
            color: #2c3e50;
            font-size: 1.5em;
            margin-bottom: 15px;
            font-weight: 600;
        }

        .feature-card p {
            color: #576574;
            line-height: 1.6;
            margin: 0;
            font-size: 1.1em;
        }

        /* Responsive adjustments for features */
        @media (max-width: 768px) {
            .section.features {
                padding: 20px;
                margin: 20px 15px;
                gap: 20px;
            }

            .feature-card {
                padding: 20px;
            }

            .feature-card h3 {
                font-size: 1.3em;
            }

            .feature-card p {
                font-size: 1em;
            }
        }

        @media (max-width: 480px) {
            .section.features {
                grid-template-columns: 1fr;
                padding: 15px;
            }
        }

        /* 移动端适配 */
        @media (max-width: 768px) {
            .game-board {
                padding: 15px;
                margin: 0 10px;
            }

            .board-grid {
                width: calc(100vw - 50px); /* 移动端充满屏幕宽度，减去边距 */
                max-width: 384px; /* 但不超过原始尺寸 */
            }

            .shape-grids {
                gap: 15px;
            }

            .shape-grid {
                width: 100px;
            }
        }

        /* 小屏幕手机适配 */
        @media (max-width: 480px) {
            .game-board {
                padding: 10px;
            }

            .shape-grids {
                flex-direction: column;
                align-items: center;
                gap: 15px;
            }

            .shape-grid {
                width: 150px; /* 在垂直排列时可以适当放大 */
            }

            .board-controls {
                width: 100%;
            }

            .board-controls .cta-button {
                flex: 1;
                white-space: nowrap;
            }
        }

        /* 中等屏幕优化 */
        @media (min-width: 481px) and (max-width: 768px) {
            .shape-grids {
                justify-content: center;
            }

            .shape-grid {
                width: calc((100% - 30px) / 3); /* 三等分宽度，减去间隔 */
                min-width: 100px;
            }
        }

        /* 横屏模式优化 */
        @media (max-height: 500px) and (orientation: landscape) {
            .game-container {
                flex-direction: row;
                align-items: flex-start;
                justify-content: center;
                gap: 20px;
            }

            .board-grid {
                margin: 0;
                width: min(45vh, 384px); /* 使用视口高度，但不超过原始尺寸 */
            }

            .shape-grids {
                flex-direction: column;
                margin: 0;
                gap: 10px;
            }

            .shape-grid {
                width: min(15vh, 100px);
            }
        }
