/* ============================================
   KundliBanao - Punya Points & Levels Styles
   ============================================ */

/* Homepage Gita widget */
.home-gita-card { max-width: 720px; margin: 0 auto; }
.hgs-label {
    font-size: 0.78rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
    font-weight: 700;
    text-align: center;
}
.hgs-label i { color: #22d3ee; margin-right: 6px; }
.hgs-card {
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.06), rgba(251, 191, 36, 0.04));
    border: 1px solid rgba(34, 211, 238, 0.22);
    border-radius: 18px;
    padding: 24px 22px;
    text-align: center;
}
.hgs-meta {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.hgs-loc {
    color: #22d3ee;
    font-weight: 700;
    font-size: 0.84rem;
    padding: 3px 10px;
    background: rgba(34, 211, 238, 0.15);
    border-radius: 999px;
}
.hgs-theme { color: var(--text-dim); font-size: 0.82rem; align-self: center; }
.hgs-sanskrit {
    font-family: 'Noto Sans Devanagari', serif;
    font-size: 1.3rem;
    color: #fde68a;
    font-weight: 700;
    line-height: 1.7;
    margin-bottom: 12px;
}
.hgs-translit {
    color: #c4b5fd;
    font-style: italic;
    font-size: 0.92rem;
    margin-bottom: 12px;
}
.hgs-meaning {
    color: var(--text);
    font-size: 0.94rem;
    margin-bottom: 18px;
    font-style: italic;
    line-height: 1.5;
}
.hgs-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    text-decoration: none;
}
@media (max-width: 640px) {
    .hgs-sanskrit { font-size: 1.1rem; }
}

/* Nav "NEW" pill */
.nav-new-pill {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 6px;
    border-radius: 6px;
    background: linear-gradient(135deg, #f97316, #dc2626);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    vertical-align: middle;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(249, 115, 22, 0.4);
}

/* Chip next to username in header */
.user-punya-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    padding: 3px 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(245, 158, 11, 0.06));
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #f59e0b;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.02em;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.user-punya-chip:hover { transform: translateY(-1px); }
.user-punya-chip i { font-size: 0.7rem; }

/* Streak chip — sits between username and punya chip */
.user-streak-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.2), rgba(239, 68, 68, 0.08));
    border: 1px solid rgba(249, 115, 22, 0.5);
    color: #fb923c;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.user-streak-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}
.user-streak-chip.streak-done-today {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(249, 115, 22, 0.12));
    border-color: rgba(16, 185, 129, 0.5);
    color: #34d399;
}
.user-streak-chip i {
    font-size: 0.72rem;
    animation: chipFlicker 2.5s ease-in-out infinite;
}
@keyframes chipFlicker {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* Punya card inside user dropdown */
.user-punya-card {
    margin: 8px 12px 4px;
    padding: 12px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(245, 158, 11, 0.04));
    border: 1px solid var(--border);
    border-radius: 12px;
}
.user-punya-card .upc-loading {
    color: var(--text-dim);
    font-size: 0.82rem;
    text-align: center;
    padding: 6px;
}
.upc-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.upc-badge {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #fff;
    font-weight: 800;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}
.upc-info { flex: 1; min-width: 0; }
.upc-level {
    font-weight: 700;
    font-size: 0.92rem;
    line-height: 1.1;
}
.upc-points {
    font-size: 0.74rem;
    color: var(--text-dim);
    margin-top: 2px;
}
.upc-points i { color: #f59e0b; }
.upc-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}
.upc-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s ease;
}
.upc-next {
    font-size: 0.72rem;
    color: var(--text-dim);
    text-align: center;
}
.upc-next b { color: var(--text); }

/* Modal: Mera Punya */
.punya-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: punyaFade 0.2s ease;
}
@keyframes punyaFade { from { opacity: 0; } to { opacity: 1; } }
.punya-modal-card {
    background: var(--bg-card, #1a1a2e);
    border: 1px solid var(--border, rgba(255,255,255,0.1));
    border-radius: 18px;
    max-width: 640px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.punya-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border, rgba(255,255,255,0.08));
}
.punya-modal-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text);
}
.punya-modal-title i { color: #f59e0b; margin-right: 6px; }
.punya-modal-close {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1.6rem;
    cursor: pointer;
    padding: 0 8px;
    line-height: 1;
}
.punya-modal-body {
    padding: 20px;
    overflow-y: auto;
}

/* Hero block */
.punya-hero {
    text-align: center;
    padding: 24px 16px;
    border-radius: 14px;
    margin-bottom: 18px;
}
.punya-hero-badge {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 12px;
    color: #fff;
    font-weight: 800;
    font-size: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}
.punya-hero-level {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    margin-bottom: 4px;
}
.punya-hero-points {
    font-size: 0.92rem;
    color: var(--text-dim);
    margin-bottom: 12px;
}
.punya-hero-points i { color: #f59e0b; }
.punya-hero-bar {
    height: 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 5px;
    overflow: hidden;
    margin: 0 auto 10px;
    max-width: 320px;
}
.punya-hero-bar-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 1s ease;
}
.punya-hero-next {
    font-size: 0.82rem;
    color: var(--text-dim);
}
.punya-hero-next b { color: var(--text); }

/* Sections */
.punya-section { margin-bottom: 20px; }
.punya-section h4 {
    font-size: 0.92rem;
    color: var(--text);
    margin: 0 0 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border, rgba(255,255,255,0.06));
}

/* Levels list */
.pl-list { display: flex; flex-direction: column; gap: 6px; }
.pl-row {
    display: grid;
    grid-template-columns: 32px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    transition: background 0.2s;
}
.pl-row.pl-active {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.25);
}
.pl-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #fff;
    font-weight: 800;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pl-name {
    font-weight: 700;
    font-size: 0.88rem;
}
.pl-range {
    font-size: 0.74rem;
    color: var(--text-dim);
}

/* Rules list */
.punya-rules {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px;
}
.punya-rules li {
    padding: 8px 12px;
    background: rgba(139, 92, 246, 0.06);
    border: 1px solid rgba(139, 92, 246, 0.18);
    border-radius: 10px;
    font-size: 0.84rem;
    color: var(--text);
}
.punya-rules li i {
    color: var(--primary-light, #a78bfa);
    margin-right: 6px;
    width: 16px;
}
.punya-rules li b { color: #f59e0b; }

/* Log */
.punya-log { display: flex; flex-direction: column; gap: 4px; max-height: 240px; overflow-y: auto; }
.punya-log-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    font-size: 0.84rem;
}
.plr-action { color: var(--text); }
.plr-meta { color: #f59e0b; font-weight: 600; font-size: 0.76rem; }

/* Leaderboard */
.lb-list { display: flex; flex-direction: column; gap: 4px; }
.lb-row {
    display: grid;
    grid-template-columns: 40px 1fr auto auto;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    font-size: 0.86rem;
}
.lb-rank { font-weight: 700; text-align: center; }
.lb-name { font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-level { font-size: 0.74rem; font-weight: 600; }
.lb-points { font-weight: 700; color: #f59e0b; font-size: 0.8rem; }
.lb-points i { font-size: 0.74rem; margin-right: 2px; }

/* Toast */
.punya-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--bg-card, #1a1a2e);
    border: 1px solid #f59e0b;
    border-radius: 14px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
    z-index: 10000;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    min-width: 220px;
    max-width: 360px;
}
.punya-toast.show { transform: translateX(0); }
.punya-toast.punya-toast-levelup {
    border-width: 2px;
    animation: punyaPulse 1.6s ease infinite;
}
@keyframes punyaPulse {
    0%, 100% { box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4); }
    50% { box-shadow: 0 12px 40px rgba(245, 158, 11, 0.5); }
}
.pt-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: #fff;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.pt-body { flex: 1; min-width: 0; }
.pt-title {
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--text);
    line-height: 1.2;
}
.pt-sub {
    font-size: 0.78rem;
    color: var(--text-dim);
    margin-top: 2px;
}

/* Mobile */
@media (max-width: 640px) {
    .punya-toast { right: 12px; left: 12px; bottom: 12px; max-width: none; }
    .user-punya-chip { padding: 2px 8px; font-size: 0.68rem; }
    .punya-modal-card { max-height: 95vh; }
    .punya-hero-badge { width: 64px; height: 64px; font-size: 1.8rem; }
    .punya-hero-level { font-size: 1.2rem; }
    .punya-rules { grid-template-columns: 1fr; }
}
