n/aiu/Series_apple · 2 个月前
注册 登录
n/ai · 2 个月前 · 331 次浏览
u/Series_apple白银

Gemini 3.8flash 正式上线!

就在不久前,谷歌正式发布了Gemini 3 .8 flash。目前已在网页端,反重力和AI studio上线
image
image

据Gemini自述,从 Gemini 3.7 到现在的 Gemini 3.8 Flash,核心的提升主要集中在移动端性能优化、复杂逻辑推理效率,以及多模态与工具协同能力上:

响应延迟与端侧吞吐大幅优化:作为专为移动设备优化的 Flash 架构,3.8 在保持紧凑体积的同时显著降低了首字延迟(TTFT),在长时间多轮对话中能够维持更稳定、低耗能的高速流式输出。

长上下文记忆与检索精度提升:在处理更长的对话历史和复杂背景信息时,3.8 减少了“长程遗忘”现象,对细节指令的遵循能力更强,能够更精准地整合多段上下文。

多步骤逻辑与代码生成更可靠:面对需要逐步拆解的逻辑分析、数学推导和代码实现,3.8 降低了中间幻觉率,边界条件处理和严谨性相比 3.7 均有可感知的改进。

工具调用与交互能力更原生:与图像理解、动态可视化及外部工具的协同更为敏捷,能更快判断何时需要结构化呈现,输出格式也更规范稳定。

0
6
登录后参与讨论。
u/udc2b6nr 广告
QuicksilverVPN

快银 VPN,一键连接全球节点,线路稳定、延迟低。支持 Windows、macOS 等多平台,TUN 全局模式覆盖全部应用流量。无需复杂配置,下载即用。

umami.dnsl.top 了解更多

6 条回复

排序
  1. UttX 钻石 钻石会员 2 个月前

    感謝提供資訊~

    0
  2. fanfanfan 黄金 2 个月前

    去 AI Studio 看看,不知道响应速度体感怎么样。

    0
  3. Series_apple 白银 楼主 2 个月前

    速度特别快

    0
  4. Penelope_Udell 黄金 3 YEARS 2 个月前

    3.8画的鹈鹕

    <!DOCTYPE html>
    <html lang="zh-CN">
    <head>
      <meta charset="UTF-8" />
      <meta name="viewport" content="width=device-width, initial-scale=1.0" />
      <title>鹈鹕骑行记 - Pelican on a Bicycle SVG</title>
      <style>
        :root {
          --bg-gradient-day: linear-gradient(180deg, #bae6fd 0%, #e0f2fe 35%, #fffbeb 75%, #bbf7d0 100%);
          --bg-gradient-sunset: linear-gradient(180deg, #fb923c 0%, #f472b6 35%, #6366f1 70%, #1e1b4b 100%);
          --bg-gradient-night: linear-gradient(180deg, #020617 0%, #0f172a 45%, #1e1b4b 80%, #064e3b 100%);
          --card-bg: rgba(255, 255, 255, 0.92);
          --text-main: #0f172a;
          --text-sub: #475569;
          --accent: #f97316;
          --anim-speed-mult: 1;
        }
    
        body.sunset-theme {
          --text-main: #f8fafc;
          --text-sub: #cbd5e1;
          --card-bg: rgba(30, 27, 75, 0.85);
        }
    
        body.night-theme {
          --text-main: #f1f5f9;
          --text-sub: #94a3b8;
          --card-bg: rgba(15, 23, 42, 0.9);
        }
    
        * {
          box-sizing: border-box;
          margin: 0;
          padding: 0;
          user-select: none;
        }
    
        body {
          min-height: 100vh;
          display: flex;
          flex-direction: column;
          align-items: center;
          justify-content: center;
          font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
          background: var(--bg-gradient-day);
          transition: background 0.8s cubic-bezier(0.4, 0, 0.2, 1), color 0.5s ease;
          padding: 20px 16px;
          overflow-x: hidden;
        }
    
        .container {
          width: 100%;
          max-width: 980px;
          display: flex;
          flex-direction: column;
          align-items: center;
          gap: 16px;
        }
    
        .header {
          text-align: center;
          backdrop-filter: blur(12px);
          background: var(--card-bg);
          padding: 12px 32px;
          border-radius: 999px;
          box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.07), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
          border: 1px solid rgba(255, 255, 255, 0.4);
          transition: all 0.5s ease;
        }
    
        .header h1 {
          font-size: 1.55rem;
          font-weight: 800;
          color: var(--text-main);
          letter-spacing: -0.02em;
          display: flex;
          align-items: center;
          gap: 10px;
          justify-content: center;
        }
    
        .header p {
          font-size: 0.86rem;
          color: var(--text-sub);
          margin-top: 3px;
        }
    
        /* SVG Canvas Card */
        .canvas-wrapper {
          width: 100%;
          background: var(--card-bg);
          backdrop-filter: blur(16px);
          border-radius: 28px;
          padding: 18px;
          box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.16), 0 0 0 1px rgba(255, 255, 255, 0.35);
          position: relative;
          overflow: hidden;
          transition: all 0.5s ease;
        }
    
        svg.scene {
          width: 100%;
          height: auto;
          display: block;
          filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.08));
          overflow: visible;
        }
    
        /* Controls Bar */
        .controls {
          display: flex;
          flex-wrap: wrap;
          gap: 12px;
          justify-content: center;
          align-items: center;
          background: var(--card-bg);
          backdrop-filter: blur(12px);
          padding: 12px 24px;
          border-radius: 22px;
          box-shadow: 0 10px 22px -5px rgba(0, 0, 0, 0.08);
          border: 1px solid rgba(255, 255, 255, 0.3);
          max-width: 100%;
        }
    
        .btn-group {
          display: flex;
          align-items: center;
          gap: 6px;
          background: rgba(0, 0, 0, 0.05);
          padding: 4px;
          border-radius: 14px;
        }
    
        body.sunset-theme .btn-group,
        body.night-theme .btn-group {
          background: rgba(255, 255, 255, 0.1);
        }
    
        button {
          border: none;
          outline: none;
          background: transparent;
          color: var(--text-main);
          padding: 8px 14px;
          font-size: 0.86rem;
          font-weight: 600;
          border-radius: 10px;
          cursor: pointer;
          display: flex;
          align-items: center;
          gap: 6px;
          transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
        }
    
        button:hover {
          background: rgba(0, 0, 0, 0.08);
          transform: translateY(-1px);
        }
    
        body.sunset-theme button:hover,
        body.night-theme button:hover {
          background: rgba(255, 255, 255, 0.15);
        }
    
        button.active {
          background: #ffffff;
          color: #0284c7;
          box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
        }
    
        body.sunset-theme button.active {
          background: #ec4899;
          color: #ffffff;
        }
    
        body.night-theme button.active {
          background: #38bdf8;
          color: #0f172a;
        }
    
        .action-btn {
          background: #f97316;
          color: white !important;
          padding: 8px 16px;
          border-radius: 12px;
          box-shadow: 0 4px 12px rgba(249, 115, 22, 0.35);
        }
    
        .action-btn:hover {
          background: #ea580c !important;
          box-shadow: 0 6px 16px rgba(249, 115, 22, 0.45);
          transform: translateY(-2px);
        }
    
        .action-btn:active {
          transform: scale(0.96);
        }
    
        /* Interactive hint badge */
        .hint-bubble {
          position: absolute;
          top: 28px;
          right: 32px;
          background: rgba(255, 255, 255, 0.92);
          color: #0369a1;
          font-size: 0.78rem;
          font-weight: 600;
          padding: 6px 14px;
          border-radius: 20px;
          box-shadow: 0 4px 14px rgba(0,0,0,0.08);
          pointer-events: none;
          animation: floatBadge 3.2s ease-in-out infinite;
          z-index: 10;
        }
    
        body.sunset-theme .hint-bubble,
        body.night-theme .hint-bubble {
          background: rgba(30, 41, 59, 0.92);
          color: #38bdf8;
        }
    
        /* ========================================================
           SVG ANIMATIONS (Pure CSS Keyframes)
           ======================================================== */
    
        /* Wheels Spinning */
        .wheel-rotate {
          animation: spinWheel calc(1.8s / var(--anim-speed-mult)) linear infinite;
        }
        .wheel-rear {
          transform-origin: 270px 425px;
        }
        .wheel-front {
          transform-origin: 640px 425px;
        }
    
        @keyframes spinWheel {
          from { transform: rotate(0deg); }
          to   { transform: rotate(360deg); }
        }
    
        /* Pelican Gentle Riding & Bobbing Motion */
        .pelican-rider {
          animation: riderBob calc(0.9s / var(--anim-speed-mult)) ease-in-out infinite alternate;
          transform-origin: 360px 280px;
        }
    
        @keyframes riderBob {
          0% {
            transform: translateY(0px) rotate(0deg);
          }
          50% {
            transform: translateY(-3px) rotate(-0.4deg);
          }
          100% {
            transform: translateY(1.5px) rotate(0.6deg);
          }
        }
    
        /* Throat Pouch gentle wobble */
        .pouch-wobble {
          animation: pouchWobble calc(1.4s / var(--anim-speed-mult)) ease-in-out infinite alternate;
          transform-origin: 520px 175px;
        }
    
        @keyframes pouchWobble {
          0% { transform: scaleY(1) rotate(0deg); }
          50% { transform: scaleY(1.04) scaleX(0.98) rotate(-1deg); }
          100% { transform: scaleY(0.97) scaleX(1.02) rotate(1.2deg); }
        }
    
        /* Little Fish peeking & waving */
        .fish-wiggle {
          animation: fishPeek calc(1.1s / var(--anim-speed-mult)) ease-in-out infinite alternate;
          transform-origin: 625px 165px;
        }
    
        @keyframes fishPeek {
          0% { transform: translate(0, 0) rotate(-6deg); }
          50% { transform: translate(2px, -4px) rotate(5deg); }
          100% { transform: translate(-1px, 2px) rotate(-10deg); }
        }
    
        /* Road dash movement */
        .road-dashes {
          animation: moveRoad calc(0.8s / var(--anim-speed-mult)) linear infinite;
        }
    
        @keyframes moveRoad {
          from { stroke-dashoffset: 0; }
          to   { stroke-dashoffset: -140; }
        }
    
        /* Wind lines passing by */
        .wind-streak-1 {
          animation: windPass 1.4s linear infinite;
        }
        .wind-streak-2 {
          animation: windPass 1.9s linear infinite 0.5s;
        }
        .wind-streak-3 {
          animation: windPass 1.1s linear infinite 0.2s;
        }
    
        @keyframes windPass {
          0% {
            transform: translateX(200px);
            opacity: 0;
          }
          20% {
            opacity: 0.85;
          }
          80% {
            opacity: 0.75;
          }
          100% {
            transform: translateX(-450px);
            opacity: 0;
          }
        }
    
        /* Clouds drifting */
        .cloud-slow {
          animation: driftCloud 36s linear infinite;
        }
        .cloud-fast {
          animation: driftCloud 24s linear infinite;
        }
    
        @keyframes driftCloud {
          from { transform: translateX(0); }
          to   { transform: translateX(-950px); }
        }
    
        @keyframes floatBadge {
          0%, 100% { transform: translateY(0); }
          50% { transform: translateY(-5px); }
        }
    
        /* Sound ripple when clicking bell */
        .bell-sound-wave {
          opacity: 0;
          transform-origin: 10px 5px;
        }
    
        .bell-ringing .bell-sound-wave {
          animation: soundWave 0.6s ease-out;
        }
    
        @keyframes soundWave {
          0% { transform: scale(0.6); opacity: 1; }
          100% { transform: scale(2.2); opacity: 0; }
        }
    
        /* Interactive cursor classes */
        .interactive-element {
          cursor: pointer;
          transition: filter 0.2s ease;
        }
        .interactive-element:hover {
          filter: brightness(1.1);
        }
    
        /* Headlight beam for Night Mode */
        .headlight-beam {
          opacity: 0;
          transition: opacity 0.8s ease;
          pointer-events: none;
        }
        body.night-theme .headlight-beam {
          opacity: 0.45;
        }
    
        /* Responsive adjustments */
        @media (max-width: 640px) {
          .header h1 { font-size: 1.25rem; }
          .header p { font-size: 0.75rem; }
          .controls { padding: 8px 12px; gap: 8px; }
          button { font-size: 0.78rem; padding: 6px 10px; }
          .hint-bubble { display: none; }
        }
      </style>
    </head>
    <body>
    
      <div class="container">
        <!-- Header Title -->
        <header class="header">
          <h1>🚲 鹈鹕骑行记 <span>Pelican on Wheels</span></h1>
          <p>优雅可爱的大嘴鹈鹕,戴着复古骑行帽,载着私房小鱼快乐兜风!</p>
        </header>
    
        <!-- Main SVG Display Card -->
        <div class="canvas-wrapper">
          <div class="hint-bubble">💡 点击车铃可“叮叮”响,点击鹈鹕与小鱼有互动!</div>
    
          <svg class="scene" id="pelicanSvg" viewBox="0 0 920 560" xmlns="http://www.w3.org/2000/svg">
            <defs>
              <!-- Sky / Background Gradients -->
              <linearGradient id="skyGrad" x1="0%" y1="0%" x2="0%" y2="100%">
                <stop offset="0%" stop-color="#7dd3fc" stop-opacity="0.55"/>
                <stop offset="60%" stop-color="#bae6fd" stop-opacity="0.35"/>
                <stop offset="100%" stop-color="#fef08a" stop-opacity="0.45"/>
              </linearGradient>
    
              <!-- Sun / Moon Glow -->
              <radialGradient id="sunGlow" cx="50%" cy="50%" r="50%">
                <stop id="sunCore" offset="0%" stop-color="#fef08a" stop-opacity="0.95"/>
                <stop id="sunMid" offset="50%" stop-color="#fde047" stop-opacity="0.5"/>
                <stop id="sunOut" offset="100%" stop-color="#fde047" stop-opacity="0"/>
              </radialGradient>
    
              <!-- Bicycle Frame Gradient (Mint Emerald Cruiser) -->
              <linearGradient id="frameGrad" x1="0%" y1="0%" x2="100%" y2="100%">
                <stop offset="0%" stop-color="#34d399"/>
                <stop offset="45%" stop-color="#059669"/>
                <stop offset="100%" stop-color="#064e3b"/>
              </linearGradient>
    
              <!-- Metal / Chrome Gradient -->
              <linearGradient id="chromeGrad" x1="0%" y1="0%" x2="0%" y2="100%">
                <stop offset="0%" stop-color="#f8fafc"/>
                <stop offset="35%" stop-color="#cbd5e1"/>
                <stop offset="70%" stop-color="#94a3b8"/>
                <stop offset="100%" stop-color="#e2e8f0"/>
              </linearGradient>
    
              <!-- Tire Gradient -->
              <linearGradient id="tireGrad" x1="0%" y1="0%" x2="100%" y2="100%">
                <stop offset="0%" stop-color="#334155"/>
                <stop offset="100%" stop-color="#0f172a"/>
              </linearGradient>
    
              <!-- Pelican Bill Yellow/Orange Gradient -->
              <linearGradient id="billGrad" x1="0%" y1="0%" x2="100%" y2="0%">
                <stop offset="0%" stop-color="#ea580c"/>
                <stop offset="30%" stop-color="#f97316"/>
                <stop offset="75%" stop-color="#facc15"/>
                <stop offset="100%" stop-color="#ea580c"/>
              </linearGradient>
    
              <!-- Pelican Gular Pouch Warm Salmon Gradient -->
              <linearGradient id="pouchGrad" x1="0%" y1="0%" x2="0%" y2="100%">
                <stop offset="0%" stop-color="#ffedd5"/>
                <stop offset="30%" stop-color="#fdba74"/>
                <stop offset="70%" stop-color="#fb923c"/>
                <stop offset="100%" stop-color="#f43f5e"/>
              </linearGradient>
    
              <!-- Feather Body Shading -->
              <linearGradient id="bodyGrad" x1="20%" y1="0%" x2="80%" y2="100%">
                <stop offset="0%" stop-color="#ffffff"/>
                <stop offset="70%" stop-color="#f1f5f9"/>
                <stop offset="100%" stop-color="#cbd5e1"/>
              </linearGradient>
    
              <!-- Wing Gradient -->
              <linearGradient id="wingGrad" x1="0%" y1="0%" x2="100%" y2="100%">
                <stop offset="0%" stop-color="#ffffff"/>
                <stop offset="60%" stop-color="#e2e8f0"/>
                <stop offset="100%" stop-color="#64748b"/>
              </linearGradient>
    
              <!-- Retro Saddle Leather -->
              <linearGradient id="leatherGrad" x1="0%" y1="0%" x2="100%" y2="0%">
                <stop offset="0%" stop-color="#9a3412"/>
                <stop offset="45%" stop-color="#7c2d12"/>
                <stop offset="100%" stop-color="#451a03"/>
              </linearGradient>
    
              <!-- Sunglasses Lens Gradient -->
              <linearGradient id="lensGrad" x1="0%" y1="0%" x2="100%" y2="100%">
                <stop offset="0%" stop-color="#06b6d4"/>
                <stop offset="50%" stop-color="#3b82f6"/>
                <stop offset="100%" stop-color="#ec4899"/>
              </linearGradient>
    
              <!-- Headlight Beam Gradient -->
              <linearGradient id="headlightBeam" x1="0%" y1="0%" x2="100%" y2="20%">
                <stop offset="0%" stop-color="#fef08a" stop-opacity="0.8"/>
                <stop offset="60%" stop-color="#fef08a" stop-opacity="0.3"/>
                <stop offset="100%" stop-color="#fef08a" stop-opacity="0"/>
              </linearGradient>
    
              <!-- Drop Shadow Filters -->
              <filter id="softShadow" x="-10%" y="-10%" width="130%" height="130%">
                <feDropShadow dx="2" dy="5" stdDeviation="4" flood-opacity="0.16"/>
              </filter>
    
              <filter id="groundShadow" x="-10%" y="-30%" width="120%" height="160%">
                <feGaussianBlur stdDeviation="7"/>
              </filter>
            </defs>
    
            <!-- ================= BACKGROUND SCENERY ================= -->
            <rect x="10" y="10" width="900" height="540" rx="22" fill="url(#skyGrad)" opacity="0.85"/>
    
            <!-- Celestial Body (Sun / Moon) -->
            <circle id="sunCircleGlow" cx="780" cy="95" r="75" fill="url(#sunGlow)"/>
            <circle id="sunCircleCore" cx="780" cy="95" r="34" fill="#fef08a" opacity="0.95"/>
    
            <!-- Distant Mountains & Gentle Hills -->
            <path d="M 0 420 Q 150 330 300 410 T 600 390 T 920 420 L 920 490 L 0 490 Z" fill="#93c5fd" opacity="0.35"/>
            <path d="M 0 440 Q 220 370 440 430 T 920 440 L 920 490 L 0 490 Z" fill="#6ee7b7" opacity="0.4"/>
    
            <!-- Drifting Clouds (Animated SVG Group) -->
            <g opacity="0.88">
              <!-- Cloud 1 -->
              <g class="cloud-slow">
                <path d="M 850 110 Q 865 90 890 95 Q 915 80 945 95 Q 970 90 985 110 Q 995 130 975 140 L 855 140 Q 835 130 850 110 Z" fill="#ffffff" opacity="0.95"/>
                <path d="M 1250 130 Q 1265 110 1290 115 Q 1315 100 1345 115 Q 1370 110 1385 130 Q 1395 150 1375 160 L 1255 160 Q 1235 150 1250 130 Z" fill="#ffffff" opacity="0.95"/>
              </g>
              <!-- Cloud 2 -->
              <g class="cloud-fast">
                <path d="M 450 70 Q 460 55 480 60 Q 500 45 525 60 Q 545 55 558 70 Q 568 85 550 95 L 455 95 Q 438 85 450 70 Z" fill="#ffffff" opacity="0.8"/>
                <path d="M 980 65 Q 990 50 1010 55 Q 1030 40 1055 55 Q 1075 50 1088 65 Q 1098 80 1080 90 L 985 90 Q 968 80 980 65 Z" fill="#ffffff" opacity="0.8"/>
              </g>
            </g>
    
            <!-- Speed / Wind Streaks -->
            <g stroke="#ffffff" stroke-width="2.5" stroke-linecap="round" opacity="0.75">
              <line class="wind-streak-1" x1="720" y1="180" x2="790" y2="180"/>
              <line class="wind-streak-2" x1="680" y1="240" x2="745" y2="240"/>
              <line class="wind-streak-3" x1="770" y1="320" x2="845" y2="320"/>
              <line class="wind-streak-1" x1="160" y1="310" x2="230" y2="310"/>
            </g>
    
            <!-- Headlight Beam (Night Mode only, projected on road) -->
            <polygon class="headlight-beam" points="628,268 910,380 910,485 628,280" fill="url(#headlightBeam)"/>
    
            <!-- Road Base & Grass -->
            <rect x="10" y="475" width="900" height="75" fill="#475569" rx="0"/>
            <rect x="10" y="470" width="900" height="10" fill="#10b981"/>
            <rect x="10" y="466" width="900" height="5" fill="#34d399"/>
    
            <!-- Animated Road Marking (Dashes moving backward to simulate forward motion) -->
            <line class="road-dashes" x1="10" y1="515" x2="910" y2="515" stroke="#facc15" stroke-width="6" stroke-dasharray="35 35" stroke-linecap="round"/>
    
            <!-- ================= BIKE & RIDER SHADOW ================= -->
            <ellipse cx="455" cy="488" rx="230" ry="14" fill="#0f172a" opacity="0.32" filter="url(#groundShadow)"/>
    
            <!-- ================= FAR PEDAL, CRANK & FAR LEG ================= -->
            <!-- Far Leg (Shadowed behind frame) -->
            <g id="farLegGroup" opacity="0.75">
              <!-- Far hip fluff -->
              <ellipse cx="376" cy="285" rx="14" ry="10" fill="#cbd5e1"/>
              <!-- Far leg bone -->
              <path id="farLegPath" d="M 376 285 Q 400 330 430 382" fill="none" stroke="#ea580c" stroke-width="9" stroke-linecap="round" stroke-linejoin="round"/>
              <circle id="farKneeCircle" cx="400" cy="330" r="5" fill="#c2410c"/>
              <circle id="farAnkleCircle" cx="430" cy="382" r="5" fill="#9a3412"/>
              <!-- Far Webbed Foot planted on far pedal -->
              <g id="farFootGroup" transform="translate(430, 382)">
                <polygon points="-14,-5 20,-9 24,2 14,5 -14,0" fill="#c2410c"/>
                <path d="M -14 -3 Q 4 -6 20 -9" stroke="#9a3412" stroke-width="3" stroke-linecap="round"/>
                <path d="M -14 -1 Q 6 -1 24 2" stroke="#9a3412" stroke-width="3" stroke-linecap="round"/>
                <path d="M -14 1 Q 3 3 14 5" stroke="#9a3412" stroke-width="3" stroke-linecap="round"/>
              </g>
            </g>
    
            <!-- Far Crank & Pedal -->
            <g id="farCrankGroup" opacity="0.85">
              <line id="farCrankLine" x1="430" y1="425" x2="430" y2="382" stroke="#475569" stroke-width="7" stroke-linecap="round"/>
              <g id="farPedal" transform="translate(430, 382)">
                <rect x="-18" y="-4" width="36" height="8" rx="3" fill="#1e293b" stroke="#475569" stroke-width="1.5"/>
                <rect x="-6" y="-1" width="12" height="3" rx="1" fill="#d97706" opacity="0.8"/>
              </g>
            </g>
    
            <!-- Rear Luggage Carrier / Rack -->
            <g stroke="#64748b" stroke-linecap="round" stroke-linejoin="round">
              <line x1="240" y1="335" x2="350" y2="335" stroke-width="5"/>
              <line x1="270" y1="425" x2="255" y2="335" stroke-width="4"/>
              <line x1="270" y1="425" x2="330" y2="335" stroke-width="4"/>
              <rect x="236" y="332" width="5" height="10" rx="2" fill="#ef4444"/>
            </g>
    
            <!-- ================= WHEELS (ANIMATED) ================= -->
            <!-- REAR WHEEL (Center: 270, 425, Radius: 60) -->
            <g>
              <circle cx="270" cy="425" r="62" fill="none" stroke="url(#tireGrad)" stroke-width="12" filter="url(#softShadow)"/>
              <circle cx="270" cy="425" r="54" fill="#f8fafc" fill-opacity="0.12" stroke="url(#chromeGrad)" stroke-width="5"/>
              <!-- Spokes (Animated Rotation) -->
              <g class="wheel-rotate wheel-rear" stroke="#94a3b8" stroke-width="1.8" opacity="0.85">
                <line x1="270" y1="371" x2="270" y2="479"/>
                <line x1="216" y1="425" x2="324" y2="425"/>
                <line x1="232" y1="387" x2="308" y2="463"/>
                <line x1="232" y1="463" x2="308" y2="387"/>
                <line x1="220" y1="405" x2="320" y2="445"/>
                <line x1="220" y1="445" x2="320" y2="405"/>
                <line x1="250" y1="373" x2="290" y2="477"/>
                <line x1="290" y1="373" x2="250" y2="477"/>
              </g>
              <circle cx="270" cy="425" r="10" fill="#475569"/>
              <circle cx="270" cy="425" r="5" fill="#f8fafc"/>
              <circle cx="270" cy="425" r="15" fill="none" stroke="#64748b" stroke-width="4" stroke-dasharray="4 2"/>
              <!-- Rear Mudguard / Fender -->
              <path d="M 206 425 A 68 68 0 0 1 325 380" fill="none" stroke="#059669" stroke-width="8" stroke-linecap="round"/>
              <path d="M 206 425 A 68 68 0 0 1 325 380" fill="none" stroke="#34d399" stroke-width="3" stroke-linecap="round"/>
              <line x1="270" y1="425" x2="210" y2="435" stroke="#94a3b8" stroke-width="2.5" stroke-linecap="round"/>
            </g>
    
            <!-- FRONT WHEEL (Center: 640, 425, Radius: 60) -->
            <g>
              <circle cx="640" cy="425" r="62" fill="none" stroke="url(#tireGrad)" stroke-width="12" filter="url(#softShadow)"/>
              <circle cx="640" cy="425" r="54" fill="#f8fafc" fill-opacity="0.12" stroke="url(#chromeGrad)" stroke-width="5"/>
              <!-- Spokes (Animated Rotation) -->
              <g class="wheel-rotate wheel-front" stroke="#94a3b8" stroke-width="1.8" opacity="0.85">
                <line x1="640" y1="371" x2="640" y2="479"/>
                <line x1="586" y1="425" x2="694" y2="425"/>
                <line x1="602" y1="387" x2="678" y2="463"/>
                <line x1="602" y1="463" x2="678" y2="387"/>
                <line x1="590" y1="405" x2="690" y2="445"/>
                <line x1="590" y1="445" x2="690" y2="405"/>
                <line x1="620" y1="373" x2="660" y2="477"/>
                <line x1="660" y1="373" x2="620" y2="477"/>
              </g>
              <circle cx="640" cy="425" r="9" fill="#475569"/>
              <circle cx="640" cy="425" r="4" fill="#f8fafc"/>
              <!-- Front Mudguard / Fender -->
              <path d="M 584 395 A 68 68 0 0 1 688 385" fill="none" stroke="#059669" stroke-width="8" stroke-linecap="round"/>
              <path d="M 584 395 A 68 68 0 0 1 688 385" fill="none" stroke="#34d399" stroke-width="3" stroke-linecap="round"/>
              <line x1="640" y1="425" x2="600" y2="465" stroke="#94a3b8" stroke-width="2.5" stroke-linecap="round"/>
            </g>
    
            <!-- ================= BICYCLE MAIN FRAME ================= -->
            <!-- Chain -->
            <g stroke="#334155" stroke-width="3" stroke-dasharray="5 3">
              <line x1="270" y1="416" x2="430" y2="410"/>
              <line x1="270" y1="434" x2="430" y2="440"/>
            </g>
            <path d="M 430 405 A 20 20 0 0 1 430 445" fill="none" stroke="#64748b" stroke-width="4"/>
    
            <!-- Frame Tubes (Mint Emerald Classic Dutch Cruiser) -->
            <g stroke="url(#frameGrad)" stroke-linecap="round" stroke-linejoin="round">
              <!-- Chainstay: rear hub to bottom bracket -->
              <line x1="270" y1="425" x2="430" y2="425" stroke-width="11"/>
              <!-- Seatstay: rear hub to seat cluster -->
              <line x1="270" y1="425" x2="355" y2="295" stroke-width="11"/>
              <!-- Seat Tube: bottom bracket to seat cluster -->
              <line x1="430" y1="425" x2="355" y2="295" stroke-width="13"/>
              <!-- Down Tube: bottom bracket to head tube lower -->
              <path d="M 430 425 Q 500 395 568 315" fill="none" stroke-width="13"/>
              <!-- Top Tube (Swooped vintage cruiser twin-bar) -->
              <path d="M 355 305 C 415 328, 500 318, 562 260" fill="none" stroke-width="12"/>
              <path d="M 355 325 C 420 350, 508 332, 566 285" fill="none" stroke-width="8" opacity="0.8"/>
              <!-- Front Fork: head tube to front wheel hub -->
              <line x1="568" y1="312" x2="640" y2="425" stroke-width="11"/>
              <!-- Head Tube -->
              <line x1="562" y1="250" x2="569" y2="315" stroke-width="14"/>
            </g>
    
            <!-- Chrome Frame Highlights -->
            <g stroke="#a7f3d0" stroke-linecap="round" opacity="0.65">
              <path d="M 358 303 C 415 326, 498 316, 558 258" fill="none" stroke-width="3"/>
              <line x1="432" y1="420" x2="358" y2="297" stroke-width="3"/>
            </g>
    
            <!-- Brooks-Style Classic Leather Saddle (Mounted at seat cluster) -->
            <g filter="url(#softShadow)">
              <!-- Chrome seat post pillar -->
              <line x1="355" y1="295" x2="352" y2="280" stroke="url(#chromeGrad)" stroke-width="9" stroke-linecap="round"/>
              <!-- Chrome saddle springs -->
              <circle cx="332" cy="286" r="5.5" fill="none" stroke="#64748b" stroke-width="2.5"/>
              <circle cx="344" cy="286" r="5.5" fill="none" stroke="#64748b" stroke-width="2.5"/>
              <!-- Rich Leather Saddle Cushion supporting Pelican bottom -->
              <path d="M 314 276 C 316 266, 336 262, 362 265 C 388 268, 400 277, 396 283 C 392 289, 376 283, 356 282 C 328 280, 314 282, 314 276 Z" fill="url(#leatherGrad)"/>
              <!-- Brass Rivets -->
              <circle cx="324" cy="275" r="1.5" fill="#fbbf24"/>
              <circle cx="336" cy="274" r="1.5" fill="#fbbf24"/>
              <circle cx="348" cy="274" r="1.5" fill="#fbbf24"/>
            </g>
    
            <!-- Handlebar Stem & Handlebars -->
            <path d="M 562 250 L 556 205 L 532 202" fill="none" stroke="url(#chromeGrad)" stroke-width="8" stroke-linecap="round" stroke-linejoin="round"/>
            <path d="M 515 210 Q 534 196, 556 205" fill="none" stroke="url(#chromeGrad)" stroke-width="7" stroke-linecap="round"/>
            <!-- Leather Handlebar Grip -->
            <path d="M 512 212 L 526 204" stroke="url(#leatherGrad)" stroke-width="9" stroke-linecap="round"/>
    
            <!-- Front Retro Headlight (Clickable to toggle beam!) -->
            <g id="bikeHeadlight" class="interactive-element" transform="translate(562, 266)">
              <path d="M 0 0 L 14 -4 L 14 14 L 0 10 Z" fill="#334155" stroke="#64748b" stroke-width="1.5"/>
              <ellipse cx="14" cy="5" rx="3" ry="9" fill="#fef08a" stroke="#ca8a04" stroke-width="1.5"/>
            </g>
    
            <!-- Front Wicker Basket with Baguette & Flowers -->
            <g id="frontBasket" filter="url(#softShadow)">
              <path d="M 572 238 L 638 238 L 628 284 L 576 284 Z" fill="#d97706" stroke="#92400e" stroke-width="3" rx="4"/>
              <!-- Basket Weave -->
              <line x1="576" y1="250" x2="634" y2="250" stroke="#b45309" stroke-width="2"/>
              <line x1="576" y1="266" x2="630" y2="266" stroke="#b45309" stroke-width="2"/>
              <line x1="588" y1="238" x2="590" y2="284" stroke="#b45309" stroke-width="2"/>
              <line x1="605" y1="238" x2="603" y2="284" stroke="#b45309" stroke-width="2"/>
              <line x1="620" y1="238" x2="616" y2="284" stroke="#b45309" stroke-width="2"/>
              <!-- Baguette -->
              <path d="M 580 240 L 572 212 C 570 206, 578 202, 582 208 L 594 240 Z" fill="#d97706" stroke="#b45309" stroke-width="1.5"/>
              <line x1="574" y1="214" x2="578" y2="216" stroke="#78350f" stroke-width="1.5"/>
              <line x1="577" y1="222" x2="582" y2="224" stroke="#78350f" stroke-width="1.5"/>
              <!-- Daisy Flower -->
              <circle cx="616" cy="230" r="7.5" fill="#facc15"/>
              <circle cx="616" cy="230" r="3.5" fill="#78350f"/>
              <!-- Coral Flower -->
              <circle cx="602" cy="232" r="6" fill="#f43f5e"/>
              <circle cx="602" cy="232" r="2.5" fill="#fde047"/>
            </g>
    
            <!-- Interactive Bike Bell (Clickable!) -->
            <g id="bikeBell" class="interactive-element" transform="translate(544, 192)">
              <path d="M 0 10 A 10 10 0 0 1 20 10 Z" fill="#facc15" stroke="#ca8a04" stroke-width="2"/>
              <circle cx="10" cy="4" r="2.5" fill="#fef08a"/>
              <rect x="7" y="10" width="6" height="4" fill="#64748b"/>
              <circle class="bell-sound-wave" cx="10" cy="5" r="16" fill="none" stroke="#eab308" stroke-width="2.5"/>
            </g>
    
            <!-- ================= PELICAN RIDER (ANIMATED GROUP) ================= -->
            <g id="pelicanGroup" class="pelican-rider interactive-element">
    
              <!-- Tail Feathers resting over saddle back -->
              <g filter="url(#softShadow)">
                <path d="M 330 262 C 295 248, 275 258, 258 272 C 278 280, 305 278, 335 276 Z" fill="#e2e8f0"/>
                <path d="M 335 256 C 310 240, 285 246, 272 258 C 290 262, 316 266, 340 268 Z" fill="#cbd5e1"/>
                <path d="M 324 269 C 289 266, 269 276, 254 286 C 274 289, 304 284, 332 281 Z" fill="#94a3b8"/>
              </g>
    
              <!-- Main Chubby Pelican Body (Seated gracefully on saddle) -->
              <path d="M 336 262 C 330 212, 385 192, 435 206 C 475 216, 488 248, 472 278 C 452 305, 400 305, 360 282 C 342 272, 336 268, 336 262 Z"
                    fill="url(#bodyGrad)" filter="url(#softShadow)"/>
    
              <!-- Body shading / underbelly warmth -->
              <path d="M 350 274 C 362 288, 396 295, 428 288 C 445 280, 458 272, 464 262 C 438 276, 388 278, 350 274 Z"
                    fill="#cbd5e1" opacity="0.6"/>
    
              <!-- S-Curved Elegant / Quirky Pelican Neck -->
              <path d="M 442 216 C 452 180, 472 155, 490 130 C 500 115, 518 115, 526 130 C 530 145, 518 170, 500 200 C 488 220, 472 230, 456 236 Z"
                    fill="url(#bodyGrad)"/>
    
              <!-- Head (Round & Expressive) -->
              <ellipse cx="516" cy="122" rx="28" ry="24" fill="url(#bodyGrad)" filter="url(#softShadow)"/>
    
              <!-- Tuft / Crest of feathers on back of head -->
              <path d="M 492 110 C 478 106, 468 114, 462 120 C 472 120, 485 117, 492 115 Z" fill="#e2e8f0"/>
              <path d="M 490 118 C 478 118, 468 126, 465 134 C 475 131, 485 126, 490 123 Z" fill="#cbd5e1"/>
    
              <!-- ================= THE FAMOUS GULAR POUCH (THROAT POUCH) ================= -->
              <!-- Pouch Wobble Animation Group -->
              <g class="pouch-wobble">
                <!-- Throat Pouch (Big Stretchy Pelican Scoop!) -->
                <path d="M 502 138 C 492 162, 502 212, 542 228 C 582 238, 642 208, 712 142 C 648 158, 568 172, 516 140 Z"
                      fill="url(#pouchGrad)" opacity="0.95" filter="url(#softShadow)"/>
    
                <!-- Pouch Fold Details / Texture Lines -->
                <path d="M 520 152 Q 538 196 578 212" fill="none" stroke="#ea580c" stroke-width="2" opacity="0.45" stroke-linecap="round"/>
                <path d="M 538 156 Q 562 192 612 198" fill="none" stroke="#ea580c" stroke-width="2" opacity="0.4" stroke-linecap="round"/>
                <path d="M 562 156 Q 598 182 652 176" fill="none" stroke="#ea580c" stroke-width="1.8" opacity="0.35" stroke-linecap="round"/>
    
                <!-- CUTE SECRET: A Little Fish Peeking Out of the Pouch! -->
                <g class="fish-wiggle" id="pouchFish">
                  <!-- Fish Body -->
                  <ellipse cx="628" cy="166" rx="18" ry="9" transform="rotate(-25 628 166)" fill="#38bdf8"/>
                  <!-- Fish Tail Fin -->
                  <polygon points="610,174 598,168 600,183" fill="#0284c7"/>
                  <!-- Fish Dorsal Fin -->
                  <path d="M 620 158 Q 626 151 634 157 Z" fill="#0ea5e9"/>
                  <!-- Fish Eye -->
                  <circle cx="637" cy="164" r="3.5" fill="#ffffff"/>
                  <circle cx="638" cy="164" r="1.8" fill="#0f172a"/>
                  <circle cx="639" cy="163" r="0.8" fill="#ffffff"/>
                  <!-- Fish cute surprised mouth -->
                  <ellipse cx="644" cy="167" rx="1.5" ry="2.5" fill="#0369a1"/>
                  <!-- Tiny water bubbles from fish -->
                  <circle cx="652" cy="158" r="2.5" fill="none" stroke="#bae6fd" stroke-width="1.2" opacity="0.8"/>
                  <circle cx="658" cy="150" r="1.8" fill="none" stroke="#bae6fd" stroke-width="1" opacity="0.7"/>
                </g>
              </g>
    
              <!-- Upper Bill (Long, Strong, Golden Yellow with hooked tip) -->
              <path d="M 518 120 Q 612 122, 712 138 C 722 140, 723 147, 713 149 Q 622 134, 512 134 Z"
                    fill="url(#billGrad)" filter="url(#softShadow)"/>
              <!-- Beak Hook Tip -->
              <path d="M 710 138 C 720 140, 722 148, 712 149 C 708 149, 708 143, 710 138 Z" fill="#c2410c"/>
              <!-- Ridge / Nostril Groove along Beak -->
              <path d="M 528 124 Q 618 128, 702 140" fill="none" stroke="#ea580c" stroke-width="1.8" stroke-linecap="round"/>
              <ellipse cx="532" cy="124" rx="2.5" ry="1" fill="#7c2d12"/>
    
              <!-- Pelican Big Happy Eye -->
              <circle cx="512" cy="116" r="8" fill="#ffffff"/>
              <circle cx="514" cy="116" r="5" fill="#0284c7"/>
              <circle cx="515" cy="116" r="3" fill="#0f172a"/>
              <circle cx="517" cy="114" r="1.8" fill="#ffffff"/>
    
              <!-- Stylish Cycling Sunglasses (Interactive!) -->
              <g id="sunglasses" class="interactive-element">
                <line x1="500" y1="114" x2="525" y2="114" stroke="#eab308" stroke-width="2.5"/>
                <ellipse cx="514" cy="116" rx="9.5" ry="8" fill="url(#lensGrad)" opacity="0.88" stroke="#facc15" stroke-width="1.5"/>
                <path d="M 508 112 Q 518 112 520 120" fill="none" stroke="#ffffff" stroke-width="1.5" opacity="0.7" stroke-linecap="round"/>
                <path d="M 505 114 L 488 116" stroke="#ca8a04" stroke-width="2"/>
              </g>
    
              <!-- Retro Cycling Cap (French Style Tricolore with flipped-up visor) -->
              <g id="cyclingCap">
                <path d="M 490 112 C 492 92, 525 89, 535 110 Z" fill="#2563eb"/>
                <path d="M 504 110 C 506 91, 519 90, 521 109 Z" fill="#ffffff"/>
                <path d="M 510 110 C 511 91, 517 90, 518 109 Z" fill="#dc2626"/>
                <path d="M 529 110 Q 546 102, 550 94 C 544 100, 533 104, 525 108 Z" fill="#f8fafc" stroke="#e2e8f0" stroke-width="1"/>
                <circle cx="512" cy="92" r="2.5" fill="#facc15"/>
              </g>
    
              <!-- Near Wing (Resting forward, clasping handlebar grip!) -->
              <g filter="url(#softShadow)">
                <path d="M 402 222 C 382 238, 392 278, 418 286 C 442 292, 472 272, 492 248 C 472 242, 438 234, 402 222 Z"
                      fill="url(#wingGrad)"/>
                <path d="M 458 258 C 482 248, 508 230, 522 214 C 520 220, 508 232, 492 244 C 508 236, 524 222, 528 216 C 522 224, 508 240, 482 254 C 472 260, 462 262, 458 258 Z"
                      fill="#475569"/>
                <path d="M 438 234 Q 482 224, 522 212" fill="none" stroke="#f1f5f9" stroke-width="14" stroke-linecap="round"/>
                <!-- Clasping fingers -->
                <path d="M 516 208 C 522 204, 528 210, 524 216 C 520 222, 514 216, 516 208 Z" fill="#cbd5e1"/>
                <path d="M 521 210 C 527 206, 532 212, 528 218 C 524 224, 519 218, 521 210 Z" fill="#94a3b8"/>
              </g>
    
            </g> <!-- End Pelican Rider -->
    
            <!-- ================= DYNAMIC PEDALING LEGS & CRANK (IK CONTROLLED) ================= -->
            <!-- Near Pelican Leg (Dynamically synchronized with pedal) -->
            <g id="nearLegGroup">
              <!-- Hip Joint Feather Fluff -->
              <ellipse cx="382" cy="285" rx="16" ry="12" fill="#e2e8f0" filter="url(#softShadow)"/>
              <!-- Leg Bone (Thigh + Shin) -->
              <path id="nearLegPath" d="M 382 285 L 416 368 L 430 468" fill="none" stroke="#f97316" stroke-width="11" stroke-linecap="round" stroke-linejoin="round"/>
              <path id="nearLegHighlight" d="M 382 285 L 416 368 L 430 468" fill="none" stroke="#ea580c" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
              <!-- Knee cap -->
              <circle id="nearKneeCircle" cx="416" cy="368" r="6" fill="#f97316"/>
              <!-- Ankle -->
              <circle id="nearAnkleCircle" cx="430" cy="468" r="6" fill="#ea580c"/>
    
              <!-- Near Webbed Foot (Mounted squarely on the pedal) -->
              <g id="nearFootGroup" transform="translate(430, 468)">
                <!-- Webbing membrane -->
                <polygon points="-16,-6 24,-11 30,3 18,6 -16,0" fill="#fb923c"/>
                <!-- Webbed Toes -->
                <path d="M -16 -4 Q 5 -8 24 -11" stroke="#c2410c" stroke-width="4" stroke-linecap="round"/>
                <path d="M -16 -2 Q 8 -2 30 3" stroke="#c2410c" stroke-width="4" stroke-linecap="round"/>
                <path d="M -16 0 Q 3 3 18 6" stroke="#c2410c" stroke-width="4" stroke-linecap="round"/>
                <!-- Claws -->
                <polygon points="24,-13 28,-11 23,-9" fill="#78350f"/>
                <polygon points="30,1 34,3 29,5" fill="#78350f"/>
                <polygon points="18,5 22,7 17,9" fill="#78350f"/>
              </g>
            </g>
    
            <!-- ================= FOREGROUND CRANKSET, CHAINRING & PEDAL ================= -->
            <g id="nearCrankGroup">
              <!-- Chainring Disk (Center: 430, 425) -->
              <circle cx="430" cy="425" r="23" fill="#475569" stroke="#94a3b8" stroke-width="2"/>
              <circle cx="430" cy="411" r="4" fill="#1e293b"/>
              <circle cx="442" cy="420" r="4" fill="#1e293b"/>
              <circle cx="438" cy="434" r="4" fill="#1e293b"/>
              <circle cx="422" cy="434" r="4" fill="#1e293b"/>
              <circle cx="418" cy="420" r="4" fill="#1e293b"/>
              <!-- Near Crank Arm -->
              <line id="nearCrankLine" x1="430" y1="425" x2="430" y2="468" stroke="url(#chromeGrad)" stroke-width="9" stroke-linecap="round"/>
              <circle cx="430" cy="425" r="7.5" fill="#cbd5e1"/>
    
              <!-- Near Pedal (Flat horizontal) -->
              <g id="nearPedal" transform="translate(430, 468)">
                <rect x="-20" y="-4" width="40" height="10" rx="3" fill="#0f172a" stroke="#64748b" stroke-width="2"/>
                <rect x="-8" y="-1" width="16" height="4" rx="1.5" fill="#f59e0b"/>
              </g>
            </g>
    
            <!-- Dynamic Wind Speed Lines near wheels -->
            <g stroke="#ffffff" stroke-width="2" stroke-linecap="round" opacity="0.6">
              <line class="wind-streak-3" x1="200" y1="488" x2="260" y2="488"/>
              <line class="wind-streak-2" x1="570" y1="488" x2="630" y2="488"/>
            </g>
    
            <!-- Floating Dialog Bubble on Pelican Click -->
            <g id="speechBubble" opacity="0" transform="translate(540, 50)" style="transition: opacity 0.3s ease, transform 0.3s ease; pointer-events: none;">
              <rect x="0" y="0" width="180" height="46" rx="12" fill="#ffffff" filter="url(#softShadow)" stroke="#38bdf8" stroke-width="2"/>
              <polygon points="20,46 30,46 15,58" fill="#ffffff"/>
              <text x="90" y="28" font-size="14" font-weight="bold" fill="#0369a1" text-anchor="middle" id="speechText">嘎嘎!兜风真爽!🐟</text>
            </g>
          </svg>
        </div>
    
        <!-- Control Center -->
        <div class="controls">
          <!-- Speed Presets -->
          <div class="btn-group">
            <button id="btnSpeedSlow" onclick="setSpeed(0.6)">🐢 悠闲漫游</button>
            <button id="btnSpeedNorm" class="active" onclick="setSpeed(1.0)">🚲 标准巡航</button>
            <button id="btnSpeedFast" onclick="setSpeed(2.2)">⚡ 竞速狂飙</button>
            <button id="btnPause" onclick="togglePause()">⏸️ 暂停</button>
          </div>
    
          <!-- Theme Switcher -->
          <div class="btn-group">
            <button id="btnDay" class="active" onclick="setTheme('day')">☀️ 晴空</button>
            <button id="btnSunset" onclick="setTheme('sunset')">🌅 晚霞</button>
            <button id="btnNight" onclick="setTheme('night')">🌌 极夜</button>
          </div>
    
          <!-- Action Button (Ring Bell) -->
          <button class="action-btn" onclick="ringBell()">🔔 按响车铃</button>
        </div>
      </div>
    
      <script>
        let currentSpeed = 1.0;
        let isPaused = false;
        let audioCtx = null;
    
        // ==========================================
        // 2-BONE INVERSE KINEMATICS (IK) FOR PEDALING
        // ==========================================
        const CRANK_CX = 430;
        const CRANK_CY = 425;
        const CRANK_R = 43;
    
        // Hip positions
        const NEAR_HIP = { x: 382, y: 285 };
        const FAR_HIP = { x: 375, y: 285 };
    
        // Leg segments length: Thigh (L1) and Shin (L2)
        const L1 = 82;
        const L2 = 86;
    
        let crankAngle = Math.PI / 2; // Starts pointing down at t=0
        let lastTime = performance.now();
    
        const nearCrankLine = document.getElementById('nearCrankLine');
        const nearPedal = document.getElementById('nearPedal');
        const nearLegPath = document.getElementById('nearLegPath');
        const nearLegHighlight = document.getElementById('nearLegHighlight');
        const nearKneeCircle = document.getElementById('nearKneeCircle');
        const nearAnkleCircle = document.getElementById('nearAnkleCircle');
        const nearFootGroup = document.getElementById('nearFootGroup');
    
        const farCrankLine = document.getElementById('farCrankLine');
        const farPedal = document.getElementById('farPedal');
        const farLegPath = document.getElementById('farLegPath');
        const farFootGroup = document.getElementById('farFootGroup');
    
        function solveIK(hip, pedalX, pedalY) {
          const dx = pedalX - hip.x;
          const dy = pedalY - hip.y;
          const dist = Math.hypot(dx, dy);
    
          // Clamp distance to avoid triangle inequality violation
          const clampedDist = Math.max(Math.abs(L1 - L2) + 0.1, Math.min(L1 + L2 - 0.1, dist));
    
          const cosBeta = (L1 * L1 + clampedDist * clampedDist - L2 * L2) / (2 * L1 * clampedDist);
          const beta = Math.acos(Math.max(-1, Math.min(1, cosBeta)));
          const alpha = Math.atan2(dy, dx);
    
          // Knee bends forward (alpha - beta)
          const kneeX = hip.x + L1 * Math.cos(alpha - beta);
          const kneeY = hip.y + L1 * Math.sin(alpha - beta);
    
          return { kneeX, kneeY };
        }
    
        function updatePedaling(timestamp) {
          const dt = (timestamp - lastTime) / 1000;
          lastTime = timestamp;
    
          if (!isPaused) {
            // Crank rotation speed matches wheels: 1 full circle per (1.8s / speedMult)
            const angularVelocity = (2 * Math.PI) / (1.8 / currentSpeed);
            crankAngle = (crankAngle + angularVelocity * dt) % (2 * Math.PI);
    
            // Near Pedal Position
            const nearPx = CRANK_CX + CRANK_R * Math.cos(crankAngle);
            const nearPy = CRANK_CY + CRANK_R * Math.sin(crankAngle);
    
            // Far Pedal Position (180 degrees opposite)
            const farPx = CRANK_CX - CRANK_R * Math.cos(crankAngle);
            const farPy = CRANK_CY - CRANK_R * Math.sin(crankAngle);
    
            // 1. Update Near Crank & Pedal
            nearCrankLine.setAttribute('x2', nearPx);
            nearCrankLine.setAttribute('y2', nearPy);
            nearPedal.setAttribute('transform', `translate(${nearPx}, ${nearPy})`);
    
            // 2. Update Near Leg IK
            const nearIK = solveIK(NEAR_HIP, nearPx, nearPy);
            const nearPathD = `M ${NEAR_HIP.x} ${NEAR_HIP.y} Q ${nearIK.kneeX} ${nearIK.kneeY} ${nearPx} ${nearPy}`;
            nearLegPath.setAttribute('d', nearPathD);
            nearLegHighlight.setAttribute('d', nearPathD);
            nearKneeCircle.setAttribute('cx', nearIK.kneeX);
            nearKneeCircle.setAttribute('cy', nearIK.kneeY);
            nearAnkleCircle.setAttribute('cx', nearPx);
            nearAnkleCircle.setAttribute('cy', nearPy);
            nearFootGroup.setAttribute('transform', `translate(${nearPx}, ${nearPy})`);
    
            // 3. Update Far Crank & Pedal
            farCrankLine.setAttribute('x2', farPx);
            farCrankLine.setAttribute('y2', farPy);
            farPedal.setAttribute('transform', `translate(${farPx}, ${farPy})`);
    
            // 4. Update Far Leg IK
            const farIK = solveIK(FAR_HIP, farPx, farPy);
            const farPathD = `M ${FAR_HIP.x} ${FAR_HIP.y} Q ${farIK.kneeX} ${farIK.kneeY} ${farPx} ${farPy}`;
            farLegPath.setAttribute('d', farPathD);
            const farKneeCircle = document.getElementById('farKneeCircle');
            const farAnkleCircle = document.getElementById('farAnkleCircle');
            if (farKneeCircle) {
              farKneeCircle.setAttribute('cx', farIK.kneeX);
              farKneeCircle.setAttribute('cy', farIK.kneeY);
            }
            if (farAnkleCircle) {
              farAnkleCircle.setAttribute('cx', farPx);
              farAnkleCircle.setAttribute('cy', farPy);
            }
            farFootGroup.setAttribute('transform', `translate(${farPx}, ${farPy})`);
          }
    
          requestAnimationFrame(updatePedaling);
        }
    
        // Start IK Animation Loop
        requestAnimationFrame(updatePedaling);
    
        // ==========================================
        // AUDIO & INTERACTIVE FEATURES
        // ==========================================
        function getAudioContext() {
          if (!audioCtx) {
            audioCtx = new (window.AudioContext || window.webkitAudioContext)();
          }
          if (audioCtx.state === 'suspended') {
            audioCtx.resume();
          }
          return audioCtx;
        }
    
        // Bicycle Bell Sound ("Ding-Ding!")
        function playBellSound() {
          try {
            const ctx = getAudioContext();
            const now = ctx.currentTime;
    
            [0, 0.14].forEach((offset, idx) => {
              const osc1 = ctx.createOscillator();
              const osc2 = ctx.createOscillator();
              const gain = ctx.createGain();
    
              osc1.type = 'sine';
              osc2.type = 'triangle';
    
              const baseFreq = idx === 0 ? 2080 : 2620;
              osc1.frequency.setValueAtTime(baseFreq, now + offset);
              osc2.frequency.setValueAtTime(baseFreq * 1.5, now + offset);
    
              gain.gain.setValueAtTime(0.35, now + offset);
              gain.gain.exponentialRampToValueAtTime(0.001, now + offset + 0.6);
    
              osc1.connect(gain);
              osc2.connect(gain);
              gain.connect(ctx.destination);
    
              osc1.start(now + offset);
              osc2.start(now + offset);
              osc1.stop(now + offset + 0.65);
              osc2.stop(now + offset + 0.65);
            });
          } catch (e) {}
        }
    
        // Pelican Honk Sound
        function playHonkSound() {
          try {
            const ctx = getAudioContext();
            const now = ctx.currentTime;
            const osc = ctx.createOscillator();
            const gain = ctx.createGain();
    
            osc.type = 'sawtooth';
            osc.frequency.setValueAtTime(260, now);
            osc.frequency.exponentialRampToValueAtTime(140, now + 0.28);
    
            gain.gain.setValueAtTime(0.3, now);
            gain.gain.exponentialRampToValueAtTime(0.01, now + 0.3);
    
            osc.connect(gain);
            gain.connect(ctx.destination);
    
            osc.start(now);
            osc.stop(now + 0.32);
          } catch (e) {}
        }
    
        // Ring Bell
        function ringBell() {
          playBellSound();
          const bell = document.getElementById('bikeBell');
          bell.classList.remove('bell-ringing');
          void bell.offsetWidth;
          bell.classList.add('bell-ringing');
          showSpeech("叮铃铃~ 前方让一让!🚴");
        }
    
        // Speech Bubble
        let speechTimer = null;
        function showSpeech(text) {
          const bubble = document.getElementById('speechBubble');
          const speechText = document.getElementById('speechText');
          speechText.textContent = text;
          bubble.style.opacity = '1';
          bubble.style.transform = 'translate(540px, 40px)';
    
          clearTimeout(speechTimer);
          speechTimer = setTimeout(() => {
            bubble.style.opacity = '0';
            bubble.style.transform = 'translate(540px, 50px)';
          }, 2500);
        }
    
        // Speed Control
        function setSpeed(speed) {
          isPaused = false;
          currentSpeed = speed;
          document.documentElement.style.setProperty('--anim-speed-mult', speed);
    
          document.getElementById('btnSpeedSlow').classList.toggle('active', speed === 0.6);
          document.getElementById('btnSpeedNorm').classList.toggle('active', speed === 1.0);
          document.getElementById('btnSpeedFast').classList.toggle('active', speed === 2.2);
          document.getElementById('btnPause').classList.remove('active');
          document.getElementById('btnPause').textContent = '⏸️ 暂停';
    
          document.querySelectorAll('*').forEach(el => {
            el.style.animationPlayState = 'running';
          });
        }
    
        // Pause / Resume
        function togglePause() {
          const pauseBtn = document.getElementById('btnPause');
          if (!isPaused) {
            isPaused = true;
            pauseBtn.classList.add('active');
            pauseBtn.textContent = '▶️ 继续';
            document.querySelectorAll('*').forEach(el => {
              el.style.animationPlayState = 'paused';
            });
            showSpeech("踩住刹车,看看海景~ ⏸️");
          } else {
            isPaused = false;
            pauseBtn.classList.remove('active');
            pauseBtn.textContent = '⏸️ 暂停';
            document.querySelectorAll('*').forEach(el => {
              el.style.animationPlayState = 'running';
            });
            showSpeech("脚踏一蹬,重新出发!💨");
          }
        }
    
        // Themes
        function setTheme(theme) {
          document.body.classList.remove('sunset-theme', 'night-theme');
          document.getElementById('btnDay').classList.remove('active');
          document.getElementById('btnSunset').classList.remove('active');
          document.getElementById('btnNight').classList.remove('active');
    
          const sky = document.getElementById('skyGrad');
          const sunCore = document.getElementById('sunCore');
          const sunMid = document.getElementById('sunMid');
          const sunCircleCore = document.getElementById('sunCircleCore');
    
          if (theme === 'day') {
            document.getElementById('btnDay').classList.add('active');
            sky.children[0].setAttribute('stop-color', '#7dd3fc');
            sky.children[1].setAttribute('stop-color', '#bae6fd');
            sky.children[2].setAttribute('stop-color', '#fef08a');
            sunCore.setAttribute('stop-color', '#fef08a');
            sunMid.setAttribute('stop-color', '#fde047');
            sunCircleCore.setAttribute('fill', '#fef08a');
          } else if (theme === 'sunset') {
            document.body.classList.add('sunset-theme');
            document.getElementById('btnSunset').classList.add('active');
            sky.children[0].setAttribute('stop-color', '#f97316');
            sky.children[1].setAttribute('stop-color', '#ec4899');
            sky.children[2].setAttribute('stop-color', '#4338ca');
            sunCore.setAttribute('stop-color', '#fb923c');
            sunMid.setAttribute('stop-color', '#f43f5e');
            sunCircleCore.setAttribute('fill', '#fda4af');
          } else if (theme === 'night') {
            document.body.classList.add('night-theme');
            document.getElementById('btnNight').classList.add('active');
            sky.children[0].setAttribute('stop-color', '#020617');
            sky.children[1].setAttribute('stop-color', '#0f172a');
            sky.children[2].setAttribute('stop-color', '#064e3b');
            sunCore.setAttribute('stop-color', '#e2e8f0');
            sunMid.setAttribute('stop-color', '#94a3b8');
            sunCircleCore.setAttribute('fill', '#f8fafc');
          }
        }
    
        // Click Events
        document.getElementById('bikeBell').addEventListener('click', (e) => {
          e.stopPropagation();
          ringBell();
        });
    
        const quotes = [
          "嘎嘎!今天顺风真好骑!💨",
          "喉囊里的小鱼可新鲜了!🐟",
          "环岛骑行第42公里打卡!🚩",
          "戴上墨镜,我就是整条街最酷的鸟!😎",
          "咔嗒咔嗒,脚踏踩得飞起~✨"
        ];
        let quoteIdx = 0;
    
        document.getElementById('pelicanGroup').addEventListener('click', () => {
          playHonkSound();
          quoteIdx = (quoteIdx + 1) % quotes.length;
          showSpeech(quotes[quoteIdx]);
        });
    
        document.getElementById('pouchFish').addEventListener('click', (e) => {
          e.stopPropagation();
          playHonkSound();
          showSpeech("小鱼:救命!但兜风好像挺爽的…🐟");
        });
    
        // Toggle headlight beam manually
        document.getElementById('bikeHeadlight').addEventListener('click', (e) => {
          e.stopPropagation();
          const beam = document.querySelector('.headlight-beam');
          const cur = window.getComputedStyle(beam).opacity;
          beam.style.opacity = parseFloat(cur) > 0.1 ? '0' : '0.55';
          showSpeech("车灯开关咔嗒!💡");
        });
      </script>
    </body>
    </html>
    
    
    0
  5. newbietan 黄金 3 YEARS 2 个月前

    已经高强度用过一天了,感觉还可以,刷新我对Gemini最近一段时间的表现

    0
  6. keioio 白银 3 YEARS 2 个月前

    好像用的人还是少

    0