improvfmeents
This commit is contained in:
@@ -2501,4 +2501,295 @@ body, html {
|
||||
@keyframes fadeIn {
|
||||
from { opacity: 0; transform: scale(0.95); }
|
||||
to { opacity: 1; transform: scale(1); }
|
||||
}
|
||||
|
||||
/* --- 1. TABLE THEMES --- */
|
||||
#game-table-container.theme-classicgreen,
|
||||
#game-table-container.theme-classic-green {
|
||||
background: radial-gradient(ellipse at center, #144933 0%, #0b2b1d 60%, #04120c 100%) !important;
|
||||
}
|
||||
#game-table-container.theme-classicgreen .poker-table-surface,
|
||||
#game-table-container.theme-classic-green .poker-table-surface {
|
||||
border-color: #5a3818 !important;
|
||||
background: radial-gradient(ellipse at center, #1e5c42 0%, #13422e 65%, #0d2e20 100%) !important;
|
||||
box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 0, 0, 0.9) !important;
|
||||
}
|
||||
|
||||
#game-table-container.theme-royalburgundy,
|
||||
#game-table-container.theme-royal-burgundy {
|
||||
background: radial-gradient(ellipse at center, #420d18 0%, #24050b 60%, #0c0103 100%) !important;
|
||||
}
|
||||
#game-table-container.theme-royalburgundy .poker-table-surface,
|
||||
#game-table-container.theme-royal-burgundy .poker-table-surface {
|
||||
border-color: #8c6227 !important;
|
||||
background: radial-gradient(ellipse at center, #5c1422 0%, #3d0a14 65%, #200409 100%) !important;
|
||||
box-shadow: inset 0 0 65px rgba(0, 0, 0, 0.85), 0 0 35px rgba(236, 72, 153, 0.25) !important;
|
||||
}
|
||||
|
||||
#game-table-container.theme-woodcabin,
|
||||
#game-table-container.theme-wood-cabin {
|
||||
background: radial-gradient(ellipse at center, #2e1d10 0%, #1a0f08 60%, #080402 100%) !important;
|
||||
}
|
||||
#game-table-container.theme-woodcabin .poker-table-surface,
|
||||
#game-table-container.theme-wood-cabin .poker-table-surface {
|
||||
border-color: #3e2723 !important;
|
||||
background: radial-gradient(ellipse at center, #3d2817 0%, #291a0e 65%, #180f07 100%) !important;
|
||||
box-shadow: inset 0 0 70px rgba(0, 0, 0, 0.9), 0 0 30px rgba(245, 158, 11, 0.2) !important;
|
||||
}
|
||||
|
||||
#game-table-container.theme-cyberneon,
|
||||
#game-table-container.theme-cyber-neon {
|
||||
background: radial-gradient(ellipse at center, #0a1f30 0%, #050d14 60%, #010408 100%) !important;
|
||||
}
|
||||
#game-table-container.theme-cyberneon .poker-table-surface,
|
||||
#game-table-container.theme-cyber-neon .poker-table-surface {
|
||||
border-color: #00e5ff !important;
|
||||
background: radial-gradient(ellipse at center, #0e2a40 0%, #081724 65%, #03080d 100%) !important;
|
||||
box-shadow: inset 0 0 60px rgba(0, 229, 255, 0.25), 0 0 40px rgba(0, 229, 255, 0.35) !important;
|
||||
}
|
||||
|
||||
/* --- MOVE HISTORY RADAR (ŽIVÝ ZÁZNAMNÍK ŤAHOV) --- */
|
||||
.game-log-radar {
|
||||
position: absolute;
|
||||
top: 55px;
|
||||
left: 14px;
|
||||
z-index: 80;
|
||||
max-width: 280px;
|
||||
width: 260px;
|
||||
pointer-events: auto;
|
||||
transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
||||
}
|
||||
|
||||
.game-log-radar.minimized {
|
||||
width: auto;
|
||||
max-width: 48px;
|
||||
}
|
||||
|
||||
.log-radar-toggle-btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
background: rgba(10, 25, 20, 0.85);
|
||||
border: 1px solid rgba(245, 176, 65, 0.45);
|
||||
color: var(--gold);
|
||||
font-size: 0.76rem;
|
||||
font-weight: 800;
|
||||
padding: 4px 10px;
|
||||
border-radius: 14px;
|
||||
cursor: pointer;
|
||||
backdrop-filter: blur(8px);
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
|
||||
margin-bottom: 6px;
|
||||
transition: all 0.2s ease;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.log-radar-toggle-btn:hover {
|
||||
background: rgba(245, 176, 65, 0.25);
|
||||
border-color: var(--gold);
|
||||
transform: scale(1.05);
|
||||
}
|
||||
|
||||
.log-radar-items-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 5px;
|
||||
background: rgba(8, 16, 12, 0.92);
|
||||
border: 1px solid rgba(245, 176, 65, 0.3);
|
||||
border-radius: 14px;
|
||||
padding: 8px 10px;
|
||||
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.85), inset 0 0 15px rgba(245, 176, 65, 0.08);
|
||||
backdrop-filter: blur(10px);
|
||||
max-height: 220px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.log-radar-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
font-size: 0.78rem;
|
||||
color: #f1f5f9;
|
||||
padding: 5px 8px;
|
||||
border-radius: 8px;
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
border-left: 3px solid var(--gold);
|
||||
animation: radar-item-in 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
||||
}
|
||||
|
||||
@keyframes radar-item-in {
|
||||
0% { transform: translateX(-15px); opacity: 0; }
|
||||
100% { transform: translateX(0); opacity: 1; }
|
||||
}
|
||||
|
||||
.log-radar-icon {
|
||||
font-size: 1rem;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.log-radar-text {
|
||||
flex: 1;
|
||||
line-height: 1.25;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.log-radar-sub {
|
||||
font-size: 0.68rem;
|
||||
opacity: 0.85;
|
||||
color: var(--gold);
|
||||
}
|
||||
|
||||
/* --- 4. 3D VICTORY PODIUM & MATCH STATS MODAL --- */
|
||||
.match-summary-backdrop {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: rgba(0, 0, 0, 0.88);
|
||||
backdrop-filter: blur(14px);
|
||||
z-index: 500;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 16px;
|
||||
animation: fadeIn 0.35s ease;
|
||||
}
|
||||
|
||||
.match-summary-card {
|
||||
background: linear-gradient(135deg, rgba(20, 15, 35, 0.98) 0%, rgba(10, 25, 20, 0.98) 50%, rgba(30, 15, 10, 0.98) 100%);
|
||||
border: 2px solid #ffd700;
|
||||
border-radius: 28px;
|
||||
box-shadow: 0 0 60px rgba(255, 215, 0, 0.45), 0 20px 50px rgba(0, 0, 0, 0.95);
|
||||
max-width: 650px;
|
||||
width: 100%;
|
||||
padding: 24px 28px;
|
||||
color: #ffffff;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
max-height: 90vh;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.podium-container {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
justify-content: center;
|
||||
gap: 14px;
|
||||
margin: 18px 0 22px;
|
||||
min-height: 180px;
|
||||
}
|
||||
|
||||
.podium-column {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
flex: 1;
|
||||
max-width: 130px;
|
||||
}
|
||||
|
||||
.podium-avatar-box {
|
||||
margin-bottom: 8px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.podium-avatar {
|
||||
font-size: 2.8rem;
|
||||
filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.8));
|
||||
animation: podium-bounce 1.5s infinite alternate ease-in-out;
|
||||
}
|
||||
|
||||
.podium-crown {
|
||||
position: absolute;
|
||||
top: -16px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
font-size: 1.5rem;
|
||||
animation: float 2s infinite ease-in-out alternate;
|
||||
}
|
||||
|
||||
.podium-name {
|
||||
font-size: 0.88rem;
|
||||
font-weight: 800;
|
||||
color: #ffffff;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 120px;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.podium-step {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-family: 'Cinzel', serif;
|
||||
font-size: 1.8rem;
|
||||
font-weight: 900;
|
||||
border-radius: 12px 12px 0 0;
|
||||
box-shadow: inset 0 2px 6px rgba(255, 255, 255, 0.3), 0 10px 20px rgba(0, 0, 0, 0.6);
|
||||
}
|
||||
|
||||
.step-gold {
|
||||
height: 110px;
|
||||
background: linear-gradient(180deg, #ffd700 0%, #b8860b 100%);
|
||||
color: #1a1a1a;
|
||||
border: 2px solid #fff;
|
||||
box-shadow: 0 0 25px rgba(255, 215, 0, 0.6);
|
||||
}
|
||||
|
||||
.step-silver {
|
||||
height: 80px;
|
||||
background: linear-gradient(180deg, #e2e8f0 0%, #94a3b8 100%);
|
||||
color: #0f172a;
|
||||
border: 2px solid #f8fafc;
|
||||
}
|
||||
|
||||
.step-bronze {
|
||||
height: 60px;
|
||||
background: linear-gradient(180deg, #cd7f32 0%, #8b4513 100%);
|
||||
color: #ffffff;
|
||||
border: 2px solid #d97706;
|
||||
}
|
||||
|
||||
@keyframes podium-bounce {
|
||||
0% { transform: translateY(0); }
|
||||
100% { transform: translateY(-8px); }
|
||||
}
|
||||
|
||||
.match-stats-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 10px;
|
||||
margin-bottom: 22px;
|
||||
}
|
||||
|
||||
.stat-badge-box {
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
border: 1px solid rgba(245, 176, 65, 0.25);
|
||||
border-radius: 14px;
|
||||
padding: 10px 14px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.stat-badge-icon {
|
||||
font-size: 1.6rem;
|
||||
}
|
||||
|
||||
.stat-badge-title {
|
||||
font-size: 0.72rem;
|
||||
color: #94a3b8;
|
||||
text-transform: uppercase;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
|
||||
.stat-badge-value {
|
||||
font-size: 0.98rem;
|
||||
font-weight: 800;
|
||||
color: var(--gold);
|
||||
}
|
||||
@@ -39,6 +39,17 @@ window.FaraonFx = (function () {
|
||||
return audioCtx;
|
||||
}
|
||||
|
||||
// Automatické prebudenie AudioContextu pri prvom kliknutí používateľa kdekoľvek
|
||||
if (typeof window !== 'undefined') {
|
||||
const unlockAudio = () => {
|
||||
getAudioContext();
|
||||
window.removeEventListener('pointerdown', unlockAudio);
|
||||
window.removeEventListener('keydown', unlockAudio);
|
||||
};
|
||||
window.addEventListener('pointerdown', unlockAudio, { passive: true });
|
||||
window.addEventListener('keydown', unlockAudio, { passive: true });
|
||||
}
|
||||
|
||||
// --- PROCEDURAL SOUND GENERATORS ---
|
||||
function playCardSnap() {
|
||||
if (isMuted) return;
|
||||
@@ -386,6 +397,182 @@ window.FaraonFx = (function () {
|
||||
});
|
||||
}
|
||||
|
||||
function playCardWhoosh() {
|
||||
if (isMuted) return;
|
||||
const ctx = getAudioContext();
|
||||
if (!ctx) return;
|
||||
const now = ctx.currentTime;
|
||||
const bufferSize = Math.floor(ctx.sampleRate * 0.22);
|
||||
const buffer = ctx.createBuffer(1, bufferSize, ctx.sampleRate);
|
||||
const data = buffer.getChannelData(0);
|
||||
for (let i = 0; i < bufferSize; i++) {
|
||||
data[i] = (Math.random() * 2 - 1) * Math.sin((i / bufferSize) * Math.PI);
|
||||
}
|
||||
const noise = ctx.createBufferSource();
|
||||
noise.buffer = buffer;
|
||||
const filter = ctx.createBiquadFilter();
|
||||
filter.type = 'bandpass';
|
||||
filter.frequency.setValueAtTime(450, now);
|
||||
filter.frequency.exponentialRampToValueAtTime(1200, now + 0.1);
|
||||
filter.frequency.exponentialRampToValueAtTime(350, now + 0.22);
|
||||
filter.Q.value = 2.5;
|
||||
|
||||
const gain = ctx.createGain();
|
||||
gain.gain.setValueAtTime(0.3, now);
|
||||
gain.gain.exponentialRampToValueAtTime(0.001, now + 0.22);
|
||||
|
||||
noise.connect(filter);
|
||||
filter.connect(gain);
|
||||
gain.connect(ctx.destination);
|
||||
noise.start(now);
|
||||
}
|
||||
|
||||
function playBotPersonalitySfx(personalityId, emotion) {
|
||||
if (isMuted) return;
|
||||
const ctx = getAudioContext();
|
||||
if (!ctx) return;
|
||||
const now = ctx.currentTime;
|
||||
const pId = (personalityId || 'fox').toLowerCase();
|
||||
const emo = (emotion || 'thinking').toLowerCase();
|
||||
|
||||
// Mierny posun tóniny podľa emócie
|
||||
let pitchMul = 1.0;
|
||||
if (emo === 'shocked' || emo === 'desperate') pitchMul = 0.82;
|
||||
else if (emo === 'confident' || emo === 'celebrating') pitchMul = 1.22;
|
||||
else if (emo === 'freezing') pitchMul = 1.45;
|
||||
else if (emo === 'angry') pitchMul = 0.92;
|
||||
|
||||
switch (pId) {
|
||||
case 'fox': { // Lišiak Filip - sly playful rising arpeggio
|
||||
const baseFreqs = [440, 554.37, 659.25, 880];
|
||||
baseFreqs.forEach((freq, i) => {
|
||||
const osc = ctx.createOscillator();
|
||||
const gain = ctx.createGain();
|
||||
const t = now + i * 0.045;
|
||||
osc.type = 'triangle';
|
||||
osc.frequency.setValueAtTime(freq * pitchMul, t);
|
||||
gain.gain.setValueAtTime(0.28, t);
|
||||
gain.gain.exponentialRampToValueAtTime(0.001, t + 0.18);
|
||||
osc.connect(gain);
|
||||
gain.connect(ctx.destination);
|
||||
osc.start(t);
|
||||
osc.stop(t + 0.19);
|
||||
});
|
||||
break;
|
||||
}
|
||||
case 'queen': { // Kráľovná Alžbeta - regal royal chime / bell chords
|
||||
const baseFreqs = [523.25, 659.25, 783.99, 1046.50];
|
||||
baseFreqs.forEach((freq, i) => {
|
||||
const osc = ctx.createOscillator();
|
||||
const gain = ctx.createGain();
|
||||
const t = now + i * 0.055;
|
||||
osc.type = 'sine';
|
||||
osc.frequency.setValueAtTime(freq * pitchMul, t);
|
||||
gain.gain.setValueAtTime(0.32, t);
|
||||
gain.gain.exponentialRampToValueAtTime(0.001, t + 0.42);
|
||||
osc.connect(gain);
|
||||
gain.connect(ctx.destination);
|
||||
osc.start(t);
|
||||
osc.stop(t + 0.43);
|
||||
});
|
||||
break;
|
||||
}
|
||||
case 'robot': { // Kyber-Robo - 8-bit digital synth crunch
|
||||
const tones = [880, 1320, 660, 1760];
|
||||
tones.forEach((freq, i) => {
|
||||
const osc = ctx.createOscillator();
|
||||
const gain = ctx.createGain();
|
||||
const t = now + i * 0.04;
|
||||
osc.type = 'square';
|
||||
osc.frequency.setValueAtTime(freq * pitchMul, t);
|
||||
gain.gain.setValueAtTime(0.22, t);
|
||||
gain.gain.exponentialRampToValueAtTime(0.001, t + 0.06);
|
||||
osc.connect(gain);
|
||||
gain.connect(ctx.destination);
|
||||
osc.start(t);
|
||||
osc.stop(t + 0.065);
|
||||
});
|
||||
break;
|
||||
}
|
||||
case 'grandpa': { // Dedo Jozef - warm vintage harmonic bell
|
||||
const osc = ctx.createOscillator();
|
||||
const gain = ctx.createGain();
|
||||
osc.type = 'sine';
|
||||
osc.frequency.setValueAtTime(987.77 * pitchMul, now);
|
||||
gain.gain.setValueAtTime(0.35, now);
|
||||
gain.gain.exponentialRampToValueAtTime(0.001, now + 0.55);
|
||||
osc.connect(gain);
|
||||
gain.connect(ctx.destination);
|
||||
osc.start(now);
|
||||
osc.stop(now + 0.56);
|
||||
break;
|
||||
}
|
||||
case 'cyberkid': { // Hacker Miško - futuristic laser zap
|
||||
const osc = ctx.createOscillator();
|
||||
const gain = ctx.createGain();
|
||||
osc.type = 'sawtooth';
|
||||
osc.frequency.setValueAtTime(1500 * pitchMul, now);
|
||||
osc.frequency.exponentialRampToValueAtTime(180 * pitchMul, now + 0.18);
|
||||
gain.gain.setValueAtTime(0.3, now);
|
||||
gain.gain.exponentialRampToValueAtTime(0.001, now + 0.18);
|
||||
osc.connect(gain);
|
||||
gain.connect(ctx.destination);
|
||||
osc.start(now);
|
||||
osc.stop(now + 0.19);
|
||||
break;
|
||||
}
|
||||
case 'cat': { // Mačka Minda - playful synth meow
|
||||
const osc = ctx.createOscillator();
|
||||
const gain = ctx.createGain();
|
||||
osc.type = 'sine';
|
||||
osc.frequency.setValueAtTime(580 * pitchMul, now);
|
||||
osc.frequency.exponentialRampToValueAtTime(980 * pitchMul, now + 0.11);
|
||||
osc.frequency.exponentialRampToValueAtTime(680 * pitchMul, now + 0.28);
|
||||
gain.gain.setValueAtTime(0.32, now);
|
||||
gain.gain.exponentialRampToValueAtTime(0.001, now + 0.30);
|
||||
osc.connect(gain);
|
||||
gain.connect(ctx.destination);
|
||||
osc.start(now);
|
||||
osc.stop(now + 0.31);
|
||||
break;
|
||||
}
|
||||
case 'wizard': { // Čarodejník Baltazár - mystical shimmering chord
|
||||
[392.00, 587.33, 880.00, 1174.66].forEach((freq, i) => {
|
||||
const osc = ctx.createOscillator();
|
||||
const gain = ctx.createGain();
|
||||
const t = now + i * 0.035;
|
||||
osc.type = 'sine';
|
||||
osc.frequency.setValueAtTime(freq * pitchMul, t);
|
||||
gain.gain.setValueAtTime(0.24, t);
|
||||
gain.gain.exponentialRampToValueAtTime(0.001, t + 0.45);
|
||||
osc.connect(gain);
|
||||
gain.connect(ctx.destination);
|
||||
osc.start(t);
|
||||
osc.stop(t + 0.46);
|
||||
});
|
||||
break;
|
||||
}
|
||||
case 'bear': { // Medveď Mišo - deep bass growl thud
|
||||
const osc = ctx.createOscillator();
|
||||
const gain = ctx.createGain();
|
||||
osc.type = 'sawtooth';
|
||||
osc.frequency.setValueAtTime(95 * pitchMul, now);
|
||||
osc.frequency.exponentialRampToValueAtTime(38 * pitchMul, now + 0.35);
|
||||
gain.gain.setValueAtTime(0.42, now);
|
||||
gain.gain.exponentialRampToValueAtTime(0.001, now + 0.35);
|
||||
osc.connect(gain);
|
||||
gain.connect(ctx.destination);
|
||||
osc.start(now);
|
||||
osc.stop(now + 0.36);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
playCardSnap();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// --- SCREEN SHAKE ---
|
||||
function triggerScreenShake(intensity = 5) {
|
||||
const board = document.getElementById('game-table-container');
|
||||
@@ -1197,6 +1384,8 @@ window.FaraonFx = (function () {
|
||||
animateCardPlay,
|
||||
animateCardDraw,
|
||||
animateTurnTransition,
|
||||
playCardWhoosh,
|
||||
playBotPersonalitySfx,
|
||||
setSpeedLevel,
|
||||
toggleMute
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user