/**
 * PinFi Horns System Styles
 * The Horn Belief Economy UI
 */

/* ==========================================
   ROOT VARIABLES
   ========================================== */

:root {
    --horns-gold: #fbbf24;
    --horns-gold-dark: #d97706;
    --horns-gold-glow: rgba(251, 191, 36, 0.6);
    --horns-red: #dc2626;
    --horns-green: #22c55e;
    --horns-purple: #8b5cf6;
    --horns-bg-dark: #09090b;
    --horns-bg-card: rgba(24, 24, 27, 0.95);
    --horns-border: rgba(63, 63, 70, 0.5);
}

/* ==========================================
   HORNS GLOW EFFECT
   ========================================== */

.pinfi-horns-glow {
    color: var(--horns-gold);
    text-shadow: 0 0 20px var(--horns-gold-glow);
}

/* ==========================================
   CURRENT OPPORTUNITIES BOX
   ========================================== */

#pinfi-current-opportunities {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, rgba(217, 119, 6, 0.05) 100%);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.pinfi-opps-title {
    font-family: 'Oswald', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--horns-gold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pinfi-opps-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pinfi-opp-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
}

.pinfi-opp-card:hover {
    background: rgba(0, 0, 0, 0.5);
    border-color: rgba(251, 191, 36, 0.3);
    transform: translateX(4px);
}

.pinfi-opp-avatar {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(135deg, #27272a 0%, #18181b 100%);
    flex-shrink: 0;
}

.pinfi-opp-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pinfi-opp-avatar-letter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-family: 'Oswald', sans-serif;
    font-size: 20px;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.6);
}

.pinfi-opp-new-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--horns-gold);
    color: #000;
    font-size: 8px;
    font-weight: bold;
    padding: 2px 4px;
    border-radius: 4px;
    text-transform: uppercase;
}

.pinfi-opp-info {
    flex: 1;
    min-width: 0;
}

.pinfi-opp-name {
    font-family: 'Oswald', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pinfi-opp-genre {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    margin: 0 0 4px 0;
}

.pinfi-opp-spots {
    font-size: 10px;
    color: var(--horns-green);
    font-weight: 500;
}

.pinfi-opp-closed {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
}

.pinfi-opp-follow-btn {
    background: linear-gradient(135deg, var(--horns-gold) 0%, var(--horns-gold-dark) 100%);
    color: #000;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-family: 'Oswald', sans-serif;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.pinfi-opp-follow-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px var(--horns-gold-glow);
}

.pinfi-opp-follow-btn.followed {
    background: rgba(255, 255, 255, 0.1);
    color: var(--horns-green);
}

.pinfi-opps-empty {
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.5);
}

.pinfi-opps-empty-icon {
    font-size: 24px;
    display: block;
    margin-bottom: 8px;
}

/* ==========================================
   CRYPTO-STYLE CHART
   ========================================== */

#pinfi-chart-container {
    background: linear-gradient(135deg, rgba(24, 24, 27, 0.95) 0%, rgba(15, 15, 18, 0.95) 100%);
    border: 1px solid var(--horns-border);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    overflow: hidden;
}

.pinfi-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.pinfi-chart-band {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pinfi-chart-avatar {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--horns-gold) 0%, var(--horns-gold-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--horns-gold);
    box-shadow: 0 0 20px var(--horns-gold-glow);
}

.pinfi-chart-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pinfi-chart-avatar span {
    font-family: 'Oswald', sans-serif;
    font-size: 24px;
    font-weight: bold;
    color: #000;
}

.pinfi-chart-band-name {
    font-family: 'Oswald', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.pinfi-chart-band-genre {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin: 4px 0 0 0;
}

.pinfi-chart-score {
    text-align: right;
}

.pinfi-chart-value {
    font-family: 'Oswald', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--horns-gold);
    text-shadow: 0 0 20px var(--horns-gold-glow);
    display: block;
}

.pinfi-chart-change {
    font-size: 14px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
}

.pinfi-chart-change.positive {
    color: var(--horns-green);
    background: rgba(34, 197, 94, 0.15);
}

.pinfi-chart-change.negative {
    color: var(--horns-red);
    background: rgba(220, 38, 38, 0.15);
}

.pinfi-chart-svg-container {
    margin: 0 -20px;
    height: 200px;
}

.pinfi-chart-svg-container svg {
    display: block;
}

.pinfi-chart-line {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawChart 2s ease-out forwards;
}

@keyframes drawChart {
    to { stroke-dashoffset: 0; }
}

.pinfi-chart-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--horns-border);
}

.pinfi-chart-stat {
    text-align: center;
}

.pinfi-chart-stat-value {
    font-family: 'Oswald', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    display: block;
}

.pinfi-chart-stat-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pinfi-chart-empty {
    padding: 40px;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
}

/* ==========================================
   TOP 5 BANDS LIST
   ========================================== */

#pinfi-top-bands-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.pinfi-top-band {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--horns-bg-card);
    border: 1px solid var(--horns-border);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.pinfi-top-band:hover {
    background: rgba(30, 30, 35, 0.95);
    transform: translateX(4px);
}

.pinfi-top-band.gold {
    border-color: rgba(251, 191, 36, 0.4);
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, rgba(24, 24, 27, 0.95) 100%);
}

.pinfi-top-band.silver {
    border-color: rgba(192, 192, 192, 0.3);
}

.pinfi-top-band.bronze {
    border-color: rgba(205, 127, 50, 0.3);
}

.pinfi-top-rank {
    font-size: 18px;
    width: 32px;
    text-align: center;
    flex-shrink: 0;
}

.pinfi-top-avatar {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    overflow: hidden;
    background: #27272a;
    flex-shrink: 0;
}

.pinfi-top-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pinfi-top-avatar-letter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-family: 'Oswald', sans-serif;
    font-size: 18px;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.6);
}

.pinfi-top-info {
    flex: 1;
    min-width: 0;
}

.pinfi-top-name {
    font-family: 'Oswald', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 4px 0;
}

.pinfi-top-stats {
    display: flex;
    gap: 12px;
    font-size: 11px;
}

.pinfi-top-horns {
    color: var(--horns-gold);
    font-weight: 600;
}

.pinfi-top-believers {
    color: rgba(255, 255, 255, 0.5);
}

.pinfi-top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.pinfi-top-yours {
    font-size: 11px;
    color: var(--horns-purple);
    font-weight: 500;
}

.pinfi-allocate-btn {
    background: linear-gradient(135deg, var(--horns-gold) 0%, var(--horns-gold-dark) 100%);
    color: #000;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-family: 'Oswald', sans-serif;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pinfi-allocate-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px var(--horns-gold-glow);
}

.pinfi-top-empty {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.4);
}

.pinfi-top-empty-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 12px;
}

/* ==========================================
   HORNS SLIDER MODAL
   ========================================== */

#pinfi-horns-slider-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

#pinfi-horns-slider-modal.hidden {
    display: none;
}

.pinfi-slider-content {
    background: linear-gradient(135deg, #18181b 0%, #09090b 100%);
    border: 1px solid var(--horns-border);
    border-radius: 16px;
    padding: 24px;
    width: 100%;
    max-width: 400px;
    position: relative;
}

.pinfi-slider-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s;
}

.pinfi-slider-close:hover {
    color: #fff;
}

.pinfi-slider-header {
    text-align: center;
    margin-bottom: 24px;
}

.pinfi-slider-title {
    font-family: 'Oswald', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px 0;
}

.pinfi-slider-subtitle {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

.pinfi-slider-band {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

.pinfi-slider-band-name {
    font-family: 'Oswald', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--horns-gold);
}

.pinfi-slider-available {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

.pinfi-slider-available span {
    color: var(--horns-gold);
    font-weight: 600;
}

.pinfi-slider-control {
    margin-bottom: 24px;
}

.pinfi-slider-input {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    background: #27272a;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}

.pinfi-slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--horns-gold) 0%, var(--horns-gold-dark) 100%);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 15px var(--horns-gold-glow);
    border: 2px solid #fff;
}

.pinfi-slider-input::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--horns-gold) 0%, var(--horns-gold-dark) 100%);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 0 15px var(--horns-gold-glow);
}

.pinfi-slider-amount-display {
    text-align: center;
    margin-top: 16px;
}

.pinfi-slider-amount {
    font-family: 'Oswald', sans-serif;
    font-size: 48px;
    font-weight: 700;
    color: var(--horns-gold);
    text-shadow: 0 0 30px var(--horns-gold-glow);
}

.pinfi-slider-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.pinfi-slider-actions {
    display: flex;
    gap: 12px;
}

.pinfi-slider-confirm {
    flex: 1;
    background: linear-gradient(135deg, var(--horns-gold) 0%, var(--horns-gold-dark) 100%);
    color: #000;
    border: none;
    padding: 14px 20px;
    border-radius: 8px;
    font-family: 'Oswald', sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pinfi-slider-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--horns-gold-glow);
}

.pinfi-slider-cancel {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--horns-border);
    padding: 14px 20px;
    border-radius: 8px;
    font-family: 'Oswald', sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pinfi-slider-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* ==========================================
   SCOUTING BADGES
   ========================================== */

#pinfi-scouting-badges {
    background: var(--horns-bg-card);
    border: 1px solid var(--horns-border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.pinfi-scouting-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.pinfi-scouting-header h4 {
    font-family: 'Oswald', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.pinfi-scouting-xp {
    font-size: 12px;
    color: var(--horns-purple);
    font-weight: 600;
}

.pinfi-badges-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pinfi-scouting-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15) 0%, rgba(217, 119, 6, 0.1) 100%);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 6px;
}

.pinfi-badge-icon {
    font-size: 14px;
}

.pinfi-badge-name {
    font-size: 12px;
    color: #fff;
    font-weight: 500;
}

.pinfi-badge-rank {
    font-size: 10px;
    color: var(--horns-gold);
    font-weight: 700;
}

.pinfi-badges-empty {
    padding: 16px;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
}

/* ==========================================
   BAND PROFILE PINFI STATS
   ========================================== */

.pinfi-band-profile-stats {
    background: var(--horns-bg-card);
    border: 1px solid var(--horns-border);
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
}

.pinfi-band-profile-title {
    font-family: 'Oswald', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--horns-gold);
    margin: 0 0 12px 0;
}

.pinfi-band-profile-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.pinfi-band-profile-stat {
    text-align: center;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

.pinfi-band-stat-value {
    font-family: 'Oswald', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    display: block;
}

.pinfi-band-stat-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
}

.pinfi-genesis-badge {
    margin-top: 12px;
    padding: 8px 12px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2) 0%, rgba(217, 119, 6, 0.1) 100%);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 6px;
    font-size: 12px;
    color: var(--horns-gold);
    text-align: center;
}

/* ==========================================
   HORNS STATUS BAR (Header)
   ========================================== */

.pinfi-horns-status-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    border: 1px solid rgba(251, 191, 36, 0.2);
}

.pinfi-horns-icon {
    font-size: 20px;
}

.pinfi-horns-count {
    display: flex;
    flex-direction: column;
}

.pinfi-horns-count-value {
    font-family: 'Oswald', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--horns-gold);
    text-shadow: 0 0 10px var(--horns-gold-glow);
    line-height: 1;
}

.pinfi-horns-count-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
}

.pinfi-horns-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.pinfi-horns-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--horns-gold-dark) 0%, var(--horns-gold) 100%);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* ==========================================
   HOW SCOUTING WORKS (Info Section)
   ========================================== */

.pinfi-scouting-info {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(88, 28, 135, 0.05) 100%);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.pinfi-scouting-info-title {
    font-family: 'Oswald', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--horns-purple);
    margin: 0 0 12px 0;
}

.pinfi-scouting-steps {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pinfi-scouting-step {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.pinfi-step-number {
    width: 24px;
    height: 24px;
    background: var(--horns-purple);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.pinfi-step-content h5 {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 2px 0;
}

.pinfi-step-content p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

.pinfi-double-xp {
    margin-top: 12px;
    padding: 8px 12px;
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 6px;
    font-size: 12px;
    color: var(--horns-green);
    text-align: center;
}

/* ==========================================
   RESPONSIVE ADJUSTMENTS
   ========================================== */

@media (max-width: 640px) {
    .pinfi-chart-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .pinfi-slider-amount {
        font-size: 36px;
    }

    .pinfi-band-profile-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .pinfi-band-stat-value {
        font-size: 16px;
    }
}
