/**
 * Hubionis Points (HP) Styles
 * 1. Compact hero bar for dashboard
 * 2. Full HP subpage styles
 * @version 1.0.0
 */

/* ===================================
   1. COMPACT HERO BAR (Dashboard)
   ================================== */

.hp-hero-compact {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 1.5rem !important;
    padding: 1rem 1.5rem !important;
    margin-bottom: 1.5rem !important;
    background: linear-gradient(135deg, rgba(31, 85, 85, 0.45) 0%, rgba(15, 42, 42, 0.25) 100%) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-radius: 14px !important;
    border: 1px solid rgba(127, 255, 0, 0.12) !important;
    position: relative !important;
    overflow: hidden !important;
    min-height: auto !important;
    grid-template-columns: unset !important;
}

.hp-hero-compact::before {
    content: '' !important;
    position: absolute !important;
    top: 0; left: 0; right: 0; bottom: 0 !important;
    background: radial-gradient(ellipse at 80% 50%, rgba(127, 255, 0, 0.04) 0%, transparent 60%) !important;
    pointer-events: none !important;
    animation: none !important;
}

/* Left side — welcome + meta */
.hp-hero-left {
    flex: 1 !important;
    min-width: 0 !important;
    text-align: left !important;
    align-items: flex-start !important;
    gap: 0.25rem !important;
}

.hp-hero-left .user-info {
    align-items: flex-start !important;
    text-align: left !important;
}

.hp-hero-compact .welcome-title {
    font-size: 1.15rem !important;
    font-weight: 600 !important;
    margin: 0 0 0.35rem 0 !important;
    line-height: 1.3 !important;
}

.hp-hero-compact .user-meta {
    margin-top: 0 !important;
    gap: 0.4rem !important;
    justify-content: flex-start !important;
}

.hp-hero-compact .join-date {
    font-size: 0.68rem !important;
    color: #8892A6 !important;
}

/* Right side — HP stats chips + mini ring */
.hp-hero-right {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    gap: 0.5rem !important;
    flex-shrink: 0 !important;
}

.hp-inline-stats {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
    margin: 0 !important;
    width: auto !important;
}

/* Individual stat chips */
.hp-stat-chip {
    display: flex !important;
    align-items: center !important;
    gap: 0.35rem !important;
    padding: 0.35rem 0.65rem !important;
    background: rgba(10, 26, 26, 0.55) !important;
    border-radius: 10px !important;
    border: 1px solid rgba(127, 255, 0, 0.08) !important;
    transition: all 0.2s ease !important;
    cursor: default !important;
}

.hp-stat-chip:hover {
    border-color: rgba(127, 255, 0, 0.2) !important;
    background: rgba(10, 26, 26, 0.7) !important;
}

.hp-chip-accent {
    border-color: rgba(127, 255, 0, 0.18) !important;
    background: rgba(127, 255, 0, 0.06) !important;
}

.hp-chip-accent:hover {
    border-color: rgba(127, 255, 0, 0.35) !important;
    background: rgba(127, 255, 0, 0.1) !important;
}

.hp-chip-icon {
    font-size: 0.85rem !important;
    line-height: 1 !important;
}

.hp-chip-val {
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    color: #fff !important;
    line-height: 1.1 !important;
}

.hp-chip-accent .hp-chip-val {
    color: #7FFF00 !important;
}

.hp-chip-lbl {
    font-size: 0.6rem !important;
    color: #8892A6 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
    line-height: 1 !important;
}

/* Mini progress ring */
.hp-mini-ring {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 0 !important;
    position: relative !important;
}

.hp-mini-ring .progress-ring {
    width: 44px !important;
    height: 44px !important;
    position: relative !important;
}

.hp-mini-ring .progress-ring svg {
    width: 44px !important;
    height: 44px !important;
    transform: rotate(-90deg) !important;
}

.hp-mini-ring .ring-background {
    fill: none !important;
    stroke: rgba(127, 255, 0, 0.1) !important;
    stroke-width: 10 !important;
}

.hp-mini-ring .ring-progress {
    fill: none !important;
    stroke: url(#progressGradient) !important;
    stroke-width: 10 !important;
    stroke-linecap: round !important;
    stroke-dasharray: 251 !important;
    stroke-dashoffset: 251 !important;
    transition: stroke-dashoffset 1s ease !important;
    filter: none !important;
}

.hp-ring-pct {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    font-size: 0.6rem !important;
    font-weight: 700 !important;
    color: #7FFF00 !important;
    line-height: 1 !important;
}

/* "View HP Details →" link */
.hp-see-all-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.3rem !important;
    padding: 0.3rem 0.75rem !important;
    font-size: 0.68rem !important;
    font-weight: 600 !important;
    color: #7FFF00 !important;
    background: rgba(127, 255, 0, 0.06) !important;
    border: 1px solid rgba(127, 255, 0, 0.15) !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
    white-space: nowrap !important;
}

.hp-see-all-btn:hover {
    background: rgba(127, 255, 0, 0.12) !important;
    border-color: rgba(127, 255, 0, 0.3) !important;
    transform: translateX(2px) !important;
}

/* Hide old elements that might still be styled */
.hp-hero-compact .user-avatar-section,
.hp-hero-compact .user-subtitle:not(.join-date),
.hp-hero-compact .completion-widget:not(.hp-mini-ring .progress-ring),
.hp-hero-compact .quick-stats-bar:not(.hp-inline-stats),
.hp-hero-compact .stat-divider,
.hp-hero-compact .btn-complete-profile {
    display: none !important;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
    .hp-hero-compact {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.75rem !important;
        padding: 0.85rem 1rem !important;
    }
    .hp-hero-left .user-info {
        align-items: center !important;
        text-align: center !important;
    }
    .hp-hero-compact .user-meta {
        justify-content: center !important;
    }
    .hp-hero-right {
        align-items: center !important;
    }
    .hp-inline-stats {
        justify-content: center !important;
        flex-wrap: wrap !important;
    }
}

@media (max-width: 480px) {
    .hp-hero-compact {
        padding: 0.75rem !important;
        gap: 0.6rem !important;
    }
    .hp-hero-compact .welcome-title {
        font-size: 0.95rem !important;
    }
    .hp-stat-chip {
        padding: 0.25rem 0.5rem !important;
    }
    .hp-chip-val {
        font-size: 0.85rem !important;
    }
    .hp-chip-lbl {
        display: none !important;
    }
}

/* ===================================
   2. HP SUBPAGE — hubionis-points.html
   ================================== */

/* Layout */
.hp-page {
    min-height: 100vh;
    background: #0A1A1A;
    color: #fff;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

.hp-page-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

/* Back nav */
.hp-back-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.hp-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #8892A6;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.2s;
}

.hp-back-link:hover {
    color: #7FFF00;
}

/* Profile Card */
.hp-profile-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    padding: 1.75rem 2rem;
    background: linear-gradient(135deg, rgba(31, 85, 85, 0.5) 0%, rgba(15, 42, 42, 0.3) 100%);
    border-radius: 16px;
    border: 1px solid rgba(127, 255, 0, 0.12);
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.hp-profile-card::after {
    content: '';
    position: absolute;
    top: -30%; right: -10%;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(127, 255, 0, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.hp-profile-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: relative;
    z-index: 1;
}

.hp-profile-name {
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.hp-profile-name span {
    background: linear-gradient(135deg, #7FFF00, #6DE800);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hp-profile-subtitle {
    font-size: 0.85rem;
    color: #8892A6;
}

.hp-profile-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.hp-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.hp-badge-rank {
    background: rgba(127, 255, 0, 0.1);
    color: #7FFF00;
    border: 1px solid rgba(127, 255, 0, 0.2);
}

.hp-badge-level {
    background: rgba(139, 92, 246, 0.1);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

/* Stats row in profile card */
.hp-profile-stats {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.25rem;
}

.hp-pstat {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.hp-pstat-val {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
}

.hp-pstat-val.accent {
    color: #7FFF00;
}

.hp-pstat-lbl {
    font-size: 0.7rem;
    color: #8892A6;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Large progress ring */
.hp-profile-ring {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
}

.hp-ring-large {
    position: relative;
    width: 120px;
    height: 120px;
}

.hp-ring-large svg {
    width: 120px;
    height: 120px;
    transform: rotate(-90deg);
}

.hp-ring-large .ring-bg {
    fill: none;
    stroke: rgba(127, 255, 0, 0.1);
    stroke-width: 8;
}

.hp-ring-large .ring-fill {
    fill: none;
    stroke: url(#hpGrad);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 314;
    stroke-dashoffset: 314;
    transition: stroke-dashoffset 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.hp-ring-center {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.hp-ring-pct-large {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #7FFF00;
}

.hp-ring-sublabel {
    display: block;
    font-size: 0.6rem;
    color: #8892A6;
    text-transform: uppercase;
    margin-top: 2px;
}

.hp-ring-next {
    font-size: 0.7rem;
    color: #8892A6;
    text-align: center;
}

/* Section cards */
.hp-section {
    margin-bottom: 1.5rem;
}

.hp-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.hp-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hp-section-title .icon {
    font-size: 1.2rem;
}

.hp-section-count {
    font-size: 0.75rem;
    color: #8892A6;
    background: rgba(10, 26, 26, 0.5);
    padding: 0.2rem 0.6rem;
    border-radius: 8px;
}

/* Subrole Road */
.hp-subrole-road {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.75rem;
}

.hp-sr-road-card {
    padding: 1rem 1.15rem;
    background: rgba(10, 26, 26, 0.45);
    border-radius: 12px;
    border: 1px solid rgba(127, 255, 0, 0.06);
    display: flex;
    align-items: center;
    gap: 0.85rem;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.hp-sr-road-card:hover {
    background: rgba(127, 255, 0, 0.03);
    border-color: rgba(127, 255, 0, 0.15);
}

.hp-sr-road-card.sr-owned {
    border-color: rgba(127, 255, 0, 0.25);
    background: rgba(127, 255, 0, 0.04);
    box-shadow: 0 0 20px rgba(127, 255, 0, 0.06);
}

.hp-sr-road-card.sr-affordable {
    border-color: rgba(127, 255, 0, 0.15);
    background: rgba(127, 255, 0, 0.02);
}

.hp-sr-road-card.sr-locked {
    opacity: 0.55;
}

.hp-sr-road-icon {
    font-size: 1.6rem;
    line-height: 1;
    flex-shrink: 0;
    width: 36px;
    text-align: center;
}

.hp-sr-road-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.hp-sr-road-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hp-sr-road-card.sr-locked .hp-sr-road-title {
    color: #778;
}

.hp-sr-road-meta {
    display: flex;
    gap: 0.5rem;
    font-size: 0.68rem;
    color: #8892A6;
}

.hp-sr-road-card.sr-locked .hp-sr-road-meta {
    color: #556;
}

.hp-sr-road-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    flex-shrink: 0;
    min-width: 70px;
}

.hp-sr-status-icon {
    font-size: 1.1rem;
}

.hp-sr-status-text {
    font-size: 0.65rem;
    color: #8892A6;
    text-align: center;
    white-space: nowrap;
}

.hp-sr-road-card.sr-owned .hp-sr-status-text {
    color: #7FFF00;
    font-weight: 600;
}

.hp-sr-road-card.sr-affordable .hp-sr-status-text {
    color: #7FFF00;
}

/* Actions Table */
.hp-actions-grid {
    display: grid;
    gap: 0.5rem;
}

.hp-action-row {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    background: rgba(10, 26, 26, 0.4);
    border-radius: 10px;
    border: 1px solid rgba(127, 255, 0, 0.04);
    transition: all 0.2s ease;
}

.hp-action-row:hover {
    border-color: rgba(127, 255, 0, 0.12);
    background: rgba(10, 26, 26, 0.6);
}

.hp-action-icon {
    font-size: 1.1rem;
    width: 28px;
    text-align: center;
}

.hp-action-name {
    font-size: 0.82rem;
    color: #fff;
    font-weight: 500;
}

.hp-action-cat {
    font-size: 0.6rem;
    color: #8892A6;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 0.15rem 0.45rem;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 6px;
}

.hp-action-pts {
    font-size: 0.85rem;
    font-weight: 700;
    color: #7FFF00;
    white-space: nowrap;
}

.hp-action-cap {
    font-size: 0.6rem;
    color: #8892A6;
    font-weight: 400;
}

/* Category filter tabs */
.hp-cat-tabs {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.hp-cat-tab {
    padding: 0.35rem 0.75rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: #8892A6;
    background: rgba(10, 26, 26, 0.5);
    border: 1px solid rgba(127, 255, 0, 0.08);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: capitalize;
}

.hp-cat-tab:hover {
    color: #fff;
    border-color: rgba(127, 255, 0, 0.2);
}

.hp-cat-tab.active {
    color: #7FFF00;
    border-color: rgba(127, 255, 0, 0.3);
    background: rgba(127, 255, 0, 0.08);
}

/* Challenges section */
.hp-challenges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 0.75rem;
}

.hp-challenge-card {
    padding: 1.15rem 1.25rem;
    background: rgba(10, 26, 26, 0.45);
    border-radius: 12px;
    border: 1px solid rgba(127, 255, 0, 0.06);
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.hp-challenge-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hp-challenge-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: #fff;
}

.hp-challenge-bonus {
    font-size: 0.75rem;
    font-weight: 700;
    color: #7FFF00;
    background: rgba(127, 255, 0, 0.08);
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
}

.hp-challenge-desc {
    font-size: 0.75rem;
    color: #8892A6;
    line-height: 1.4;
}

.hp-challenge-progress {
    height: 6px;
    background: rgba(127, 255, 0, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.hp-challenge-bar {
    height: 100%;
    background: linear-gradient(90deg, #7FFF00, #5FCC00);
    border-radius: 3px;
    transition: width 0.8s ease;
}

.hp-challenge-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.68rem;
    color: #8892A6;
}

/* Rewards section */
.hp-rewards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.75rem;
}

.hp-reward-card {
    padding: 1.15rem 1.25rem;
    background: rgba(10, 26, 26, 0.45);
    border-radius: 12px;
    border: 1px solid rgba(127, 255, 0, 0.06);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.hp-reward-card:hover {
    border-color: rgba(127, 255, 0, 0.15);
}

.hp-reward-card.cant-afford {
    opacity: 0.55;
}

.hp-reward-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hp-reward-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
}

.hp-reward-icon {
    font-size: 1.3rem;
}

.hp-reward-desc {
    font-size: 0.72rem;
    color: #8892A6;
    line-height: 1.4;
}

.hp-reward-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(127, 255, 0, 0.05);
}

.hp-reward-cost {
    font-size: 0.82rem;
    font-weight: 700;
    color: #7FFF00;
}

.hp-reward-level {
    font-size: 0.65rem;
    color: #8892A6;
}

.hp-reward-btn {
    padding: 0.3rem 0.7rem;
    font-size: 0.7rem;
    font-weight: 600;
    background: linear-gradient(135deg, #7FFF00, #5FCC00);
    color: #0F2A2A;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hp-reward-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(127, 255, 0, 0.3);
}

.hp-reward-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* How it works info box */
.hp-info-box {
    padding: 1.5rem 1.75rem;
    background: rgba(10, 26, 26, 0.45);
    border-radius: 14px;
    border: 1px solid rgba(127, 255, 0, 0.06);
}

.hp-info-title {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hp-info-text {
    font-size: 0.82rem;
    color: #8892A6;
    line-height: 1.7;
    margin-bottom: 0.5rem;
}

.hp-info-list {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 0;
}

.hp-info-list li {
    padding: 0.4rem 0;
    font-size: 0.8rem;
    color: #C0C0C0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.hp-info-list li:last-child {
    border-bottom: none;
}

.hp-info-list li .check {
    color: #7FFF00;
    font-weight: 700;
}

/* Loading skeleton */
.hp-skeleton {
    background: linear-gradient(90deg, rgba(127, 255, 0, 0.03) 25%, rgba(127, 255, 0, 0.06) 50%, rgba(127, 255, 0, 0.03) 75%);
    background-size: 200% 100%;
    animation: hpShimmer 1.5s infinite;
    border-radius: 8px;
}

@keyframes hpShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Leaderboard mini */
.hp-leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.hp-lb-row {
    display: grid;
    grid-template-columns: 30px 1fr auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: rgba(10, 26, 26, 0.4);
    border-radius: 10px;
    border: 1px solid transparent;
}

.hp-lb-row.me {
    border-color: rgba(127, 255, 0, 0.15);
    background: rgba(127, 255, 0, 0.04);
}

.hp-lb-rank {
    font-size: 0.85rem;
    font-weight: 700;
    color: #8892A6;
    text-align: center;
}

.hp-lb-row.me .hp-lb-rank {
    color: #7FFF00;
}

.hp-lb-name {
    font-size: 0.82rem;
    color: #fff;
    font-weight: 500;
}

.hp-lb-pts {
    font-size: 0.8rem;
    font-weight: 700;
    color: #7FFF00;
}

/* Two-column layout for bottom sections */
.hp-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .hp-profile-card {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 1.25rem;
    }
    .hp-profile-stats {
        justify-content: center;
    }
    .hp-profile-badges {
        justify-content: center;
    }
    .hp-profile-ring {
        align-self: center;
    }
    .hp-two-col {
        grid-template-columns: 1fr;
    }
    .hp-subrole-road {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
    .hp-challenges-grid {
        grid-template-columns: 1fr;
    }
    .hp-rewards-grid {
        grid-template-columns: 1fr;
    }
    .hp-action-row {
        grid-template-columns: auto 1fr auto;
    }
    .hp-action-cat {
        display: none;
    }
}

@media (max-width: 480px) {
    .hp-page-inner {
        padding: 1rem 0.75rem 3rem;
    }
    .hp-subrole-road {
        grid-template-columns: 1fr;
    }
}
