/* Boling activity card — fixed under navbar (top) */
.boling-float-card {
    --boling-nav-h: 85px;
    --boling-gap: 10px;
    position: fixed;
    top: calc(var(--boling-nav-h) + var(--boling-gap));
    left: 12px;
    right: 12px;
    bottom: auto;
    z-index: 998;
    width: auto;
    max-width: 720px;
    margin: 0 auto;
    padding: 12px 42px 12px 16px;
    border-radius: 14px;
    background: linear-gradient(145deg, #1a1a1a 0%, #2a1515 55%, #1f1010 100%);
    border: 1px solid rgba(198, 49, 39, 0.5);
    color: #fff;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 12px;
    transform-origin: top center;
    animation:
        boling-float-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) both,
        boling-bob 3.2s ease-in-out 0.55s infinite,
        boling-glow 2.8s ease-in-out 0.55s infinite;
}

.boling-float-card::before {
    content: "";
    position: absolute;
    inset: -40% -30%;
    background: radial-gradient(circle at 30% 20%, rgba(198, 49, 39, 0.28), transparent 55%);
    pointer-events: none;
    animation: boling-shine 4.5s ease-in-out infinite;
}

.boling-float-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        105deg,
        transparent 0%,
        rgba(255, 255, 255, 0.08) 45%,
        transparent 70%
    );
    transform: skewX(-18deg);
    pointer-events: none;
    animation: boling-sweep 4.8s ease-in-out 1.2s infinite;
}

.boling-float-card__title {
    position: relative;
    z-index: 1;
    margin: 0;
    padding-right: 0;
    flex: 1;
    min-width: 0;
    font-size: 15px;
    line-height: 1.4;
    font-weight: 600;
    color: #fff;
    animation: boling-title-in 0.5s ease 0.15s both;
}

.boling-float-card__btn {
    position: relative;
    z-index: 1;
    display: block;
    width: auto;
    flex-shrink: 0;
    min-width: 108px;
    border: 0;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    overflow: hidden;
    white-space: nowrap;
    background: linear-gradient(90deg, #9c2820, #C63127, #e04a3f, #C63127, #9c2820);
    background-size: 200% 100%;
    box-shadow: 1px 2px 12px rgba(198, 49, 39, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation:
        boling-btn-in 0.5s ease 0.28s both,
        boling-btn-flow 3s linear infinite;
}

.boling-float-card__btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(198, 49, 39, 0.55);
}

.boling-float-card__btn:active {
    transform: translateY(0) scale(0.98);
}

.boling-float-card__btn .boling-btn-ripple {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: inherit;
    pointer-events: none;
}

.boling-float-card__btn .boling-btn-ripple::before {
    content: "";
    position: absolute;
    top: 0;
    left: -40%;
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    animation: boling-btn-shine 2.4s ease-in-out infinite;
}

.boling-float-spacer {
    height: calc(var(--boling-card-h, 56px) + var(--boling-gap, 10px) + 8px);
}

.boling-float-card__close {
    position: absolute;
    top: 50%;
    right: 10px;
    margin-top: -12px;
    z-index: 2;
    width: 24px;
    height: 24px;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.55);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s ease, transform 0.2s ease;
}

.boling-float-card__close:hover {
    color: #fff;
    transform: rotate(90deg);
}

.boling-sheet-mask {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}

.boling-sheet-mask.is-open {
    opacity: 1;
    visibility: visible;
}

.boling-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1001;
    max-height: 72vh;
    overflow: auto;
    background: #1c1c1c;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.4);
    transform: translateY(100%);
    transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
    color: #fff;
    padding: 12px 16px 28px;
}

.boling-sheet.is-open {
    transform: translateY(0);
}

.boling-sheet__handle {
    width: 40px;
    height: 4px;
    margin: 4px auto 14px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.25);
}

.boling-sheet__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding: 0 4px;
}

.boling-sheet__header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.boling-sheet.is-open .boling-sheet__header {
    animation: boling-panel-in 0.35s ease both;
}

.boling-sheet__close {
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.boling-sheet__close:hover {
    color: #fff;
    transform: rotate(90deg);
}

.boling-sheet__body {
    padding: 4px 4px 8px;
    opacity: 0;
    transform: translateY(10px);
}

.boling-sheet.is-open .boling-sheet__body {
    animation: boling-item-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: 0.08s;
}

.boling-sheet__input {
    width: 100%;
    margin: 0 0 12px;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: #151515;
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.boling-sheet__input:focus {
    border-color: #C63127;
    box-shadow: 0 0 0 3px rgba(198, 49, 39, 0.18);
}

.boling-sheet__input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.boling-sheet__submit {
    width: 100%;
    border: 0;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(to right, #9c2820, #C63127);
    transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.boling-sheet__submit:hover {
    opacity: 0.95;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(198, 49, 39, 0.4);
}

.boling-sheet__submit:active {
    transform: scale(0.98);
}

@keyframes boling-float-in {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes boling-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(4px); }
}

@keyframes boling-glow {
    0%, 100% {
        box-shadow:
            0 8px 28px rgba(0, 0, 0, 0.35),
            0 0 0 0 rgba(198, 49, 39, 0.35);
    }
    50% {
        box-shadow:
            0 12px 32px rgba(0, 0, 0, 0.4),
            0 0 24px 2px rgba(198, 49, 39, 0.28);
    }
}

@keyframes boling-shine {
    0%, 100% { opacity: 0.55; transform: translate(0, 0) scale(1); }
    50% { opacity: 1; transform: translate(8%, 6%) scale(1.08); }
}

@keyframes boling-sweep {
    0%, 70% { left: -120%; }
    100% { left: 140%; }
}

@keyframes boling-title-in {
    from { opacity: 0; transform: translateX(8px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes boling-btn-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes boling-btn-flow {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

@keyframes boling-btn-shine {
    0%, 55% { left: -40%; opacity: 0; }
    60% { opacity: 1; }
    100% { left: 120%; opacity: 0; }
}

@keyframes boling-panel-in {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes boling-item-in {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 576px) {
    .boling-float-card {
        --boling-gap: 8px;
        left: 8px;
        right: 8px;
        bottom: auto;
        width: auto;
        max-width: none;
        padding: 10px 36px 10px 12px;
        gap: 8px;
        transform-origin: top center;
    }

    .boling-float-card__title {
        font-size: 13px;
    }

    .boling-float-card__btn {
        min-width: 88px;
        padding: 8px 12px;
        font-size: 13px;
    }

    #toTop {
        bottom: 24px;
        right: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .boling-float-card,
    .boling-float-card::before,
    .boling-float-card::after,
    .boling-float-card__title,
    .boling-float-card__btn,
    .boling-float-card__btn .boling-btn-ripple::before,
    .boling-sheet.is-open .boling-sheet__body,
    .boling-sheet.is-open .boling-sheet__header {
        animation: none !important;
    }

    .boling-float-card {
        box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
    }

    .boling-sheet__body {
        opacity: 1;
        transform: none;
    }
}
