/**
 * Grapevine 3D Animation Widget Styles
 * Jobb felső sarok, kis méret, tooltip
 */

.grapevine-widget {
    position: fixed;
    /* top és right ELTÁVOLÍTVA - JS állítja be dinamikusan */
    top: 20px;
    right: 20px;
    width: 150px;
    height: 150px;
    z-index: 9999;
    pointer-events: auto;
    /* Lassú, sima mozgás - 4 másodperc */
    transition: left 4s ease-in-out, top 4s ease-in-out;
}

#grapevine-canvas-wrapper {
    width: 100%;
    height: 100%;
}

#grapevine-canvas-wrapper canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

/* DIALOG SYSTEM - Beszélgető buborékok */
.dialog-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 800px;
    z-index: 10000;
    pointer-events: none;
    transition: opacity 0.5s;
}

.dialog-bubble {
    background: linear-gradient(135deg, rgba(30, 30, 55, 0.95), rgba(20, 20, 40, 0.95));
    border: 2px solid rgba(136, 136, 255, 0.5);
    border-radius: 20px;
    padding: 20px 25px;
    margin-bottom: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    animation: bubbleAppear 0.5s ease-out;
    position: relative;
}

.dialog-bubble.left {
    margin-right: 100px;
    border-color: rgba(136, 68, 255, 0.7);
}

.dialog-bubble.right {
    margin-left: 100px;
    border-color: rgba(255, 204, 102, 0.7);
    background: linear-gradient(135deg, rgba(40, 35, 25, 0.95), rgba(30, 25, 15, 0.95));
}

.dialog-speaker {
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 10px;
    text-shadow: 0 0 10px currentColor;
}

.dialog-text {
    font-size: 16px;
    line-height: 1.8;
    color: #e0e0e0;
    min-height: 24px;
    white-space: pre-line; /* Sortörések megjelenítése */
}

/* Guild link styling - arany téma */
.dialog-guild-link {
    display: inline-block;
    color: #ffd700;
    font-weight: bold;
    font-size: 15px;
    text-decoration: none;
    padding: 8px 15px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(218, 165, 32, 0.15));
    border: 2px solid rgba(255, 215, 0, 0.5);
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
    pointer-events: auto; /* Kattinthatóvá teszi a linket! */
    cursor: pointer;
}

.dialog-guild-link:hover {
    color: #fff;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(218, 165, 32, 0.3));
    border-color: rgba(255, 215, 0, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.5);
}

.dialog-link-section {
    animation: linkFadeIn 0.5s ease-out;
}

@keyframes linkFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Tooltip styling */
.grapevine-tooltip {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.9), rgba(255, 165, 0, 0.9));
    color: #1a1a2e;
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: bold;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, bottom 0.3s ease;
    text-align: center;
}

.grapevine-widget:hover .grapevine-tooltip {
    opacity: 1;
    bottom: -60px;
}

/* Hover effekt - kicsit nagyobb */
.grapevine-widget:hover {
    transform: scale(1.05);
}

/* Mobile - KIKAPCSOLJUK */
@media (max-width: 768px) {
    .grapevine-widget {
        display: none !important;
    }
}

/* Tablet - kisebb méret */
@media (max-width: 1024px) and (min-width: 769px) {
    .grapevine-widget {
        width: 120px;
        height: 120px;
        top: 15px;
        right: 15px;
    }
}

/* Kis animáció betöltéskor */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.grapevine-widget {
    animation: fadeInScale 0.8s ease-out;
}

/* ═══════════════════════════════════════════════════════ */
/* TROLL RENDSZER - Xal'atath piszkálódás jobb alsó sarok */
/* ═══════════════════════════════════════════════════════ */

.troll-bubble-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9998;
    max-width: 400px;
    opacity: 1;
    transition: opacity 0.5s ease;
    pointer-events: none;
    animation: trollSlideUp 0.6s ease-out;
}

.troll-bubble {
    background: linear-gradient(135deg, rgba(40, 15, 60, 0.97), rgba(25, 10, 40, 0.97));
    border: 3px solid rgba(136, 68, 255, 0.8);
    border-radius: 18px;
    padding: 18px 22px;
    box-shadow: 
        0 12px 40px rgba(136, 68, 255, 0.4),
        0 0 30px rgba(136, 68, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
}

/* Xal'atath név */
.troll-speaker {
    font-weight: bold;
    font-size: 16px;
    color: #8844ff;
    margin-bottom: 8px;
    text-shadow: 0 0 15px rgba(136, 68, 255, 0.8);
    letter-spacing: 1px;
}

/* Troll üzenet szöveg */
.troll-message {
    font-size: 15px;
    line-height: 1.5;
    color: #e8d4ff;
    margin-bottom: 10px;
    min-height: 22px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Class/Spec meta info */
.troll-meta {
    font-size: 11px;
    color: rgba(136, 68, 255, 0.7);
    font-style: italic;
    text-align: right;
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Slide up animáció */
@keyframes trollSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pulse effect Xal'atath névhez */
@keyframes trollPulse {
    0%, 100% {
        text-shadow: 0 0 15px rgba(136, 68, 255, 0.8);
    }
    50% {
        text-shadow: 0 0 25px rgba(136, 68, 255, 1), 0 0 35px rgba(136, 68, 255, 0.6);
    }
}

.troll-speaker {
    animation: trollPulse 2s ease-in-out infinite;
}

/* Mobile - troll is kikapcsoljuk */
@media (max-width: 768px) {
    .troll-bubble-container {
        display: none !important;
    }
}

/* Tablet - kisebb buborék */
@media (max-width: 1024px) and (min-width: 769px) {
    .troll-bubble-container {
        max-width: 320px;
        bottom: 15px;
        right: 15px;
    }
    
    .troll-message {
        font-size: 14px;
    }
}

/* ═══════════════════════════════════════════════════════ */
/* HELP MENÜ RENDSZER - Bal alsó sarok */
/* ═══════════════════════════════════════════════════════ */

.help-menu-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 10001;
    background: linear-gradient(135deg, rgba(30, 20, 50, 0.98), rgba(20, 10, 40, 0.98));
    border: 3px solid rgba(136, 68, 255, 0.8);
    border-radius: 20px;
    padding: 20px;
    min-width: 320px;
    max-width: 400px;
    box-shadow: 
        0 15px 50px rgba(136, 68, 255, 0.4),
        0 0 40px rgba(136, 68, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: opacity 0.4s ease;
    animation: helpSlideIn 0.5s ease-out;
}

.help-menu-title {
    font-size: 20px;
    font-weight: bold;
    color: #8844ff;
    text-align: center;
    margin-bottom: 15px;
    text-shadow: 0 0 20px rgba(136, 68, 255, 0.8);
    letter-spacing: 1px;
    animation: helpTitlePulse 2s ease-in-out infinite;
}

.help-menu-option {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, rgba(136, 68, 255, 0.2), rgba(100, 40, 200, 0.2));
    border: 2px solid rgba(136, 68, 255, 0.5);
    border-radius: 12px;
    color: #e8d4ff;
    font-size: 15px;
    font-weight: 500;
    padding: 12px 15px;
    margin-bottom: 10px;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.help-menu-option:hover {
    background: linear-gradient(135deg, rgba(136, 68, 255, 0.4), rgba(100, 40, 200, 0.4));
    border-color: rgba(136, 68, 255, 0.9);
    transform: translateX(5px) scale(1.02);
    box-shadow: 
        0 6px 20px rgba(136, 68, 255, 0.4),
        0 0 25px rgba(136, 68, 255, 0.3);
}

.help-menu-option:active {
    transform: translateX(3px) scale(0.98);
}

/* ARANY DÍSZÍTÉSŰ GOMB - Eternal Illusion Guild */
.help-menu-gold {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.25), rgba(218, 165, 32, 0.25)) !important;
    border: 3px solid rgba(255, 215, 0, 0.7) !important;
    color: #ffe9a0 !important;
    font-weight: 600 !important;
    box-shadow: 
        0 4px 20px rgba(255, 215, 0, 0.4),
        0 0 30px rgba(255, 215, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    animation: goldPulse 2s ease-in-out infinite;
}

.help-menu-gold:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.4), rgba(218, 165, 32, 0.4)) !important;
    border-color: rgba(255, 215, 0, 1) !important;
    transform: translateX(8px) scale(1.05) !important;
    box-shadow: 
        0 8px 30px rgba(255, 215, 0, 0.6),
        0 0 40px rgba(255, 215, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}

@keyframes goldPulse {
    0%, 100% {
        box-shadow: 
            0 4px 20px rgba(255, 215, 0, 0.4),
            0 0 30px rgba(255, 215, 0, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
    50% {
        box-shadow: 
            0 4px 25px rgba(255, 215, 0, 0.6),
            0 0 40px rgba(255, 215, 0, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
}

.help-menu-close {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, rgba(200, 40, 40, 0.3), rgba(150, 20, 20, 0.3));
    border: 2px solid rgba(255, 80, 80, 0.5);
    border-radius: 12px;
    color: #ffaaaa;
    font-size: 14px;
    font-weight: bold;
    padding: 10px;
    margin-top: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.help-menu-close:hover {
    background: linear-gradient(135deg, rgba(200, 40, 40, 0.5), rgba(150, 20, 20, 0.5));
    border-color: rgba(255, 80, 80, 0.8);
    transform: scale(1.05);
}

/* Help dialog extra styling (kis szurkálódás) */
.dialog-extra {
    font-size: 14px;
    line-height: 1.4;
}

/* Animációk */
@keyframes helpSlideIn {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes helpTitlePulse {
    0%, 100% {
        text-shadow: 0 0 20px rgba(136, 68, 255, 0.8);
    }
    50% {
        text-shadow: 0 0 30px rgba(136, 68, 255, 1), 0 0 40px rgba(136, 68, 255, 0.6);
    }
}

/* Mobile - help menü is kikapcsoljuk */
@media (max-width: 768px) {
    .help-menu-container {
        display: none !important;
    }
}

/* Tablet - kisebb menü */
@media (max-width: 1024px) and (min-width: 769px) {
    .help-menu-container {
        min-width: 280px;
        max-width: 320px;
        bottom: 15px;
        left: 15px;
        padding: 15px;
    }
    
    .help-menu-title {
        font-size: 18px;
    }
    
    .help-menu-option {
        font-size: 14px;
        padding: 10px 12px;
    }
}
    }
    
    .troll-message {
        font-size: 14px;
    }
}
