/* ========================================
   МОДУЛЬ "МАСКОТЫ" — Стили
   ======================================== */

.mascot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    pointer-events: none;
}
.mascot-container > * { pointer-events: auto; }

.mascot-avatar-wrapper {
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
}
.mascot-avatar-wrapper:hover { transform: scale(1.05); }

.mascot-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    background: #fff;
}
.mascot-avatar-wrapper:hover .mascot-avatar {
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
}

.mascot-name-tag {
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.mascot-avatar-wrapper:hover .mascot-name-tag { opacity: 1; }

.mascot-speech-bubble {
    position: relative;
    max-width: 280px;
    padding: 14px 18px;
    border-radius: 18px;
    border: 2px solid;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    margin-bottom: 10px;
    margin-right: 10px;
    opacity: 0;
    transform: translateY(10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.mascot-speech-bubble.mascot-speech-show {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.mascot-speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 30px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid;
    border-top-color: inherit;
}
.mascot-speech-close {
    position: absolute;
    top: 6px;
    right: 10px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    opacity: 0.5;
    transition: opacity 0.2s;
}
.mascot-speech-close:hover { opacity: 1; }

.mascot-menu {
    position: absolute;
    bottom: 90px;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    min-width: 180px;
    overflow: hidden;
    animation: mascotMenuAppear 0.2s ease-out;
}
@keyframes mascotMenuAppear {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}
.mascot-menu-item {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 13px;
    color: #333;
    transition: background 0.15s;
    white-space: nowrap;
}
.mascot-menu-item:hover { background: #f5f5f5; }

@keyframes mascotBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}
@keyframes mascotWiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}
@keyframes mascotNod {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(-5deg); }
}
.mascot-bounce { animation: mascotBounce 0.6s ease; }
.mascot-wiggle { animation: mascotWiggle 0.5s ease; }
.mascot-nod { animation: mascotNod 0.4s ease; }

/* Elly */
.mascot-container.mascot-elly .mascot-speech-bubble {
    background: linear-gradient(135deg, #ffe4e1 0%, #ffc0cb 100%);
    color: #8b0000;
    border-color: #e74c3c;
}
.mascot-container.mascot-elly .mascot-speech-bubble::after { border-top-color: #ffc0cb; }
.mascot-container.mascot-elly .mascot-name-tag { background: #e74c3c; }

/* Quistis */
.mascot-container.mascot-quistis .mascot-speech-bubble {
    background: linear-gradient(135deg, #e8f4f8 0%, #d4e6f1 100%);
    color: #1a5276;
    border-color: #3498db;
}
.mascot-container.mascot-quistis .mascot-speech-bubble::after { border-top-color: #d4e6f1; }
.mascot-container.mascot-quistis .mascot-name-tag { background: #3498db; }

/* Kid */
.mascot-container.mascot-kid .mascot-speech-bubble {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    color: #7e5109;
    border-color: #f39c12;
}
.mascot-container.mascot-kid .mascot-speech-bubble::after { border-top-color: #ffe0b2; }
.mascot-container.mascot-kid .mascot-name-tag { background: #f39c12; }

@media (max-width: 768px) {
    .mascot-container { bottom: 10px; right: 10px; }
    .mascot-avatar { width: 60px; height: 60px; }
    .mascot-speech-bubble { max-width: 220px; font-size: 13px; }
    .mascot-menu { bottom: 70px; min-width: 160px; }
}
@media (max-width: 480px) {
    .mascot-avatar { width: 50px; height: 50px; }
    .mascot-speech-bubble { max-width: 180px; font-size: 12px; }
}
@media print { .mascot-container { display: none !important; } }
@media (prefers-reduced-motion: reduce) {
    .mascot-avatar, .mascot-speech-bubble, .mascot-avatar-wrapper {
        transition: none !important; animation: none !important;
    }
}
