/* Bubble Ad Module - jmhp.pro */

.bubble-ad-container {
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.bubble {
    position: absolute;
    width: 100px;
    height: 100px;
    background: 
        radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.12), transparent 55%),
        radial-gradient(circle at 65% 70%, rgba(150, 220, 255, 0.04), transparent 70%),
        radial-gradient(circle at 50% 50%, rgba(200, 230, 255, 0.025), transparent);
    border: 0.5px solid rgba(200, 230, 255, 0.15);
    border-radius: 48% 52% 51% 49% / 47% 53% 52% 48%;
    cursor: pointer;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 15px 40px rgba(100, 200, 255, 0.03),
        0 5px 12px rgba(0, 0, 0, 0.02),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.02);
    backdrop-filter: blur(12px) saturate(110%);
    -webkit-backdrop-filter: blur(12px) saturate(110%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: 
        sphereMorph 14s ease-in-out infinite,
        jellyfishPulse 9s ease-in-out infinite,
        bubbleFloat 18s ease-in-out infinite;
    transform-style: preserve-3d;
    will-change: transform, border-radius;
    overflow: visible;
    filter: contrast(1.01) brightness(1.005);
    opacity: 0.8;
    user-select: none;
    -webkit-user-select: none;
}

@keyframes liquidRipple {
    0%, 100% {
        border-radius: 48% 52% 51% 49% / 47% 53% 52% 48%;
    }
    25% {
        border-radius: 52% 48% 49% 51% / 53% 47% 48% 52%;
    }
    50% {
        border-radius: 49% 51% 52% 48% / 48% 52% 53% 47%;
    }
    75% {
        border-radius: 51% 49% 48% 52% / 52% 48% 47% 53%;
    }
}

.bubble:hover {
    animation: 
        sphereMorph 14s ease-in-out infinite,
        jellyfishPulse 9s ease-in-out infinite,
        bubbleFloat 18s ease-in-out infinite,
        liquidRipple 1.4s ease-in-out infinite;
}

.bubble:hover::before {
    opacity: 0.5;
}

.bubble:hover::after {
    opacity: 0.35;
}

@keyframes liquidRipple {
    0%, 100% {
        border-radius: 48% 52% 51% 49% / 47% 53% 52% 48%;
    }
    25% {
        border-radius: 52% 48% 49% 51% / 53% 47% 48% 52%;
    }
    50% {
        border-radius: 49% 51% 52% 48% / 48% 52% 53% 47%;
    }
    75% {
        border-radius: 51% 49% 48% 52% / 52% 48% 47% 53%;
    }
}

.bubble:active {
    cursor: pointer;
    opacity: 0.85;
}

@keyframes jellyfishPulse {
    0%, 100% { 
        opacity: 0.5;
        transform: scale(1);
    }
    50% { 
        opacity: 0.6;
        transform: scale(1.01);
    }
}

.bubble-canvas {
    width: 180px;
    height: 180px;
    pointer-events: none;
    mix-blend-mode: screen;
    opacity: 0.95;
}

.bubble-text {
    display: block;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.98);
    padding: 0 24px;
    text-shadow: 
        0 0 20px rgba(0, 255, 255, 0.8),
        0 0 40px rgba(0, 255, 255, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.4),
        0 -1px 0 rgba(255, 255, 255, 0.6);
    letter-spacing: 0.02em;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    animation: textGlow 3s ease-in-out infinite;
}

@keyframes textGlow {
    0%, 100% {
        text-shadow: 
            0 0 20px rgba(0, 255, 255, 0.8),
            0 0 40px rgba(0, 255, 255, 0.4),
            0 2px 8px rgba(0, 0, 0, 0.4),
            0 -1px 0 rgba(255, 255, 255, 0.6);
    }
    50% {
        text-shadow: 
            0 0 30px rgba(0, 255, 255, 1),
            0 0 60px rgba(0, 255, 255, 0.6),
            0 2px 8px rgba(0, 0, 0, 0.4),
            0 -1px 0 rgba(255, 255, 255, 0.8);
    }
}

.bubble::before {
    content: '';
    position: absolute;
    top: 15%;
    left: 20%;
    width: 35%;
    height: 35%;
    background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.03) 45%, transparent 75%);
    border-radius: 50%;
    filter: blur(10px);
    animation: lightMove 8s ease-in-out infinite;
    opacity: 0.3;
    mix-blend-mode: overlay;
    transition: all 0.4s ease;
}


.bubble::after {
    content: '';
    position: absolute;
    bottom: 12%;
    right: 15%;
    width: 22%;
    height: 22%;
    background: radial-gradient(circle, rgba(150, 220, 255, 0.06), rgba(100, 200, 255, 0.02) 55%, transparent 80%);
    border-radius: 50%;
    filter: blur(8px);
    animation: lightMove 8s ease-in-out infinite reverse;
    opacity: 0.2;
    transition: all 0.4s ease;
}


@keyframes lightMove {
    0%, 100% { 
        transform: translate(0, 0) scale(1);
        opacity: 0.9;
    }
    25% {
        transform: translate(4px, -6px) scale(1.08);
        opacity: 1;
    }
    50% { 
        transform: translate(-2px, -8px) scale(1.05);
        opacity: 0.85;
    }
    75% {
        transform: translate(6px, -4px) scale(1.1);
        opacity: 0.95;
    }
}


@keyframes sphereFloat {
    0%, 100% { 
        transform: translateY(0px) translateX(0px) rotateX(0deg) rotateY(0deg);
    }
    25% { 
        transform: translateY(-15px) translateX(10px) rotateX(2deg) rotateY(3deg);
    }
    50% { 
        transform: translateY(-8px) translateX(-10px) rotateX(-2deg) rotateY(-3deg);
    }
    75% { 
        transform: translateY(-20px) translateX(6px) rotateX(1deg) rotateY(2deg);
    }
}

@keyframes sphereRotate {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

@keyframes spherePulse {
    0%, 100% { 
        opacity: 0.85;
        transform: scale(1);
    }
    50% { 
        opacity: 1;
        transform: scale(1.02);
    }
}


.bubble-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: linear-gradient(135deg, #0ff, #00d4ff);
    border-radius: 50%;
    pointer-events: none;
    box-shadow: 0 0 12px rgba(0, 255, 255, 0.8), 0 0 24px rgba(0, 255, 255, 0.4);
    filter: blur(0.5px);
}

.ad-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.3s ease;
}

.ad-modal.active {
    display: flex;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.ad-modal-content {
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(0, 255, 255, 0.4);
    border-radius: 8px;
    padding: 30px 20px;
    max-width: 95%;
    width: 600px;
    max-height: 90%;
    position: relative;
    box-shadow: 0 0 60px rgba(0, 255, 255, 0.2);
    animation: modalSlideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

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

.ad-modal-header {
    text-align: center;
    margin-bottom: 20px;
    font-family: system-ui, -apple-system, sans-serif;
    color: #0ff;
    font-size: 1.3em;
    font-weight: 400;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
    width: 100%;
}

.ad-modal-message {
    text-align: center;
    margin-bottom: 30px;
    font-family: system-ui, -apple-system, sans-serif;
    color: #fff;
    font-size: 1.05em;
    line-height: 1.7;
    width: 100%;
}

.ad-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(0, 255, 255, 0.4);
    border-radius: 50%;
    color: #0ff;
    font-size: 20px;
    cursor: not-allowed;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Courier New', monospace;
    font-weight: 400;
}

.ad-modal-close .close-countdown {
    font-size: 16px;
    font-weight: 600;
    color: #0ff;
}

.ad-modal-close:hover {
    background: rgba(0, 255, 255, 0.1);
    border-color: #0ff;
    color: #0ff;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
}
}

.ad-container {
    min-height: 280px;
    min-width: 336px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 5px;
    padding: 20px;
    margin: 0 auto;
    width: fit-content;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .bubble {
        width: 120px;
        height: 120px;
    }
    
    .bubble-canvas {
        width: 120px;
        height: 120px;
    }
    
    .ad-modal-content {
        padding: 24px;
    }
    
    .ad-modal-header {
        font-size: 0.95em;
    }
}
/* Cache bust 1774579842 */

@keyframes sphereMorph {
    0%, 100% {
        border-radius: 48% 52% 51% 49% / 47% 53% 52% 48%;
    }
    25% {
        border-radius: 52% 48% 47% 53% / 51% 49% 48% 52%;
    }
    50% {
        border-radius: 49% 51% 52% 48% / 53% 47% 51% 49%;
    }
    75% {
        border-radius: 51% 49% 48% 52% / 49% 51% 47% 53%;
    }
}

@keyframes sphereIridescence {
    0% { filter: contrast(1.02) brightness(1.01) hue-rotate(0deg); }
    33% { filter: contrast(1.03) brightness(1.02) hue-rotate(15deg); }
    66% { filter: contrast(1.02) brightness(1.01) hue-rotate(-15deg); }
    100% { filter: contrast(1.02) brightness(1.01) hue-rotate(0deg); }
}

.bubble:hover .bubble-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.bubble-emoji {
    font-size: 48px;
    animation: emojiFloat 4s ease-in-out infinite;
    filter: drop-shadow(0 0 12px rgba(0, 255, 255, 0.4));
}

@keyframes emojiFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-4px) scale(1.05); }
}

.bubble-tooltip {
    position: absolute;
    bottom: -45px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(0, 0, 0, 0.92);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 8px;
    padding: 8px 16px;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.bubble-tooltip::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid rgba(0, 255, 255, 0.3);
}

.ad-disclaimer {
    text-align: center;
    margin-top: 12px;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
    font-size: 11px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 0.02em;
}

@keyframes bubbleFloat {
    0%, 100% { 
        transform: translate(0, 0);
    }
    25% { 
        transform: translate(12px, -18px);
    }
    50% { 
        transform: translate(-8px, -28px);
    }
    75% { 
        transform: translate(15px, -12px);
    }
}

/* Shockwave burst effect */
.shockwave {
    position: fixed;
    width: 0;
    height: 0;
    border: 3px solid rgba(0, 255, 255, 0.8);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    animation: shockwaveExpand 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    z-index: 9999;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.6);
}

@keyframes shockwaveExpand {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
        border-width: 4px;
    }
    30% {
        opacity: 1;
        border-width: 3px;
    }
    100% {
        width: 250px;
        height: 250px;
        opacity: 0;
        border-width: 1px;
    }
}

/* Explosive burst particles */
.burst-particle {
    position: fixed;
    background: radial-gradient(circle, rgba(0, 255, 255, 1), rgba(100, 200, 255, 0.6));
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    animation: particleBurst 1.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    z-index: 9999;
    filter: blur(0.5px);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
}

@keyframes particleBurst {
    0% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
        filter: blur(0px) brightness(2);
    }
    15% {
        transform: translate(calc(-50% + var(--burst-x, 0)), calc(-50% + var(--burst-y, 0))) scale(1);
        opacity: 1;
        filter: blur(1px) brightness(1.5);
    }
    50% {
        opacity: 0.8;
        filter: blur(2px) brightness(1);
    }
    100% {
        transform: translate(calc(-50% + var(--burst-x, 0)), calc(-50% + var(--burst-y, 0) - var(--float-y, 60px))) scale(0.2);
        opacity: 0;
        filter: blur(4px) brightness(0.5);
    }
}

/* Bubble explosive pop */
@keyframes bubbleExplode {
    0% {
        transform: scale(1);
        opacity: 1;
        filter: blur(0px) brightness(1);
    }
    50% {
        transform: scale(1.3);
        opacity: 0.8;
        filter: blur(2px) brightness(2);
    }
    100% {
        transform: scale(0);
        opacity: 0;
        filter: blur(8px) brightness(3);
    }
}
