{
  "case_id": "A2",
  "case_name": "Xbox手柄控制器",
  "prompt": "生成一个精致的Xbox手柄控制器SVG图形，要求：\n1. 完整的按钮布局（ABXY、摇杆、扳机）\n2. 支持鼠标交互（按钮按下效果）\n3. 添加灯光和阴影细节\n4. 单文件HTML实现",
  "result": {
    "success": true,
    "content": "这是一个单文件 HTML 解决方案。它包含一个绘制精细的 SVG Xbox Series X/S 风格手柄，使用了 SVG 滤镜来实现逼真的阴影和灯光，并使用 CSS 来实现按钮的按下和摇杆的交互效果。\n\n你可以直接将以下代码保存为 `.html` 文件并在浏览器中打开。\n\n```html\n<!DOCTYPE html>\n<html lang=\"zh-CN\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>Interactive Xbox Controller SVG</title>\n    <style>\n        body {\n            margin: 0;\n            height: 100vh;\n            display: flex;\n            justify-content: center;\n            align-items: center;\n            background: radial-gradient(circle at center, #2b2b2b 0%, #1a1a1a 100%);\n            font-family: 'Segoe UI', sans-serif;\n        }\n\n        .controller-container {\n            width: 800px;\n            max-width: 100%;\n            filter: drop-shadow(0 20px 30px rgba(0,0,0,0.6));\n        }\n\n        /* 交互动画定义 */\n        .interactive {\n            cursor: pointer;\n            transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1), filter 0.1s;\n            transform-origin: center;\n        }\n\n        /* 按钮按下效果 */\n        .btn-face:active {\n            transform: scale(0.92);\n            filter: brightness(0.8);\n        }\n        \n        .btn-face:active text {\n            opacity: 0.7;\n        }\n\n        /* 摇杆交互 */\n        .stick-group:active .stick-top {\n            transform: translate(0, 5px); /* 模拟向下按压 L3/R3 */\n        }\n        \n        /* 简单的摇杆倾斜模拟 (Hover时) */\n        .stick-group:hover .stick-top {\n            transform: translate(-2px, -2px);\n            transition: transform 0.3s ease;\n        }\n\n        /* D-Pad 交互 */\n        .dpad-btn:active {\n            fill: #151515;\n        }\n        .dpad-group:active {\n            transform: scale(0.98);\n        }\n\n        /* 中间功能键 */\n        .btn-center:active {\n            transform: scale(0.9);\n        }\n\n        /* Xbox Logo 发光效果 */\n        .xbox-btn:hover {\n            filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8));\n        }\n        .xbox-btn:active {\n            transform: scale(0.95);\n        }\n\n        /* 肩键 (虽然在正面看不太清，但模拟点击) */\n        .bumper:active {\n            transform: translateY(2px);\n        }\n    </style>\n</head>\n<body>\n\n    <div class=\"controller-container\">\n        <svg viewBox=\"0 0 800 550\" xmlns=\"http://www.w3.org/2000/svg\">\n            <defs>\n                <!-- 材质：机身磨砂渐变 -->\n                <radialGradient id=\"bodyGradient\" cx=\"50%\" cy=\"30%\" r=\"80%\">\n                    <stop offset=\"0%\" stop-color=\"#3a3a3a\"/>\n                    <stop offset=\"100%\" stop-color=\"#1f1f1f\"/>\n                </radialGradient>\n\n                <!-- 材质：摇杆凹槽阴影 -->\n                <radialGradient id=\"stickSocket\" cx=\"50%\" cy=\"50%\" r=\"50%\">\n                    <stop offset=\"70%\" stop-color=\"#111\"/>\n                    <stop offset=\"100%\" stop-color=\"#2a2a2a\"/>\n                </radialGradient>\n\n                <!-- 材质：摇杆顶部 -->\n                <radialGradient id=\"stickTopGrad\" cx=\"50%\" cy=\"40%\" r=\"60%\">\n                    <stop offset=\"0%\" stop-color=\"#444\"/>\n                    <stop offset=\"100%\" stop-color=\"#222\"/>\n                </radialGradient>\n                \n                <!-- 材质：摇杆边缘纹理 -->\n                <pattern id=\"gripPattern\" x=\"0\" y=\"0\" width=\"4\" height=\"4\" patternUnits=\"userSpaceOnUse\">\n                    <circle cx=\"2\" cy=\"2\" r=\"1\" fill=\"#1a1a1a\"/>\n                </pattern>\n\n                <!-- 滤镜：按钮内阴影 (模拟凹陷) -->\n                <filter id=\"insetShadow\">\n                    <feOffset dx=\"0\" dy=\"2\"/>\n                    <feGaussianBlur stdDeviation=\"2\" result=\"offset-blur\"/>\n                    <feComposite operator=\"out\" in=\"SourceGraphic\" in2=\"offset-blur\" result=\"inverse\"/>\n                    <feFlood flood-color=\"black\" flood-opacity=\"0.7\" result=\"color\"/>\n                    <feComposite operator=\"in\" in=\"color\" in2=\"inverse\" result=\"shadow\"/>\n                    <feComposite operator=\"over\" in=\"shadow\" in2=\"SourceGraphic\"/>\n                </filter>\n\n                <!-- 滤镜：按钮高光 -->\n                <linearGradient id=\"gloss\" x1=\"0%\" y1=\"0%\" x2=\"0%\" y2=\"100%\">\n                    <stop offset=\"0%\" stop-color=\"white\" stop-opacity=\"0.4\"/>\n                    <stop offset=\"50%\" stop-color=\"white\" stop-opacity=\"0.0\"/>\n                </linearGradient>\n\n                <!-- 按钮颜色 -->\n                <radialGradient id=\"btnA\" cx=\"50%\" cy=\"100%\" r=\"100%\"><stop offset=\"0%\" stop-color=\"#4caf50\"/><stop offset=\"100%\" stop-color=\"#2e7d32\"/></radialGradient>\n                <radialGradient id=\"btnB\" cx=\"50%\" cy=\"100%\" r=\"100%\"><stop offset=\"0%\" stop-color=\"#f44336\"/><stop offset=\"100%\" stop-color=\"#c62828\"/></radialGradient>\n                <radialGradient id=\"btnX\" cx=\"50%\" cy=\"100%\" r=\"100%\"><stop offset=\"0%\" stop-color=\"#2196f3\"/><stop offset=\"100%\" stop-color=\"#1565c0\"/></radialGradient>\n                <radialGradient id=\"btnY\" cx=\"50%\" cy=\"100%\" r=\"100%\"><stop offset=\"0%\" stop-color=\"#ffeb3b\"/><stop offset=\"100%\" stop-color=\"#fbc02d\"/></radialGradient>\n            </defs>\n\n            <!-- === 主体 === -->\n            <!-- 轮廓 -->\n            <path d=\"M230,80 \n                     C150,80 80,160 80,280 \n                     C80,450 150,520 200,520 \n                     C240,520 260,480 280,450 \n                     L520,450 \n                     C540,480 560,520 600,520 \n                     C650,520 720,450 720,280 \n                     C720,160 650,80 570,80 \n                     L530,90 L270,90 Z\" \n                  fill=\"url(#bodyGradient)\" stroke=\"#111\" stroke-width=\"2\"/>\n            \n            <!-- 顶部肩键 (LB/RB) -->\n            <path class=\"bumper interactive\" d=\"M230,80 C180,80 130,120 120,180 L270,140 L270,90 Z\" fill=\"#222\" stroke=\"#111\"/>\n            <path class=\"bumper interactive\" d=\"M570,80 C620,80 670,120 680,180 L530,140 L530,90 Z\" fill=\"#222\" stroke=\"#111\"/>\n            \n            <!-- 顶部板机 (LT/RT - 露出的一点点) -->\n            <path d=\"M140,75 L250,85 L230,60 C180,60 150,70 140,75\" fill=\"#151515\"/>\n            <path d=\"M660,75 L550,85 L570,60 C620,60 650,70 660,75\" fill=\"#151515\"/>\n\n            <!-- === 左侧控制区 === -->\n            \n            <!-- 左摇杆 (Left Stick) -->\n            <g class=\"stick-group interactive\" transform=\"translate(220, 200)\">\n                <!-- 底座凹槽 -->\n                <circle cx=\"0\" cy=\"0\" r=\"55\" fill=\"url(#stickSocket)\" filter=\"url(#insetShadow)\"/>\n                <!-- 摇杆杆身 -->\n                <circle class=\"stick-top\" cx=\"0\" cy=\"0\" r=\"35\" fill=\"#1a1a1a\"/>\n                <!-- 摇杆帽 -->\n                <g class=\"stick-top\">\n                    <circle cx=\"0\" cy=\"0\" r=\"35\" fill=\"url(#stickTopGrad)\" stroke=\"#111\" stroke-width=\"1\"/>\n                    <circle cx=\"0\" cy=\"0\" r=\"28\" fill=\"none\" stroke=\"url(#gripPattern)\" stroke-width=\"6\" opacity=\"0.5\"/>\n                    <circle cx=\"0\" cy=\"0\" r=\"25\" fill=\"#222\" opacity=\"0.3\"/> <!-- 凹陷感 -->\n                </g>\n            </g>\n\n            <!-- 十字键 (D-Pad) - Series X 碟形设计 -->\n            <g class=\"dpad-group interactive\" transform=\"translate(280, 340)\">\n                <!-- 碟形底座 -->\n                <circle cx=\"0\" cy=\"0\" r=\"45\" fill=\"#181818\" stroke=\"#333\" stroke-width=\"1\" filter=\"url(#insetShadow)\"/>\n                <!-- 十字按键 -->\n                <path class=\"dpad-btn\" d=\"M-12,-38 L12,-38 L15,-15 L38,-12 L38,12 L15,15 L12,38 L-12,38 L-15,15 L-38,12 L-38,-12 L-15,-15 Z\" \n                      fill=\"#222\" stroke=\"#000\" stroke-width=\"0.5\"/>\n                <!-- 内部细节 -->\n                <path d=\"M-5,-25 L5,-25 L5,-10 L25,-5 L25,5 L5,10 L5,25 L-5,25 L-5,10 L-25,5 L-25,-5 L-5,-10 Z\" fill=\"#111\"/>\n            </g>\n\n            <!-- === 右侧控制区 === -->\n\n            <!-- 右摇杆 (Right Stick) -->\n            <g class=\"stick-group interactive\" transform=\"translate(500, 340)\">\n                <circle cx=\"0\" cy=\"0\" r=\"55\" fill=\"url(#stickSocket)\" filter=\"url(#insetShadow)\"/>\n                <circle class=\"stick-top\" cx=\"0\" cy=\"0\" r=\"35\" fill=\"#1a1a1a\"/>\n                <g class=\"stick-top\">\n                    <circle cx=\"0\" cy=\"0\" r=\"35\" fill=\"url(#stickTopGrad)\" stroke=\"#111\" stroke-width=\"1\"/>\n                    <circle cx=\"0\" cy=\"0\" r=\"28\" fill=\"none\" stroke=\"url(#gripPattern)\" stroke-width=\"6\" opacity=\"0.5\"/>\n                    <circle cx=\"0\" cy=\"0\" r=\"25\" fill=\"#222\" opacity=\"0.3\"/>\n                </g>\n            </g>\n\n            <!-- ABXY 按钮 -->\n            <g class=\"abxy\" transform=\"translate(580, 200)\">\n                <!-- Y Button (Top) -->\n                <g class=\"btn-face interactive\" transform=\"translate(0, -45)\">\n                    <circle cx=\"0\" cy=\"0\" r=\"22\" fill=\"#111\"/> <!-- 黑色边框/孔 -->\n                    <circle cx=\"0\" cy=\"0\" r=\"20\" fill=\"url(#btnY)\"/>\n                    <circle cx=\"0\" cy=\"0\" r=\"18\" fill=\"url(#gloss)\"/>\n                    <text x=\"0\" y=\"7\" text-anchor=\"middle\" fill=\"#000\" font-weight=\"bold\" font-size=\"20\">Y</text>\n                </g>\n                <!-- X Button (Left) -->\n                <g class=\"btn-face interactive\" transform=\"translate(-45, 0)\">\n                    <circle cx=\"0\" cy=\"0\" r=\"22\" fill=\"#111\"/>\n                    <circle cx=\"0\" cy=\"0\" r=\"20\" fill=\"url(#btnX)\"/>\n                    <circle cx=\"0\" cy=\"0\" r=\"18\" fill=\"url(#gloss)\"/>\n                    <text x=\"0\" y=\"7\" text-anchor=\"middle\" fill=\"#fff\" font-weight=\"bold\" font-size=\"20\">X</text>\n                </g>\n                <!-- B Button (Right) -->\n                <g class=\"btn-face interactive\" transform=\"translate(45, 0)\">\n                    <circle cx=\"0\" cy=\"0\" r=\"22\" fill=\"#111\"/>\n                    <circle cx=\"0\" cy=\"0\" r=\"20\" fill=\"url(#btnB)\"/>\n                    <circle cx=\"0\" cy=\"0\" r=\"18\" fill=\"url(#gloss)\"/>\n                    <text x=\"0\" y=\"7\" text-anchor=\"middle\" fill=\"#fff\" font-weight=\"bold\" font-size=\"20\">B</text>\n                </g>\n                <!-- A Button (Bottom) -->\n                <g class=\"btn-face interactive\" transform=\"translate(0, 45)\">\n                    <circle cx=\"0\" cy=\"0\" r=\"22\" fill=\"#111\"/>\n                    <circle cx=\"0\" cy=\"0\" r=\"20\" fill=\"url(#btnA)\"/>\n                    <circle cx=\"0\" cy=\"0\" r=\"18\" fill=\"url(#gloss)\"/>\n                    <text x=\"0\" y=\"7\" text-anchor=\"middle\" fill=\"#fff\" font-weight=\"bold\" font-size=\"20\">A</text>\n                </g>\n            </g>\n\n            <!-- === 中央区域 === -->\n\n            <!-- Xbox Guide Button (Logo) -->\n            <g class=\"xbox-btn interactive\" transform=\"translate(400, 180)\">\n                <circle cx=\"0\" cy=\"0\" r=\"28\" fill=\"#fff\" stroke=\"#ccc\" stroke-width=\"1\"/>\n                <!-- Logo X Shape -->\n                <path d=\"M-12,-12 L12,12 M12,-12 L-12,12\" stroke=\"#333\" stroke-width=\"6\" stroke-linecap=\"round\"/>\n                <circle cx=\"0\" cy=\"0\" r=\"28\" fill=\"url(#gloss)\" opacity=\"0.6\"/>\n            </g>\n\n            <!-- View Button (Left Small) -->\n            <g class=\"btn-center interactive\" transform=\"translate(330, 200)\">\n                <circle cx=\"0\" cy=\"0\" r=\"10\" fill=\"#111\"/>\n                <rect x=\"-5\" y=\"-3\" width=\"10\" height=\"6\" rx=\"1\" fill=\"#888\"/>\n                <rect x=\"-3\" y=\"-1\" width=\"6\" height=\"2\" fill=\"#111\"/>\n            </g>\n\n            <!-- Menu Button (Right Small) -->\n            <g class=\"btn-center interactive\" transform=\"translate(470, 200)\">\n                <circle cx=\"0\" cy=\"0\" r=\"10\" fill=\"#111\"/>\n                <rect x=\"-5\" y=\"-4\" width=\"10\" height=\"2\" fill=\"#888\"/>\n                <rect x=\"-5\" y=\"0\" width=\"10\" height=\"2\" fill=\"#888\"/>\n                <rect x=\"-5\" y=\"4\" width=\"10\" height=\"2\" fill=\"#888\"/>\n            </g>\n\n            <!-- Share Button (Center Oval) -->\n            <g class=\"btn-center interactive\" transform=\"translate(400, 250)\">\n                <rect x=\"-10\" y=\"-6\" width=\"20\" height=\"12\" rx=\"6\" fill=\"#111\"/>\n                <path d=\"M-4,3 L0,-3 L4,3 M0,-3 L0,5\" stroke=\"#888\" stroke-width=\"1.5\" fill=\"none\"/>\n            </g>\n\n        </svg>\n    </div>\n\n    <script>\n        // 可以在这里添加更复杂的JS逻辑，\n        // 例如监听键盘事件来映射手柄动画，或者连接 Gamepad API\n        // 目前交互完全由 CSS 处理，以保持代码简洁。\n        console.log(\"Xbox Controller Rendered.\");\n    </script>\n</body>\n</html>\n```\n\n### 这个 SVG 的设计亮点：\n\n1.  **精致的材质感**：\n    *   **机身**：使用了 `radialGradient` 创建了微妙的磨砂黑渐变，模拟了 Xbox Series X 手柄的质感。\n    *   **摇杆**：摇杆底部有一个深色的“凹槽”阴影，摇杆帽有防滑纹理（通过 `<pattern>` 和描边实现）以及顶部凹陷的阴影效果。\n    *   **水晶按键**：ABXY 按钮使用了多层结构（底座、颜色层、高光层），`gloss` 渐变模拟了透明塑料的反光感。\n\n2.  **交互效果 (CSS)**：\n    *   **按下 (Active)**：点击任何按钮（ABXY、十字键、功能键）时，它们会缩小并稍微变暗，模拟物理按下的行程感。\n    *   **摇杆 (Hover/Active)**：当鼠标悬停在摇杆上时，它会轻微偏移；按下时会向下移动，模拟 L3/R3 点击。\n    *   **发光**：Xbox Logo 按钮在悬停时会有微弱的白色光晕。\n\n3.  **结构细节**：\n    *   包含了**分享按钮**（Share Button），这是 Series X/S 手柄特有的特征。\n    *   十字键（D-Pad）采用了新的**混合式碟形设计**，而不是老式的十字形。\n    *   顶部可以看到肩键（LB/RB）和板机（LT/RT）的一部分，增加了立体感。\n\n4.  **单文件实现**：\n    *   所有 SVG 路径、CSS 样式和 HTML 结构都封装在一个文件中，无需外部资源。",
    "model": "gemini-3-pro-preview",
    "usage": {
      "prompt_tokens": 81,
      "completion_tokens": 6247,
      "total_tokens": 6328
    },
    "timestamp": "2025-11-19 13:26:32"
  },
  "needs_screenshot": true,
  "needs_manual_test": true
}