<style>
body {
margin: 0;
background: #fff0f5;
font-family: sans-serif;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
}
.page {
text-align: center;
padding: 40px;
}
h1 {
color: #e05080;
font-size: 2rem;
margin-bottom: 16px;
}
.desc {
color: #666;
margin-bottom: 32px;
}
#donateBtn {
background: #e05080;
color: white;
border: none;
padding: 20px 40px;
font-size: 1.5rem;
border-radius: 50px;
cursor: pointer;
}
#donateBtn:hover {
background: #c03060;
}
.count {
color: #888;
margin-top: 24px;
}
</style>
<div class="page">
<h1>HARTINクリック募金</h1>
<p class="desc">ボタンを1回押すごとに、1円が寄付されます。</p>
<button id="donateBtn">♥ 募金する</button>
<p class="count">寄付回数:<span id="countDisplay">0</span>回</p>
</div>
let count = 0;
const btn = document.querySelector('#donateBtn');
const countDisplay = document.querySelector('#countDisplay');
btn.addEventListener('click', function() {
count = count + 1;
countDisplay.textContent = count;
});