{"id":52,"date":"2026-05-27T13:21:12","date_gmt":"2026-05-27T10:21:12","guid":{"rendered":"https:\/\/urasuzay.com\/?page_id=52"},"modified":"2026-06-17T17:55:06","modified_gmt":"2026-06-17T14:55:06","slug":"battlestars","status":"publish","type":"page","link":"https:\/\/urasuzay.com\/index.php\/battlestars\/","title":{"rendered":"battlestars"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"52\" class=\"elementor elementor-52\">\n\t\t\t\t<div class=\"elementor-element elementor-element-3ea9a14 e-con e-atomic-element e-flexbox-base \" data-id=\"3ea9a14\" data-element_type=\"e-flexbox\" data-e-type=\"e-flexbox\" data-interaction-id=\"3ea9a14\">\n    \t\t\t<p class=\"e-paragraph-base\" data-interaction-id=\"96ac072\"><a href=\"https:\/\/urasuzay.com\/\" target=\"_self\" class=\"e-paragraph-link-base\">\n\t\tAna Sayfa\n\t<\/a><\/p>\n\t\t\n<\/div>\n<div class=\"elementor-element elementor-element-05f64de e-flex e-con-boxed e-con e-parent\" data-id=\"05f64de\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-9f288c9 elementor-widget elementor-widget-html\" data-id=\"9f288c9\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t\t<div id=\"app\">\n  <div class=\"topBar\">\n    <div class=\"profile\">\n      <div class=\"avatar\">\ud83e\udde0<\/div>\n      <div>\n        <div class=\"playerName\">Brainrot Arena<\/div>\n        <div class=\"level\">Seviye 1<\/div>\n      <\/div>\n    <\/div>\n\n    <div class=\"coins\">\n      <span>\ud83d\udc8e<\/span>\n      <b>120<\/b>\n    <\/div>\n  <\/div>\n\n  <div id=\"menuScreen\">\n    <div class=\"mainMenu\">\n      <button class=\"sideBtn\" onclick=\"openDeck()\">DESTEM<\/button>\n\n      <div class=\"favoriteArea\">\n        <div class=\"title\">Favori Brainrotum<\/div>\n\n        <div class=\"favoriteCard\" onclick=\"openFavoritePicker()\">\n          <div class=\"clickHint\">De\u011fi\u015ftirmek i\u00e7in t\u0131kla<\/div>\n          <img decoding=\"async\" id=\"favImage\" class=\"favImage\" src=\"https:\/\/commons.wikimedia.org\/wiki\/Special:FilePath\/Tung_tung_tung_sahur.webp\">\n          <h2 id=\"favName\">Hen\u00fcz yok<\/h2>\n          <p id=\"favRarity\">Oyuna ba\u015fla, deste gelsin<\/p>\n          <div id=\"favPower\" class=\"powerBadge\">G\u00fc\u00e7: 0<\/div>\n        <\/div>\n\n        <button class=\"playBtn\" onclick=\"startBattle()\">OYNA<\/button>\n      <\/div>\n\n      <button class=\"sideBtn\" onclick=\"openCodePanel()\">KOD G\u0130R<\/button>\n    <\/div>\n\n    <div class=\"bottomBar\">\n      <button onclick=\"openCodePanel()\">\ud83c\udf81 Kod<\/button>\n      <button onclick=\"openDeck()\">\ud83c\udccf Deste<\/button>\n      <button onclick=\"openFavoritePicker()\">\u2b50 Favori<\/button>\n      <button onclick=\"resetGame()\">\ud83e\uddf9 S\u0131f\u0131rla<\/button>\n    <\/div>\n  <\/div>\n\n  <div id=\"battleScreen\">\n    <div class=\"battleTop\">\n      <button class=\"backBtn\" onclick=\"exitBattle()\">MEN\u00dc<\/button>\n      <div class=\"battleTitle\">Brainrot Royale<\/div>\n      <div class=\"timer\" id=\"battleTimer\">02:00<\/div>\n    <\/div>\n\n    <div id=\"arena\">\n      <div class=\"river\"><\/div>\n      <div class=\"bridge bridgeTop\"><\/div>\n      <div class=\"bridge bridgeBottom\"><\/div>\n\n      <div id=\"playerKing\" class=\"tower player kingTower\">\n        <div class=\"towerName\">SEN<\/div>\n        <div class=\"towerHp\"><div id=\"playerKingHpBar\"><\/div><\/div>\n      <\/div>\n\n      <div id=\"playerTop\" class=\"tower player sideTower topTower\">\n        <div class=\"towerName\">KULE<\/div>\n        <div class=\"towerHp\"><div id=\"playerTopHpBar\"><\/div><\/div>\n      <\/div>\n\n      <div id=\"playerBottom\" class=\"tower player sideTower bottomTower\">\n        <div class=\"towerName\">KULE<\/div>\n        <div class=\"towerHp\"><div id=\"playerBottomHpBar\"><\/div><\/div>\n      <\/div>\n\n      <div id=\"botKing\" class=\"tower bot kingTower\">\n        <div class=\"towerName\">BOT<\/div>\n        <div class=\"towerHp\"><div id=\"botKingHpBar\"><\/div><\/div>\n      <\/div>\n\n      <div id=\"botTop\" class=\"tower bot sideTower topTower\">\n        <div class=\"towerName\">KULE<\/div>\n        <div class=\"towerHp\"><div id=\"botTopHpBar\"><\/div><\/div>\n      <\/div>\n\n      <div id=\"botBottom\" class=\"tower bot sideTower bottomTower\">\n        <div class=\"towerName\">KULE<\/div>\n        <div class=\"towerHp\"><div id=\"botBottomHpBar\"><\/div><\/div>\n      <\/div>\n\n      <div id=\"unitsLayer\"><\/div>\n      <div id=\"damageLayer\"><\/div>\n    <\/div>\n\n    <div class=\"battleBottom\">\n      <div class=\"elixirBox\">\n        <div class=\"elixirText\">\u0130ksir: <span id=\"elixirText\">5<\/span>\/10<\/div>\n        <div class=\"elixirBar\"><div id=\"elixirFill\"><\/div><\/div>\n      <\/div>\n\n      <div class=\"handWrap\">\n        <div class=\"handTitle\">Sava\u015f Destem<\/div>\n        <div id=\"battleHand\"><\/div>\n      <\/div>\n    <\/div>\n  <\/div>\n<\/div>\n\n<div id=\"codePanel\" class=\"modal\">\n  <div class=\"modalBox\">\n    <button class=\"closeBtn\" onclick=\"closeModals()\">X<\/button>\n    <h2>Kart Kodunu Gir<\/h2>\n    <p class=\"smallText\">Kart\u0131n arkas\u0131ndaki 12 haneli kodu yaz.<\/p>\n\n    <input id=\"codeInput\" maxlength=\"12\" placeholder=\"12 haneli kod\">\n    <button class=\"yellowBtn\" onclick=\"redeemCode()\">Desteye Ekle<\/button>\n\n    <p id=\"codeMessage\"><\/p>\n  <\/div>\n<\/div>\n\n<div id=\"deckPanel\" class=\"modal\">\n  <div class=\"modalBox big\">\n    <button class=\"closeBtn\" onclick=\"closeModals()\">X<\/button>\n    <h2>Destem<\/h2>\n    <div id=\"deckList\" class=\"deckGrid\"><\/div>\n  <\/div>\n<\/div>\n\n<div id=\"favoritePanel\" class=\"modal\">\n  <div class=\"modalBox big\">\n    <button class=\"closeBtn\" onclick=\"closeModals()\">X<\/button>\n    <h2>Favori Brainrot Se\u00e7<\/h2>\n    <p class=\"smallText\">Destendeki kartlardan birini ana men\u00fcye koy.<\/p>\n    <div id=\"favoriteList\" class=\"deckGrid\"><\/div>\n  <\/div>\n<\/div>\n\n<div id=\"resultPanel\" class=\"modal\">\n  <div class=\"modalBox\">\n    <h2 id=\"resultTitle\">Sonu\u00e7<\/h2>\n    <p id=\"resultText\"><\/p>\n    <button class=\"yellowBtn\" onclick=\"exitBattle()\">Ana Men\u00fc<\/button>\n    <button class=\"yellowBtn\" onclick=\"startBattle()\">Tekrar Oyna<\/button>\n  <\/div>\n<\/div>\n\n<div id=\"toast\"><\/div>\n\n<style>\n  * {\n    box-sizing: border-box;\n  }\n\n  body {\n    margin: 0;\n    font-family: Arial, sans-serif;\n    background:\n      radial-gradient(circle at top, #4355ff 0%, transparent 35%),\n      linear-gradient(135deg, #151a5a, #281044 60%, #111);\n    color: white;\n    min-height: 100vh;\n    overflow-x: hidden;\n  }\n\n  #app {\n    min-height: 100vh;\n    padding: 18px;\n    padding-bottom: 90px;\n  }\n\n  .topBar {\n    display: flex;\n    justify-content: space-between;\n    align-items: center;\n    background: rgba(0,0,0,0.28);\n    border: 3px solid rgba(255,255,255,0.12);\n    border-radius: 20px;\n    padding: 12px 16px;\n    box-shadow: 0 8px 0 rgba(0,0,0,0.25);\n  }\n\n  .profile {\n    display: flex;\n    align-items: center;\n    gap: 12px;\n  }\n\n  .avatar {\n    width: 54px;\n    height: 54px;\n    border-radius: 16px;\n    background: linear-gradient(160deg, #ffdd57, #ff8c00);\n    display: grid;\n    place-items: center;\n    font-size: 30px;\n    border: 3px solid white;\n    box-shadow: 0 5px 0 #9b5c00;\n  }\n\n  .playerName {\n    font-size: 21px;\n    font-weight: 900;\n  }\n\n  .level {\n    color: #c7d2ff;\n    font-size: 14px;\n  }\n\n  .coins {\n    background: #101936;\n    border: 3px solid #5f75ff;\n    border-radius: 14px;\n    padding: 9px 15px;\n    font-size: 22px;\n    box-shadow: 0 5px 0 #05091b;\n  }\n\n  .mainMenu {\n    margin-top: 35px;\n    display: grid;\n    grid-template-columns: 170px 1fr 170px;\n    gap: 20px;\n    align-items: center;\n  }\n\n  .sideBtn {\n    height: 90px;\n    border: none;\n    border-radius: 20px;\n    background: linear-gradient(#37d26f, #109a43);\n    color: white;\n    font-size: 22px;\n    font-weight: 900;\n    cursor: pointer;\n    border: 4px solid white;\n    box-shadow: 0 8px 0 #075e2a;\n    text-shadow: 0 2px #000;\n  }\n\n  .sideBtn:active,\n  .playBtn:active,\n  .yellowBtn:active,\n  .bottomBar button:active,\n  .backBtn:active {\n    transform: translateY(5px);\n    box-shadow: none;\n  }\n\n  .favoriteArea {\n    display: flex;\n    flex-direction: column;\n    align-items: center;\n  }\n\n  .title {\n    font-size: 30px;\n    font-weight: 900;\n    color: #ffdd57;\n    text-shadow: 0 4px 0 #000;\n    margin-bottom: 12px;\n  }\n\n  .favoriteCard {\n    width: min(420px, 90vw);\n    min-height: 440px;\n    background:\n      linear-gradient(160deg, rgba(255,255,255,0.95), rgba(213,231,255,0.95)),\n      radial-gradient(circle, white, #8ee5ff);\n    color: #121212;\n    border: 6px solid #ffdd57;\n    border-radius: 34px;\n    display: flex;\n    flex-direction: column;\n    align-items: center;\n    justify-content: center;\n    gap: 8px;\n    cursor: pointer;\n    position: relative;\n    box-shadow:\n      0 14px 0 #aa7d00,\n      0 20px 40px rgba(0,0,0,0.5);\n    animation: floaty 2.4s infinite ease-in-out;\n    overflow: hidden;\n    padding: 30px 20px;\n  }\n\n  .favoriteCard::before {\n    content: \"\";\n    position: absolute;\n    width: 220px;\n    height: 220px;\n    background: rgba(255, 221, 87, 0.4);\n    border-radius: 50%;\n    top: -70px;\n    right: -70px;\n  }\n\n  .clickHint {\n    position: absolute;\n    top: 14px;\n    background: #111;\n    color: #ffdd57;\n    padding: 7px 13px;\n    border-radius: 999px;\n    font-weight: bold;\n    font-size: 13px;\n    z-index: 2;\n  }\n\n  .favImage {\n    width: 220px;\n    height: 220px;\n    object-fit: cover;\n    border-radius: 28px;\n    border: 5px solid #111;\n    z-index: 1;\n    box-shadow: 0 9px 0 rgba(0,0,0,0.25);\n    background: #ddd;\n    margin-top: 20px;\n  }\n\n  .favoriteCard h2 {\n    margin: 10px 0 0;\n    font-size: 30px;\n    text-align: center;\n    z-index: 1;\n  }\n\n  .favoriteCard p {\n    margin: 0;\n    font-size: 18px;\n    font-weight: bold;\n    z-index: 1;\n  }\n\n  .powerBadge {\n    background: #111;\n    color: #fff;\n    padding: 10px 18px;\n    border-radius: 16px;\n    margin-top: 8px;\n    font-weight: 900;\n    z-index: 1;\n  }\n\n  .playBtn {\n    margin-top: 26px;\n    width: min(340px, 80vw);\n    height: 78px;\n    background: linear-gradient(#ff5c5c, #d91515);\n    color: white;\n    border: 5px solid white;\n    border-radius: 22px;\n    font-size: 35px;\n    font-weight: 1000;\n    cursor: pointer;\n    box-shadow: 0 9px 0 #7a0505;\n    text-shadow: 0 3px #000;\n  }\n\n  .bottomBar {\n    position: fixed;\n    left: 12px;\n    right: 12px;\n    bottom: 12px;\n    background: rgba(0,0,0,0.45);\n    border: 3px solid rgba(255,255,255,0.15);\n    border-radius: 22px;\n    display: grid;\n    grid-template-columns: repeat(4, 1fr);\n    gap: 8px;\n    padding: 10px;\n    backdrop-filter: blur(8px);\n  }\n\n  .bottomBar button {\n    border: none;\n    border-radius: 15px;\n    background: linear-gradient(#ffd84f, #f0a900);\n    color: #1b1300;\n    font-weight: 900;\n    font-size: 16px;\n    padding: 13px 8px;\n    cursor: pointer;\n    box-shadow: 0 5px 0 #8d6300;\n  }\n\n  .modal {\n    position: fixed;\n    inset: 0;\n    background: rgba(0,0,0,0.72);\n    display: none;\n    justify-content: center;\n    align-items: center;\n    padding: 18px;\n    z-index: 20;\n  }\n\n  .modal.show {\n    display: flex;\n  }\n\n  .modalBox {\n    width: min(500px, 95vw);\n    max-height: 88vh;\n    overflow-y: auto;\n    background: linear-gradient(160deg, #2835a8, #171b54);\n    border: 5px solid white;\n    border-radius: 28px;\n    padding: 24px;\n    position: relative;\n    box-shadow: 0 16px 0 rgba(0,0,0,0.35);\n    text-align: center;\n  }\n\n  .modalBox.big {\n    width: min(900px, 95vw);\n  }\n\n  .modalBox h2 {\n    margin-top: 0;\n    color: #ffdd57;\n    text-shadow: 0 3px 0 #000;\n    font-size: 32px;\n  }\n\n  .closeBtn {\n    position: absolute;\n    top: 12px;\n    right: 12px;\n    background: #ff3b3b;\n    color: white;\n    border: 3px solid white;\n    border-radius: 12px;\n    font-weight: 900;\n    padding: 8px 12px;\n    cursor: pointer;\n  }\n\n  .smallText {\n    color: #d8e0ff;\n  }\n\n  input {\n    width: 100%;\n    max-width: 310px;\n    padding: 15px;\n    font-size: 20px;\n    text-align: center;\n    text-transform: uppercase;\n    border-radius: 16px;\n    border: 4px solid #ffdd57;\n    outline: none;\n    margin: 10px 0;\n    font-weight: bold;\n  }\n\n  .yellowBtn {\n    display: block;\n    margin: 10px auto;\n    background: linear-gradient(#ffef7a, #ffbd16);\n    color: #181000;\n    border: 4px solid white;\n    border-radius: 18px;\n    padding: 14px 24px;\n    font-size: 19px;\n    font-weight: 900;\n    cursor: pointer;\n    box-shadow: 0 7px 0 #936700;\n  }\n\n  #codeMessage {\n    min-height: 28px;\n    font-weight: 900;\n    font-size: 18px;\n  }\n\n  .deckGrid {\n    display: grid;\n    grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));\n    gap: 16px;\n    margin-top: 18px;\n  }\n\n  .miniCard {\n    background: linear-gradient(160deg, white, #d9e6ff);\n    color: #111;\n    border-radius: 22px;\n    padding: 14px 12px;\n    border: 4px solid #ffdd57;\n    min-height: 250px;\n    box-shadow: 0 8px 0 #9a7100;\n    cursor: pointer;\n    position: relative;\n  }\n\n  .cardImage {\n    width: 100%;\n    height: 125px;\n    object-fit: cover;\n    border-radius: 15px;\n    border: 3px solid #111;\n    margin-top: 24px;\n    background: #ddd;\n  }\n\n  .miniCard h3 {\n    margin: 8px 0 4px;\n    font-size: 18px;\n  }\n\n  .miniCard p {\n    margin: 4px;\n    font-weight: bold;\n  }\n\n  .rarityTag {\n    position: absolute;\n    top: 8px;\n    left: 8px;\n    background: #111;\n    color: #ffdd57;\n    padding: 5px 9px;\n    border-radius: 999px;\n    font-size: 12px;\n    font-weight: 900;\n    z-index: 2;\n  }\n\n  .empty {\n    grid-column: 1 \/ -1;\n    padding: 30px;\n    background: rgba(255,255,255,0.12);\n    border-radius: 20px;\n    font-size: 20px;\n  }\n\n  #toast {\n    position: fixed;\n    left: 50%;\n    top: 24px;\n    transform: translateX(-50%);\n    background: #111;\n    color: #ffdd57;\n    border: 3px solid white;\n    padding: 14px 22px;\n    border-radius: 18px;\n    font-weight: 900;\n    display: none;\n    z-index: 99;\n    box-shadow: 0 8px 20px rgba(0,0,0,0.45);\n    text-align: center;\n  }\n\n  #battleScreen {\n    display: none;\n    margin-top: 20px;\n  }\n\n  .battleTop {\n    display: flex;\n    align-items: center;\n    justify-content: space-between;\n    gap: 10px;\n    margin-bottom: 12px;\n  }\n\n  .backBtn {\n    background: linear-gradient(#ff5c5c, #c61616);\n    color: white;\n    border: 4px solid white;\n    border-radius: 14px;\n    padding: 10px 16px;\n    font-weight: 900;\n    cursor: pointer;\n    box-shadow: 0 5px 0 #760707;\n  }\n\n  .battleTitle {\n    font-size: 28px;\n    color: #ffdd57;\n    font-weight: 1000;\n    text-shadow: 0 3px #000;\n  }\n\n  .timer {\n    background: #111;\n    border: 3px solid white;\n    border-radius: 14px;\n    padding: 9px 14px;\n    color: #ffdd57;\n    font-size: 20px;\n    font-weight: 900;\n  }\n\n  #arena {\n    width: min(1000px, 96vw);\n    height: min(540px, 58vh);\n    min-height: 390px;\n    margin: 0 auto;\n    position: relative;\n    overflow: hidden;\n    border: 6px solid white;\n    border-radius: 28px;\n    background:\n      linear-gradient(90deg, rgba(34,160,78,0.96) 0 49%, rgba(30,123,197,0.95) 49% 51%, rgba(34,160,78,0.96) 51% 100%);\n    box-shadow: 0 14px 0 rgba(0,0,0,0.35);\n    cursor: crosshair;\n  }\n\n  #arena::before {\n    content: \"\";\n    position: absolute;\n    inset: 0;\n    background-image:\n      linear-gradient(rgba(255,255,255,0.09) 1px, transparent 1px),\n      linear-gradient(90deg, rgba(255,255,255,0.09) 1px, transparent 1px);\n    background-size: 42px 42px;\n    pointer-events: none;\n  }\n\n  .river {\n    position: absolute;\n    left: 49%;\n    top: 0;\n    width: 2%;\n    height: 100%;\n    background: linear-gradient(#3cc8ff, #1176ff);\n    box-shadow: 0 0 20px rgba(0,0,0,0.3);\n  }\n\n  .bridge {\n    position: absolute;\n    left: 46.5%;\n    width: 7%;\n    height: 15%;\n    background: #c99052;\n    border: 4px solid #7a4b24;\n    border-radius: 12px;\n    z-index: 1;\n  }\n\n  .bridgeTop {\n    top: 22%;\n  }\n\n  .bridgeBottom {\n    bottom: 22%;\n  }\n\n  .tower {\n    position: absolute;\n    width: 76px;\n    height: 88px;\n    border-radius: 18px;\n    border: 4px solid white;\n    display: grid;\n    place-items: center;\n    font-weight: 900;\n    z-index: 5;\n    box-shadow: 0 7px 0 rgba(0,0,0,0.35);\n  }\n\n  .tower.player {\n    background: linear-gradient(#4ecbff, #116ee8);\n  }\n\n  .tower.bot {\n    background: linear-gradient(#ff6666, #c81414);\n  }\n\n  .player.kingTower {\n    left: 6%;\n    top: 50%;\n    transform: translateY(-50%);\n  }\n\n  .player.topTower {\n    left: 22%;\n    top: 18%;\n  }\n\n  .player.bottomTower {\n    left: 22%;\n    bottom: 18%;\n  }\n\n  .bot.kingTower {\n    right: 6%;\n    top: 50%;\n    transform: translateY(-50%);\n  }\n\n  .bot.topTower {\n    right: 22%;\n    top: 18%;\n  }\n\n  .bot.bottomTower {\n    right: 22%;\n    bottom: 18%;\n  }\n\n  .towerName {\n    position: absolute;\n    top: 12px;\n    font-size: 13px;\n    text-shadow: 0 2px #000;\n  }\n\n  .towerHp {\n    position: absolute;\n    left: 7px;\n    right: 7px;\n    bottom: 10px;\n    height: 10px;\n    background: #2a0505;\n    border: 2px solid white;\n    border-radius: 99px;\n    overflow: hidden;\n  }\n\n  .towerHp div {\n    height: 100%;\n    width: 100%;\n    background: linear-gradient(90deg, #48ff68, #d7ff37);\n  }\n\n  #unitsLayer,\n  #damageLayer {\n    position: absolute;\n    inset: 0;\n    pointer-events: none;\n  }\n\n  .unit {\n    position: absolute;\n    width: 46px;\n    height: 46px;\n    border-radius: 50%;\n    border: 3px solid white;\n    object-fit: cover;\n    z-index: 8;\n    background: #eee;\n    box-shadow: 0 5px 0 rgba(0,0,0,0.35);\n  }\n\n  .unit.playerUnit {\n    outline: 4px solid #00b7ff;\n  }\n\n  .unit.botUnit {\n    outline: 4px solid #ff3333;\n  }\n\n  .unitHp {\n    position: absolute;\n    width: 50px;\n    height: 7px;\n    background: #2a0505;\n    border: 1px solid white;\n    border-radius: 99px;\n    z-index: 9;\n    overflow: hidden;\n  }\n\n  .unitHp div {\n    height: 100%;\n    background: #64ff65;\n  }\n\n  .hitText {\n    position: absolute;\n    z-index: 15;\n    color: #ffef6d;\n    font-weight: 1000;\n    font-size: 18px;\n    text-shadow: 0 2px #000;\n    animation: rise 0.7s forwards;\n  }\n\n  .battleBottom {\n    width: min(1000px, 96vw);\n    margin: 14px auto 0;\n    display: grid;\n    grid-template-columns: 180px 1fr;\n    gap: 12px;\n    align-items: start;\n  }\n\n  .elixirBox {\n    background: rgba(0,0,0,0.45);\n    border: 3px solid white;\n    border-radius: 18px;\n    padding: 12px;\n  }\n\n  .elixirText {\n    font-weight: 900;\n    color: #e3c4ff;\n    margin-bottom: 7px;\n  }\n\n  .elixirBar {\n    height: 18px;\n    background: #220535;\n    border: 2px solid white;\n    border-radius: 99px;\n    overflow: hidden;\n  }\n\n  #elixirFill {\n    width: 50%;\n    height: 100%;\n    background: linear-gradient(90deg, #a13cff, #f06bff);\n  }\n\n  .handWrap {\n    background: rgba(0,0,0,0.35);\n    border: 3px solid rgba(255,255,255,0.4);\n    border-radius: 18px;\n    padding: 8px;\n    max-height: 220px;\n    overflow-y: auto;\n  }\n\n  .handTitle {\n    color: #ffdd57;\n    font-weight: 900;\n    margin-bottom: 8px;\n    text-align: center;\n  }\n\n  #battleHand {\n    display: grid;\n    grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));\n    gap: 10px;\n  }\n\n  .handCard {\n    background: linear-gradient(160deg, #fff, #dbe8ff);\n    color: #111;\n    border: 4px solid #ffdd57;\n    border-radius: 18px;\n    padding: 8px;\n    min-height: 125px;\n    cursor: pointer;\n    box-shadow: 0 6px 0 #9a7100;\n    text-align: center;\n    position: relative;\n  }\n\n  .handCard.selected {\n    border-color: #6dff8b;\n    transform: translateY(-8px);\n  }\n\n  .handCard.disabled {\n    filter: grayscale(1) brightness(0.7);\n    cursor: not-allowed;\n  }\n\n  .handCard img {\n    width: 72px;\n    height: 55px;\n    object-fit: cover;\n    border-radius: 10px;\n    border: 2px solid #111;\n  }\n\n  .handCard h4 {\n    margin: 4px 0;\n    font-size: 12px;\n  }\n\n  .cost {\n    position: absolute;\n    left: 6px;\n    top: 6px;\n    background: #9417ff;\n    color: white;\n    border: 2px solid white;\n    border-radius: 50%;\n    width: 28px;\n    height: 28px;\n    display: grid;\n    place-items: center;\n    font-weight: 1000;\n  }\n\n  @keyframes floaty {\n    0%, 100% {\n      transform: translateY(0) rotate(-1deg);\n    }\n\n    50% {\n      transform: translateY(-10px) rotate(1deg);\n    }\n  }\n\n  @keyframes rise {\n    from {\n      opacity: 1;\n      transform: translateY(0);\n    }\n\n    to {\n      opacity: 0;\n      transform: translateY(-35px);\n    }\n  }\n\n  @media (max-width: 760px) {\n    .mainMenu {\n      grid-template-columns: 1fr;\n    }\n\n    .sideBtn {\n      height: 64px;\n    }\n\n    .title {\n      font-size: 25px;\n    }\n\n    .favoriteCard {\n      min-height: 380px;\n    }\n\n    .favImage {\n      width: 180px;\n      height: 180px;\n    }\n\n    .bottomBar button {\n      font-size: 13px;\n      padding: 11px 4px;\n    }\n\n    .battleBottom {\n      grid-template-columns: 1fr;\n    }\n\n    .tower {\n      width: 62px;\n      height: 74px;\n    }\n\n    #arena {\n      height: 430px;\n    }\n  }\n<\/style>\n\n<script>\n  const validCodes = {\n    \"BRN7K2X9Q4PA\": {\n      id: \"tralalero\",\n      name: \"Tralalero Tralala\",\n      image: \"https:\/\/commons.wikimedia.org\/wiki\/Special:FilePath\/Tralalero_Tralala.webp\",\n      rarity: \"Efsanevi\",\n      power: 95,\n      cost: 5,\n      hp: 720,\n      damage: 70,\n      speed: 0.82,\n      range: 38,\n      attackSpeed: 850\n    },\n\n    \"BMB4R9Z1T8LU\": {\n      id: \"bombardiro\",\n      name: \"Bombardiro Crocodilo\",\n      image: \"https:\/\/commons.wikimedia.org\/wiki\/Special:FilePath\/Bombardiro_Crocodillo.jpg\",\n      rarity: \"Epik\",\n      power: 88,\n      cost: 4,\n      hp: 620,\n      damage: 62,\n      speed: 0.75,\n      range: 36,\n      attackSpeed: 900\n    },\n\n    \"TNG8L3M5Q2ZA\": {\n      id: \"tungtung\",\n      name: \"Tung Tung Sahur\",\n      image: \"https:\/\/commons.wikimedia.org\/wiki\/Special:FilePath\/Tung_tung_tung_sahur.webp\",\n      rarity: \"Ba\u015flang\u0131\u00e7\",\n      power: 76,\n      cost: 3,\n      hp: 470,\n      damage: 45,\n      speed: 1.0,\n      range: 34,\n      attackSpeed: 780\n    },\n\n    \"CPN2W7A9K5XD\": {\n      id: \"cappuccino\",\n      name: \"Cappuccino Assassino\",\n      image: \"https:\/\/commons.wikimedia.org\/wiki\/Special:FilePath\/Cappucino_assasino.webp\",\n      rarity: \"Ba\u015flang\u0131\u00e7\",\n      power: 91,\n      cost: 5,\n      hp: 520,\n      damage: 88,\n      speed: 1.15,\n      range: 40,\n      attackSpeed: 730\n    },\n\n    \"CAP1B2R3A4AA\": {\n      id: \"capibara\",\n      name: \"Capibara Cocosini\",\n      image: \"https:\/\/images.unsplash.com\/photo-1557431177-36141475c676?auto=format&fit=crop&w=600&q=80\",\n      rarity: \"Ba\u015flang\u0131\u00e7\",\n      power: 84,\n      cost: 4,\n      hp: 650,\n      damage: 52,\n      speed: 0.85,\n      range: 36,\n      attackSpeed: 820\n    },\n\n    \"BAN4N5M6Y7AA\": {\n      id: \"muzlumaymun\",\n      name: \"Muzlu Maymunito\",\n      image: \"https:\/\/images.unsplash.com\/photo-1540573133985-87b6da6d54a9?auto=format&fit=crop&w=600&q=80\",\n      rarity: \"Ba\u015flang\u0131\u00e7\",\n      power: 87,\n      cost: 4,\n      hp: 500,\n      damage: 78,\n      speed: 1.18,\n      range: 38,\n      attackSpeed: 700\n    },\n\n    \"LRL6P1V8S3NO\": {\n      id: \"lirili\",\n      name: \"Lirili Larila\",\n      image: \"https:\/\/commons.wikimedia.org\/wiki\/Special:FilePath\/Liril%C3%AC_Laril%C3%A0.webp\",\n      rarity: \"Nadir\",\n      power: 72,\n      cost: 3,\n      hp: 540,\n      damage: 38,\n      speed: 0.95,\n      range: 34,\n      attackSpeed: 800\n    },\n\n    \"BRR4P7T9M2AA\": {\n      id: \"brrbrr\",\n      name: \"Brr Brr Patapim\",\n      image: \"https:\/\/commons.wikimedia.org\/wiki\/Special:FilePath\/Brr_brr_patapim.jpg\",\n      rarity: \"S\u00fcper Nadir\",\n      power: 83,\n      cost: 4,\n      hp: 680,\n      damage: 50,\n      speed: 0.7,\n      range: 34,\n      attackSpeed: 850\n    },\n\n    \"BAL8C2P5N7QA\": {\n      id: \"ballerina\",\n      name: \"Ballerina Cappuccina\",\n      image: \"https:\/\/commons.wikimedia.org\/wiki\/Special:FilePath\/Ballerina_Cappuccina.png\",\n      rarity: \"Epik\",\n      power: 86,\n      cost: 4,\n      hp: 430,\n      damage: 74,\n      speed: 1.25,\n      range: 38,\n      attackSpeed: 690\n    },\n\n    \"ALL1B2C3D4EF\": {\n      id: \"allbrainrot\",\n      name: \"Brainrot Tak\u0131m\u0131\",\n      image: \"https:\/\/commons.wikimedia.org\/wiki\/Special:FilePath\/Italian_brainrot_characters.png\",\n      rarity: \"Mitik\",\n      power: 99,\n      cost: 6,\n      hp: 820,\n      damage: 90,\n      speed: 0.8,\n      range: 42,\n      attackSpeed: 820\n    },\n\n    \"TRI9P8T7R6AA\": {\n      id: \"tripitropi\",\n      name: \"Tripi Tropi Tropa\",\n      image: \"https:\/\/picsum.photos\/seed\/tripitropi\/600\/600\",\n      rarity: \"Nadir\",\n      power: 79,\n      cost: 3,\n      hp: 460,\n      damage: 58,\n      speed: 1.2,\n      range: 35,\n      attackSpeed: 740\n    },\n\n    \"FRU6L5L4A3AA\": {\n      id: \"frullifrulla\",\n      name: \"Frulli Frulla\",\n      image: \"https:\/\/picsum.photos\/seed\/frullifrulla\/600\/600\",\n      rarity: \"S\u00fcper Nadir\",\n      power: 81,\n      cost: 4,\n      hp: 530,\n      damage: 61,\n      speed: 1.05,\n      range: 37,\n      attackSpeed: 760\n    },\n\n    \"GLR1A2B3C4AA\": {\n      id: \"glorbo\",\n      name: \"Glorbo Fruttodrillo\",\n      image: \"https:\/\/picsum.photos\/seed\/glorbo\/600\/600\",\n      rarity: \"Epik\",\n      power: 89,\n      cost: 5,\n      hp: 760,\n      damage: 67,\n      speed: 0.72,\n      range: 40,\n      attackSpeed: 880\n    },\n\n    \"MAT7T8O9N1AA\": {\n      id: \"matteo\",\n      name: \"Matteo Macaronino\",\n      image: \"https:\/\/picsum.photos\/seed\/matteo\/600\/600\",\n      rarity: \"Nadir\",\n      power: 74,\n      cost: 3,\n      hp: 430,\n      damage: 49,\n      speed: 1.08,\n      range: 36,\n      attackSpeed: 720\n    },\n\n    \"PIZ1Z2A3R4AA\": {\n      id: \"pizzarino\",\n      name: \"Pizzarino Tornado\",\n      image: \"https:\/\/images.unsplash.com\/photo-1513104890138-7c749659a591?auto=format&fit=crop&w=600&q=80\",\n      rarity: \"Epik\",\n      power: 90,\n      cost: 5,\n      hp: 560,\n      damage: 92,\n      speed: 0.95,\n      range: 43,\n      attackSpeed: 820\n    },\n\n    \"DRG5O6N7E8AA\": {\n      id: \"dragoncello\",\n      name: \"Dragoncello Spaghetto\",\n      image: \"https:\/\/picsum.photos\/seed\/dragoncello\/600\/600\",\n      rarity: \"Mitik\",\n      power: 101,\n      cost: 6,\n      hp: 880,\n      damage: 96,\n      speed: 0.78,\n      range: 45,\n      attackSpeed: 840\n    },\n\n    \"ROB2O3T4O5AA\": {\n      id: \"robotini\",\n      name: \"Robotini Pepperoni\",\n      image: \"https:\/\/picsum.photos\/seed\/robotini\/600\/600\",\n      rarity: \"Efsanevi\",\n      power: 96,\n      cost: 5,\n      hp: 690,\n      damage: 80,\n      speed: 0.9,\n      range: 46,\n      attackSpeed: 760\n    },\n\n    \"NIN6J7A8K9AA\": {\n      id: \"ninjabrot\",\n      name: \"Ninja Brototto\",\n      image: \"https:\/\/picsum.photos\/seed\/ninjabrot\/600\/600\",\n      rarity: \"S\u00fcper Nadir\",\n      power: 85,\n      cost: 4,\n      hp: 420,\n      damage: 82,\n      speed: 1.35,\n      range: 35,\n      attackSpeed: 660\n    }\n  };\n\n  let deck = JSON.parse(localStorage.getItem(\"brainrotDeckRoyaleV3\")) || [];\n  let usedCodes = JSON.parse(localStorage.getItem(\"usedBrainrotCodesRoyaleV3\")) || [];\n  let favoriteId = localStorage.getItem(\"favoriteBrainrotIdRoyaleV3\") || null;\n\n  let battleRunning = false;\n  let units = [];\n  let selectedCard = null;\n  let unitIdCounter = 0;\n  let battleLoop = null;\n  let botLoop = null;\n  let timerLoop = null;\n  let elixirLoop = null;\n  let elixir = 5;\n  let botElixir = 5;\n  let battleTime = 120;\n\n  let towers = {};\n\n  function saveGame() {\n    localStorage.setItem(\"brainrotDeckRoyaleV3\", JSON.stringify(deck));\n    localStorage.setItem(\"usedBrainrotCodesRoyaleV3\", JSON.stringify(usedCodes));\n\n    if (favoriteId) {\n      localStorage.setItem(\"favoriteBrainrotIdRoyaleV3\", favoriteId);\n    }\n  }\n\n  function openCodePanel() {\n    closeModals();\n    document.getElementById(\"codePanel\").classList.add(\"show\");\n    document.getElementById(\"codeInput\").focus();\n  }\n\n  function openDeck() {\n    closeModals();\n    addStarterDeckIfEmpty();\n    renderDeck();\n    document.getElementById(\"deckPanel\").classList.add(\"show\");\n  }\n\n  function openFavoritePicker() {\n    closeModals();\n    addStarterDeckIfEmpty();\n    renderFavoriteList();\n    document.getElementById(\"favoritePanel\").classList.add(\"show\");\n  }\n\n  function closeModals() {\n    document.querySelectorAll(\".modal\").forEach(function(modal) {\n      modal.classList.remove(\"show\");\n    });\n  }\n\n  function redeemCode() {\n    const input = document.getElementById(\"codeInput\");\n    const msg = document.getElementById(\"codeMessage\");\n    const code = input.value.trim().toUpperCase();\n\n    if (code.length !== 12) {\n      msg.style.color = \"#ff7676\";\n      msg.textContent = \"Kod tam 12 haneli olmal\u0131!\";\n      return;\n    }\n\n    if (!validCodes[code]) {\n      msg.style.color = \"#ff7676\";\n      msg.textContent = \"Ge\u00e7ersiz kod!\";\n      return;\n    }\n\n    if (usedCodes.includes(code)) {\n      msg.style.color = \"#ffd35c\";\n      msg.textContent = \"Bu kod zaten kullan\u0131lm\u0131\u015f!\";\n      return;\n    }\n\n    const card = validCodes[code];\n\n    const alreadyInDeck = deck.some(function(deckCard) {\n      return deckCard.id === card.id;\n    });\n\n    if (alreadyInDeck) {\n      usedCodes.push(code);\n      saveGame();\n      msg.style.color = \"#ffd35c\";\n      msg.textContent = \"Bu kart zaten destende var!\";\n      return;\n    }\n\n    deck.push(card);\n    usedCodes.push(code);\n\n    if (!favoriteId) {\n      favoriteId = card.id;\n    }\n\n    saveGame();\n    updateFavorite();\n\n    input.value = \"\";\n    msg.style.color = \"#6dff8b\";\n    msg.textContent = card.name + \" desteye eklendi!\";\n\n    showToast(\"Yeni kart a\u00e7\u0131ld\u0131: \" + card.name);\n  }\n\n  function renderDeck() {\n    const deckList = document.getElementById(\"deckList\");\n    deckList.innerHTML = \"\";\n\n    if (deck.length === 0) {\n      deckList.innerHTML = `\n        <div class=\"empty\">\n          Hen\u00fcz kart\u0131n yok. Oyuna ba\u015flay\u0131nca ba\u015flang\u0131\u00e7 desten gelecek!\n        <\/div>\n      `;\n      return;\n    }\n\n    deck.forEach(function(card) {\n      const div = document.createElement(\"div\");\n      div.className = \"miniCard\";\n      div.innerHTML = `\n        <div class=\"rarityTag\">${card.rarity}<\/div>\n        <img decoding=\"async\" class=\"cardImage\" src=\"${card.image}\">\n        <h3>${card.name}<\/h3>\n        <p>G\u00fc\u00e7: ${card.power}<\/p>\n        <p>\u0130ksir: ${card.cost}<\/p>\n      `;\n      deckList.appendChild(div);\n    });\n  }\n\n  function renderFavoriteList() {\n    const favoriteList = document.getElementById(\"favoriteList\");\n    favoriteList.innerHTML = \"\";\n\n    if (deck.length === 0) {\n      favoriteList.innerHTML = `\n        <div class=\"empty\">\n          Favori se\u00e7mek i\u00e7in \u00f6nce oyuna ba\u015fla veya kod gir.\n        <\/div>\n      `;\n      return;\n    }\n\n    deck.forEach(function(card) {\n      const div = document.createElement(\"div\");\n      div.className = \"miniCard\";\n      div.onclick = function() {\n        selectFavorite(card.id);\n      };\n\n      div.innerHTML = `\n        <div class=\"rarityTag\">${card.rarity}<\/div>\n        <img decoding=\"async\" class=\"cardImage\" src=\"${card.image}\">\n        <h3>${card.name}<\/h3>\n        <p>G\u00fc\u00e7: ${card.power}<\/p>\n        <p>\u0130ksir: ${card.cost}<\/p>\n      `;\n\n      favoriteList.appendChild(div);\n    });\n  }\n\n  function selectFavorite(id) {\n    favoriteId = id;\n    saveGame();\n    updateFavorite();\n    closeModals();\n    showToast(\"Favori Brainrot de\u011fi\u015fti!\");\n  }\n\n  function updateFavorite() {\n    const fav = deck.find(function(card) {\n      return card.id === favoriteId;\n    });\n\n    const favImage = document.getElementById(\"favImage\");\n    const favName = document.getElementById(\"favName\");\n    const favRarity = document.getElementById(\"favRarity\");\n    const favPower = document.getElementById(\"favPower\");\n\n    if (!fav) {\n      favImage.src = \"https:\/\/commons.wikimedia.org\/wiki\/Special:FilePath\/Tung_tung_tung_sahur.webp\";\n      favName.textContent = \"Hen\u00fcz yok\";\n      favRarity.textContent = \"Oyuna ba\u015fla, deste gelsin\";\n      favPower.textContent = \"G\u00fc\u00e7: 0\";\n      return;\n    }\n\n    favImage.src = fav.image;\n    favName.textContent = fav.name;\n    favRarity.textContent = fav.rarity;\n    favPower.textContent = \"G\u00fc\u00e7: \" + fav.power;\n  }\n\n  function showToast(text) {\n    const toast = document.getElementById(\"toast\");\n    toast.textContent = text;\n    toast.style.display = \"block\";\n\n    setTimeout(function() {\n      toast.style.display = \"none\";\n    }, 1800);\n  }\n\n  function resetGame() {\n    const ok = confirm(\"T\u00fcm deste ve kullan\u0131lan kodlar silinsin mi?\");\n    if (!ok) return;\n\n    deck = [];\n    usedCodes = [];\n    favoriteId = null;\n\n    localStorage.removeItem(\"brainrotDeckRoyaleV3\");\n    localStorage.removeItem(\"usedBrainrotCodesRoyaleV3\");\n    localStorage.removeItem(\"favoriteBrainrotIdRoyaleV3\");\n\n    updateFavorite();\n    renderDeck();\n    renderFavoriteList();\n    showToast(\"Oyun s\u0131f\u0131rland\u0131!\");\n  }\n\n  function addStarterDeckIfEmpty() {\n    if (deck.length > 0) return;\n\n    const starterCodes = [\n      \"TNG8L3M5Q2ZA\",\n      \"CPN2W7A9K5XD\",\n      \"CAP1B2R3A4AA\",\n      \"BAN4N5M6Y7AA\"\n    ];\n\n    starterCodes.forEach(function(code) {\n      deck.push(validCodes[code]);\n    });\n\n    favoriteId = \"tungtung\";\n    saveGame();\n    updateFavorite();\n    showToast(\"Ba\u015flang\u0131\u00e7 desten verildi!\");\n  }\n\n  function startBattle() {\n    closeModals();\n    addStarterDeckIfEmpty();\n\n    document.getElementById(\"menuScreen\").style.display = \"none\";\n    document.getElementById(\"battleScreen\").style.display = \"block\";\n\n    battleRunning = true;\n    units = [];\n    selectedCard = null;\n    elixir = 5;\n    botElixir = 5;\n    battleTime = 120;\n    unitIdCounter = 0;\n\n    document.getElementById(\"unitsLayer\").innerHTML = \"\";\n    document.getElementById(\"damageLayer\").innerHTML = \"\";\n\n    setupTowers();\n    renderBattleHand();\n    updateElixirUI();\n    updateTimerUI();\n\n    clearBattleLoops();\n\n    battleLoop = setInterval(updateBattle, 30);\n    botLoop = setInterval(botPlayCard, 2100);\n    timerLoop = setInterval(updateTimer, 1000);\n    elixirLoop = setInterval(function() {\n      if (!battleRunning) return;\n\n      elixir = Math.min(10, elixir + 1);\n      botElixir = Math.min(10, botElixir + 1);\n      updateElixirUI();\n      renderBattleHand();\n    }, 1200);\n\n    showToast(\"Kart se\u00e7, kendi yar\u0131 sahana t\u0131kla!\");\n  }\n\n  function exitBattle() {\n    battleRunning = false;\n    clearBattleLoops();\n    closeModals();\n\n    document.getElementById(\"battleScreen\").style.display = \"none\";\n    document.getElementById(\"menuScreen\").style.display = \"block\";\n    updateFavorite();\n  }\n\n  function clearBattleLoops() {\n    clearInterval(battleLoop);\n    clearInterval(botLoop);\n    clearInterval(timerLoop);\n    clearInterval(elixirLoop);\n  }\n\n  function setupTowers() {\n    towers = {\n      playerKing: { id: \"playerKing\", team: \"player\", hp: 2400, maxHp: 2400, damage: 42, range: 155, lastAttack: 0 },\n      playerTop: { id: \"playerTop\", team: \"player\", hp: 1400, maxHp: 1400, damage: 36, range: 140, lastAttack: 0 },\n      playerBottom: { id: \"playerBottom\", team: \"player\", hp: 1400, maxHp: 1400, damage: 36, range: 140, lastAttack: 0 },\n      botKing: { id: \"botKing\", team: \"bot\", hp: 2400, maxHp: 2400, damage: 42, range: 155, lastAttack: 0 },\n      botTop: { id: \"botTop\", team: \"bot\", hp: 1400, maxHp: 1400, damage: 36, range: 140, lastAttack: 0 },\n      botBottom: { id: \"botBottom\", team: \"bot\", hp: 1400, maxHp: 1400, damage: 36, range: 140, lastAttack: 0 }\n    };\n\n    updateTowerBars();\n  }\n\n  function updateTowerBars() {\n    Object.keys(towers).forEach(function(key) {\n      const t = towers[key];\n      const bar = document.getElementById(t.id + \"HpBar\");\n      const towerEl = document.getElementById(t.id);\n      const percent = Math.max(0, t.hp \/ t.maxHp * 100);\n\n      if (bar) {\n        bar.style.width = percent + \"%\";\n      }\n\n      if (towerEl) {\n        towerEl.style.opacity = t.hp <= 0 ? \"0.25\" : \"1\";\n      }\n    });\n  }\n\n  function renderBattleHand() {\n    const hand = document.getElementById(\"battleHand\");\n    hand.innerHTML = \"\";\n\n    const battleDeck = deck;\n\n    battleDeck.forEach(function(card) {\n      const div = document.createElement(\"div\");\n      div.className = \"handCard\";\n\n      if (selectedCard && selectedCard.id === card.id) {\n        div.classList.add(\"selected\");\n      }\n\n      if (elixir < card.cost) {\n        div.classList.add(\"disabled\");\n      }\n\n      div.onclick = function() {\n        if (!battleRunning) return;\n\n        if (elixir < card.cost) {\n          showToast(\"Yeterli iksir yok!\");\n          return;\n        }\n\n        selectedCard = card;\n        renderBattleHand();\n        showToast(card.name + \" se\u00e7ildi. Kendi taraf\u0131na koy!\");\n      };\n\n      div.innerHTML = `\n        <div class=\"cost\">${card.cost}<\/div>\n        <img decoding=\"async\" src=\"${card.image}\">\n        <h4>${card.name}<\/h4>\n        <div>G\u00fc\u00e7 ${card.power}<\/div>\n      `;\n\n      hand.appendChild(div);\n    });\n  }\n\n  document.getElementById(\"arena\").addEventListener(\"click\", function(e) {\n    if (!battleRunning || !selectedCard) return;\n\n    const arena = document.getElementById(\"arena\");\n    const rect = arena.getBoundingClientRect();\n    const x = e.clientX - rect.left;\n    const y = e.clientY - rect.top;\n\n    if (x > rect.width * 0.47) {\n      showToast(\"Sadece kendi yar\u0131 sahana koyabilirsin!\");\n      return;\n    }\n\n    if (elixir < selectedCard.cost) {\n      showToast(\"Yeterli iksir yok!\");\n      return;\n    }\n\n    spawnUnit(\"player\", selectedCard, x, y);\n    elixir -= selectedCard.cost;\n    selectedCard = null;\n\n    updateElixirUI();\n    renderBattleHand();\n  });\n\n  function spawnUnit(team, card, x, y) {\n    const img = document.createElement(\"img\");\n    const hpBar = document.createElement(\"div\");\n    const hpFill = document.createElement(\"div\");\n\n    img.className = \"unit \" + (team === \"player\" ? \"playerUnit\" : \"botUnit\");\n    img.src = card.image;\n\n    hpBar.className = \"unitHp\";\n    hpBar.appendChild(hpFill);\n\n    document.getElementById(\"unitsLayer\").appendChild(img);\n    document.getElementById(\"unitsLayer\").appendChild(hpBar);\n\n    const unit = {\n      id: unitIdCounter++,\n      team: team,\n      card: card,\n      x: x,\n      y: y,\n      hp: card.hp,\n      maxHp: card.hp,\n      damage: card.damage,\n      speed: card.speed,\n      range: card.range,\n      attackSpeed: card.attackSpeed,\n      lastAttack: 0,\n      element: img,\n      hpElement: hpBar,\n      hpFill: hpFill\n    };\n\n    units.push(unit);\n    drawUnit(unit);\n\n    return unit;\n  }\n\n  function drawUnit(unit) {\n    unit.element.style.left = (unit.x - 23) + \"px\";\n    unit.element.style.top = (unit.y - 23) + \"px\";\n\n    unit.hpElement.style.left = (unit.x - 25) + \"px\";\n    unit.hpElement.style.top = (unit.y - 36) + \"px\";\n    unit.hpFill.style.width = Math.max(0, unit.hp \/ unit.maxHp * 100) + \"%\";\n  }\n\n  function botPlayCard() {\n    if (!battleRunning) return;\n    if (botElixir < 3) return;\n\n    const botCards = deck;\n\n    const possible = botCards.filter(function(card) {\n      return card.cost <= botElixir;\n    });\n\n    if (possible.length === 0) return;\n\n    const card = possible[Math.floor(Math.random() * possible.length)];\n    const arena = document.getElementById(\"arena\");\n    const rect = arena.getBoundingClientRect();\n\n    const x = rect.width * (0.58 + Math.random() * 0.22);\n    const y = rect.height * (0.25 + Math.random() * 0.5);\n\n    spawnUnit(\"bot\", card, x, y);\n    botElixir -= card.cost;\n  }\n\n  function updateBattle() {\n    if (!battleRunning) return;\n\n    const now = Date.now();\n\n    updateUnits(now);\n    updateTowerAttacks(now);\n    removeDeadUnits();\n    updateTowerBars();\n    checkWinLose();\n  }\n\n  function updateUnits(now) {\n    units.forEach(function(unit) {\n      if (unit.hp <= 0) return;\n\n      const enemy = findNearestEnemy(unit);\n\n      if (enemy) {\n        const targetPos = getTargetPosition(enemy);\n        const dx = targetPos.x - unit.x;\n        const dy = targetPos.y - unit.y;\n        const dist = Math.sqrt(dx * dx + dy * dy);\n\n        if (dist <= unit.range) {\n          if (now - unit.lastAttack > unit.attackSpeed) {\n            attackTarget(unit, enemy);\n            unit.lastAttack = now;\n          }\n        } else {\n          moveToward(unit, targetPos.x, targetPos.y);\n        }\n      } else {\n        const arena = document.getElementById(\"arena\");\n        const rect = arena.getBoundingClientRect();\n\n        if (unit.team === \"player\") {\n          moveToward(unit, rect.width * 0.92, rect.height * 0.5);\n        } else {\n          moveToward(unit, rect.width * 0.08, rect.height * 0.5);\n        }\n      }\n\n      drawUnit(unit);\n    });\n  }\n\n  function findNearestEnemy(unit) {\n    let enemies = [];\n\n    units.forEach(function(other) {\n      if (other.team !== unit.team && other.hp > 0) {\n        enemies.push(other);\n      }\n    });\n\n    Object.keys(towers).forEach(function(key) {\n      const tower = towers[key];\n\n      if (tower.team !== unit.team && tower.hp > 0) {\n        enemies.push(tower);\n      }\n    });\n\n    let nearest = null;\n    let nearestDist = Infinity;\n\n    enemies.forEach(function(enemy) {\n      const pos = getTargetPosition(enemy);\n      const dx = pos.x - unit.x;\n      const dy = pos.y - unit.y;\n      const dist = Math.sqrt(dx * dx + dy * dy);\n\n      if (dist < nearestDist) {\n        nearestDist = dist;\n        nearest = enemy;\n      }\n    });\n\n    return nearest;\n  }\n\n  function getTargetPosition(target) {\n    if (target.element) {\n      return { x: target.x, y: target.y };\n    }\n\n    const arena = document.getElementById(\"arena\");\n    const towerEl = document.getElementById(target.id);\n    const arenaRect = arena.getBoundingClientRect();\n    const towerRect = towerEl.getBoundingClientRect();\n\n    return {\n      x: towerRect.left - arenaRect.left + towerRect.width \/ 2,\n      y: towerRect.top - arenaRect.top + towerRect.height \/ 2\n    };\n  }\n\n  function moveToward(unit, tx, ty) {\n    const dx = tx - unit.x;\n    const dy = ty - unit.y;\n    const dist = Math.sqrt(dx * dx + dy * dy);\n\n    if (dist < 1) return;\n\n    unit.x += dx \/ dist * unit.speed;\n    unit.y += dy \/ dist * unit.speed;\n  }\n\n  function attackTarget(attacker, target) {\n    target.hp -= attacker.damage;\n    const pos = getTargetPosition(target);\n    showDamage(pos.x, pos.y, \"-\" + attacker.damage);\n  }\n\n  function updateTowerAttacks(now) {\n    Object.keys(towers).forEach(function(key) {\n      const tower = towers[key];\n\n      if (tower.hp <= 0) return;\n      if (now - tower.lastAttack < 850) return;\n\n      let nearest = null;\n      let nearestDist = Infinity;\n      const towerPos = getTargetPosition(tower);\n\n      units.forEach(function(unit) {\n        if (unit.team === tower.team || unit.hp <= 0) return;\n\n        const dx = unit.x - towerPos.x;\n        const dy = unit.y - towerPos.y;\n        const dist = Math.sqrt(dx * dx + dy * dy);\n\n        if (dist < tower.range && dist < nearestDist) {\n          nearestDist = dist;\n          nearest = unit;\n        }\n      });\n\n      if (nearest) {\n        nearest.hp -= tower.damage;\n        tower.lastAttack = now;\n        showDamage(nearest.x, nearest.y, \"-\" + tower.damage);\n      }\n    });\n  }\n\n  function removeDeadUnits() {\n    units = units.filter(function(unit) {\n      if (unit.hp <= 0) {\n        unit.element.remove();\n        unit.hpElement.remove();\n        return false;\n      }\n\n      return true;\n    });\n  }\n\n  function showDamage(x, y, text) {\n    const div = document.createElement(\"div\");\n    div.className = \"hitText\";\n    div.textContent = text;\n    div.style.left = x + \"px\";\n    div.style.top = y + \"px\";\n\n    document.getElementById(\"damageLayer\").appendChild(div);\n\n    setTimeout(function() {\n      div.remove();\n    }, 700);\n  }\n\n  function updateElixirUI() {\n    document.getElementById(\"elixirText\").textContent = elixir;\n    document.getElementById(\"elixirFill\").style.width = (elixir * 10) + \"%\";\n  }\n\n  function updateTimer() {\n    if (!battleRunning) return;\n\n    battleTime--;\n    updateTimerUI();\n\n    if (battleTime <= 0) {\n      finishByTowerHp();\n    }\n  }\n\n  function updateTimerUI() {\n    const min = Math.floor(battleTime \/ 60);\n    const sec = battleTime % 60;\n    document.getElementById(\"battleTimer\").textContent =\n      String(min).padStart(2, \"0\") + \":\" + String(sec).padStart(2, \"0\");\n  }\n\n  function checkWinLose() {\n    if (!battleRunning) return;\n\n    if (towers.botKing.hp <= 0) {\n      finishBattle(true, \"Bot kral kulesi y\u0131k\u0131ld\u0131!\");\n      return;\n    }\n\n    if (towers.playerKing.hp <= 0) {\n      finishBattle(false, \"Senin kral kulen y\u0131k\u0131ld\u0131!\");\n    }\n  }\n\n  function finishByTowerHp() {\n    const playerHp =\n      Math.max(0, towers.playerKing.hp) +\n      Math.max(0, towers.playerTop.hp) +\n      Math.max(0, towers.playerBottom.hp);\n\n    const botHp =\n      Math.max(0, towers.botKing.hp) +\n      Math.max(0, towers.botTop.hp) +\n      Math.max(0, towers.botBottom.hp);\n\n    if (playerHp >= botHp) {\n      finishBattle(true, \"S\u00fcre bitti, kule canlar\u0131nda \u00f6ndesin!\");\n    } else {\n      finishBattle(false, \"S\u00fcre bitti, bot kule can\u0131nda \u00f6ne ge\u00e7ti!\");\n    }\n  }\n\n  function finishBattle(win, text) {\n    battleRunning = false;\n    clearBattleLoops();\n\n    document.getElementById(\"resultTitle\").textContent = win ? \"KAZANDIN!\" : \"KAYBETT\u0130N!\";\n    document.getElementById(\"resultText\").textContent = text;\n    document.getElementById(\"resultPanel\").classList.add(\"show\");\n  }\n\n  document.addEventListener(\"keydown\", function(e) {\n    if (e.key === \"Escape\") {\n      closeModals();\n    }\n\n    if (\n      e.key === \"Enter\" &&\n      document.getElementById(\"codePanel\").classList.contains(\"show\")\n    ) {\n      redeemCode();\n    }\n  });\n\n  addStarterDeckIfEmpty();\n  updateFavorite();\n<\/script>\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Ana Sayfa \ud83e\udde0 Brainrot Arena Seviye 1 \ud83d\udc8e 120 DESTEM Favori Brainrotum De\u011fi\u015ftirmek i\u00e7in t\u0131kla Hen\u00fcz yok Oyuna ba\u015fla, deste gelsin G\u00fc\u00e7: 0 OYNA KOD G\u0130R \ud83c\udf81 Kod \ud83c\udccf Deste \u2b50 Favori \ud83e\uddf9 S\u0131f\u0131rla MEN\u00dc Brainrot Royale 02:00 SEN KULE KULE BOT KULE KULE \u0130ksir: 5\/10 Sava\u015f Destem X Kart Kodunu Gir Kart\u0131n arkas\u0131ndaki 12 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"elementor_canvas","meta":{"footnotes":""},"class_list":["post-52","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/urasuzay.com\/index.php\/wp-json\/wp\/v2\/pages\/52","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/urasuzay.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/urasuzay.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/urasuzay.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/urasuzay.com\/index.php\/wp-json\/wp\/v2\/comments?post=52"}],"version-history":[{"count":22,"href":"https:\/\/urasuzay.com\/index.php\/wp-json\/wp\/v2\/pages\/52\/revisions"}],"predecessor-version":[{"id":167,"href":"https:\/\/urasuzay.com\/index.php\/wp-json\/wp\/v2\/pages\/52\/revisions\/167"}],"wp:attachment":[{"href":"https:\/\/urasuzay.com\/index.php\/wp-json\/wp\/v2\/media?parent=52"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}