/* ============================================
   EFFECTS - triggered de user, mobile-first
   ============================================ */

/* ----- RIPPLE LA CLICK ----- */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: rippleGrow 0.7s var(--ease-out) forwards;
    pointer-events: none;
}
@keyframes rippleGrow {
    to { transform: scale(3); opacity: 0; }
}

/* ----- FRUNZE LA CLICK ----- */
.leaf-particle {
    position: fixed;
    font-size: 20px;
    pointer-events: none;
    z-index: 9999;
    will-change: transform;
    user-select: none;
    -webkit-user-select: none;
    line-height: 1;
}

/* ----- +1 FLOAT ----- */
.float-number {
    position: fixed;
    font-family: 'Fraunces', serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--grass-dark);
    pointer-events: none;
    z-index: 9999;
    text-shadow: 0 2px 8px rgba(255, 255, 255, 0.9);
    animation: floatUp 1s var(--ease-out) forwards;
    transform: translate(-50%, 0);
    line-height: 1;
}
@keyframes floatUp {
    0%   { opacity: 0; transform: translate(-50%, 0) scale(0.8); }
    20%  { opacity: 1; transform: translate(-50%, -15px) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -70px) scale(0.9); }
}

/* ----- ACHIEVEMENT POPUP ----- */
/* Pe mobil: centru-sus, aproape full-width */
.achievement {
    position: fixed;
    top: 12px;
    left: 12px;
    right: 12px;
    transform: translateY(-200%);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-left: 4px solid var(--grass);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    box-shadow: 0 10px 30px rgba(27, 94, 32, 0.2);
    z-index: 10000;
    display: flex;
    gap: 12px;
    align-items: center;
    transition: transform 0.5s var(--ease-bounce);
    padding-top: calc(12px + env(safe-area-inset-top));
}
.achievement.is-visible {
    transform: translateY(0);
}
.achievement__icon {
    font-size: 1.8rem;
    flex-shrink: 0;
    line-height: 1;
}
.achievement__content { flex: 1; min-width: 0; }
.achievement__label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--grass-dark);
    font-weight: 700;
    margin-bottom: 2px;
}
.achievement__name {
    font-family: 'Fraunces', serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.25;
    overflow-wrap: anywhere;
}

/* ----- LEVEL UP GLOW pe card ----- */
.card.is-levelup {
    animation: cardGlow 1.4s ease;
}
@keyframes cardGlow {
    0%, 100% { box-shadow: var(--shadow-lg); }
    40%      { box-shadow: 0 20px 60px rgba(76, 175, 80, 0.5),
                           0 0 0 3px rgba(76, 175, 80, 0.25); }
}

/* ----- COOKIE BANNER ----- */
.cookie-banner {
    position: fixed;
    bottom: 12px;
    left: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 16px 18px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 9999;
    transform: translateY(calc(100% + 40px));
    transition: transform 0.5s var(--ease-bounce);
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
}
.cookie-banner.is-visible { transform: translateY(0); }
.cookie-banner p {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--ink);
}
.cookie-banner a {
    color: var(--grass-dark);
    font-weight: 600;
}
.btn-cookie {
    background: linear-gradient(145deg, var(--grass), var(--grass-dark));
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    min-height: 44px; /* tap target accesibil */
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
    transition: transform 0.2s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    align-self: flex-end;
    min-width: 120px;
}
.btn-cookie:hover { transform: translateY(-1px); }
.btn-cookie:active { transform: translateY(0) scale(0.97); }

/* ============================================
   DESKTOP
   ============================================ */
@media (min-width: 640px) {
    .achievement {
        top: 20px;
        left: auto;
        right: -400px;
        max-width: 320px;
        padding: 14px 18px;
        transform: none;
        transition: right 0.5s var(--ease-bounce);
    }
    .achievement.is-visible {
        right: 20px;
        transform: none;
    }
    .achievement__icon { font-size: 2rem; }
    .achievement__name { font-size: 1.05rem; }

    .cookie-banner {
        bottom: 16px;
        left: 16px;
        right: 16px;
        max-width: 560px;
        margin: 0 auto;
        flex-direction: row;
        align-items: center;
        gap: 16px;
        padding: 18px 22px;
        border-radius: var(--radius-lg);
    }
    .cookie-banner p {
        font-size: 0.85rem;
        flex: 1;
    }
    .btn-cookie {
        align-self: auto;
        padding: 10px 22px;
    }

    .leaf-particle { font-size: 22px; }
    .float-number { font-size: 1.6rem; }
}
