İçeriğe geç
Tüm kodlar

İstanbul'un Fethi

Yorumla oynanan TikTok LIVE strateji oyunu

147 satır · 9,1 KBHamİndir
:root {
  --red: #e0102f;
  --gold: #ffcc33;
  --cream: #f4efe2;
  --ink: #1a1022;
  --panel: rgba(28, 10, 14, 0.84);
  --font: 'Arial Black', 'Segoe UI', Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--ink); overflow: hidden; font-family: var(--font); }
body { display: flex; align-items: center; justify-content: center; }
#stage { position: relative; overflow: hidden; background: var(--ink); --s: 1; }
#stage > canvas { display: block; }
.labels { position: absolute; inset: 0; pointer-events: none; z-index: 1; }

/* ---------- isim etiketleri ---------- */
.tag { display: flex; flex-direction: column; align-items: center; pointer-events: none; position: relative; }
.tag .name {
  font: 700 calc(17px * var(--s)) / 1 'Segoe UI', Arial, sans-serif;
  color: #fff;
  padding: calc(3px * var(--s)) calc(7px * var(--s));
  border-radius: calc(9px * var(--s));
  background: rgba(40, 6, 10, 0.6);
  text-shadow: 0 1px 2px #000;
  white-space: nowrap;
  max-width: calc(200px * var(--s));
  overflow: hidden;
  text-overflow: ellipsis;
}
.tag .name.fatih { color: #3a1d00; background: linear-gradient(90deg, #ffcc33, #fff0a8); box-shadow: 0 0 calc(10px * var(--s)) #ffcc33; }
.tag .name.fatih::before { content: '👑 '; }
.tag .bubble {
  position: absolute;
  bottom: calc(100% + 6px * var(--s));
  font: 600 calc(20px * var(--s)) / 1.2 'Segoe UI', Arial, sans-serif;
  color: #2a0a0a;
  background: var(--cream);
  padding: calc(6px * var(--s)) calc(12px * var(--s));
  border-radius: calc(14px * var(--s));
  white-space: nowrap;
  box-shadow: 0 calc(3px * var(--s)) calc(10px * var(--s)) rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(calc(8px * var(--s))) scale(0.8);
  transition: opacity 0.2s, transform 0.2s;
}
.tag .bubble::after {
  content: ''; position: absolute; left: 50%; bottom: calc(-7px * var(--s)); transform: translateX(-50%);
  border: calc(7px * var(--s)) solid transparent; border-bottom: 0; border-top-color: var(--cream);
}
.tag .bubble.show { opacity: 1; transform: none; }
.tag .pop { position: absolute; bottom: 100%; font-size: calc(38px * var(--s)); animation: pop 1.6s ease-out forwards; }
@keyframes pop {
  0% { transform: translateY(0) scale(0.3); opacity: 0; }
  15% { transform: translateY(calc(-20px * var(--s))) scale(1.2); opacity: 1; }
  100% { transform: translateY(calc(-110px * var(--s))) scale(1); opacity: 0; }
}

/* ---------- HUD ---------- */
#hud { position: absolute; left: 0; top: 0; width: 1080px; height: 1920px; transform-origin: 0 0; pointer-events: none; color: #fff; z-index: 2; }
.title {
  position: absolute; top: 26px; left: 0; right: 0; text-align: center;
  font-size: 46px; letter-spacing: 2px; color: var(--cream);
  text-shadow: 0 0 14px var(--red), 0 3px 0 #5a0010;
}
.title .moon { color: var(--red); text-shadow: 0 0 10px #fff; }
.title .round { font-size: 26px; vertical-align: middle; padding: 4px 14px; border-radius: 14px; background: var(--red); text-shadow: none; margin-left: 8px; }
.cards { position: absolute; top: 102px; left: 24px; right: 24px; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.card {
  border-radius: 18px; padding: 12px 10px; min-height: 96px; display: flex; align-items: center; justify-content: center;
  text-align: center; font-size: 25px; line-height: 1.15; background: var(--panel); border: 4px solid;
}
.card.c1 { border-color: var(--cream); box-shadow: 0 0 16px rgba(244, 239, 226, 0.6); }
.card.c2 { border-color: var(--red); box-shadow: 0 0 18px var(--red); }
.card.c3 { border-color: var(--gold); box-shadow: 0 0 18px var(--gold); }
.hint { position: absolute; top: 222px; width: 100%; text-align: center; font: 700 25px 'Segoe UI', Arial, sans-serif; color: #ffe6c8; text-shadow: 0 0 8px #000, 0 0 4px var(--red); }
.hp { position: absolute; top: 266px; left: 60px; right: 60px; height: 54px; border-radius: 27px; background: rgba(20, 6, 6, 0.85); border: 3px solid var(--gold); overflow: hidden; box-shadow: 0 0 14px rgba(255, 204, 51, 0.6); }
.hp .fill { position: absolute; inset: 0 auto 0 0; width: 100%; background: linear-gradient(90deg, #8a0f1a, #e0102f, #ff6b4a); transition: width 0.35s; }
.hp .fill.low { animation: blink 0.6s infinite alternate; }
@keyframes blink { to { filter: brightness(1.6); } }
.hp .txt { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 25px; text-shadow: 0 2px 4px #000; }
.leaders {
  position: absolute; top: 334px; left: 24px; right: 24px; display: flex; align-items: center; gap: 16px;
  padding: 10px 20px; border-radius: 16px; background: var(--panel); border: 3px solid var(--red);
  font: 700 25px 'Segoe UI', Arial, sans-serif; white-space: nowrap; overflow: hidden;
}
.leaders .lbl { color: var(--gold); font-family: var(--font); font-size: 22px; }
.leaders .list { display: flex; gap: 22px; overflow: hidden; }
.leaders .ld em { font-style: normal; color: var(--gold); }
.leaders .empty { opacity: 0.75; }
.likes { position: absolute; top: 406px; left: 220px; right: 220px; height: 36px; border-radius: 18px; background: rgba(20, 6, 6, 0.8); border: 2px solid #ff7aa8; overflow: hidden; }
.likes .fill { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, #ff3d7a, #ffb03d); transition: width 0.3s; }
.likes .txt { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 19px; text-shadow: 0 2px 3px #000; }

.song, .count {
  position: absolute; bottom: 30px; padding: 10px 20px; border-radius: 28px; background: var(--panel);
  border: 2px solid var(--gold); font: 700 24px 'Segoe UI', Arial, sans-serif; max-width: 720px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.song { left: 24px; }
.song .note { color: var(--gold); display: inline-block; animation: bob 0.6s ease-in-out infinite alternate; }
@keyframes bob { to { transform: translateY(-6px); } }
.count { right: 24px; border-color: var(--red); }
.feed { position: absolute; left: 24px; bottom: 100px; display: flex; flex-direction: column; gap: 8px; font: 700 23px 'Segoe UI', Arial, sans-serif; }
.feed .fi { align-self: flex-start; padding: 7px 16px; border-radius: 16px; background: rgba(28, 10, 14, 0.75); animation: fin 0.3s ease-out; transition: opacity 0.6s; }
.feed .fi.out { opacity: 0; }
@keyframes fin { from { transform: translateX(-30px); opacity: 0; } }

.banner {
  position: absolute; bottom: 330px; left: 50%; max-width: 1000px; transform: translateX(-50%) scale(0.6); opacity: 0;
  padding: 20px 36px; border-radius: 22px; font-size: 38px; text-align: center; background: rgba(28, 6, 10, 0.92);
  border: 4px solid var(--red); box-shadow: 0 0 30px var(--red);
  transition: opacity 0.3s, transform 0.3s cubic-bezier(0.2, 1.6, 0.4, 1);
}
.banner.show { opacity: 1; transform: translateX(-50%) scale(1); }
.banner.gift { border-color: var(--gold); box-shadow: 0 0 34px var(--gold); }
.banner.party { border-color: #fff; background: linear-gradient(90deg, #8a0f1a, #e0102f, #8a0f1a); font-size: 42px; }

.dmgs { position: absolute; inset: 0; }
.dmg { position: absolute; transform: translate(-50%, -50%); font-size: 40px; color: #fff; text-shadow: 0 0 6px #e0102f, 0 3px 0 #000; animation: dmg 1.2s ease-out forwards; }
.dmg.big { font-size: 72px; color: var(--gold); }
@keyframes dmg { 0% { opacity: 0; margin-top: 0; transform: translate(-50%, -50%) scale(0.4); } 15% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); } 100% { opacity: 0; margin-top: -120px; transform: translate(-50%, -50%) scale(1); } }

.victory {
  position: absolute; top: 1150px; left: 90px; right: 90px; padding: 22px 24px; text-align: center;
  border-radius: 30px; background: rgb(120, 6, 20); border: 6px solid var(--gold); z-index: 2;
  box-shadow: 0 0 60px var(--gold), inset 0 0 40px rgba(0, 0, 0, 0.4);
  transform: scale(0.5); opacity: 0; transition: transform 0.5s cubic-bezier(0.2, 1.6, 0.4, 1), opacity 0.4s;
}
.victory.show { transform: none; opacity: 1; }
.victory .v1 { font-size: 44px; color: #fff; text-shadow: 0 0 18px var(--gold); }
.victory .v2 { font-size: 26px; color: var(--gold); margin: 4px 0 12px; }
.victory .v3 { font-size: 24px; letter-spacing: 3px; color: var(--cream); margin-bottom: 12px; }
.victory .hero { font: 800 34px 'Segoe UI', Arial, sans-serif; margin: 8px 0; }
.victory .hero em { font-style: normal; color: var(--gold); font-size: 30px; }
.victory .hero.h0 { font-size: 42px; }
.victory .last { font: 700 28px 'Segoe UI', Arial, sans-serif; margin-top: 16px; color: #ffe6c8; }
.victory .v4 { font: 600 24px 'Segoe UI', Arial, sans-serif; margin-top: 14px; opacity: 0.8; }

#net { position: absolute; right: 8px; top: 8px; width: 10px; height: 10px; border-radius: 50%; opacity: 0.6; z-index: 3; }
#net.ok { background: #2ee59d; }
#net.bad { background: #ff4a4a; }
#sound {
  position: absolute; z-index: 3; left: 50%; top: 50%; transform: translateX(-50%); padding: 18px 28px;
  font: 700 18px 'Segoe UI', Arial, sans-serif; color: #fff; background: rgba(28, 6, 10, 0.92);
  border: 2px solid var(--gold); border-radius: 16px; cursor: pointer; box-shadow: 0 0 20px var(--gold);
}
#yt-host { position: fixed; left: 0; bottom: 0; width: 320px; height: 180px; opacity: 0.001; pointer-events: none; z-index: -1; }

Lisans bilgisi projenin LICENSE dosyasında.