/* Account home — custom market widgets (FMP), our own UI instead of TradingView embeds */

/* ---- Market Leaders ---- */
.ih-leaders {
    background: rgba(24, 24, 27, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 20px;
    margin-top: 24px;
}

.ih-leaders-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.ih-leaders-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.ih-leaders-tabs {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    padding: 4px;
    gap: 4px;
}

.ih-leaders-tab {
    border: 0;
    background: transparent;
    color: #9ca3af;
    font-size: 13px;
    font-weight: 500;
    padding: 7px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.ih-leaders-tab:hover { color: #e5e7eb; }

.ih-leaders-tab.active {
    background: rgba(99, 102, 241, 0.18);
    color: #fff;
}

.ih-leaders-panel { display: none; }
.ih-leaders-panel.active { display: block; }

.ih-leaders-row {
    display: grid;
    grid-template-columns: 36px 1fr auto auto;
    align-items: center;
    gap: 12px;
    padding: 10px 8px;
    border-radius: 10px;
    transition: background 0.15s ease;
}

.ih-leaders-row:hover { background: rgba(255, 255, 255, 0.03); }
.ih-leaders-row + .ih-leaders-row { border-top: 1px solid rgba(255, 255, 255, 0.04); }

.ih-leaders-logo {
    position: relative;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
}

.ih-leaders-logo::after {
    content: attr(data-letter);
    font-size: 15px;
    font-weight: 700;
    color: #fff;
}

.ih-leaders-logo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
    padding: 3px;
}

.ih-leaders-name {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ih-leaders-symbol {
    font-weight: 600;
    color: #fff;
    font-size: 14px;
}

.ih-leaders-company {
    font-size: 12px;
    color: #9ca3af;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}

.ih-leaders-price {
    font-variant-numeric: tabular-nums;
    color: #e5e7eb;
    font-size: 14px;
}

.ih-leaders-change {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    font-size: 14px;
    min-width: 72px;
    text-align: right;
}

.ih-leaders-change.up { color: #22c55e; }
.ih-leaders-change.down { color: #ef4444; }

.ih-leaders-empty {
    color: #9ca3af;
    font-size: 14px;
    padding: 24px 8px;
    text-align: center;
}

@media (max-width: 640px) {
    .ih-leaders-company { max-width: 120px; }
    .ih-leaders-row { grid-template-columns: 32px 1fr auto; }
    .ih-leaders-price { display: none; }
    .ih-leaders-logo { width: 32px; height: 32px; }
}

/* ============================================================
   Neon floating background (matches the public landing page)
   ============================================================ */
.ih-home-fx {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.ih-home-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.35;
    animation: ih-orb-float 22s ease-in-out infinite;
}
.ih-home-orb.orb-1 { width: 480px; height: 480px; top: -120px; left: -80px;  background: #8b5cf6; }
.ih-home-orb.orb-2 { width: 420px; height: 420px; bottom: -140px; right: -60px; background: #06b6d4; animation-delay: -7s; }
.ih-home-orb.orb-3 { width: 360px; height: 360px; top: 38%; left: 55%; background: #10b981; opacity: 0.20; animation-delay: -14s; }

@keyframes ih-orb-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%  { transform: translate(40px, -30px) scale(1.08); }
    66%  { transform: translate(-30px, 25px) scale(0.95); }
}

.ih-home-particles span {
    position: absolute;
    bottom: -12px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(168, 85, 247, 0.55);
    animation: ih-home-float-up 20s infinite linear;
}
.ih-home-particles span:nth-child(1) { left: 8%;  animation-delay: -1s;  }
.ih-home-particles span:nth-child(2) { left: 22%; animation-delay: -5s;  background: rgba(6, 182, 212, 0.5); }
.ih-home-particles span:nth-child(3) { left: 38%; animation-delay: -9s;  }
.ih-home-particles span:nth-child(4) { left: 54%; animation-delay: -3s;  background: rgba(16, 185, 129, 0.5); }
.ih-home-particles span:nth-child(5) { left: 70%; animation-delay: -12s; background: rgba(236, 72, 153, 0.5); }
.ih-home-particles span:nth-child(6) { left: 86%; animation-delay: -7s;  }

@keyframes ih-home-float-up {
    0%   { transform: translateY(0) scale(0); opacity: 0; }
    10%  { opacity: 0.85; }
    90%  { opacity: 0.85; }
    100% { transform: translateY(-100vh) scale(1); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .ih-home-orb, .ih-home-particles span { animation: none; }
}

/* ============================================================
   Neon accents on home widgets
   ============================================================ */
.ih-app .ih-welcome h1 {
    background: linear-gradient(135deg, #8b5cf6, #06b6d4, #10b981);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ih-leaders-header h3,
.ih-app .ih-fear-greed h3 {
    background: linear-gradient(135deg, #c4b5fd, #67e8f9);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ih-leaders,
.ih-app .ih-fear-greed {
    background: rgba(24, 24, 27, 0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(168, 85, 247, 0.18);
    box-shadow: 0 0 30px rgba(168, 85, 247, 0.08);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ih-leaders:hover,
.ih-app .ih-fear-greed:hover {
    border-color: rgba(168, 85, 247, 0.32);
    box-shadow: 0 0 42px rgba(168, 85, 247, 0.15);
}

/* ============================================================
   Fear & Greed gauge — TradingView-style speedometer
   ============================================================ */
.ih-app .ih-gauge2 {
    position: relative;
    width: 100%;
    max-width: 440px;
    margin: 16px auto 6px;
    aspect-ratio: 320 / 205;
}

.ih-gauge2-svg {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 76%;
    height: auto;
    overflow: visible;
}

.ih-gauge2-track {
    fill: none;
    stroke: rgba(255, 255, 255, 0.07);
    stroke-width: 14;
    stroke-linecap: round;
}

.ih-gauge2-arc {
    fill: none;
    stroke-width: 14;
    stroke-linecap: round;
}

.ih-gauge2-needle {
    stroke: #f3f4f6;
    stroke-width: 4;
    stroke-linecap: round;
    filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.5));
}

.ih-gauge2-hub {
    fill: #f3f4f6;
}

.ih-gauge2-lbl {
    position: absolute;
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    white-space: nowrap;
    pointer-events: none;
}
.ih-gauge2-lbl.lbl-n { top: 16%; left: 50%; transform: translateX(-50%); }
.ih-gauge2-lbl.lbl-f { top: 66%; left: 0; }
.ih-gauge2-lbl.lbl-g { top: 66%; right: 0; }

@media (max-width: 640px) {
    .ih-gauge2-lbl { font-size: 10px; }
    .ih-gauge2-svg { width: 84%; }
}

/* ============================================================
   Market Indices cards (FMP) with sparklines
   ============================================================ */
.ih-indices {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 24px 0 28px;
}

/* spacing between major home sections */
.ih-app .ih-two-cols { margin: 28px 0; }
.ih-app .ih-welcome  { margin-bottom: 20px; }

.ih-index-id {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.ih-index-icon {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.ih-index-card {
    background: rgba(24, 24, 27, 0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(168, 85, 247, 0.14);
    border-radius: 14px;
    padding: 14px 16px;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.ih-index-card:hover {
    border-color: rgba(168, 85, 247, 0.30);
    box-shadow: 0 0 30px rgba(168, 85, 247, 0.12);
    transform: translateY(-2px);
}

.ih-index-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.ih-index-name {
    font-size: 13px;
    color: #9ca3af;
    font-weight: 500;
}

.ih-index-chg {
    font-size: 13px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.ih-index-chg.up { color: #22c55e; }
.ih-index-chg.down { color: #ef4444; }

.ih-index-price {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin: 6px 0 8px;
    font-variant-numeric: tabular-nums;
}

.ih-index-spark {
    display: block;
    width: 100%;
    height: 40px;
}

@media (max-width: 1024px) { .ih-indices { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .ih-indices { grid-template-columns: 1fr; } }
