/* ===== GOOGLE FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&family=Roboto:wght@400;500&family=Source+Serif+4:wght@400;600&display=swap');

/* ===== DESIGN SYSTEM ===== */
:root {
  --bg-main: #020617;
  --bg-panel: #0f172a;
  --border: #1e293b;

  --text-main: #e2e8f0;
  --text-soft: #cbd5e1;
  --text-muted: #94a3b8;

  --accent: #3b82f6;

  --radius: 14px;
  --gap: 12px;
}

/* ===== GLOBAL ===== */
body {
  font-family: 'Roboto', Arial, sans-serif;
  margin: 0;
  background: var(--bg-main);
  color: var(--text-main);
}

.page {
  max-width: 1100px;
  margin: 0 auto;
}

/* ===== SPACING ===== */
.page > * {
  margin-bottom: var(--gap);
}

header,
.container,
.total-bar,
.charts,
.nav,
.info-text {
  padding-left: 12px;
  padding-right: 12px;
}

/* ===== HOMEPAGE HERO CARDS ===== */

.homepage {
  margin-top: 10px;
}

/* ===== HOMEPAGE GRID (2 PER ROW) ===== */
.homepage-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  margin-top: 20px;
}

/* mobile */
@media (max-width: 700px) {
  .homepage-grid {
    grid-template-columns: 1fr;
  }
}

/* card container */
.homepage-card {
  background: linear-gradient(180deg, #0f172a, #020617);
  border-radius: 28px;
  padding: 18px 20px;
  overflow: hidden;
  position: relative;

  display: flex;
  flex-direction: column;
  justify-content: flex-start;

  min-height: 300px;

  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.homepage-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 28px 70px rgba(0,0,0,0.75);
}


.homepage-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.card-days{
  font-family:'Source Serif 4', serif;
  margin-top:2px;
  font-size:12px;
  color:#94a3b8;
  font-weight:600;
  letter-spacing:1.8px;
  text-transform:uppercase;

  text-align:center;
}

/* ===== HEADER ===== */

  .homepage-header h4 {
  font-family:'Source Serif 4', serif;
  font-size:22px;
  font-weight:600;
  color:#94a3b8;
  text-align:center;
  letter-spacing:0.5px;
  margin-top:-2px;
  margin-bottom:0px;
  }


h3{
  font-family:'Source Serif 4', serif;
  font-size:18px;
  font-weight:600;
  color:#94a3b8;
  text-align:center;
  margin-top:10px;
  margin-bottom:24px;

  letter-spacing:0.5px;
}

.homepage-meta {
  font-family: "Roboto", sans-serif;
  font-size: 16px;          /* +36% bigger */
  font-weight: 600;
  text-align: center;
  color: #94a3b8;
}

/* ===== TREND CHECKER  ===== */

.trend-checker{
  max-width:700px;
  margin:70px auto;
  text-align:center;
}

.trend-checker h2{
  font-family:'Source Serif 4', serif;
  font-size:18px;
  margin-bottom:8px;
  letter-spacing:2px;
  color:#94a3b8;
}

.trend-checker-input{
  display:flex;
  gap:12px;
  justify-content:center;
  flex-wrap:wrap;
}

.trend-checker input{
  width:260px;
  padding:14px 18px;
  border-radius:14px;
  border:none;
  background:#0f1f3d;
  color:white;
  font-size:1rem;
  outline:none;
}

.trend-checker button{
  height:52px;
  padding:0 28px;

  border-radius:14px;

  border:1px solid rgba(255,255,255,0.08);

  background:#08152d;

  color:#dbe7ff;

  font-weight:600;
  font-size:1rem;

  cursor:pointer;

  transition:all 0.2s ease;
}

.trend-checker button:hover{
  border-color:#38bdf8;
  box-shadow:0 0 12px rgba(56,189,248,0.25);
  transform:translateY(-1px);
}

#trendResult{
  margin-top:30px;
  min-height:80px;
}

.trend-result-card{
  padding:22px;
  border-radius:18px;
  background:#0f1f3d;
}

.trend-yes{
  color:#22c55e;
}

.trend-no{
  color:#ef4444;
}

.trend-score{
  font-size:2rem;
  margin:10px 0;
}

.trend-notes{
  color:#94a3b8;
  margin-top:10px;
}

@media(max-width:768px){

  .trend-checker{
    margin:30px 15px;
    padding:25px;
  }

  .trend-checker h2{
    font-size:1.5rem;
  }

  .trend-checker input{
    width:100%;
  }

  .trend-checker button{
    width:100%;
  }

}
/* ===== TREND LIST SECTION ===== */

.new-entries-section{
  max-width:1200px;
  margin:70px auto;
  padding:0 20px;
}

.new-entries-section h2{
  text-align:center;
  margin-bottom:30px;
  font-size:2rem;
  color:#dbe7ff;
  letter-spacing:1px;
}

#newEntriesGrid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  gap:20px;
}

.new-entry-card{
  background:#08152d;
  border:1px solid rgba(255,255,255,0.08);
  border-radius:22px;
  padding:24px;
  transition:0.2s ease;
}

.new-entry-card:hover{
  transform:translateY(-4px);
  border-color:#38bdf8;
}

.new-entry-ticker{
  font-size:2rem;
  font-weight:700;
  color:white;
}

.new-entry-score{
  margin-top:12px;
  font-size:1.1rem;
  color:#38bdf8;
}

.new-entry-badge{
  display:inline-block;
  margin-top:18px;
  padding:6px 12px;
  border-radius:999px;
  background:#22c55e22;
  color:#22c55e;
  font-size:0.85rem;
  font-weight:700;
}


/* ===== TOP 10 ===== */
.top10-section{
  max-width:1200px;
  margin:80px auto;
  padding:0 20px;
}

.top10-section h2{
  text-align:center;
  margin-bottom:35px;
  font-size:2.2rem;
  color:#dbe7ff;
  letter-spacing:1px;
}

#top10Grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:24px;
}

.top10-card{
  background:#08152d;
  border:1px solid rgba(255,255,255,0.08);
  border-radius:24px;
  padding:24px;
  transition:0.25s ease;
  position:relative;
  overflow:hidden;
}

.top10-card:hover{
  transform:translateY(-5px);
  border-color:#38bdf8;
}

.top10-rank{
  position:absolute;
  top:16px;
  right:18px;
  font-size:0.9rem;
  color:#38bdf8;
  font-weight:700;
}

.top10-ticker{
  font-size:2rem;
  font-weight:700;
  color:white;
  margin-top:10px;
}

.top10-score{
  margin-top:14px;
  font-size:1.1rem;
  color:#38bdf8;
  font-weight:600;
}

.top10-bar{
  margin-top:18px;
  height:10px;
  background:rgba(255,255,255,0.08);
  border-radius:999px;
  overflow:hidden;
}

.top10-fill{
  height:100%;
  background:linear-gradient(90deg,#38bdf8,#2563eb);
  border-radius:999px;
}

/* ===== VALUE SECTION ===== */

.homepage-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0px; /* tighter spacing */
  margin: 0px 0 2px; /* reduced vertical space */
}

.homepage-value {
  font-family: "Source Serif 4", serif;
  font-size: 48px;
  font-weight: 600;
  color: #f1f5f9;
   margin-top: 0px;
}

.homepage-change {
  font-family: "Roboto", sans-serif;
  font-size: 20px;
  font-weight: 600;
  margin-top: 0px;
   margin-bottom: 0px;
}


.card-performance {
  display: flex;
  justify-content: center;
  gap: 16px;
  font-size: 20px;   /* match old % size */
  font-weight: 600;
  margin-top: 0px;
}

.positive { color: #22c55e; }
.negative { color: #ef4444; }

/* ===== CHART AREA ===== */

.homepage-chart {
  position: relative;
  height: 150px;
  margin-top: 2px;
  filter: brightness(1.15) saturate(1.1);
}

.homepage-chart canvas {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;

  /* subtle brightness boost */
  filter: brightness(1.1);
}



/* ===== CARD SHARE BUTTON ===== */

.card-share {
  position: absolute;
  top: 6px;
  right: 12px;
  z-index: 20;   /* 👈 ADD THIS */
}

.share-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;

  width: 34px;
  height: 34px;

  color: #cbd5f5;
  font-size: 16px;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  transition: all 0.2s ease;
}

.share-btn:hover {
  background: rgba(56,189,248,0.15);
  color: #38bdf8;
}

.homepage-card {
  position: relative;
}

/* ===== MOBILE TWEAK ===== */

@media (max-width: 768px) {
  .homepage-card {
    padding: 20px;
    min-height: 280px;
  }

  .homepage-value {
    font-size: 38px; 
    margin-top: -6px;
  }



  .homepage-meta {
    font-size: 15px;
  }
}

/* ===== NAVBAR ===== */

.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;

  background: var(--bg-main);
  border-bottom: 1px solid var(--border);

  backdrop-filter: blur(8px);
}



.dropdown {
  display: flex;
  align-items: center;
}




/* INNER LAYOUT */
.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 24px;

  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* LOGO */
.logo {
  font-family: 'Source Serif 4', serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-main);
}

/* NAV TABS (REPLACES OLD .tab SYSTEM) */
.nav-links {
  display: flex;
  align-items: center;   /* 👈 THIS is the key */
  gap: 12px;
}

/* TAB BUTTONS */

.nav-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  height: 40px;              /* consistent height */
  padding: 0 16px;           /* horizontal spacing */

  background: transparent;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;

  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;

  text-decoration: none;     /* 👈 important for <a> links */
  cursor: pointer;

  transition: all 0.2s ease;
}

.nav-tab.active {
  border-color: #38bdf8;
  color: #38bdf8;
  background: rgba(56,189,248,0.08);
  box-shadow: 0 0 0 1px rgba(56,189,248,0.3);
}

/* HOVER */
.nav-tab:hover {
  border-color: #38bdf8;
  color: #38bdf8;
  background: rgba(56,189,248,0.08);
  transform: translateY(-1px);
}

/* ACTIVE TAB */
.nav-tab {
  transition: all 0.2s ease;
}

/* ACTIVE STATE */
.nav-tab.active {
  border: 1px solid #38bdf8;
  color: #38bdf8;
  background: rgba(56,189,248,0.08);
  box-shadow: 0 0 0 1px rgba(56,189,248,0.3);
}

/* ===== TAB CONTENT CONTROL (KEEP THIS) ===== */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ===== DROPDOWN ===== */



.dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.dropdown-item {
  display: block;
  padding: 10px 14px;
  color: #cbd5e1;
  text-decoration: none;
}

.dropdown-item:hover {
  background: rgba(56,189,248,0.1);
  color: #38bdf8;
}

/* ===== DROPDOWN WRAPPER ===== */
.dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

/* ===== DROPDOWN MENU ===== */
.dropdown-menu {
  position: absolute;
  top: calc(100% - 2px);   /* 👈 removes hover gap */
  left: 0;

  min-width: 180px;
  padding: 6px;

  background: #0f172a; /* match your dark theme */
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;

  box-shadow: 0 10px 25px rgba(0,0,0,0.4);

  display: none;
  flex-direction: column;
  gap: 4px;

  z-index: 1000;
}

/* ===== SHOW ON HOVER ===== */
.dropdown:hover .dropdown-menu {
  display: flex;
}

/* ===== DROPDOWN ITEMS ===== */
.dropdown-item {
  display: block;
  padding: 8px 12px;

  color: var(--text-muted);
  text-decoration: none;

  border-radius: 8px;
  font-size: 13px;

  transition: all 0.15s ease;
}

/* ===== HOVER STATE ===== */
.dropdown-item:hover {
  background: rgba(56,189,248,0.08);
  color: #38bdf8;
}
/* ===== HEADER ===== */
header {
  font-family: 'Source Serif 4', serif;
  background: var(--bg-panel);
  padding: 18px 0 14px;
  text-align: center;
  font-size: 32px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

h2 {
  font-family: 'Roboto', sans-serif;
  background: var(--bg-panel);

  font-size: 46px;              /* bigger text */
  font-weight: 600;
  letter-spacing: 14px;

  padding: 18px 0;              /* 👈 makes the box taller */
  line-height: 1.4;             /* 👈 FIXES squashing */
  margin-top: 0;

  text-align: center;
  color: #94a3b8;

  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}



/* ===== INFO TEXT ===== */
.info-text {
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  color: var(--text-soft);
  text-align: center;
  font-size: 15px;
  line-height: 1.6;
  color: #94a3b8;
}

.info-text p {
  margin: 6px 0;
}

/* ===== DISCLAIMER ===== */
.disclaimer {
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  font-size: 12px;
  color: #94a3b8;
  text-align: center;

  margin-top: 30px;
  padding: 0 16px;
  line-height: 1.5;

    grid-column:1 / -1;
  max-width: 900px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* ===== TABLE CARD ===== */
.container {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 20px;
  margin-bottom: 30px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
}

/* ===== TABLE ===== */
table {
  width: 100%;
  border-collapse: collapse;
  background: transparent;
  font-size: 13px;
}

th, td {
  padding: 6px 8px;
  border: none;
  text-align: center;
}

tbody tr {
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

thead tr {
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

th {
  position: sticky;
  top: 0;
  background: var(--bg-panel);
  font-weight: 600;
  font-size: 12px;
  z-index: 2;
}

td {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

tr:hover {
  background: #1e293b;
}

/* ===== ACQUIRED IN TABLE ===== */
.acquired{
  opacity:0.55;
  filter:saturate(0.7);
}

.acquired td{
  color:#94a3b8 !important;
}

/* ===== TOTAL GRID (NEW LAYOUT) ===== */
.total-grid {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: center;
  text-align: center;
}

.total-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.total-item.center #totalValue {
  font-family: 'Source Serif 4', serif;
  font-size: 40px;
  font-weight: 600;
  letter-spacing: 2px;
  margin-bottom: 8px
}




/* ===== CHARTS GRID ===== */
.charts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}
/* ===== SIDE % TYPOGRAPHY ===== */

#dailyChange,
#totalOverall {
  font-family: 'Source Serif 4', serif;
  font-size: 40px;
  font-weight: 600;
    margin-bottom: 8px;
}


/* ===== CHART CARDS (FIXED) ===== */
.chart-box {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  justify-content: flex-start;
  
  display: flex;
  flex-direction: column;

  height: 300px;
  padding: 22px;
    margin-top: 12px;

  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
}

/* ===== UNIVERSAL CHART TITLE (ALL CHARTS MATCH) ===== */
.chart-title {
  font-family: 'Source Serif 4', serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 2px;

  text-align: center;
  width: 100%;
  
}

/* ===== CANVAS FIX (PREVENT GROWTH BUG) ===== */
.chart-box canvas {
  width: 100% !important;
  display: block;
  margin: 0 auto;
}

/* 👇 ONLY shrink bar/line charts */
.chart-box:not(.pie-box) canvas {
  height: 90% !important;
}

.pie-box{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
}

.pie-box canvas{
  width:min(70vw,240px)!important;
  aspect-ratio:1 / 1;
  height:auto!important;
  margin-top:10px;
}

/* ===== PERFORMANCE ROW ===== */
.performance-row {
  display: grid;
  grid-template-columns: 1fr;
  margin-top: 12px;
  margin-bottom: 44px;
  padding-left: 12px;
  padding-right: 12px;
  
}

/* ===== PERFORMANCE BOX (inherits chart-box) ===== */
.performance-box {
  padding: 18px;
  height: 340px;   /* 👈 control height */
}

/* ===== PERFORMANCE TITLE ===== */
.performance-box .chart-title {
  margin-bottom: 3px;
}

/* ===== PERFORMANCE CANVAS ===== */
.performance-box canvas {
  flex: none;
  height: 320px !important;
}

@media (max-width: 768px) {

  .chart-box {
    height: 180px;   /* 👈 bring this back */
    margin-bottom: 12px;
  }

  .performance-box {
    height: 220px;
  }

  .chart-box canvas {
    width: 100% !important;
    height: 100% !important;
  }
}





/* ===== Daily CHANGE ===== */

#dailyChange,
#totalOverall {
  font-family: 'Source Serif 4', serif;
  font-size: 40px;
  font-weight: 600;
}


/* ===== HOMEPAGE DASHBOARD CARDS ===== */

.dashboard-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

/* Card container */
.dashboard-overview .card {
  background: linear-gradient(180deg, #0f172a, #020617);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);

  display: flex;
  flex-direction: column;
  gap: 10px;

  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Hover effect (nice polish) */
.dashboard-overview .card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
}

/* Title */
.dashboard-overview .card h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

/* Meta text */
.dashboard-overview .card .meta {
  font-size: 12px;
  opacity: 0.6;
}

/* Main value */
.dashboard-overview .card .value {
  font-size: 22px;
  font-weight: 600;
}

/* % change */
.dashboard-overview .card .change {
  font-size: 14px;
  font-weight: 500;
}

/* Mini chart */
.dashboard-overview .card canvas {
  height: 80px !important;
  width: 100% !important;
  display: block;
  margin-top: 10px;
}

/* ===== SITE UPDATE ===== */

.site-update {
    background: linear-gradient(180deg, #0f172a, #020617);
  border: 1px solid rgba(56,189,248,0.25);
  border-radius: 16px;

  padding: 12px 18px;
  margin: 16px auto 24px;

  width: fit-content;

  display: flex;
  gap: 10px;
  align-items: center;

  font-size: 14px;
  font-weight: 500;

  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.update-label {
  color: #38bdf8;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.update-text {
  color: #e2e8f0;
}


/* ===== TRADINGVIEW GRID ===== */
/* =========================
   TRADINGVIEW GRID
========================= */

.tv-section{
  width:100%;
  max-width:1100px;

  margin:28px auto 0;
}

.tv-grid{
  display:grid;

  grid-template-columns:repeat(3, 1fr);

  gap:30px;
}

.tv-card{
  width:100%;
height:180px;
  position:relative;

  background:linear-gradient(
    180deg,
    rgba(17,24,39,0.96) 0%,
    rgba(15,23,42,0.96) 100%
  );

  border:1px solid rgba(148,163,184,0.08);

  border-radius:14px;

  overflow:hidden;

  cursor:pointer;

  transition:0.25s ease;

  box-shadow:
    0 1px 0 rgba(255,255,255,0.03),
    0 10px 30px rgba(0,0,0,0.35);
}

.tv-mini{
  height:315px;

  position:relative;

  z-index:1;
}


/* =========================
   MODAL
========================= */

.tv-modal{
  display:none;

  position:fixed;

  inset:0;

  background:rgba(0,0,0,0.88);

  z-index:9999;

  justify-content:center;

  align-items:center;

  padding:40px;
}

.tv-modal-content{
  width:92%;

  max-width:1100px;

  height:85vh;

  background:#020617;

  border-radius:18px;

  overflow:hidden;

  position:relative;
}

#expandedChart{
  width:100%;
  height:100%;
}

#closeTv{
  position:absolute;

  top:14px;
  right:18px;

  color:white;

  font-size:28px;

  cursor:pointer;

  z-index:20;
}

/* TICKER LABEL */

.tv-ticker{
  position:absolute;

  top:10px;
  left:12px;

  z-index:99999;

  display:block;

  font-family:"Source Serif 4", serif;

  font-size:11px;

  font-weight:600;

  letter-spacing:1.4px;

  text-transform:uppercase;

  color:#ffffff;

  opacity:0.95;

  text-shadow:
    0 1px 4px rgba(0,0,0,0.95);

  pointer-events:none;
}

.acquired{
  opacity:0.45;
}

.tv-acquired{
  height:100%;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  text-align:center;
padding:0 24px;
  color:#94a3b8;
}

.acquired-title{
    font-family:"Source Serif 4", serif;
  font-size:12px;
  letter-spacing:3px;
  margin-bottom:4px;
  opacity:0.7;
}

.acquired-ticker{
    font-family:"Source Serif 4", serif;
  font-size:18px;
  font-weight:700;
  color:grey;
  margin-bottom:4px;
}

.acquired-text{
  font-size:13px;
  line-height:1.6;
  max-width:220px;
}
