[html]<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Ежедневные награды | ON:AIR</title>
<style>
*{
margin:0;
padding:0;
box-sizing:border-box;
}
body{
background:linear-gradient(145deg,#1a1a2e 0%,#16213e 100%);
min-height:100vh;
display:flex;
justify-content:center;
align-items:center;
padding:30px 20px;
font-family:'Trebuchet MS','Segoe UI',sans-serif;
}
.main-card{
max-width:650px;
width:100%;
margin:auto;
color:#6a6a7a;
}
.card-inner{
background:linear-gradient(
135deg,
rgba(255,235,245,0.9),
rgba(255,245,250,0.85)
);
border-radius:20px;
padding:25px;
box-shadow:0 0 25px rgba(255,180,220,0.25);
}
.onair-header{
display:flex;
justify-content:space-between;
align-items:center;
gap:15px;
}
.onair-title{
font-size:30px;
letter-spacing:4px;
color:rgba(120,220,255,0.9);
text-shadow:
0 0 10px rgba(120,220,255,0.6),
0 0 20px rgba(120,220,255,0.4),
0 0 40px rgba(255,180,220,0.4);
animation:onairGlow 2.5s infinite ease-in-out;
}
.live-badge{
font-size:16px;
font-weight:bold;
color:#ff6b8a;
text-shadow:0 0 6px rgba(255,120,150,0.6);
animation:liveBlink 1.5s infinite;
}
@keyframes onairGlow{
0%{opacity:0.85;}
50%{opacity:1;}
100%{opacity:0.85;}
}
@keyframes liveBlink{
0%,100%{opacity:1;}
50%{opacity:0.4;}
}
/* GRID */
.rewards-grid{
display:grid;
grid-template-columns:repeat(7,1fr);
gap:10px;
margin:25px 0;
}
.reward-cell{
aspect-ratio:1/1;
position:relative;
display:flex;
justify-content:center;
align-items:center;
border-radius:14px;
font-size:14px;
font-weight:bold;
cursor:pointer;
transition:0.2s ease;
user-select:none;
color:#fff;
background:transparent;
backdrop-filter:blur(4px);
text-shadow:0 0 4px rgba(0,0,0,0.3);
}
.reward-cell::before{
content:'';
position:absolute;
inset:0;
border-radius:14px;
padding:2px;
background:linear-gradient(
135deg,
rgba(120,220,255,0.8),
rgba(255,180,220,0.7)
);
-webkit-mask:
linear-gradient(#fff 0 0) content-box,
linear-gradient(#fff 0 0);
mask:
linear-gradient(#fff 0 0) content-box,
linear-gradient(#fff 0 0);
-webkit-mask-composite:xor;
mask-composite:exclude;
pointer-events:none;
}
.reward-cell.locked{
color:rgba(255,255,255,0.5);
font-size:15px;
}
.reward-cell.locked::before{
background:linear-gradient(
135deg,
rgba(150,150,150,0.5),
rgba(100,100,100,0.3)
);
}
.reward-cell.opened::before{
background:linear-gradient(
135deg,
rgba(120,220,255,0.95),
rgba(255,200,230,0.95)
);
box-shadow:0 0 12px rgba(120,220,255,0.5);
}
.reward-cell:hover{
transform:scale(1.03);
}
/* TIMER */
.timer-block{
text-align:center;
font-size:13px;
background:rgba(255,255,255,0.2);
backdrop-filter:blur(4px);
border-radius:20px;
padding:10px 15px;
margin:15px 0;
color:#78dcff;
font-weight:bold;
letter-spacing:1px;
}
/* TOAST */
.toast-notify{
position:fixed;
bottom:30px;
left:50%;
transform:translateX(-50%);
background:rgba(0,0,0,0.85);
backdrop-filter:blur(12px);
color:#ffb4dc;
padding:10px 20px;
border-radius:30px;
font-size:14px;
font-weight:bold;
opacity:0;
transition:0.3s ease;
pointer-events:none;
z-index:1000;
white-space:nowrap;
border:1px solid rgba(255,180,220,0.4);
}
.toast-notify.show{
opacity:1;
}
/* BOTTOM */
.icons-row{
margin-top:20px;
display:flex;
justify-content:space-between;
align-items:center;
gap:10px;
background:rgba(255,255,255,0.45);
border-radius:15px;
padding:12px 15px;
backdrop-filter:blur(6px);
border:1px solid rgba(255,255,255,0.6);
}
</style>
</head>
<body>
<div class="main-card">
<div class="card-inner">
<!-- HEADER -->
<div class="onair-header">
<div class="onair-title">
daily check-in
</div>
<div class="live-badge">
● LIVE
</div>
</div>
<!-- GRID -->
<div class="rewards-grid" id="rewardsGrid"></div>
<!-- TIMER -->
<div class="timer-block" id="timerDisplay">
загрузка...
</div>
<!-- ICONS -->
<div class="icons-row">
<div style="flex:1;text-align:center;">
🎤
</div>
<div style="flex:1;text-align:center;">
🎧
</div>
</div>
</div>
</div>
<div class="toast-notify" id="toast"></div>
<script>
const grid = document.getElementById("rewardsGrid");
const toast = document.getElementById("toast");
const timerDiv = document.getElementById("timerDisplay");
/* НАГРАДЫ */
const rewards = [
10,15,20,25,30,35,40,
45,50,55,60,65,70,75,
80,85,90,95,100,10,15,
20,25,30,35,40,45,50,
55,60,100
];
/* PROFILE */
const profileId =
window.location.pathname || "default_profile";
/* STORAGE */
const STORAGE_KEYS = {
currentDay:
`currentDay_${profileId}`,
opened:
`opened_${profileId}`,
lastClaimDate:
`lastClaimDate_${profileId}`
};
let currentDay = Number(
localStorage.getItem(
STORAGE_KEYS.currentDay
) || 0
);
let opened = JSON.parse(
localStorage.getItem(
STORAGE_KEYS.opened
) || "[]"
);
let lastClaimDate =
localStorage.getItem(
STORAGE_KEYS.lastClaimDate
);
/* FIX */
if(currentDay < 0) currentDay = 0;
if(currentDay > 31) currentDay = 31;
/* TODAY */
function today(){
return new Date()
.toISOString()
.split("T")[0];
}
/* TOAST */
function showToast(text){
toast.textContent = text;
toast.classList.add("show");
setTimeout(() => {
toast.classList.remove("show");
},2000);
}
/* COPY */
function copyReward(day,value){
const text = `${day}-${value}`;
const ta =
document.createElement("textarea");
ta.value = text;
ta.style.position = "fixed";
ta.style.opacity = "0";
document.body.appendChild(ta);
ta.focus();
ta.select();
let success = false;
try{
success =
document.execCommand("copy");
}
catch(e){
success = false;
}
document.body.removeChild(ta);
if(success){
showToast(`Скопировано: ${text}`);
}
else{
showToast("Ошибка копирования ❌");
}
}
/* GRID */
function renderGrid(){
grid.innerHTML = "";
for(let i = 0; i < 31; i++){
const cell =
document.createElement("div");
cell.className =
"reward-cell locked";
cell.textContent = "🎵";
/* OPENED */
if(opened[i]){
cell.classList.remove("locked");
cell.classList.add("opened");
cell.textContent = rewards[i];
}
/* CLICK */
cell.addEventListener("click",function(){
/* OPENED */
if(opened[i]){
copyReward(
i + 1,
rewards[i]
);
showToast("Уже открыто ✔");
return;
}
/* ORDER */
if(i !== currentDay){
showToast(
"Открывай по порядку 🔒"
);
return;
}
/* TODAY */
if(lastClaimDate === today()){
showToast(
"Уже получено сегодня ⏳"
);
return;
}
/* COPY FIRST */
copyReward(
i + 1,
rewards[i]
);
/* SAVE */
opened[i] = true;
currentDay++;
localStorage.setItem(
STORAGE_KEYS.opened,
JSON.stringify(opened)
);
localStorage.setItem(
STORAGE_KEYS.currentDay,
currentDay
);
localStorage.setItem(
STORAGE_KEYS.lastClaimDate,
today()
);
lastClaimDate = today();
/* UI */
cell.classList.remove("locked");
cell.classList.add("opened");
cell.textContent =
rewards[i];
});
grid.appendChild(cell);
}
}
/* TIMER */
function updateTimer(){
const now = new Date();
const tomorrow = new Date();
tomorrow.setHours(
24,0,0,0
);
const diff =
tomorrow - now;
const h = Math.floor(
diff / 1000 / 60 / 60
);
const m = Math.floor(
diff / 1000 / 60
) % 60;
const s = Math.floor(
diff / 1000
) % 60;
timerDiv.textContent =
`⏱️ Следующая награда через: ${h}ч ${m}м ${s}с ⏱️`;
}
/* START */
renderGrid();
updateTimer();
setInterval(updateTimer,1000);
</script>
</body>
</html>[/html]
