/* ============================================================
   GLOBAL ANNOUNCEMENT BARS — GALAXYSEVEN
   Purple & Blue thematic gradient, minimalistic design.
   Placed after premium-banner on all pages.
   ============================================================ */

/* ── CSS Variables ─────────────────────────── */
:root {
    --ga-bg: rgba(16, 12, 41, 0.78);
    --ga-border: rgba(147, 51, 234, 0.18);
    --ga-glow-purple: rgba(147, 51, 234, 0.35);
    --ga-glow-blue: rgba(59, 130, 246, 0.3);
    --ga-text: rgba(255, 255, 255, 0.9);
    --ga-text-dim: rgba(255, 255, 255, 0.55);
    --ga-accent: #a855f7;
    --ga-accent-blue: #6366f1;
    --ga-blur: 12px;
    --ga-transition: 320ms cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* ── Wrapper — holds both bars ─────────────── */
.global-announcement-wrapper {
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    z-index: 998;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 1100px;
    pointer-events: none;
}

/* ─╼ Shared Bar Base ╼───────────────────────── */
.global-announcement-bar {
    width: 100%;

    background: var(--ga-bg);
    backdrop-filter: blur(var(--ga-blur));
    -webkit-backdrop-filter: blur(var(--ga-blur));
    border: 1px solid var(--ga-border);
    box-shadow:
        0 2px 16px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
    overflow: hidden;
    position: relative;
    pointer-events: auto;
    transition: all var(--ga-transition);
}

/* Subtle gradient overlay */
.global-announcement-bar::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(
        135deg,
        rgba(147, 51, 234, 0.06) 0%,
        rgba(59, 130, 246, 0.04) 50%,
        rgba(147, 51, 234, 0.02) 100%
    );
    pointer-events: none;
    z-index: 0;
}

/* ─╼ Cash Winning Bar ╼───────────────────────── */
.global-announcement-cash {
    min-height: 38px;
    display: flex;
    align-items: center;
    padding: 6px 16px;
}

.global-announcement-cash .ga-cash-icon {
    font-size: 1.15rem;
    margin-right: 10px;
    flex-shrink: 0;
    z-index: 1;
    animation: ga-pulse-icon 2s ease-in-out infinite;
}

@keyframes ga-pulse-icon {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.8; }
}

.global-announcement-cash .ga-cash-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--ga-text);
    white-space: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    z-index: 1;
    flex: 1;
    min-width: 0;
    /* Hidden scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;
    /* Right-edge fade mask */
    -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent 100%);
    mask-image: linear-gradient(90deg, #000 88%, transparent 100%);
}

.global-announcement-cash .ga-cash-text::-webkit-scrollbar {
    display: none;
}

.global-announcement-cash .ga-cash-text strong {
    color: #c084fc;
    font-weight: 700;
}

.global-announcement-cash .ga-cash-text::-webkit-scrollbar {
    display: none;
}

.global-announcement-cash .ga-cash-text .ga-win-amount {
    color: #fbbf24;
    font-weight: 700;
}

.global-announcement-cash .ga-cash-text .ga-game-tag {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: 4px;
    margin-left: 4px;
    letter-spacing: 0.03em;
}

.ga-game-tag.bebay {
    background: rgba(168, 85, 247, 0.2);
    color: #c084fc;
}

.ga-game-tag.upgrade {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

/* ── Bonus bet tag colors ── */
.ga-game-tag.bonus-dragon {
    background: rgba(239, 68, 68, 0.22);
    color: #f87171;
}

.ga-game-tag.bonus-panda {
    background: rgba(168, 85, 247, 0.22);
    color: #c084fc;
}

.ga-game-tag.bonus-supreme7 {
    background: rgba(251, 191, 36, 0.22);
    color: #fbbf24;
}

.ga-game-tag.bonus-divine9 {
    background: rgba(52, 211, 153, 0.22);
    color: #34d399;
}

/* Cash entry cards (series) */
.ga-cash-entry {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    margin-right: 6px;
    border-radius: 5px;
    background: rgba(139, 92, 246, 0.08);
    white-space: nowrap;
    flex-shrink: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    font-size: 0.78rem;
}

.ga-cash-entry.ga-new {
    animation: ga-entry-pop 0.4s ease-out;
}

/* Fire-drop cash entry — animated gradient backdrop for wins > $500 */
.ga-cash-entry.ga-fire-entry {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(251, 146, 60, 0.3);
    box-shadow: 0 0 12px rgba(251, 146, 60, 0.15);
}

.ga-cash-entry.ga-fire-entry::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(
        90deg,
        rgba(251, 146, 60, 0.22) 0%,
        rgba(239, 68, 68, 0.12) 40%,
        rgba(251, 146, 60, 0.04) 70%,
        transparent 100%
    );
    z-index: 0;
    pointer-events: none;
    animation: ga-fire-sweep 2s ease-in-out infinite;
}

@keyframes ga-fire-sweep {
    0%   { opacity: 0.6; background-position: 0% 50%; }
    50%  { opacity: 1;   background-position: 100% 50%; }
    100% { opacity: 0.6; background-position: 0% 50%; }
}

/* Ensure text stays above the fire backdrop */
.ga-cash-entry.ga-fire-entry > * {
    position: relative;
    z-index: 1;
}

@keyframes ga-entry-pop {
    0%   { transform: scale(0.85); opacity: 0; }
    50%  { transform: scale(1.04); opacity: 1; }
    100% { transform: scale(1);    opacity: 1; }
}

/* ─╼ Item Winning Bar ╼──────────────────────── */
.global-announcement-items {
    min-height: 140px;
    display: flex;
    align-items: center;
    padding: 6px 14px;
    gap: 10px;
}

/* Left-edge gradient fade — 10% width, subtle fire tint, 100%→0% opacity */
.global-announcement-items::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 10%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(
        90deg,
        rgba(251, 146, 60, 0.18) 0%,
        rgba(239, 68, 68, 0.06) 40%,
        transparent 100%
    );
    pointer-events: none;
    z-index: 2;
}

.global-announcement-items .ga-items-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    z-index: 1;
    opacity: 0.85;
    order: 0;
}

/* Fire-drop appears first, then divider, then item cards */
.ga-fire-drop-section {
    order: 1;
}

.ga-fire-drop-divider {
    order: 2;
}

/* Scrolling items row */
.ga-items-scroll {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    z-index: 1;
    order: 3;
    /* Hidden scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent 100%);
    mask-image: linear-gradient(90deg, #000 92%, transparent 100%);
    flex-shrink: 0;

}

.ga-items-scroll::-webkit-scrollbar { display: none; }

/* ── Flip Card ─────────────────────────────── */
.ga-item-card {
    width: 120px;
    height: 100px;
    perspective: 600px;
    flex-shrink: 0;
    cursor: pointer;
    position: relative;
}

.ga-item-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.ga-item-card:hover .ga-item-card-inner {
    transform: rotateY(180deg);
}

.ga-item-card-front,
.ga-item-card-back {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Front — image on tier-colored parallelogram backdrop */
.ga-item-card-front {
    /* background: var(--ga-card-tier-bg, rgba(0, 0, 0, 0.3)); */
}

/* Parallelogram tier-color backdrop — 50% card size, darkened radial fill */
.ga-item-card-front::before {
    content: '';
    position: absolute;
    top: 21%;
    left: 13%;
    width: 74%;
    height: 56%;
    background: var(--ga-card-tier-bg, rgba(0, 0, 0, 0.3));
    filter: brightness(0.55) saturate(0.7);
    transform: skewX(-10deg);
    z-index: 0;
    opacity: 0.85;
}

/* Bright tier-color parallelogram outline */
.ga-item-card-front::after {
    content: '';
    position: absolute;
    top: 21%;
    left: 13%;
    width: 74%;
    height: 56%;
    border: 2px solid var(--ga-card-tier-bg, rgba(255,255,255,0.3));
    filter: brightness(2.5) saturate(2);
    transform: skewX(-10deg);
    z-index: 0;
    opacity: 0.85;
}

.ga-item-card .ga-item-img {
    width: 96px;
    height: 96px;
    object-fit: contain;
    border-radius: 4px;
    z-index: 1;
}

/* Back — reveals user, game, name, wear, value */
.ga-item-card-back {
    transform: rotateY(180deg);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    flex-direction: column;
    gap: 2px;
    padding: 6px;
}

/* Parallelogram tier-color backdrop on back face — matching front */
.ga-item-card-back::before {
    content: '';
    position: absolute;
    top: 21%;
    left: 13%;
    width: 74%;
    height: 56%;
    background: var(--ga-card-tier-bg, rgba(0, 0, 0, 0.3));
    filter: brightness(0.55) saturate(0.7);
    transform: skewX(-10deg);
    z-index: 0;
    opacity: 0.85;
}

.ga-item-card-back::after {
    content: '';
    position: absolute;
    top: 21%;
    left: 13%;
    width: 74%;
    height: 56%;
    border: 2px solid var(--ga-card-tier-bg, rgba(255,255,255,0.3));
    filter: brightness(2.5) saturate(2);
    transform: skewX(-10deg);
    z-index: 0;
    opacity: 0.85;
}

.ga-item-card-back .ga-flip-user {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.45rem;
    font-weight: 500;
    color: #ffffff;
    white-space: nowrap;
    overflow: auto;
    text-overflow: ellipsis;
    max-width: 100%;
    line-height: 1.15;
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 2px rgba(0,0,0,0.7);
    
}

.ga-item-card-back .ga-flip-game {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.45rem;
    font-weight: 500;
    color: var(--ga-text-dim);
    white-space: nowrap;
    line-height: 1.15;
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 2px rgba(0,0,0,0.7);
}

/* Case preview image backdrop on card back (when game=case_opening) */
.ga-item-card-back .ga-case-backdrop {
    position: absolute;
    inset: 0;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50%;
    height: 50%;
    object-fit: cover;
    z-index: 1;
    opacity: 1;
    filter: brightness(0.6);
}

/* Front-side name + wear overlay — bottom-right, on top of image */
.ga-item-card-front .ga-flip-name {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    z-index: 2;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.43rem;
    font-weight: 600;
    color: #fff;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    line-height: 1.15;
    text-align: center;
    text-shadow: 0 1px 4px rgba(0,0,0,0.75);
}

.ga-item-card-front .ga-flip-meta {
    position: absolute;
    bottom: 6px;
    left: 6px;
    z-index: 2;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.38rem;
    font-weight: 500;
    color: rgba(255,255,255,0.75);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 12px);
    line-height: 1.15;
    text-align: left;
    text-shadow: 0 1px 4px rgba(0,0,0,0.75);
}

.ga-item-card-back .ga-flip-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.45rem;
    font-weight: 600;
    color: var(--ga-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    line-height: 1.15;
}

.ga-item-card-back .ga-flip-meta {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.41rem;
    color: var(--ga-text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    line-height: 1.15;
}

.ga-item-card-back .ga-flip-value {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fbbf24;
    white-space: nowrap;
    line-height: 1.1;
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

/* ─╼ Section Label Card (parallelogram — top-mid aligned) ╼─ */
.ga-section-label {
    width: 100px;
    height: 20px;
    flex-shrink: 0;
    position: absolute;
    top: -10px;
    left: 20%;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 2px;
    cursor: default;
}

.ga-section-label .ga-label-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-align: center;
    line-height: 1.2;
}

/* Fire Drop variant */
.ga-section-label.ga-label-fire {
    box-shadow:
        0 0 16px rgba(251, 146, 60, 0.1),
        inset 0 0 20px rgba(251, 146, 60, 0.04);
}

.ga-section-label.ga-label-fire .ga-label-text {
    background: linear-gradient(135deg, #fb923c, #ffffff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    text-shadow: 0 0 10px rgba(251, 146, 60, 0.4);
}

/* Recent Drop variant */
.ga-section-label.ga-label-recent {
    border: 1px solid rgba(147, 51, 234, 0.2);
    box-shadow:
        0 0 16px rgba(147, 51, 234, 0.08),
        inset 0 0 20px rgba(147, 51, 234, 0.03);
}

.ga-section-label.ga-label-recent .ga-label-text {
    color: #a78bfa;
    text-shadow: 0 0 10px rgba(147, 51, 234, 0.3);
}

/* ─╼ Fire Drop Section ╼─────────────────────── */
.ga-fire-drop-divider {
    width: 2px;
    height: 60px;
    border-radius: 1px;
    background: linear-gradient(180deg, rgba(251, 146, 60, 0.6), rgba(239, 68, 68, 0.3));
    flex-shrink: 0;
    z-index: 1;
}

.ga-fire-drop-section {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
    z-index: 1;
}

.ga-fire-drop-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    color: #fb923c;
    white-space: nowrap;
    letter-spacing: 0.03em;
    text-shadow: 0 0 8px rgba(251, 146, 60, 0.4);
}

/* ─╼ Tooltip on Hover ╼──────────────────────── */
.ga-tooltip {
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    background: rgba(16, 12, 41, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(147, 51, 234, 0.3);
    border-radius: 8px;
    padding: 7px 12px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.72rem;
    color: var(--ga-text);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.15s ease;
    white-space: nowrap;
}

.ga-tooltip.visible {
    opacity: 1;
}

.ga-tooltip .ga-tip-user {
    font-weight: 700;
    color: #c084fc;
}

.ga-tooltip .ga-tip-game {
    color: var(--ga-text-dim);
    margin-left: 2px;
}

/* ─╼ Animations ╼────────────────────────────── */
@keyframes ga-slide-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ga-item-card.ga-new {
    animation: ga-slide-in 0.35s ease-out;
}

/* ─╼ Empty state ╼───────────────────────────── */
.global-announcement-cash .ga-cash-placeholder,
.global-announcement-items .ga-items-placeholder {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    color: var(--ga-text-dim);
    z-index: 1;
    font-style: italic;
}

/* ─╼ Loading — fade bars out/in to avoid spoilers ╼─ */
.ga-loading .global-announcement-bar {
    opacity: 0;
    pointer-events: none;
}

/* ─╼ Responsive ╼────────────────────────────── */
@media (max-width: 768px) {
    .global-announcement-wrapper {
        top: auto !important;
        overflow-x: hidden;
    }

    .global-announcement-cash {
        padding: 5px 10px;
        min-height: 32px;
    }

    .global-announcement-cash .ga-cash-text {
        font-size: 0.7rem;
    }

    .global-announcement-items {
        padding: 4px 8px;
        min-height: 44px;
        gap: 6px;
    }

    .ga-item-card {
        max-width: 150px;
        padding: 3px 7px 3px 3px;
    }

    .ga-item-card .ga-item-img {
        width: 30px;
        height: 30px;
    }

    .ga-item-card .ga-item-name {
        font-size: 0.64rem;
    }

    .ga-item-card .ga-item-meta {
        font-size: 0.58rem;
    }

    .ga-item-card .ga-item-value {
        font-size: 0.62rem;
    }

    .ga-section-label {
        width: 80px;
        height: 80px;
        padding-top: 10px;
    }

    .ga-section-label .ga-label-text {
        font-size: 0.58rem;
    }
}
