{"id":2612,"date":"2026-04-12T18:00:17","date_gmt":"2026-04-12T16:00:17","guid":{"rendered":"https:\/\/www.petrklichelp.cz\/?page_id=2612"},"modified":"2026-04-12T22:34:09","modified_gmt":"2026-04-12T20:34:09","slug":"ptaci_detektiv_2","status":"publish","type":"page","link":"https:\/\/www.petrklichelp.cz\/en\/ptaci_detektiv_2\/","title":{"rendered":"Pta\u010d\u00ed detektiv 2.0"},"content":{"rendered":"<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"318\" src=\"https:\/\/www.petrklichelp.cz\/wp-content\/uploads\/2026\/04\/PD-2.0-banner-1024x318.png\" alt=\"\" class=\"wp-image-2647\" srcset=\"https:\/\/www.petrklichelp.cz\/wp-content\/uploads\/2026\/04\/PD-2.0-banner-1024x318.png 1024w, https:\/\/www.petrklichelp.cz\/wp-content\/uploads\/2026\/04\/PD-2.0-banner-300x93.png 300w, https:\/\/www.petrklichelp.cz\/wp-content\/uploads\/2026\/04\/PD-2.0-banner-768x238.png 768w, https:\/\/www.petrklichelp.cz\/wp-content\/uploads\/2026\/04\/PD-2.0-banner-1536x477.png 1536w, https:\/\/www.petrklichelp.cz\/wp-content\/uploads\/2026\/04\/PD-2.0-banner-18x6.png 18w, https:\/\/www.petrklichelp.cz\/wp-content\/uploads\/2026\/04\/PD-2.0-banner.png 1856w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n\n\n<div id=\"bird-app\" class=\"bird-app\">\n  <div class=\"bg-overlay\"><\/div>\n\n  <div class=\"page-shell\">\n    <div class=\"game-card\">\n\n      <div id=\"gameScreen\">\n        <div class=\"top-meta\">\n          <div class=\"brand\">Bird Detective 2.0<\/div>\n          <div id=\"scoreBox\" class=\"score-pill\">Score: 0 \/ 8<\/div>\n        <\/div>\n\n        <div class=\"progress-wrap\">\n          <div class=\"progress-top\">\n            <span id=\"questionCounter\">Bird 1 of 8<\/span>\n            <span id=\"progressPercent\">13 %<\/span>\n          <\/div>\n          <div class=\"progress-bar\">\n            <div id=\"progressFill\" class=\"progress-fill\"><\/div>\n          <\/div>\n        <\/div>\n\n        <div class=\"hero-block\">\n          <div class=\"hero-icon\">\ud83d\udd75\ufe0f\u200d\u2642\ufe0f\ud83d\udc26<\/div>\n          <h1>Bird Detective 2.0<\/h1>\n          <p>Listen carefully and discover which bird is hiding behind this sound.<\/p>\n        <\/div>\n\n        <audio id=\"audio\" preload=\"none\"><\/audio>\n\n        <div class=\"audio-panel\">\n          <div class=\"audio-panel-left\">\n            <div class=\"audio-label\">Audio track<\/div>\n            <div id=\"audioTitle\" class=\"audio-title\">Guess the bird<\/div>\n          <\/div>\n          <button id=\"topPlayPauseBtn\" class=\"main-audio-btn\" aria-label=\"Play bird sound\">\n            \u25b6 Play\n          <\/button>\n        <\/div>\n\n        <div class=\"input-block\">\n          <label for=\"guess\" class=\"input-label\">Your guess<\/label>\n          <input id=\"guess\" type=\"text\" placeholder=\"For example: European Robin\" autocomplete=\"off\">\n          <button id=\"submitBtn\" class=\"submit-btn\">Submit and Reveal<\/button>\n        <\/div>\n\n        <div id=\"result\" class=\"result-box\"><\/div>\n\n        <div id=\"reveal\" class=\"reveal-card\" style=\"display:none;\">\n          <div class=\"reveal-image-wrap\">\n            <img id=\"birdImg\" alt=\"Revealed bird\">\n          <\/div>\n\n          <div class=\"reveal-content\">\n            <div class=\"reveal-badge\">Revealed bird<\/div>\n            <h2 id=\"birdName\"><\/h2>\n            <p id=\"birdFact\" class=\"reveal-note\"><\/p>\n          <\/div>\n        <\/div>\n\n        <div class=\"nav-area\">\n          <button id=\"nextBtn\" class=\"next-btn\" style=\"display:none;\">\ud83c\udf3f Next Bird \u2192<\/button>\n        <\/div>\n      <\/div>\n\n      <div id=\"finalScreen\" class=\"final-screen\" style=\"display:none;\">\n        <div class=\"final-decor decor1\">\ud83c\udf43<\/div>\n        <div class=\"final-decor decor2\">\ud83c\udf3f<\/div>\n        <div class=\"final-decor decor3\">\ud83d\udc26<\/div>\n\n        <div class=\"final-label\">Mission complete<\/div>\n        <h2>Investigation result<\/h2>\n\n        <div id=\"finalScore\" class=\"final-score\">0 \/ 8<\/div>\n\n        <div id=\"finalBadge\" class=\"final-badge\">Bird Beginner<\/div>\n\n        <p id=\"finalMessage\" class=\"final-message\">Well done!<\/p>\n\n        <button id=\"restartGameBtn\" class=\"restart-btn\">\ud83d\udd04 Play Again<\/button>\n      <\/div>\n\n    <\/div>\n  <\/div>\n<\/div>\n\n<div id=\"stickyPlayer\" class=\"sticky-player\">\n  <div class=\"sticky-inner\">\n    <div class=\"sticky-text\">\n      <div class=\"sticky-label\">Now playing<\/div>\n      <div id=\"stickyBirdName\" class=\"sticky-name\">Guess the bird<\/div>\n    <\/div>\n    <button id=\"floatPlayPauseBtn\" class=\"sticky-btn\" aria-label=\"Play bird sound\">\u25b6<\/button>\n  <\/div>\n<\/div>\n\n<style>\n  * {\n    box-sizing: border-box;\n  }\n\n  .bird-app {\n    min-height: 100vh;\n    position: relative;\n    overflow: hidden;\n    font-family: Georgia, serif;\n    color: #f7f2e8;\n    background:\n      url('https:\/\/www.petrklichelp.cz\/wp-content\/uploads\/2026\/03\/wallpapersden.com_jungle-fantasy-deer_1920x1200.jpg') center\/cover no-repeat fixed;\n  }\n\n  .bg-overlay {\n    position: absolute;\n    inset: 0;\n    background:\n      linear-gradient(180deg, rgba(10, 23, 16, 0.55), rgba(10, 23, 16, 0.84)),\n      radial-gradient(circle at top right, rgba(242, 201, 76, 0.10), transparent 30%);\n    pointer-events: none;\n  }\n\n  .page-shell {\n    position: relative;\n    z-index: 1;\n    min-height: 100vh;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    padding: 26px;\n  }\n\n  .game-card {\n    width: 100%;\n    max-width: 820px;\n    background: rgba(26, 41, 28, 0.78);\n    backdrop-filter: blur(12px);\n    border: 1px solid rgba(255,255,255,0.10);\n    border-radius: 30px;\n    padding: 30px;\n    box-shadow: 0 24px 60px rgba(0,0,0,0.35);\n    position: relative;\n  }\n\n  .top-meta {\n    display: flex;\n    justify-content: space-between;\n    align-items: center;\n    gap: 14px;\n    flex-wrap: wrap;\n    margin-bottom: 18px;\n  }\n\n  .brand {\n    font-size: 13px;\n    text-transform: uppercase;\n    letter-spacing: 2px;\n    color: #dcd4bf;\n  }\n\n  .score-pill {\n    background: rgba(255,255,255,0.12);\n    color: #fff8dc;\n    padding: 10px 16px;\n    border-radius: 999px;\n    font-size: 16px;\n    font-weight: bold;\n  }\n\n  .progress-wrap {\n    margin-bottom: 26px;\n  }\n\n  .progress-top {\n    display: flex;\n    justify-content: space-between;\n    gap: 10px;\n    font-size: 14px;\n    color: #e7dfca;\n    margin-bottom: 8px;\n  }\n\n  .progress-bar {\n    width: 100%;\n    height: 12px;\n    background: rgba(255,255,255,0.12);\n    border-radius: 999px;\n    overflow: hidden;\n  }\n\n  .progress-fill {\n    width: 12.5%;\n    height: 100%;\n    border-radius: 999px;\n    background: linear-gradient(90deg, #6d8f50, #f2c94c);\n    transition: width 0.35s ease;\n  }\n\n  .hero-block {\n    text-align: center;\n    margin-bottom: 28px;\n  }\n\n  .hero-icon {\n    font-size: 44px;\n    margin-bottom: 10px;\n  }\n\n  .hero-block h1 {\n    margin: 0 0 10px 0;\n    font-size: 40px;\n    line-height: 1.12;\n    color: #fff7df;\n  }\n\n  .hero-block p {\n    margin: 0;\n    font-size: 19px;\n    color: #e6dcc6;\n    line-height: 1.5;\n  }\n\n  .audio-panel {\n    display: flex;\n    align-items: center;\n    justify-content: space-between;\n    gap: 18px;\n    background: rgba(255,255,255,0.08);\n    border: 1px solid rgba(255,255,255,0.08);\n    border-radius: 22px;\n    padding: 18px;\n    margin-bottom: 24px;\n  }\n\n  .audio-panel-left {\n    min-width: 0;\n  }\n\n  .audio-label {\n    font-size: 12px;\n    text-transform: uppercase;\n    letter-spacing: 1.5px;\n    color: #d6cfba;\n    margin-bottom: 6px;\n  }\n\n  .audio-title {\n    font-size: 20px;\n    font-weight: bold;\n    color: #fff8dc;\n  }\n\n  .main-audio-btn {\n    border: none;\n    border-radius: 999px;\n    background: linear-gradient(135deg, #6d8f50, #7ba357);\n    color: white;\n    padding: 14px 24px;\n    font-size: 17px;\n    font-weight: bold;\n    cursor: pointer;\n    box-shadow: 0 10px 24px rgba(0,0,0,0.2);\n    transition: transform 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease;\n    flex-shrink: 0;\n  }\n\n  .input-block {\n    display: flex;\n    flex-direction: column;\n    gap: 12px;\n    margin-bottom: 18px;\n  }\n\n  .input-label {\n    font-size: 15px;\n    color: #ece3cf;\n    font-weight: bold;\n  }\n\n  #guess {\n    width: 100%;\n    padding: 16px 18px;\n    border-radius: 16px;\n    border: 1px solid rgba(255,255,255,0.12);\n    background: rgba(255,255,255,0.96);\n    color: #1d2b1f;\n    font-size: 17px;\n    outline: none;\n  }\n\n  #guess:focus {\n    border-color: rgba(242, 201, 76, 0.8);\n    box-shadow: 0 0 0 4px rgba(242, 201, 76, 0.14);\n  }\n\n  .submit-btn,\n  .next-btn,\n  .restart-btn,\n  .sticky-btn {\n    transition: transform 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease;\n  }\n\n  .submit-btn {\n    border: none;\n    border-radius: 18px;\n    background: #6d8f50;\n    color: white;\n    padding: 14px 20px;\n    font-size: 16px;\n    font-weight: bold;\n    cursor: pointer;\n    box-shadow: 0 8px 20px rgba(0,0,0,0.18);\n  }\n\n  .main-audio-btn:hover,\n  .submit-btn:hover,\n  .next-btn:hover,\n  .restart-btn:hover,\n  .sticky-btn:hover {\n    transform: translateY(-1px) scale(1.02);\n    box-shadow: 0 12px 28px rgba(0,0,0,0.24);\n  }\n\n  .main-audio-btn:active,\n  .submit-btn:active,\n  .next-btn:active,\n  .restart-btn:active,\n  .sticky-btn:active {\n    transform: scale(0.97);\n  }\n\n  .result-box {\n    min-height: 34px;\n    text-align: center;\n    font-size: 20px;\n    font-weight: bold;\n    margin: 8px 0 8px 0;\n  }\n\n  .reveal-card {\n    margin-top: 18px;\n    display: grid;\n    grid-template-columns: 1.1fr 1fr;\n    gap: 18px;\n    align-items: stretch;\n    background: rgba(255,255,255,0.08);\n    border: 1px solid rgba(255,255,255,0.08);\n    border-radius: 24px;\n    padding: 18px;\n  }\n\n  .reveal-image-wrap img {\n    width: 100%;\n    height: 100%;\n    object-fit: cover;\n    border-radius: 18px;\n    box-shadow: 0 10px 24px rgba(0,0,0,0.2);\n  }\n\n  .reveal-content {\n    display: flex;\n    flex-direction: column;\n    justify-content: center;\n  }\n\n  .reveal-badge {\n    display: inline-block;\n    align-self: flex-start;\n    background: rgba(242, 201, 76, 0.16);\n    color: #fff3c2;\n    padding: 8px 12px;\n    border-radius: 999px;\n    font-size: 12px;\n    text-transform: uppercase;\n    letter-spacing: 1px;\n    margin-bottom: 12px;\n  }\n\n  .reveal-content h2 {\n    margin: 0 0 10px 0;\n    font-size: 30px;\n    color: #fff8dc;\n  }\n\n  .reveal-note {\n    margin: 0;\n    color: #f0e6cf;\n    font-size: 17px;\n    line-height: 1.5;\n    background: rgba(242, 201, 76, 0.10);\n    padding: 12px 14px;\n    border-radius: 14px;\n  }\n\n  .nav-area {\n    text-align: center;\n    margin-top: 22px;\n  }\n\n  .next-btn {\n    border: none;\n    border-radius: 999px;\n    background: #4a7c59;\n    color: white;\n    padding: 14px 24px;\n    font-size: 17px;\n    font-weight: bold;\n    cursor: pointer;\n    box-shadow: 0 10px 24px rgba(0,0,0,0.2);\n  }\n\n  .final-screen {\n    text-align: center;\n    position: relative;\n    padding: 16px 10px 6px 10px;\n  }\n\n  .final-label {\n    font-size: 13px;\n    letter-spacing: 2px;\n    text-transform: uppercase;\n    color: #d9d2be;\n    margin-bottom: 16px;\n  }\n\n  .final-screen h2 {\n    margin: 0 0 16px 0;\n    font-size: 42px;\n    color: #fff6d5;\n  }\n\n  .final-score {\n    font-size: 62px;\n    font-weight: bold;\n    color: #fff8dc;\n    margin-bottom: 16px;\n    animation: popIn 0.7s ease;\n  }\n\n  .final-badge {\n    display: inline-block;\n    background: linear-gradient(135deg, rgba(242, 201, 76, 0.22), rgba(216, 155, 60, 0.20));\n    border: 1px solid rgba(242, 201, 76, 0.25);\n    color: #fff3c7;\n    padding: 12px 18px;\n    border-radius: 999px;\n    font-size: 18px;\n    font-weight: bold;\n    margin-bottom: 18px;\n  }\n\n  .final-message {\n    font-size: 23px;\n    line-height: 1.5;\n    color: #f5f1e8;\n    margin: 0 0 26px 0;\n  }\n\n  .restart-btn {\n    border: none;\n    border-radius: 999px;\n    background: #d89b3c;\n    color: white;\n    padding: 15px 28px;\n    font-size: 18px;\n    font-weight: bold;\n    cursor: pointer;\n    box-shadow: 0 10px 24px rgba(0,0,0,0.24);\n  }\n\n  .final-decor {\n    position: absolute;\n    font-size: 34px;\n    animation: floaty 3s ease-in-out infinite;\n    pointer-events: none;\n  }\n\n  .decor1 { top: 0; left: 12px; }\n  .decor2 { top: 22px; right: 18px; animation-delay: 0.7s; }\n  .decor3 { top: 94px; left: 50%; transform: translateX(-50%); animation-delay: 1.3s; }\n\n  .sticky-player {\n    position: fixed;\n    right: 18px;\n    bottom: 18px;\n    z-index: 9999;\n  }\n\n  .sticky-inner {\n    display: flex;\n    align-items: center;\n    gap: 12px;\n    background: rgba(24, 38, 28, 0.94);\n    backdrop-filter: blur(12px);\n    border: 1px solid rgba(255,255,255,0.10);\n    border-radius: 999px;\n    padding: 10px 12px 10px 16px;\n    box-shadow: 0 14px 30px rgba(0,0,0,0.28);\n    max-width: 290px;\n  }\n\n  .sticky-text {\n    min-width: 0;\n  }\n\n  .sticky-label {\n    font-size: 11px;\n    letter-spacing: 1px;\n    text-transform: uppercase;\n    color: #d9d2be;\n    opacity: 0.85;\n  }\n\n  .sticky-name {\n    font-size: 14px;\n    font-weight: bold;\n    color: #fff8dc;\n    white-space: nowrap;\n    overflow: hidden;\n    text-overflow: ellipsis;\n  }\n\n  .sticky-btn {\n    width: 48px;\n    height: 48px;\n    border: none;\n    border-radius: 50%;\n    background: #6d8f50;\n    color: white;\n    font-size: 18px;\n    font-weight: bold;\n    cursor: pointer;\n    flex-shrink: 0;\n    box-shadow: 0 8px 18px rgba(0,0,0,0.22);\n  }\n\n  @keyframes popIn {\n    0% { transform: scale(0.4); opacity: 0; }\n    70% { transform: scale(1.12); opacity: 1; }\n    100% { transform: scale(1); }\n  }\n\n  @keyframes floaty {\n    0% { transform: translateY(0px) rotate(0deg); opacity: 0.92; }\n    50% { transform: translateY(-12px) rotate(5deg); opacity: 1; }\n    100% { transform: translateY(0px) rotate(0deg); opacity: 0.92; }\n  }\n\n  @media (max-width: 760px) {\n    .page-shell {\n      padding: 16px;\n      align-items: flex-start;\n    }\n\n    .game-card {\n      padding: 20px;\n    }\n\n    .hero-block h1 {\n      font-size: 32px;\n    }\n\n    .audio-panel {\n      flex-direction: column;\n      align-items: stretch;\n    }\n\n    .main-audio-btn {\n      width: 100%;\n    }\n\n    .reveal-card {\n      grid-template-columns: 1fr;\n    }\n  }\n\n  @media (max-width: 640px) {\n    .sticky-player {\n      left: 12px;\n      right: 12px;\n      bottom: 12px;\n    }\n\n    .sticky-inner {\n      width: 100%;\n      max-width: none;\n      justify-content: space-between;\n    }\n\n    .final-score {\n      font-size: 52px;\n    }\n\n    .final-screen h2 {\n      font-size: 34px;\n    }\n  }\n<\/style>\n\n<script>\nconst birds = {\n  i: {\n    name: \"Eurasian Nuthatch\",\n    audio: \"https:\/\/www.petrklichelp.cz\/wp-content\/uploads\/2026\/04\/BRHLIK-LESNI.mp3\",\n    image: \"https:\/\/www.petrklichelp.cz\/wp-content\/uploads\/2026\/04\/naturepic-woodpecker-great-tit-6487487-scaled.jpg\",\n    answers: [\"nuthatch\", \"eurasian nuthatch\"],\n    fact: \"The Eurasian Nuthatch can climb down tree trunks headfirst, which is unusual among birds.\"\n  },\n  j: {\n    name: \"Common Chiffchaff\",\n    audio: \"https:\/\/www.petrklichelp.cz\/wp-content\/uploads\/2026\/04\/BUDNICEK-MENSI.mp3\",\n    image: \"https:\/\/www.petrklichelp.cz\/wp-content\/uploads\/2026\/04\/horth-nature-5241012-scaled.jpg\",\n    answers: [\"chiffchaff\", \"common chiffchaff\", \"chiff chaff\"],\n    fact: \"Its song sounds like a repeated \u201cchiff-chaff,\u201d which makes it easier to recognize.\"\n  },\n  k: {\n    name: \"European Robin\",\n    audio: \"https:\/\/www.petrklichelp.cz\/wp-content\/uploads\/2026\/04\/Cervenka-obecna.mp3\",\n    image: \"https:\/\/www.petrklichelp.cz\/wp-content\/uploads\/2026\/04\/gruendercoach-robin-10205230-scaled.jpg\",\n    answers: [\"robin\", \"european robin\", \"common robin\"],\n    fact: \"The European Robin is easy to recognize because of its orange-red breast.\"\n  },\n  l: {\n    name: \"Song Thrush\",\n    audio: \"https:\/\/www.petrklichelp.cz\/wp-content\/uploads\/2026\/04\/DROZD-ZPEVNY.mp3\",\n    image: \"https:\/\/www.petrklichelp.cz\/wp-content\/uploads\/2026\/04\/canadian-nature-visions-swainsons-thrush-6937341-scaled.jpg\",\n    answers: [\"song thrush\", \"thrush\"],\n    fact: \"The Song Thrush often repeats short musical phrases twice in a row.\"\n  },\n  m: {\n    name: \"Common Blackbird\",\n    audio: \"https:\/\/www.petrklichelp.cz\/wp-content\/uploads\/2026\/04\/Kos-cerny.mp3\",\n    image: \"https:\/\/www.petrklichelp.cz\/wp-content\/uploads\/2026\/04\/brenkee-blackbird-1348356-scaled.jpg\",\n    answers: [\"blackbird\", \"common blackbird\"],\n    fact: \"The male Common Blackbird is black all over and has a bright yellow beak.\"\n  },\n  n: {\n    name: \"Common Chaffinch\",\n    audio: \"https:\/\/www.petrklichelp.cz\/wp-content\/uploads\/2026\/04\/PENKAVA-OBECNA.mp3\",\n    image: \"https:\/\/www.petrklichelp.cz\/wp-content\/uploads\/2026\/04\/fotoblend-bird-8200917-scaled.jpg\",\n    answers: [\"chaffinch\", \"common chaffinch\"],\n    fact: \"The Common Chaffinch is one of the most widespread and familiar songbirds in Europe.\"\n  },\n  o: {\n    name: \"Eurasian Wren\",\n    audio: \"https:\/\/www.petrklichelp.cz\/wp-content\/uploads\/2026\/04\/STRIZLIK-OBECNY.mp3\",\n    image: \"https:\/\/www.petrklichelp.cz\/wp-content\/uploads\/2026\/04\/gruendercoach-eurasian-wren-9659006-scaled.jpg\",\n    answers: [\"wren\", \"eurasian wren\"],\n    fact: \"The Eurasian Wren is tiny, but its song is surprisingly loud and powerful.\"\n  },\n  p: {\n    name: \"Great Tit\",\n    audio: \"https:\/\/www.petrklichelp.cz\/wp-content\/uploads\/2026\/04\/SYKORA-KONADRA.mp3\",\n    image: \"https:\/\/www.petrklichelp.cz\/wp-content\/uploads\/2026\/04\/bergadder-tit-9183622-scaled.jpg\",\n    answers: [\"great tit\"],\n    fact: \"The Great Tit has a yellow belly with a dark stripe and often visits garden feeders.\"\n  }\n};\n\nconst order = [\"i\", \"j\", \"k\", \"l\", \"m\", \"n\", \"o\", \"p\"];\nconst totalBirds = order.length;\n\nconst params = new URLSearchParams(window.location.search);\nconst birdCode = (params.get(\"bird\") || \"i\").toLowerCase();\nconst bird = birds[birdCode] || birds.i;\nconst currentIndex = order.indexOf(birdCode);\nconst questionNumber = currentIndex >= 0 ? currentIndex + 1 : 1;\n\nconst audio = document.getElementById(\"audio\");\nconst img = document.getElementById(\"birdImg\");\nconst name = document.getElementById(\"birdName\");\nconst birdFact = document.getElementById(\"birdFact\");\nconst audioTitle = document.getElementById(\"audioTitle\");\nconst stickyBirdName = document.getElementById(\"stickyBirdName\");\nconst topPlayPauseBtn = document.getElementById(\"topPlayPauseBtn\");\nconst floatPlayPauseBtn = document.getElementById(\"floatPlayPauseBtn\");\nconst submitBtn = document.getElementById(\"submitBtn\");\nconst nextBtn = document.getElementById(\"nextBtn\");\nconst resultBox = document.getElementById(\"result\");\nconst revealBox = document.getElementById(\"reveal\");\nconst guessInput = document.getElementById(\"guess\");\nconst scoreBox = document.getElementById(\"scoreBox\");\nconst questionCounter = document.getElementById(\"questionCounter\");\nconst progressPercent = document.getElementById(\"progressPercent\");\nconst progressFill = document.getElementById(\"progressFill\");\nconst gameScreen = document.getElementById(\"gameScreen\");\nconst finalScreen = document.getElementById(\"finalScreen\");\nconst finalScore = document.getElementById(\"finalScore\");\nconst finalBadge = document.getElementById(\"finalBadge\");\nconst finalMessage = document.getElementById(\"finalMessage\");\nconst restartGameBtn = document.getElementById(\"restartGameBtn\");\n\naudio.src = bird.audio;\nimg.src = bird.image;\nname.textContent = bird.name;\nbirdFact.textContent = \"\";\naudioTitle.textContent = \"Guess the bird\";\nstickyBirdName.textContent = \"Guess the bird\";\n\nfunction normalizeText(text) {\n  return text\n    .toLowerCase()\n    .trim()\n    .replace(\/[^\\w\\s]\/g, \"\")\n    .replace(\/\\s+\/g, \" \");\n}\n\nfunction getScore() {\n  return parseInt(sessionStorage.getItem(\"birdScoreDetective2En\") || \"0\", 10);\n}\n\nfunction setScore(value) {\n  sessionStorage.setItem(\"birdScoreDetective2En\", value);\n}\n\nfunction getAnsweredBirds() {\n  return JSON.parse(sessionStorage.getItem(\"answeredBirdsDetective2En\") || \"[]\");\n}\n\nfunction setAnsweredBirds(arr) {\n  sessionStorage.setItem(\"answeredBirdsDetective2En\", JSON.stringify(arr));\n}\n\nfunction updateScoreUI() {\n  scoreBox.textContent = `Score: ${getScore()} \/ ${totalBirds}`;\n}\n\nfunction updateProgressUI() {\n  const percent = Math.round((questionNumber \/ totalBirds) * 100);\n  questionCounter.textContent = `Bird ${questionNumber} of ${totalBirds}`;\n  progressPercent.textContent = `${percent} %`;\n  progressFill.style.width = `${percent}%`;\n}\n\nfunction updatePlayPauseButtons() {\n  const isPaused = audio.paused;\n  topPlayPauseBtn.textContent = isPaused ? \"\u25b6 Play\" : \"\u23f8 Pause\";\n  floatPlayPauseBtn.textContent = isPaused ? \"\u25b6\" : \"\u23f8\";\n\n  topPlayPauseBtn.setAttribute(\"aria-label\", isPaused ? \"Play bird sound\" : \"Pause bird sound\");\n  floatPlayPauseBtn.setAttribute(\"aria-label\", isPaused ? \"Play bird sound\" : \"Pause bird sound\");\n}\n\nfunction toggleAudio() {\n  if (audio.paused) {\n    audio.play();\n  } else {\n    audio.pause();\n  }\n}\n\naudio.addEventListener(\"play\", updatePlayPauseButtons);\naudio.addEventListener(\"pause\", updatePlayPauseButtons);\naudio.addEventListener(\"ended\", function () {\n  audio.currentTime = 0;\n  updatePlayPauseButtons();\n});\n\ntopPlayPauseBtn.addEventListener(\"click\", toggleAudio);\nfloatPlayPauseBtn.addEventListener(\"click\", toggleAudio);\n\nfunction getFinalMessage(score, total) {\n  const ratio = score \/ total;\n  if (ratio === 1) return \"You did not miss a single bird. That was the work of a true master bird detective.\";\n  if (ratio >= 0.75) return \"Excellent work! You have a sharp ear and bird sounds are clearly familiar to you.\";\n  if (ratio >= 0.5) return \"Very nice! You identified many birds and did a solid detective job.\";\n  if (ratio >= 0.25) return \"Good job! Some bird voices were tricky, but next time you will uncover even more.\";\n  return \"No worries. Every great detective starts with practice. Try again and listen even more carefully.\";\n}\n\nfunction getFinalBadge(score, total) {\n  const ratio = score \/ total;\n  if (ratio === 1) return \"\ud83c\udfc6 Master Bird Detective\";\n  if (ratio >= 0.75) return \"\ud83d\udd75\ufe0f\u200d\u2642\ufe0f Expert Bird Detective\";\n  if (ratio >= 0.5) return \"\ud83d\udd0e Skilled Bird Observer\";\n  if (ratio >= 0.25) return \"\ud83c\udf3f Beginner Tracker\";\n  return \"\ud83d\udc23 New Bird Explorer\";\n}\n\nfunction isCorrectAnswer(guess, acceptedAnswers) {\n  const normalizedGuess = normalizeText(guess);\n  const normalizedAnswers = acceptedAnswers.map(normalizeText);\n  return normalizedAnswers.includes(normalizedGuess);\n}\n\nfunction revealBird() {\n  audio.pause();\n  audio.currentTime = 0;\n  updatePlayPauseButtons();\n\n  revealBox.style.display = \"grid\";\n  guessInput.disabled = true;\n  stickyBirdName.textContent = bird.name;\n  audioTitle.textContent = bird.name;\n  birdFact.textContent = bird.fact;\n\n  topPlayPauseBtn.style.opacity = \"0.55\";\n  topPlayPauseBtn.style.pointerEvents = \"none\";\n\n  const isLastBird = currentIndex === order.length - 1;\n  nextBtn.textContent = isLastBird ? \"\ud83c\udfc1 Show Final Result\" : \"\ud83c\udf3f Next Bird \u2192\";\n  nextBtn.style.display = \"inline-block\";\n\n  submitBtn.disabled = true;\n  submitBtn.style.opacity = \"0.72\";\n  submitBtn.style.cursor = \"default\";\n}\n\nfunction checkAnswer() {\n  const guess = guessInput.value.trim();\n  const answeredBirds = getAnsweredBirds();\n\n  if (!guess) {\n    resultBox.innerHTML = \"\u270d\ufe0f Please type your guess first.\";\n    return;\n  }\n\n  const correct = isCorrectAnswer(guess, bird.answers);\n\n  if (correct) {\n    resultBox.innerHTML = \"\u2705 Correct!\";\n    if (!answeredBirds.includes(birdCode)) {\n      setScore(getScore() + 1);\n      answeredBirds.push(birdCode);\n      setAnsweredBirds(answeredBirds);\n      updateScoreUI();\n    }\n  } else {\n    resultBox.innerHTML = `\u274c Not quite. This bird is <strong>${bird.name}<\/strong>.`;\n    if (!answeredBirds.includes(birdCode)) {\n      answeredBirds.push(birdCode);\n      setAnsweredBirds(answeredBirds);\n    }\n  }\n\n  revealBird();\n}\n\nfunction showFinalScreen() {\n  const score = getScore();\n  gameScreen.style.display = \"none\";\n  finalScreen.style.display = \"block\";\n  finalScore.textContent = `${score} \/ ${totalBirds}`;\n  finalBadge.textContent = getFinalBadge(score, totalBirds);\n  finalMessage.textContent = getFinalMessage(score, totalBirds);\n}\n\nsubmitBtn.addEventListener(\"click\", checkAnswer);\n\nguessInput.addEventListener(\"keydown\", function(event) {\n  if (event.key === \"Enter\" && !submitBtn.disabled) {\n    checkAnswer();\n  }\n});\n\nnextBtn.addEventListener(\"click\", function () {\n  const isLastBird = currentIndex === order.length - 1;\n\n  if (isLastBird) {\n    showFinalScreen();\n    return;\n  }\n\n  const next = order[currentIndex + 1];\n  window.location.search = \"?bird=\" + next;\n});\n\nrestartGameBtn.addEventListener(\"click\", function () {\n  sessionStorage.removeItem(\"birdScoreDetective2En\");\n  sessionStorage.removeItem(\"answeredBirdsDetective2En\");\n  window.location.search = \"?bird=i\";\n});\n\nif (!sessionStorage.getItem(\"birdScoreDetective2En\") || birdCode === \"i\") {\n  if (birdCode === \"i\" && !params.has(\"resume\")) {\n    setScore(0);\n    setAnsweredBirds([]);\n  }\n}\n\nupdateScoreUI();\nupdateProgressUI();\nupdatePlayPauseButtons();\n<\/script>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img decoding=\"async\" width=\"1024\" height=\"1024\" src=\"https:\/\/www.petrklichelp.cz\/wp-content\/uploads\/2026\/04\/qr-code-21-1024x1024.png\" alt=\"\" class=\"wp-image-2618\" style=\"width:296px;height:auto\" srcset=\"https:\/\/www.petrklichelp.cz\/wp-content\/uploads\/2026\/04\/qr-code-21-1024x1024.png 1024w, https:\/\/www.petrklichelp.cz\/wp-content\/uploads\/2026\/04\/qr-code-21-300x300.png 300w, https:\/\/www.petrklichelp.cz\/wp-content\/uploads\/2026\/04\/qr-code-21-150x150.png 150w, https:\/\/www.petrklichelp.cz\/wp-content\/uploads\/2026\/04\/qr-code-21-768x768.png 768w, https:\/\/www.petrklichelp.cz\/wp-content\/uploads\/2026\/04\/qr-code-21-12x12.png 12w, https:\/\/www.petrklichelp.cz\/wp-content\/uploads\/2026\/04\/qr-code-21.png 1147w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>Bird Detective 2.0 Score: 0 \/ 8 Bird 1 of 8 13 % \ud83d\udd75\ufe0f\u200d\u2642\ufe0f\ud83d\udc26 Bird Detective 2.0 Listen carefully and&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-2612","page","type-page","status-publish","hentry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Pta\u010d\u00ed detektiv 2.0 - Petrkl\u00ed\u010d help<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.petrklichelp.cz\/en\/ptaci_detektiv_2\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Pta\u010d\u00ed detektiv 2.0 - Petrkl\u00ed\u010d help\" \/>\n<meta property=\"og:description\" content=\"Bird Detective 2.0 Score: 0 \/ 8 Bird 1 of 8 13 % \ud83d\udd75\ufe0f\u200d\u2642\ufe0f\ud83d\udc26 Bird Detective 2.0 Listen carefully and...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.petrklichelp.cz\/en\/ptaci_detektiv_2\/\" \/>\n<meta property=\"og:site_name\" content=\"Petrkl\u00ed\u010d help\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/PetrklicHelp\" \/>\n<meta property=\"article:modified_time\" content=\"2026-04-12T20:34:09+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.petrklichelp.cz\/wp-content\/uploads\/2026\/04\/PD-2.0-banner-1024x318.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"318\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.petrklichelp.cz\/ptaci_detektiv_2\/\",\"url\":\"https:\/\/www.petrklichelp.cz\/ptaci_detektiv_2\/\",\"name\":\"Pta\u010d\u00ed detektiv 2.0 - Petrkl\u00ed\u010d help\",\"isPartOf\":{\"@id\":\"https:\/\/www.petrklichelp.cz\/cs\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.petrklichelp.cz\/ptaci_detektiv_2\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.petrklichelp.cz\/ptaci_detektiv_2\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.petrklichelp.cz\/wp-content\/uploads\/2026\/04\/PD-2.0-banner-1024x318.png\",\"datePublished\":\"2026-04-12T16:00:17+00:00\",\"dateModified\":\"2026-04-12T20:34:09+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.petrklichelp.cz\/ptaci_detektiv_2\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.petrklichelp.cz\/ptaci_detektiv_2\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.petrklichelp.cz\/ptaci_detektiv_2\/#primaryimage\",\"url\":\"https:\/\/www.petrklichelp.cz\/wp-content\/uploads\/2026\/04\/PD-2.0-banner-1024x318.png\",\"contentUrl\":\"https:\/\/www.petrklichelp.cz\/wp-content\/uploads\/2026\/04\/PD-2.0-banner-1024x318.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.petrklichelp.cz\/ptaci_detektiv_2\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.petrklichelp.cz\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Pta\u010d\u00ed detektiv 2.0\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.petrklichelp.cz\/cs\/#website\",\"url\":\"https:\/\/www.petrklichelp.cz\/cs\/\",\"name\":\"Petrkl\u00ed\u010d help\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.petrklichelp.cz\/cs\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.petrklichelp.cz\/cs\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.petrklichelp.cz\/cs\/#organization\",\"name\":\"Petrkl\u00ed\u010d help\",\"url\":\"https:\/\/www.petrklichelp.cz\/cs\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.petrklichelp.cz\/cs\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/petrklichelp.mrkninaweb.cz\/wp-content\/uploads\/2023\/01\/zahrada-petrklichelp.png\",\"contentUrl\":\"https:\/\/petrklichelp.mrkninaweb.cz\/wp-content\/uploads\/2023\/01\/zahrada-petrklichelp.png\",\"width\":117,\"height\":110,\"caption\":\"Petrkl\u00ed\u010d help\"},\"image\":{\"@id\":\"https:\/\/www.petrklichelp.cz\/cs\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/PetrklicHelp\",\"https:\/\/www.instagram.com\/petrklic_help\/\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Pta\u010d\u00ed detektiv 2.0 - Petrkl\u00ed\u010d help","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.petrklichelp.cz\/en\/ptaci_detektiv_2\/","og_locale":"en_GB","og_type":"article","og_title":"Pta\u010d\u00ed detektiv 2.0 - Petrkl\u00ed\u010d help","og_description":"Bird Detective 2.0 Score: 0 \/ 8 Bird 1 of 8 13 % \ud83d\udd75\ufe0f\u200d\u2642\ufe0f\ud83d\udc26 Bird Detective 2.0 Listen carefully and...","og_url":"https:\/\/www.petrklichelp.cz\/en\/ptaci_detektiv_2\/","og_site_name":"Petrkl\u00ed\u010d help","article_publisher":"https:\/\/www.facebook.com\/PetrklicHelp","article_modified_time":"2026-04-12T20:34:09+00:00","og_image":[{"width":1024,"height":318,"url":"https:\/\/www.petrklichelp.cz\/wp-content\/uploads\/2026\/04\/PD-2.0-banner-1024x318.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_misc":{"Estimated reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.petrklichelp.cz\/ptaci_detektiv_2\/","url":"https:\/\/www.petrklichelp.cz\/ptaci_detektiv_2\/","name":"Pta\u010d\u00ed detektiv 2.0 - Petrkl\u00ed\u010d help","isPartOf":{"@id":"https:\/\/www.petrklichelp.cz\/cs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.petrklichelp.cz\/ptaci_detektiv_2\/#primaryimage"},"image":{"@id":"https:\/\/www.petrklichelp.cz\/ptaci_detektiv_2\/#primaryimage"},"thumbnailUrl":"https:\/\/www.petrklichelp.cz\/wp-content\/uploads\/2026\/04\/PD-2.0-banner-1024x318.png","datePublished":"2026-04-12T16:00:17+00:00","dateModified":"2026-04-12T20:34:09+00:00","breadcrumb":{"@id":"https:\/\/www.petrklichelp.cz\/ptaci_detektiv_2\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.petrklichelp.cz\/ptaci_detektiv_2\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.petrklichelp.cz\/ptaci_detektiv_2\/#primaryimage","url":"https:\/\/www.petrklichelp.cz\/wp-content\/uploads\/2026\/04\/PD-2.0-banner-1024x318.png","contentUrl":"https:\/\/www.petrklichelp.cz\/wp-content\/uploads\/2026\/04\/PD-2.0-banner-1024x318.png"},{"@type":"BreadcrumbList","@id":"https:\/\/www.petrklichelp.cz\/ptaci_detektiv_2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.petrklichelp.cz\/"},{"@type":"ListItem","position":2,"name":"Pta\u010d\u00ed detektiv 2.0"}]},{"@type":"WebSite","@id":"https:\/\/www.petrklichelp.cz\/cs\/#website","url":"https:\/\/www.petrklichelp.cz\/cs\/","name":"Petrkl\u00ed\u010d help","description":"","publisher":{"@id":"https:\/\/www.petrklichelp.cz\/cs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.petrklichelp.cz\/cs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Organization","@id":"https:\/\/www.petrklichelp.cz\/cs\/#organization","name":"Petrkl\u00ed\u010d help","url":"https:\/\/www.petrklichelp.cz\/cs\/","logo":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.petrklichelp.cz\/cs\/#\/schema\/logo\/image\/","url":"https:\/\/petrklichelp.mrkninaweb.cz\/wp-content\/uploads\/2023\/01\/zahrada-petrklichelp.png","contentUrl":"https:\/\/petrklichelp.mrkninaweb.cz\/wp-content\/uploads\/2023\/01\/zahrada-petrklichelp.png","width":117,"height":110,"caption":"Petrkl\u00ed\u010d help"},"image":{"@id":"https:\/\/www.petrklichelp.cz\/cs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/PetrklicHelp","https:\/\/www.instagram.com\/petrklic_help\/"]}]}},"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.petrklichelp.cz\/en\/wp-json\/wp\/v2\/pages\/2612","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.petrklichelp.cz\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.petrklichelp.cz\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.petrklichelp.cz\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.petrklichelp.cz\/en\/wp-json\/wp\/v2\/comments?post=2612"}],"version-history":[{"count":10,"href":"https:\/\/www.petrklichelp.cz\/en\/wp-json\/wp\/v2\/pages\/2612\/revisions"}],"predecessor-version":[{"id":2650,"href":"https:\/\/www.petrklichelp.cz\/en\/wp-json\/wp\/v2\/pages\/2612\/revisions\/2650"}],"wp:attachment":[{"href":"https:\/\/www.petrklichelp.cz\/en\/wp-json\/wp\/v2\/media?parent=2612"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}