/* ====================================================
   assets/css/styles.css
   ==================================================== */

@font-face {
  font-family: 'Lumos';
  src: url('../fonts/lumos.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

:root{
  --bg-dark: #05050a;
  --accent: #c43b3b;
  --text-color: #efe6d6;
  --hp-font: 'Lumos', 'Harry Potter', serif; 
  --sys-font: system-ui, -apple-system, sans-serif;
}

/* ОСНОВНІ НАЛАШТУВАННЯ */
html, body {
    width: 100%; height: 100%; margin: 0; padding: 0;
    overflow: hidden; 
    background-color: var(--bg-dark);
    font-family: var(--hp-font); 
    color: var(--text-color);
    position: fixed; 
}

/* ФОН СТОРІНКИ */
#page-bg{
  position: fixed; 
  inset: 0; 
  z-index: 0;
  background-image: url('../img/castle-bg1.jpg'); 
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  box-shadow: inset 0 0 0 1000px rgba(0, 0, 0, 0.4);
  transition: background-image 0.5s ease-in-out;
}

/* КОНТЕЙНЕР СВІЧОК */
#magic-candles-container {
    position: fixed;
    inset: 0;
    pointer-events: none; 
    z-index: 1; 
    overflow: hidden;
}

.magic-candle {
    position: absolute;
    bottom: -100px; 
    opacity: 0.8;
    will-change: transform, opacity;
}

@keyframes floatAnimation {
    0% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(10px, -15px) rotate(2deg); }
    50% { transform: translate(-5px, -25px) rotate(-2deg); }
    75% { transform: translate(-15px, -10px) rotate(1deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

button {
    font-family: var(--hp-font);
    cursor: pointer; border: none; outline: none;
}

/* ========== ВІТАЛЬНА СТОРІНКА ========== */
.welcome-wrap {
  position: relative; 
  z-index: 5; 
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100dvh; 
  padding: 20px; box-sizing: border-box;
}

.envelope {
  width: 460px; max-width: 94vw; height: 340px;
  position: relative; border-radius: 3px; 
  background: linear-gradient(180deg, rgba(245,235,215,0.98), rgba(233,218,186,0.98));
  box-shadow: 0 18px 60px rgba(10,6,4,0.6);
  transition: transform 0.34s ease;
  display: flex; justify-content: center; align-items: center;
}

.envelope-flap {
  position: absolute; top: -6px; left: 0; width: 100%; height: 52%;
  background: linear-gradient(180deg, rgba(225,200,150,0.98), rgba(210,185,140,0.96));
  transform-origin: top center; transition: transform 0.9s ease; z-index: 3;
  border-bottom: 2px dashed rgba(170,140,100,0.4);
}
.envelope.open .envelope-flap{ transform: rotateX(-120deg); }
.envelope.open .envelope-content{ opacity:0; transform: translateY(-8px); }

.envelope-content {
  position: relative; z-index: 4; 
  padding: 30px; width: 100%; height: 100%; box-sizing: border-box;
  text-align: center; display: flex; flex-direction: column; 
  align-items: center; justify-content: center; color: #3b2b1b;
}

.welcome-title { 
    white-space: nowrap; 
    font-size: 35px; 
    margin: 35px 0 0 0; 
    color: #6b2b2b; 
    line-height: 1.1; 
    text-align: center;
}

.welcome-text { 
    font-size: 20px; 
    font-weight: 700;
    margin-bottom: 30px; 
    text-align: center; 
    line-height: 1.4;
}

#btn-open {
  white-space: nowrap;
  padding: 16px 40px; 
  font-size: 30px; 
  font-weight: bold;
  border: 2px solid #8333af; 
  border-radius: 2px; 
  background: #8333af; 
  color: #fff;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  letter-spacing: 2px;
}
#btn-open:active { transform: scale(0.98); }

/* ========== КВЕСТ ========== */
.quest-wrap {
    position: relative; 
    z-index: 5; 
    width: 100%; height: 100dvh;
    display: flex; flex-direction: column; 
    justify-content: center; align-items: center;
    padding: 10px; box-sizing: border-box;
}

.game-title {
    color: var(--accent); 
    font-size: 2.5rem;
    margin: 60px 0 0 0; 
    text-shadow: 2px 2px 4px #000; 
    letter-spacing: 2px; 
    text-align: center;
}
.game-instruction {
    font-size: 1.4rem; color: #dcdcdc; margin: 0 0 20px 0; text-align: center;
}

/* ПАЗЛ */
.reference-container {
    width: 90%; max-width: 380px;
    border: 4px solid #3e2723; border-radius: 2px;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 5px; margin-bottom: 10px;
    display: flex; justify-content: center; flex-shrink: 0; z-index: 1; 
}
.reference-img { width: 100%; height: auto; display: block; opacity: 0.8; }

.puzzle-board {
    position: relative;
    width: 90%; 
    max-width: 380px; 
    height: auto; 
    min-height: 290px;
    padding-bottom: 10px; 
    background-color: #2d1b15;
    border: 5px solid #1a100c; border-radius: 4px;
    box-shadow: inset 0 0 30px rgba(0,0,0,0.9);
    overflow: visible; flex-shrink: 0;
    display: flex; justify-content: center; align-items: center;
    margin-bottom: 20px; z-index: 5;
}
.puzzle-guide {
  position: relative;
  background-image: url('https://www.transparenttextures.com/patterns/sos.png');
  background-color: rgba(14, 5, 22, 0.911); 
  z-index: 6;
  box-shadow: 1px 1px 15px 3px rgba(0, 0, 0, 0.5);
  margin-bottom: 0; 
}

.puzzle-piece {
    position: absolute; width: 80px; height: 80px;
    border: 2px solid #f0e6d2; background-color: #222;
    box-shadow: 2px 3px 6px rgba(0,0,0,0.6); filter: sepia(0.3);
    cursor: grab; touch-action: none; transition: transform 0.1s, box-shadow 0.1s;
    z-index: 100; 
}
.puzzle-piece:active { 
    cursor: grabbing; z-index: 200; 
    transform: scale(1.05) rotate(2deg);
    box-shadow: 5px 10px 20px rgba(0,0,0,0.8); filter: sepia(0);
}
.puzzle-piece.snapped { 
    border: none; box-shadow: none; filter: none;
    z-index: 10; pointer-events: none; transition: top 0.2s ease, left 0.2s ease;
}

/* ВІКТОРИНА (Карточка) */
.q-card { 
    width: 95%; 
    max-width: 450px; 
    background: #f5f5f5; 
    border-radius: 4px; 
    padding: 15px; 
    color: #2b1f15; 
    animation: popIn 0.5s ease;
    text-align: center; 
    display: flex; 
    flex-direction: column; 
    align-items: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.7);
}
@keyframes popIn { from {opacity:0; transform:scale(0.9);} to {opacity:1; transform:scale(1);} }

.q-text { 
    font-size: 20px; 
    margin-bottom: 12px; 
    line-height: 1.4; 
    font-weight: 600;
    text-align: center; 
    width: 100%;
    padding-top: 5px; 
    display: block;
}

.options { display: flex; flex-direction: column; gap: 8px; width: 100%; }

/* --- КНОПКИ ВІКТОРИНИ --- */
.opt-btn { 
    background: #8333af; 
    color: #fff; 
    border-radius: 4px; 
    border: 1px solid #3e2b16;
    font-size: 22px; 
    padding: 15px 10px;
    line-height: 1.2; 
    width: 100%; 
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center; 
    white-space: normal; 
    word-wrap: break-word; 
    height: auto; 
    min-height: 60px; 
    transition: transform 0.1s; 
    -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) { .opt-btn:hover { background: #4c1e67; } }
.opt-btn:active { transform: scale(0.96); background: #4c1e67; }

/* Шрифти */
.opt-btn.text-lg { font-size: 24px; }
.opt-btn.text-md { font-size: 19px; padding: 12px 10px; }
.opt-btn.text-sm { font-size: 16px; padding: 10px 8px; line-height: 1.3; }

@media (max-width: 500px) {
    .opt-btn.text-lg { font-size: 21px; } 
    .opt-btn.text-md { font-size: 20px; } 
    .opt-btn.text-sm { font-size: 16px; } 
    .q-card { padding: 15px 10px; }
}

/* КАРТИНКА ПИТАННЯ */
.q-image {
    width: 100%;
    height: 180px; 
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 12px;
    display: block;
}

.nav-controls {
    display: flex; justify-content: center; gap: 20px; 
    margin-top: 25px; width: 100%; max-width: 500px; z-index: 10;
}
.nav-btn {
    background: rgba(20, 20, 20, 0.85); color: #ddd;
    border: 1px solid #777; padding: 12px 30px; border-radius: 4px; 
    font-size: 18px; text-transform: uppercase; letter-spacing: 1px;
    backdrop-filter: blur(4px); transition: all 0.2s;
}
.nav-btn:hover { background: rgba(50, 50, 50, 0.95); color: #fff; border-color: #fff; }

/* --- КУЛЯ З ПІДСТАВКОЮ (Prophecy) ОНОВЛЕНО --- */

/* Контейнер-обгортка для картинки і кулі */
.orb-wrapper {
    position: relative;
    width: 300px; /* Ширина всієї конструкції */
    max-width: 90vw;
    margin: 20px auto 0 auto;
    display: flex;
    justify-content: center;
}

/* Картинка підставки (змії) */
.orb-stand-img {
    width: 100%;
    height: auto;
    display: block;
    position: relative;
    z-index: 1; /* Підставка знизу */
}

/* Сама магічна куля (дим) */
.glass-ball { 
    /* Абсолютне позиціонування поверх картинки */
    position: absolute;
    z-index: 2; /* Куля зверху */
    
    /* === НАЛАШТУВАННЯ РОЗМІРУ ТА ПОЗИЦІЇ === */
    top: 3px;       /* Відступ зверху від краю картинки */
    width: 235px;   /* Ширина кулі */
    height: 235px;  /* Висота кулі */
    left: 50%;
    transform: translateX(-50%); /* Центруємо горизонтально */
    
    border-radius: 50%; 
    
    /* Ефекти скла */
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.15), rgba(0, 0, 0, 0.1));
    box-shadow: 
        inset 0 0 20px rgba(0,0,0,0.6), 
        0 0 10px rgba(255, 255, 255, 0.1);       
    backdrop-filter: blur(2px);
    
    /* Маска для Safari */
    -webkit-mask-image: radial-gradient(white, white); 
    mask-image: radial-gradient(white, white);
    overflow: hidden; 
}

/* Дим всередині */
.orb-glow-color { 
    position: absolute; 
    inset: -50%; 
    opacity: 0; 
    transition: opacity 2s ease;
    
    background: conic-gradient(from 0deg, transparent 0%, var(--smoke-color, #fff) 20%, transparent 40%, var(--smoke-color, #fff) 60%, transparent 80%, var(--smoke-color, #fff) 100%);
    
    filter: blur(40px) brightness(2.0) drop-shadow(0 0 20px var(--smoke-color)); 
    mix-blend-mode: screen;
    
    animation: smokeSpin 4s linear infinite; 
}

@keyframes smokeSpin {
    0% { transform: rotate(0deg) scale(1); } 
    50% { transform: rotate(180deg) scale(1.2); } 
    100% { transform: rotate(360deg) scale(1); }
}

/* Адаптив для маленьких телефонів (Сфера) */
@media (max-width: 380px) {
    .orb-wrapper {
        width: 260px;
    }
    .glass-ball {
        width: 205px;
        height: 205px;
        top: 2px;
    }
}

.orb-container { 
    margin-top: 20px; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
}

.btn-primary { 
  margin-top: 20px; 
  padding: 12px 30px; 
  background: #8333af; 
  color: #fff; 
  border: none; 
  border-radius: 4px; 
  font-size: 20px; 
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.btn-result {
  margin-bottom: 50px; 
  padding: 12px 30px; 
  background: #8333af; 
  color: #fff; 
  border: none; 
  border-radius: 4px; 
  font-size: 20px; 
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

/* ЗАКЛЯТТЯ */
.spell-area { 
    width: 300px; height: 350px; background: rgba(0,0,0,0.4); 
    border: 2px solid rgba(255,255,255,0.2); border-radius: 10px; touch-action: none; position: relative;
}
canvas { position: relative; z-index: 10; }
.progress-bar { position: fixed; bottom: 0; left: 0; width: 100%; height: 6px; background: #111; z-index: 1000; }
.progress-bar i { display: block; height: 100%; background: var(--accent); transition: width 0.3s; box-shadow: 0 0 10px var(--accent); }

.result-wrap { text-align: center; color: #fff; width: 100%; }

/* ГЕРБИ */
#quest .crests-container {
    display: flex;
    justify-content: center;
    align-items: flex-end; 
    gap: 8px; 
    margin: 0 auto 10px auto; 
    width: 100%;
    position: relative;
    z-index: 10;
}

#quest .crest-img {
    display: block;
    height: auto; 
    object-fit: contain;
    filter: drop-shadow(0 0 15px rgba(0, 0, 0, 0.8));
    transition: transform 0.5s ease;
}

#quest .crest-main { width: 140px; z-index: 15; position: relative; bottom: 5px; }
#quest .crest-side { width: 100px; opacity: 0; z-index: 10; animation: crestFadeIn 2.5s ease forwards; animation-delay: 0.5s; }

@keyframes crestFadeIn {
    from { opacity: 0; transform: translateY(20px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

#quest .result-text-container { position: relative; z-index: 20; margin-top: 5px; padding: 0 10px; }

/* --- АДАПТИВ ЗАГАЛЬНИЙ (ТЕЛЕФОНИ) --- */
@media (max-width: 500px) {
    .quest-wrap {
        justify-content: flex-start;
        padding-top: 10px;
    }
    .q-image {
        height: 200px !important; 
        margin-bottom: 8px;
    }
    .q-text {
        font-size: 19px;
        margin-bottom: 10px;
        line-height: 1.2;
    }
    .q-card {
        padding: 10px 8px;
        width: 100%;
        max-width: 96%;
    }
    .options { gap: 6px; }
    .opt-btn { 
        line-height: 1.35; 
        padding: 6px 4px; 
        min-height: 48px; 
    }       
    .opt-btn.text-lg { font-size: 20px; padding-top: 8px; } 
    .opt-btn.text-md { font-size: 18px; } 
    .opt-btn.text-sm { font-size: 15px; line-height: 1.2; } 
    .nav-controls {
        margin-top: 10px;
        margin-bottom: 5px;
        gap: 8px;
    }
    .nav-btn {
        font-size: 14px;
        padding: 10px 0;
        width: 48%; 
    }
}

@media (max-height: 600px) {
    .q-image { display: none; }
    .game-title { margin-top: 40px; font-size: 2rem; }
}

/* === ПАЗЛ: КЛАС ДЛЯ АКТИВАЦІЇ === */
.quest-wrap.puzzle-active {
    justify-content: flex-start !important;
    padding-top: 40px !important; 
}
@media (max-width: 500px) {
    .quest-wrap.puzzle-active { padding-top: 20px !important; }
    .quest-wrap.puzzle-active .game-title { font-size: 1.8rem; margin-top: 10px; margin-bottom: 10px; }
    .quest-wrap.puzzle-active .game-instruction { margin-bottom: 10px; font-size: 1.2rem; }
}

/* === ФІКС ДЛЯ ЦЕНТРУВАННЯ "ЗАЛУ ПРОРОЦТВ" === */
.permission-card {
    position: absolute !important; 
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
    width: 90%;
    max-width: 400px;
    z-index: 100;
}
@media (max-width: 500px) {
    .permission-card { top: 45% !important; }
}

/* === ПОВІДОМЛЕННЯ ПРО УСПІХ У ПАЗЛІ === */
.puzzle-success-msg {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: #44ff44;
    padding: 20px 40px;
    border: 2px solid #44ff44;
    border-radius: 10px;
    font-size: 28px;
    font-weight: bold;
    text-shadow: 0 0 10px #44ff44;
    z-index: 500;
    pointer-events: none;
    animation: popIn 0.5s ease;
    white-space: nowrap;
}

/* === ПЛАВНА ПОЯВА КАРТИНОК === */
.q-image { opacity: 0; transition: opacity 0.5s ease-in; }
.q-image.loaded { opacity: 1; }

/* =========================================
   КВІДДИЧ (STYLES.CSS ADDITION - ОНОВЛЕНО ФОН)
   ========================================= */

/* Поле (ФОН-ТРИБУНИ) */
#quidditch-field {
    position: fixed; inset: 0; z-index: 0;
    display: flex; justify-content: center; align-items: center;
    background-color: #0f0f0f; 
    background-image: 
        repeating-linear-gradient(rgba(0,0,0,0.4) 0px, rgba(0,0,0,0.4) 2px, transparent 2px, transparent 10px),
        repeating-conic-gradient(
            from 0deg,
            #740001 0deg 90deg,       
            #1a472a 90deg 180deg,     
            #ecb939 180deg 270deg,    
            #0e1a40 270deg 360deg     
        );
    background-size: 100% 100%, 120px 120px;
    box-shadow: inset 0 0 200px rgba(0,0,0,0.7);
    overflow: hidden;
}

/* Трава */
.field-grass {
    width: 60vh; 
    height: 90vh; 
    background: radial-gradient(ellipse at center, #2e5a1c 0%, #15300d 100%);
    border: 6px solid #5a5a5a;
    border-radius: 200px; 
    position: relative;
    box-shadow: 0 0 100px rgba(0,0,0,0.9); 
    z-index: 1; 
}

/* Розмітка поля */
.field-line { position: absolute; background: rgba(255,255,255,0.2); }
.center-line { width: 100%; height: 2px; top: 50%; left: 0; transform: translateY(-50%); }
.center-circle {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 100px; height: 100px; 
    border: 2px solid rgba(255,255,255,0.2); 
    border-radius: 50%;
    background: radial-gradient(circle, transparent 40%, rgba(0,0,0,0.1) 100%);
}

/* Кільця */
.hoop-area {
    position: absolute; left: 50%; transform: translateX(-50%);
    display: flex; gap: 15px; align-items: center; justify-content: center;
    width: 140px;
}
.left-hoops { top: 30px; } 
.right-hoops { bottom: 30px; }

.hoop {
    width: 18px; height: 18px; 
    border: 3px solid #d4af37; 
    border-radius: 50%;
    position: relative;
    background: rgba(0,0,0,0.3); 
    box-shadow: 0 4px 0 #8a6d1c; 
    z-index: 2;
}
.hoop::after {
    content: ''; position: absolute;
    width: 2px; height: 30px; background: #8a6d1c;
    left: 50%; transform: translateX(-50%);
    z-index: -1;
}
.left-hoops .hoop::after { bottom: 15px; height: 40px; } 
.right-hoops .hoop::after { top: 15px; height: 40px; }
.hoop:nth-child(2) { width: 28px; height: 28px; margin-top: -10px; } 
.right-hoops .hoop:nth-child(2) { margin-top: 10px; }

.stands { display: none; }

/* Атмосферні гравці */
.flying-player {
    position: absolute; 
    width: 8px; height: 8px; 
    border-radius: 50%;
    background: var(--team-color, #740001); 
    box-shadow: 0 0 5px var(--team-color, #740001);
    transition: all 2s cubic-bezier(0.45, 0.05, 0.55, 0.95); 
    opacity: 0.9; z-index: 1;
}
.flying-player::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 24px; height: 2px; 
    background: #8b4513; 
    transform: translate(-50%, -50%) rotate(-15deg); 
    z-index: -1;
}
.flying-player::before {
    content: '';
    position: absolute;
    top: -4px; left: 1px;
    width: 5px; height: 5px;
    background: #ffdbac; 
    border-radius: 50%;
}

/* UI ГРИ */
#game-layer { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
#ui-bar {
    position: absolute; top: 10px; left: 0; width: 100%;
    display: flex; justify-content: space-between; padding: 0 20px;
    box-sizing: border-box; font-size: 20px; color: #ffd700;
    text-shadow: 0 2px 4px #000; font-weight: bold;
}

/* СНИТЧ */
#snitch {
    position: absolute; width: 22px; height: 22px;
    background: radial-gradient(circle at 30% 30%, #ffd700, #b8860b);
    border-radius: 50%;
    box-shadow: 0 0 15px #ffd700, 0 0 30px rgba(255, 215, 0, 0.4);
    cursor: pointer; pointer-events: auto; 
    z-index: 100;
    animation: snitchPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
#snitch::before, #snitch::after {
    content: ''; position: absolute; top: 0px;
    width: 35px; height: 14px; 
    background: rgba(230, 230, 255, 0.7);
    border-radius: 100% 0 50% 0; 
    animation: flutter 0.08s infinite alternate; 
    filter: drop-shadow(0 0 2px #fff);
}
#snitch::before { left: -28px; transform-origin: right center; transform: rotate(10deg); }
#snitch::after { right: -28px; transform-origin: left center; transform: rotate(-10deg) scaleX(-1); }

@keyframes flutter {
    from { transform: rotate(10deg) scaleY(1); }
    to { transform: rotate(-10deg) scaleY(0.6); } 
}
@keyframes snitchPop { from { transform: scale(0); } to { transform: scale(1); } }

/* МОДАЛКИ */
#modal-overlay {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(0,0,0,0.85);
    display: flex; justify-content: center; align-items: center;
    visibility: hidden; opacity: 0; transition: opacity 0.3s;
}
#modal-overlay.active { visibility: visible; opacity: 1; }

.modal-card {
    background: #1a100c; border: 2px solid #ffd700;
    padding: 30px; border-radius: 8px; text-align: center;
    max-width: 90%; width: 350px;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.2);
}

/* АДАПТИВ КВІДДИЧ */
@media (max-width: 600px) {
    .field-grass {
        width: 85vw; 
        height: 75vh;
        border-radius: 150px;
    }
    .hoop-area { gap: 10px; width: 100px; }
    .hoop { width: 14px; height: 14px; }
    .hoop:nth-child(2) { width: 22px; height: 22px; }
}

/* ОНОВЛЕНИЙ СНИТЧ (З плавним рухом) */
#snitch {
    position: absolute; width: 24px; height: 24px;
    background: radial-gradient(circle at 30% 30%, #ffd700, #b8860b);
    border-radius: 50%;
    box-shadow: 0 0 15px #ffd700, 0 0 30px rgba(255, 215, 0, 0.6);
    cursor: pointer; pointer-events: auto; 
    z-index: 100;
    
    /* Плавний рух замість стрибків */
    transition: left 0.4s ease-out, top 0.4s ease-out; 
    
    /* Анімація крилець */
    animation: snitchHover 1s infinite alternate;
}

#snitch::before, #snitch::after {
    content: ''; position: absolute; top: 0px;
    width: 35px; height: 14px; 
    background: rgba(230, 230, 255, 0.8);
    border-radius: 100% 0 50% 0; 
    animation: flutter 0.06s infinite alternate; /* Дуже швидкі крила */
    filter: drop-shadow(0 0 2px #fff);
}
#snitch::before { left: -28px; transform-origin: right center; transform: rotate(10deg); }
#snitch::after { right: -28px; transform-origin: left center; transform: rotate(-10deg) scaleX(-1); }

@keyframes flutter {
    from { transform: rotate(10deg) scaleY(1); }
    to { transform: rotate(-10deg) scaleY(0.5); } 
}
@keyframes snitchHover {
    from { transform: translateY(0); }
    to { transform: translateY(-5px); }
}

/* ШЛЕЙФ КОМЕТИ (Частинки) */
.trail-dot {
    position: absolute;
    width: 8px; height: 8px;
    background: rgba(255, 215, 0, 0.6); /* Напівпрозоре золото */
    border-radius: 50%;
    pointer-events: none; /* Щоб не заважали клікати */
    z-index: 90;
    box-shadow: 0 0 6px #ffd700;
    animation: trailFade 0.6s linear forwards; /* Зникають за 0.6с */
}

@keyframes trailFade {
    0% { opacity: 0.8; transform: scale(1); }
    100% { opacity: 0; transform: scale(0.2); }
}

/* ЕФЕКТ НАТИСКАННЯ (Хвиля) */
.catch-effect {
    position: absolute;
    width: 60px; height: 60px;
    border: 3px solid #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 150;
    animation: catchPop 0.4s ease-out forwards;
    box-shadow: 0 0 15px #ffd700;
}

@keyframes catchPop {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 1; border-width: 5px; }
    100% { transform: translate(-50%, -50%) scale(2); opacity: 0; border-width: 0px; }
}