/* ==========================================================================
   Tenebris Coin - Səviyyə dizaynları
   Bronze -> Silver -> Gold -> Diamond -> Eclipse
   Rənglər DB-dən inline CSS dəyişənləri ilə gəlir:
   --tc-start, --tc-end, --tc-glow
   ========================================================================== */

:root {
    --tc-coin: #FFC637;
    --tc-coin-dark: #E08A00;
}

/* ---------- Coin çipi (balans göstəricisi) ---------- */
.tc-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 13px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(255, 198, 55, 0.16), rgba(224, 138, 0, 0.09));
    border: 1px solid rgba(255, 198, 55, 0.36);
    color: var(--tc-coin);
    font-weight: 700;
    font-size: 13px;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
}

.tc-chip i {
    font-size: 12px;
}

.tc-chip:hover {
    border-color: rgba(255, 198, 55, 0.6);
    color: #FFD979;
}

.tc-chip-sm {
    padding: 4px 10px;
    font-size: 11.5px;
}

/* Coin ikonu - sikkə görünüşü */
.tc-coin-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 28%, #FFE9A3, var(--tc-coin) 45%, var(--tc-coin-dark));
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35) inset, 0 1px 4px rgba(224, 138, 0, 0.5);
    color: #6B3E00;
    font-size: 9px;
    font-weight: 900;
    flex-shrink: 0;
}

.tc-coin-icon-lg {
    width: 26px;
    height: 26px;
    font-size: 12px;
}

/* ==========================================================================
   AVATAR ÇƏRÇİVƏLƏRİ
   ========================================================================== */

.tc-avatar {
    position: relative;
    display: inline-block;
    width: 96px;
    height: 96px;
    flex-shrink: 0;
    --tc-start: #CD7F32;
    --tc-end: #7A4A1E;
    --tc-glow: rgba(205, 127, 50, 0.55);
}

/* Fırlanan / statik xarici halqa */
.tc-avatar::before {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--tc-start), var(--tc-end), var(--tc-start));
    z-index: 0;
}

/* Halqanın içindəki tünd boşluq (çərçivə effekti) */
.tc-avatar::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 50%;
    background: #12121c;
    z-index: 1;
}

.tc-avatar .tc-avatar-img,
.tc-avatar > img {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

/* Səviyyə nişanı (aşağı sağ künc) */
.tc-level-badge {
    position: absolute;
    z-index: 4;
    bottom: -4px;
    right: -4px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--tc-start), var(--tc-end));
    border: 2px solid #12121c;
    color: #fff;
    font-size: 13px;
    box-shadow: 0 3px 12px var(--tc-glow);
}

/* Ölçü variantları */
.tc-avatar-sm { width: 44px; height: 44px; }
.tc-avatar-sm .tc-level-badge { width: 18px; height: 18px; font-size: 8px; border-width: 1.5px; bottom: -2px; right: -2px; }
.tc-avatar-sm::before { inset: -3px; }

.tc-avatar-md { width: 68px; height: 68px; }
.tc-avatar-md .tc-level-badge { width: 24px; height: 24px; font-size: 10px; }

.tc-avatar-lg { width: 120px; height: 120px; }
.tc-avatar-lg .tc-level-badge { width: 38px; height: 38px; font-size: 16px; }

/* ---------- BRONZE: sadə metal halqa ---------- */
.tc-frame-bronze::before {
    background: linear-gradient(145deg, #E0A265, var(--tc-start) 35%, var(--tc-end) 70%, #C98A4B);
    box-shadow: 0 0 14px var(--tc-glow);
}

/* ---------- SILVER: cilalanmış metal + işıq süzülməsi ---------- */
.tc-frame-silver::before {
    background: linear-gradient(145deg, #FFFFFF, #D6DCE5 25%, var(--tc-end) 55%, #F2F5F9 78%, var(--tc-end));
    box-shadow: 0 0 18px var(--tc-glow);
}

.tc-frame-silver .tc-shine {
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    z-index: 3;
    overflow: hidden;
    pointer-events: none;
}

.tc-frame-silver .tc-shine::after {
    content: '';
    position: absolute;
    top: -60%;
    left: -60%;
    width: 55%;
    height: 220%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.75), transparent);
    transform: rotate(24deg);
    animation: tc-shine-sweep 3.6s ease-in-out infinite;
}

@keyframes tc-shine-sweep {
    0%   { left: -60%; opacity: 0; }
    35%  { opacity: 1; }
    100% { left: 130%; opacity: 0; }
}

/* ---------- GOLD: fırlanan qızıl halqa ---------- */
.tc-frame-gold::before {
    background: conic-gradient(from 0deg,
        #FFF3C4, var(--tc-start) 18%, var(--tc-end) 38%,
        #FFF3C4 52%, var(--tc-start) 70%, var(--tc-end) 88%, #FFF3C4);
    animation: tc-spin 5s linear infinite;
    box-shadow: 0 0 22px var(--tc-glow);
}

/* ---------- DIAMOND: fırlanan kristal halqa + parıltı ---------- */
.tc-frame-diamond {
    --tc-glow: rgba(90, 200, 255, 0.7);
}

.tc-frame-diamond::before {
    inset: -6px;
    background: conic-gradient(from 0deg,
        #FFFFFF, var(--tc-start) 14%, var(--tc-end) 32%,
        #E7FBFF 48%, var(--tc-start) 64%, var(--tc-end) 82%, #FFFFFF);
    animation: tc-spin 3.4s linear infinite;
    filter: drop-shadow(0 0 12px var(--tc-glow));
}

.tc-frame-diamond::after {
    inset: -2px;
}

.tc-frame-diamond .tc-sparkles {
    position: absolute;
    inset: -14px;
    z-index: 3;
    pointer-events: none;
}

.tc-frame-diamond .tc-sparkles span {
    position: absolute;
    width: 5px;
    height: 5px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 8px 2px rgba(160, 230, 255, 0.95);
    opacity: 0;
    animation: tc-sparkle 2.4s ease-in-out infinite;
}

.tc-frame-diamond .tc-sparkles span:nth-child(1) { top: 6%;  left: 74%; animation-delay: 0s; }
.tc-frame-diamond .tc-sparkles span:nth-child(2) { top: 62%; left: 4%;  animation-delay: 0.8s; }
.tc-frame-diamond .tc-sparkles span:nth-child(3) { top: 84%; left: 62%; animation-delay: 1.6s; }

@keyframes tc-sparkle {
    0%, 100% { opacity: 0; transform: scale(0.4); }
    50%      { opacity: 1; transform: scale(1.25); }
}

/* ---------- ECLIPSE: ən yüksək səviyyə, tutulma effekti ---------- */
.tc-frame-eclipse {
    --tc-glow: rgba(168, 85, 247, 0.8);
}

/* Xarici nəbz halqası */
.tc-frame-eclipse::before {
    inset: -7px;
    background: conic-gradient(from 0deg,
        #0B0714 0deg, var(--tc-start) 60deg, #F0ABFC 100deg,
        var(--tc-start) 150deg, #0B0714 210deg, var(--tc-end) 280deg,
        var(--tc-start) 330deg, #0B0714 360deg);
    animation: tc-spin 6.5s linear infinite;
    filter: drop-shadow(0 0 16px var(--tc-glow));
}

.tc-frame-eclipse::after {
    inset: -2.5px;
    background: #0B0714;
}

/* Nəfəs alan aura */
.tc-frame-eclipse .tc-aura {
    position: absolute;
    inset: -16px;
    z-index: 0;
    border-radius: 50%;
    background: radial-gradient(circle, var(--tc-glow) 0%, transparent 68%);
    animation: tc-aura-pulse 3s ease-in-out infinite;
    pointer-events: none;
}

/* Tutulma qövsü - avatarın üstündən keçən nazik işıq */
.tc-frame-eclipse .tc-corona {
    position: absolute;
    inset: -7px;
    z-index: 3;
    border-radius: 50%;
    border: 1.5px solid transparent;
    border-top-color: rgba(255, 255, 255, 0.9);
    border-right-color: rgba(240, 171, 252, 0.55);
    animation: tc-spin 2.2s linear infinite reverse;
    pointer-events: none;
}

@keyframes tc-aura-pulse {
    0%, 100% { opacity: 0.35; transform: scale(0.94); }
    50%      { opacity: 0.85; transform: scale(1.06); }
}

@keyframes tc-spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   SƏVİYYƏ NİŞANI (mətnli)
   ========================================================================== */

.tc-level-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: #fff;
    background: linear-gradient(135deg, var(--tc-start), var(--tc-end));
    box-shadow: 0 2px 12px var(--tc-glow);
    --tc-start: #CD7F32;
    --tc-end: #7A4A1E;
    --tc-glow: rgba(205, 127, 50, 0.45);
}

.tc-level-tag.tc-frame-eclipse {
    background: linear-gradient(135deg, #C084FC, #3B0764 55%, #C084FC);
    background-size: 200% 100%;
    animation: tc-tag-flow 4s linear infinite;
}

@keyframes tc-tag-flow {
    to { background-position: -200% 0; }
}

/* ==========================================================================
   SƏVİYYƏ PROQRESİ
   ========================================================================== */

.tc-progress {
    width: 100%;
    height: 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
    position: relative;
}

.tc-progress-bar {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--tc-start), var(--tc-end));
    position: relative;
    transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.tc-progress-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.42), transparent);
    background-size: 60% 100%;
    background-repeat: no-repeat;
    animation: tc-progress-shine 2.2s linear infinite;
}

@keyframes tc-progress-shine {
    0%   { background-position: -60% 0; }
    100% { background-position: 160% 0; }
}

/* ==========================================================================
   SƏVİYYƏ XƏRİTƏSİ (bütün səviyyələr)
   ========================================================================== */

.tc-levels-track {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 14px;
}

.tc-level-card {
    position: relative;
    padding: 18px 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    transition: transform 0.25s ease, border-color 0.25s ease;
    overflow: hidden;
}

.tc-level-card:hover {
    transform: translateY(-3px);
}

.tc-level-card.is-current {
    border-color: var(--tc-start);
    box-shadow: 0 0 0 1px var(--tc-start) inset, 0 8px 28px var(--tc-glow);
}

.tc-level-card.is-locked {
    opacity: 0.45;
}

.tc-level-card-icon {
    width: 46px;
    height: 46px;
    margin: 0 auto 10px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fff;
    background: linear-gradient(135deg, var(--tc-start), var(--tc-end));
    box-shadow: 0 4px 16px var(--tc-glow);
}

.tc-level-card-name {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.tc-level-card-req {
    font-size: 11.5px;
    opacity: 0.65;
    margin-bottom: 8px;
}

.tc-level-card-perk {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--tc-start);
}

.tc-level-card .tc-current-flag {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 3px 7px;
    border-radius: 999px;
    background: var(--tc-start);
    color: #10101a;
}

/* ==========================================================================
   ÇEVİRMƏ KARTI
   ========================================================================== */

.tc-convert-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 14px;
}

.tc-convert-box {
    padding: 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
}

.tc-convert-box-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    opacity: 0.6;
    margin-bottom: 6px;
}

.tc-convert-box-value {
    font-size: 22px;
    font-weight: 800;
}

.tc-convert-arrow {
    font-size: 18px;
    opacity: 0.5;
}

.tc-quick-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.tc-quick-btn {
    padding: 7px 13px;
    border-radius: 9px;
    border: 1px solid rgba(255, 198, 55, 0.32);
    background: rgba(255, 198, 55, 0.09);
    color: var(--tc-coin);
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tc-quick-btn:hover:not(:disabled) {
    background: rgba(255, 198, 55, 0.2);
    border-color: rgba(255, 198, 55, 0.6);
}

.tc-quick-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* ==========================================================================
   "COIN QAZAN" NİŞANI — məhsul səhifəsi və səbət sətirləri
   ==========================================================================
   Yığcam bir sətirlik pill: sikkə ikonu + rəqəm + ₼ ekvivalenti.
   Rəqəm JS ilə dəyişir (variant/miqdar), ona görə eni sabit saxlamaq üçün
   tabular-nums işlədilir — dəyər dəyişəndə pill tərpənmir. */

.tc-earn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 7px;
    border-radius: 100px;
    background:
        radial-gradient(120% 180% at 0% 50%, rgba(255, 198, 55, 0.18) 0%, transparent 60%),
        rgba(255, 198, 55, 0.07);
    border: 1px solid rgba(255, 198, 55, 0.28);
    color: var(--tc-coin);
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Sikkə ikonu — qradient disk */
.tc-earn-ico {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 10.5px;
    color: #3a2600;
    background: radial-gradient(circle at 32% 28%, #FFE9A3, var(--tc-coin) 45%, var(--tc-coin-dark));
    box-shadow: 0 2px 8px -2px rgba(224, 138, 0, 0.9);
}

.tc-earn-val {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.3px;
    font-variant-numeric: tabular-nums;
    color: #FFE9A3;
}

.tc-earn-lbl { font-weight: 700; opacity: 0.92; }

/* "×3" miqdar göstəricisi — yalnız miqdar 1-dən çox olanda görünür */
.tc-earn-mult {
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(255, 198, 55, 0.16);
    font-size: 10.5px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

/* ₼ ekvivalenti — ayırıcı nöqtə ilə */
.tc-earn-azn {
    padding-left: 8px;
    border-left: 1px solid rgba(255, 198, 55, 0.22);
    font-size: 11px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    opacity: 0.72;
}

/* Səbət sətirlərində daha da yığcam variant */
.tc-earn.is-sm {
    gap: 6px;
    padding: 4px 9px 4px 5px;
    font-size: 11px;
}

.tc-earn.is-sm .tc-earn-ico { width: 17px; height: 17px; font-size: 8.5px; }
.tc-earn.is-sm .tc-earn-val { font-size: 12.5px; }
.tc-earn.is-sm .tc-earn-azn { display: none; }

@media (max-width: 480px) {
    .tc-earn { font-size: 11.5px; padding: 5px 10px 5px 6px; }
    .tc-earn-val { font-size: 14px; }
    .tc-earn-azn { display: none; }
}

@media (max-width: 600px) {
    .tc-convert-grid {
        grid-template-columns: 1fr;
    }

    .tc-convert-arrow {
        transform: rotate(90deg);
    }
}

/* Hərəkət azaltma tərcihi */
@media (prefers-reduced-motion: reduce) {
    .tc-frame-gold::before,
    .tc-frame-diamond::before,
    .tc-frame-eclipse::before,
    .tc-frame-eclipse .tc-corona,
    .tc-frame-eclipse .tc-aura,
    .tc-frame-silver .tc-shine::after,
    .tc-frame-diamond .tc-sparkles span,
    .tc-progress-bar::after,
    .tc-level-tag.tc-frame-eclipse {
        animation: none;
    }
}
