/* TipCoin experiment — wallet badge & top-up modal */

.tipcoin-icon {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
    object-fit: contain;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

.tipcoin-inline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    vertical-align: middle;
}

.tipcoin-icon--title {
    margin-right: 2px;
}

.tipcoin-lb-badge,
.lb-sort-btn .tipcoin-inline,
.admin-tab-btn .tipcoin-inline,
.tipcoin-profile-panel h4 {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tipcoin-branding-trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: left;
    font: inherit;
    color: inherit;
    border-radius: 10px;
    transition: background 0.2s ease, transform 0.15s ease;
}

.tipcoin-branding-trigger:hover,
.tipcoin-branding-trigger:focus-visible {
    background: rgba(255, 215, 0, 0.08);
    outline: none;
    transform: translateY(-1px);
}

.tipcoin-branding-trigger:focus-visible {
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.45);
}

.tipcoin-branding-block .tipcoin-icon--brand {
    width: 48px;
    height: 48px;
    filter: drop-shadow(0 2px 8px rgba(255, 215, 0, 0.25));
}

.tipcoin-branding-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tipcoin-branding-title {
    color: #ffd700;
    font-size: 14px;
    font-weight: 700;
}

.tipcoin-branding-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
    max-width: 220px;
}

.portal-footer-tipcoin {
    align-items: flex-start;
}

@media (max-width: 720px) {
    .portal-footer-tipcoin {
        grid-column: 1 / -1;
        padding-top: 8px;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
    }
}

/* TipCoin info modal */
.tipcoin-info-overlay {
    position: fixed;
    inset: 0;
    z-index: 10040;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(5px);
}

.tipcoin-info-dialog {
    position: relative;
    width: min(420px, 100%);
    max-height: min(90vh, 640px);
    overflow-y: auto;
    padding: 22px 20px 18px;
    border-radius: 14px;
    background: linear-gradient(165deg, #1a1f2e 0%, #10131c 100%);
    border: 1px solid rgba(255, 215, 0, 0.35);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55), 0 0 30px rgba(255, 215, 0, 0.08);
    color: var(--text-main, #e8eaed);
    font-size: 13px;
    line-height: 1.55;
}

.tipcoin-info-dialog p {
    margin: 0 0 10px;
    color: var(--text-muted, #b0b8c4);
}

.tipcoin-info-close {
    position: absolute;
    top: 10px;
    right: 12px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}

.tipcoin-info-close:hover {
    color: #fff;
}

.tipcoin-info-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 28px 14px 0;
    font-size: 17px;
    color: #ffd700;
}

.tipcoin-info-coins {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: clamp(12px, 4vw, 20px);
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.tipcoin-info-coin {
    margin: 0;
    text-align: center;
    flex: 0 1 auto;
}

.tipcoin-info-coin-btn {
    display: block;
    width: clamp(100px, 26vw, 118px);
    height: clamp(100px, 26vw, 118px);
    margin: 0 auto 6px;
    padding: 0;
    border: none;
    border-radius: 50%;
    overflow: hidden;
    background: transparent;
    cursor: zoom-in;
    transition: transform 0.15s ease, filter 0.15s ease;
    flex-shrink: 0;
    aspect-ratio: 1 / 1;
    line-height: 0;
}

.tipcoin-info-coin-btn:hover,
.tipcoin-info-coin-btn:focus-visible {
    transform: scale(1.05);
    filter: drop-shadow(0 0 14px rgba(255, 215, 0, 0.45));
    outline: none;
}

.tipcoin-info-coin-btn img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.45));
}

.tipcoin-coin-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(8px);
}

.tipcoin-coin-lightbox-inner {
    position: relative;
    text-align: center;
    width: min(100%, 320px);
}

.tipcoin-coin-lightbox-close {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    z-index: 2;
}

.tipcoin-coin-lightbox-close:hover {
    background: rgba(255, 215, 0, 0.28);
}

.tipcoin-coin-lightbox-img {
    display: block;
    width: min(340px, 88vw);
    height: min(340px, 88vw);
    max-width: 100%;
    margin: 0 auto;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    background: transparent;
    filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 24px rgba(255, 215, 0, 0.12));
    aspect-ratio: 1 / 1;
}

.tipcoin-coin-lightbox-figure {
    margin: 0;
}

.tipcoin-coin-lightbox-figure figcaption {
    margin-top: 12px;
    font-size: 13px;
    color: #ffd700;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.tipcoin-info-coin figcaption {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tipcoin-info-lead {
    font-size: 14px !important;
    color: #fff !important;
    font-weight: 600;
}

.tipcoin-info-disclaimer {
    margin-top: 12px !important;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.25);
    color: #ffb4b4 !important;
    font-size: 12px !important;
}

.tipcoin-info-ok {
    display: block;
    width: 100%;
    margin-top: 14px;
    background: linear-gradient(135deg, #ffd700, #ff8c00) !important;
    color: #000 !important;
    font-weight: 700 !important;
    border: none !important;
}

.tipcoin-header-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.18), rgba(255, 140, 0, 0.12));
    border: 1px solid rgba(255, 215, 0, 0.45);
    color: #ffd700;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
}

.tipcoin-header-badge.is-low {
    animation: tipcoin-pulse 1.5s ease-in-out infinite;
    border-color: #ff6b6b;
    color: #ff8a8a;
}

.tipcoin-header-badge.is-updated {
    animation: tipcoin-badge-pop 0.7s ease-out;
    border-color: #ffd700;
    color: #ffd700;
}

@keyframes tipcoin-badge-pop {
    0% { transform: scale(1); }
    35% { transform: scale(1.08); }
    100% { transform: scale(1); }
}

.tipcoin-lb-badge {
    font-size: 12px;
    font-weight: 600;
    color: #ffd700;
    margin-left: 8px;
}

@keyframes tipcoin-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.4); }
    50% { box-shadow: 0 0 12px 2px rgba(255, 107, 107, 0.35); }
}

.tipcoin-stake-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.vs-tipcoin-stake-row label,
.duel-list-tipcoin {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.duel-list-tipcoin {
    font-size: 11px;
    color: #ffd700;
}

.tipcoin-stake-row label {
    font-size: 11px;
    color: var(--text-muted);
}

.tipcoin-stake-input {
    width: 64px;
    padding: 4px 6px;
    font-size: 12px;
    text-align: center;
    background: rgba(255, 215, 0, 0.08);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 4px;
    color: #ffd700;
}

.tipcoin-stake-quick {
    display: flex;
    gap: 4px;
}

.tipcoin-stake-btn {
    padding: 2px 6px;
    font-size: 10px;
    border-radius: 4px;
    border: 1px solid rgba(255, 215, 0, 0.25);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    cursor: pointer;
}

.tipcoin-stake-btn:hover,
.tipcoin-stake-btn.active {
    background: rgba(255, 215, 0, 0.15);
    color: #ffd700;
    border-color: rgba(255, 215, 0, 0.5);
}

.tipcoin-profile-panel {
    margin-bottom: 24px;
    padding: 16px 18px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.08), rgba(255, 140, 0, 0.04));
    border: 1px solid rgba(255, 215, 0, 0.25);
}

.tipcoin-profile-panel h4 {
    margin: 0 0 8px;
    color: #ffd700;
    font-size: 15px;
}

.tipcoin-profile-desc,
.tipcoin-profile-stake-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0 0 10px;
    line-height: 1.45;
}

.tipcoin-profile-balance-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    margin-bottom: 10px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.25);
    font-size: 13px;
}

.tipcoin-profile-balance-row strong {
    color: #ffd700;
    font-size: 18px;
}

.tipcoin-profile-topup-btn {
    background: linear-gradient(135deg, #ffd700, #ff8c00) !important;
    color: #000 !important;
    font-weight: 700 !important;
    border: none !important;
}

/* Top-up modal */
.tipcoin-topup-overlay {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s;
}

.tipcoin-topup-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.tipcoin-topup-dialog {
    width: min(400px, 100%);
    padding: 28px 24px;
    border-radius: 16px;
    background: linear-gradient(160deg, #1a1f2e 0%, #0f1219 100%);
    border: 1px solid rgba(255, 215, 0, 0.35);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(255, 215, 0, 0.08);
    text-align: center;
    transform: scale(0.92);
    transition: transform 0.25s ease;
}

.tipcoin-topup-overlay.is-open .tipcoin-topup-dialog {
    transform: scale(1);
}

.tipcoin-topup-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 8px;
}

.tipcoin-topup-icon .tipcoin-icon {
    width: 56px;
    height: 56px;
}

.tipcoin-topup-title {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 8px;
}

.tipcoin-topup-sub {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0 0 20px;
    line-height: 1.5;
}

.tipcoin-topup-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.tipcoin-topup-btn {
    padding: 14px 8px;
    border-radius: 10px;
    border: 2px solid rgba(255, 215, 0, 0.4);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.12), rgba(255, 140, 0, 0.08));
    color: #ffd700;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.tipcoin-topup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.2);
    border-color: #ffd700;
}

.tipcoin-topup-btn:active {
    transform: scale(0.97);
}

.tipcoin-topup-btn.is-loading {
    opacity: 0.6;
    pointer-events: none;
}

.tipcoin-topup-dismiss {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 12px;
    cursor: pointer;
    text-decoration: underline;
    padding: 8px;
}

.tipcoin-topup-balance {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.tipcoin-topup-balance strong {
    color: #ffd700;
}

.tipcoin-topup-err {
    margin: 0.5rem 0 0;
    font-size: 0.875rem;
    color: #e74c3c;
    text-align: center;
}

.tipcoin-finished-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #f87171;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
}
