.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.kinocoin {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    isolation: isolate;
}


.kinocoin--interactive {
    cursor: pointer;
    border-radius: 50%;
}
.kinocoin--interactive:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}

.kinocoin-icon {
    position: relative;
    z-index: 2;
    display: block;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
    filter: drop-shadow(0 0 2px rgba(212, 175, 55, 0.2));
    transform: translateY(0);
    transition: transform 0.25s ease, filter 0.25s ease, width 0.2s ease, height 0.2s ease;
}


.kinocoin-icon--sm { width: 14px; height: 14px; }
.kinocoin-icon--md { width: 16px; height: 16px; }
.kinocoin-icon--lg { width: 22px; height: 22px; }
.kinocoin-icon--xl { width: 26px; height: 26px; }

@media (min-width: 768px) {
    .kinocoin-icon--sm { width: 16px; height: 16px; }
    .kinocoin-icon--md { width: 18px; height: 18px; }
    .kinocoin-icon--lg { width: 28px; height: 28px; }
    .kinocoin-icon--xl { width: 34px; height: 34px; }
}


.kinocoin::before {
    content: "";
    position: absolute;
    inset: -35%;
    z-index: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.16) 0%, rgba(212, 175, 55, 0) 70%);
    opacity: 0.55;
    transition: opacity 0.35s ease, transform 0.35s ease;
    pointer-events: none;
}


.kinocoin--interactive:hover .kinocoin-icon,
.kinocoin--interactive:focus-visible .kinocoin-icon {
    transform: translateY(-1px);
    filter: brightness(1.12) drop-shadow(0 0 3px rgba(212, 175, 55, 0.35));
}
.kinocoin--interactive:hover::before,
.kinocoin--interactive:focus-visible::before {
    opacity: 0.85;
    transform: scale(1.05);
}


.kinocoin-wave {
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
}
.kinocoin.is-rewarding .kinocoin-wave {
    animation: kc-wave 0.8s cubic-bezier(.2, .7, .3, 1) forwards;
}
.kinocoin.is-rewarding-large .kinocoin-wave {
    animation-duration: 1.05s;
}
@keyframes kc-wave {
    0%   { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.45); opacity: 1; transform: scale(0.7); }
    70%  { opacity: 0.35; }
    100% { box-shadow: 0 0 0 16px rgba(212, 175, 55, 0); opacity: 0; transform: scale(1.6); }
}

.kinocoin.is-rewarding .kinocoin-icon {
    animation: kc-pulse 0.7s ease-out;
}
.kinocoin.is-rewarding-large .kinocoin-icon {
    animation: kc-pulse-large 1s ease-out;
}
@keyframes kc-pulse {
    0%   { transform: scale(1); filter: drop-shadow(0 0 2px rgba(212,175,55,.25)); }
    30%  { transform: scale(1.16); filter: drop-shadow(0 0 8px rgba(212,175,55,.65)); }
    100% { transform: scale(1); filter: drop-shadow(0 0 2px rgba(212,175,55,.25)); }
}
@keyframes kc-pulse-large {
    0%   { transform: scale(1); filter: drop-shadow(0 0 2px rgba(212,175,55,.25)); }
    35%  { transform: scale(1.26); filter: drop-shadow(0 0 12px rgba(212,175,55,.8)); }
    60%  { transform: scale(1.08); }
    100% { transform: scale(1); filter: drop-shadow(0 0 2px rgba(212,175,55,.25)); }
}

.kinocoin-shine {
    position: absolute;
    inset: 0;
    z-index: 3;
    border-radius: 50%;
    overflow: hidden;
    pointer-events: none;
}
.kinocoin-shine::after {
    content: "";
    position: absolute;
    top: 0;
    left: -60%;
    width: 40%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 245, 214, 0.55), transparent);
    transform: skewX(-18deg);
    opacity: 0;
}
.kinocoin.is-rewarding .kinocoin-shine::after,
.kinocoin.is-rewarding-large .kinocoin-shine::after {
    animation: kc-shine 0.8s ease-out;
}
@keyframes kc-shine {
    0%   { left: -60%; opacity: 0; }
    15%  { opacity: 0.9; }
    60%  { opacity: 0; }
    100% { left: 130%; opacity: 0; }
}

.kinocoin-particle {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    width: 3px;
    height: 3px;
    margin: -1.5px 0 0 -1.5px;
    border-radius: 50%;
    background: radial-gradient(circle, #f6e2a8 0%, rgba(212, 175, 55, 0.4) 70%, transparent 100%);
    opacity: 0;
    pointer-events: none;
    animation: kc-particle 0.7s ease-out forwards;
    animation-delay: var(--kc-delay, 0s);
}
@keyframes kc-particle {
    0%   { opacity: 0; transform: translate(0, 0) scale(0.6); }
    20%  { opacity: 1; }
    100% { opacity: 0; transform: translate(var(--kc-tx, 10px), var(--kc-ty, -14px)) scale(0.3); }
}


.kinocoin-gain {
    position: absolute;
    left: 50%;
    bottom: 100%;
    transform: translate(-50%, 10px) scale(0.9);
    white-space: nowrap;
    color: var(--gold);
    font-weight: 700;
    font-size: 0.85em;
    letter-spacing: 0.02em;
    opacity: 0;
    pointer-events: none;
    z-index: 4;
    animation: kc-gain 0.9s ease-out forwards;
}
@keyframes kc-gain {
    0%   { opacity: 0; transform: translate(-50%, 10px) scale(0.9); }
    18%  { opacity: 1; transform: translate(-50%, 0) scale(1.05); }
    55%  { opacity: 1; transform: translate(-50%, -8px) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -20px) scale(1); }
}


.kinocoin-balance {
    display: inline-block;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}


.kinocoin-panel {
    position: fixed;
    z-index: 260;
    width: 240px;
    padding: 18px 18px 16px;
    border-radius: 16px;
    background: var(--grad-card);
    border: 1px solid var(--gold-dim);
    box-shadow: 0 20px 40px -14px rgba(0, 0, 0, 0.65), 0 0 24px rgba(212, 175, 55, 0.1);
    color: var(--cream);
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
    transform-origin: top center;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.kinocoin-panel.is-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}
.kinocoin-panel-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gold);
    margin-bottom: 10px;
}
.kinocoin-panel-balance {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 32px;
    letter-spacing: 0.02em;
    color: var(--cream);
    margin-bottom: 10px;
}
.kinocoin-panel-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 0;
    border-top: 1px solid var(--line);
    font-size: 12.5px;
    color: var(--cream-dim);
}
.kinocoin-panel-row b {
    color: var(--cream);
    font-weight: 600;
}
.kinocoin-panel-cta {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 10px 14px;
    text-align: center;
    border-radius: 10px;
    border: 1px solid var(--gold);
    background: transparent;
    color: var(--gold);
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.25s ease, color 0.25s ease;
}
.kinocoin-panel-cta:hover {
    background: var(--gold);
    color: #14090c;
}

@media (max-width: 480px) {
    .kinocoin-panel {
        width: min(260px, calc(100vw - 24px));
    }
}

@media (prefers-reduced-motion: reduce) {
    .kinocoin-icon {
        animation: none !important;
        transition: filter 0.2s ease !important;
    }
    .kinocoin::before {
        transition: opacity 0.2s ease !important;
    }
    .kinocoin--interactive:hover .kinocoin-icon,
    .kinocoin--interactive:focus-visible .kinocoin-icon {
        transform: none !important;
    }
    .kinocoin-wave,
    .kinocoin-shine::after,
    .kinocoin-particle {
        display: none !important;
        animation: none !important;
    }
    .kinocoin.is-rewarding .kinocoin-icon,
    .kinocoin.is-rewarding-large .kinocoin-icon {
        animation: none !important;
        filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.6)) !important;
    }
    .kinocoin-gain {
        animation: kc-gain-reduced 0.9s ease-out forwards !important;
    }
    .kinocoin-panel {
        transition: opacity 0.15s ease !important;
        transform: none !important;
    }
}
@keyframes kc-gain-reduced {
    0%   { opacity: 0; }
    15%  { opacity: 1; }
    75%  { opacity: 1; }
    100% { opacity: 0; }
}
