body {
  margin: 0;
  background-color: #EDE4DC;
  color: #e01b31;
  font-family: Arial, sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.toolbar {
  background-image: linear-gradient(
    to bottom,
    #EDE4DC 75%,
    rgba(237, 228, 220, 0) 100%
  );

  color: #fff5ee;
  padding: 1rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 69;
  box-sizing: border-box;
}

.toolbar-dex {
  background-color: #EDE4DC;
  color: #fff5ee;
  padding: 1rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 69;
  box-sizing: border-box;
}

.toolbar-side {
  width: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  z-index: 70;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background-color: #0F1C1A;
  transition: 0.3s;
}

@media (max-width: 1020px) {
  .hamburger {
    display: flex;
  }

  /* Hamburger Animation */
  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }
}

.toolbar-nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  margin-left: -50px;
  z-index: 1;
}

@media (max-width: 1020px) {
  .toolbar-nav {
    position: absolute;
    top: 100%;
    right: 0;
    flex-direction: column;
    gap: 0;
    margin-left: 0;
    padding: 0.9rem;
    min-width: 170px;
    min-height: 320px;

    background-image: url('half-hrt.png');
    background-size: cover;      /* Covers the entire area */
    background-position: center;
    background-repeat: no-repeat; /* Prevents tiling */

    visibility: hidden;
    opacity: 0;
    transform: translateX(100%);
    transform-origin: top right;
    transition: all 0.5s ease-in-out;
    pointer-events: none;
  }

  .toolbar-nav.active {
    visibility: visible;
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
  }
}

.toolbar-nav-main {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  z-index: 1;
}

.nav-link-main {
  color: #0F1C1A;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: color var(--transition), background-size 0.3s ease;

  /* White background filling 50% from bottom */
  background-image: linear-gradient(to top, rgba(255, 255, 255, 0.8) 50%, transparent 50%);
  background-size: 100% 100%;
  background-position: bottom;
  background-repeat: no-repeat;
  padding: 4px 8px;
  border-radius: 8px;
}

.nav-link-main:hover {
  background-size: 100% 200%;
  transform:scale(1.1);
  transition: transform 0.2s, background-size 0.3s ease;
}

.nav-link-main:focus {
  color: #8B0013;
}

.nav-link {
  color: #0F1C1A;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: color var(--transition), background-size 0.3s ease;

  /* White background filling 50% from bottom */
  background-image: linear-gradient(to top, rgba(255, 255, 255, 0.8) 50%, transparent 50%);
  background-size: 100% 100%;
  background-position: bottom;
  background-repeat: no-repeat;
  padding: 4px 8px;
  border-radius: 8px;
}

@media (max-width: 1020px) {
  .nav-link {
    display: block !important;
    text-align: center !important;
    padding: 8px !important;
    width: 100%;
    background-image: none;
    color: #EDE4DC;
    font-family: Optima, sans-serif;
  }

  .nav-link:hover {
    text-decoration: underline;
  }

  .toolbar-nav .nav-link:nth-child(1) {
    transform: translateX(-5px);
  }

  .toolbar-nav .nav-link:nth-child(2) {
    transform: translateX(-15px);
  }

  .toolbar-nav .nav-link:nth-child(3) {
    transform: translateX(-20px);
  }

  .toolbar-nav .nav-link:nth-child(4) {
    transform: translateX(-30px);
  }

  .toolbar-nav .nav-link:nth-child(5) {
    transform: translateX(0px);
  }

  .toolbar-nav .nav-link:nth-child(6) {
    transform: translateX(20px);
  }

  .toolbar-nav .nav-link:nth-child(7) {
    transform: translateX(45px);
  }
}

.nav-link:hover {
  background-size: 100% 200%;
  transform:scale(1.1);
  transition: transform 0.2s, background-size 0.3s ease;
}

.nav-link:focus {
  color: #8B0013;
}

.nav-link-else {
  color: var(--text-secondary);
  font-weight: 500;
}

.nav-link-ai {
  color: #e01b31;
  text-decoration: none;
}

.nav-link-ai:hover {
  text-decoration: underline;
}

html {
  scroll-behavior: smooth;
}

/* Optional: Adjust target sections to account for toolbar height */
:target {
  scroll-margin-top: 100px;
}

.logo {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid #e01b31;
  object-fit: cover;
  display: block;
}

.logo-link {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-tooltip-wrapper {
  position: relative;
  display: inline-block;
}

.main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding-top: calc(64px + 1rem);
}

.text {
  color: #0F1C1A;
  margin-left: 25px;
  margin-right: 25px;
}

.random-quote {
  max-width: 800px;
  margin: 1rem auto;
  padding: 2rem;
  text-align: center;
  font-size: 1.4rem;
  font-style: italic;
  color: #0F1C1A;
  line-height: 1.3;
  position: relative;
}

.random-quote::before,
.random-quote::after {
  content: '"';
  font-size: 4rem;
  color: #e01b31;
  opacity: 0.4;
  position: absolute;
  font-family: Georgia, serif;
}

.random-quote::before {
  top: -10px;
  left: 50px;
}

.random-quote::after {
  bottom: -50px;
  right: 50px;
}

.random-quote .author {
  display: block;
  margin-top: 1.5rem;
  font-style: normal;
  font-weight: bold;
  font-size: 1.1rem;
  color: #e01b31;
}

.heart-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1rem 0;
  text-align: center;
  max-width: 690px;
  margin-left: auto;
  margin-right: auto;
}

.heart-divider .line {
  flex: 5;
  height: 1px;
  background-color: #0F1C1A;
  margin: 0 2rem;
}

.heart-divider .hearts {
  flex: 1;
  font-size: 1.2rem;
  white-space: nowrap;
  color: #e01b31;
}

.ca-box {
  color: #0F1C1A;
  font-size: clamp(0.85rem, 2.2vw, 1.1rem);
  font-family: monospace;
  word-break: break-all;
  text-align: center;
  padding: 1rem 3rem 1rem 1rem; 
  margin: 1rem auto;
  max-width: 600px;
  border-radius: 21px;
  position: relative;
  display: inline-block;
  cursor: pointer;
  user-select: none; /* prevents text selection on click */
  transition: background-color 0.2s;
  
  border: 1px solid #e01b31;

  box-shadow: 
    0 4px 12px rgba(15, 28, 26, 0.1),     /* soft outer shadow */
    inset 0 0 15px rgba(224, 27, 49, 0.2); /* subtle inner red glow for depth */
}

.ca-box:hover {
  background-color: rgba(224, 27, 49, 0.2);
}

.copy-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: #e01b31;
  color: white;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 12px;
  font-size: 0.8rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none; /* only active when visible */
}

.ca-box:hover .copy-btn,
.ca-box:focus .copy-btn {
  opacity: 1;
  pointer-events: all;
}

@media (max-width: 560px) {
  .copy-btn {
    opacity: 1;
    pointer-events: all;
  }
}

.copied-feedback {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: #0F1C1A;
  color: white;
  padding: 0.4rem 0.8rem;
  border-radius: 12px;
  font-size: 0.8rem;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.copied-feedback.show {
  opacity: 1;
}

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

.platform-blocks {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 2rem;
}

.platform-block {
  width: 110px;
  background-color: transparent;
  border-radius: 8px;
  overflow: hidden;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: transform 0.2s, box-shadow 0.2s;
  display: inline-block;
}

.platform-block:hover {
  transform: scale(1.05);
}

.platform-block-past {
  width: 110px;
  background-color: transparent;
  border-radius: 8px;
  overflow: hidden;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: transform 0.2s, box-shadow 0.2s;
  display: inline-block;
  filter: grayscale(75%);
  transition: filter 0.5s ease;
}

.platform-block-past:hover {
  transform: scale(1.05);
  filter: none;
}

@media (max-width: 1370px) {
  .platform-block-past {
    filter: none;
  }
}

.platform-title {
  font-size: 0.9rem;
  font-weight: bold;
  padding-bottom: 6px;
  color: #0F1C1A;
}

.platform-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.text-box-container {
  width: 700px;
  margin: 3rem auto;
  padding: 2rem;
  background-color: rgba(224, 27, 49, 0.08);
  border: 2px solid #e01b31;
  border-radius: 21px;
  box-shadow: 0 8px 25px rgba(15, 28, 26, 0.1);
  font-size: 1.1rem;
  line-height: 1.7;
  color: #0F1C1A;
}

@media (max-width: 835px) {
  .text-box-container {
    width: 90%;
    margin: none;
    padding: 1rem;
  }
}

.text-box-container p {
  margin: 0 0 1.2rem 0;
  padding: 1rem 1rem;
  background-color: #E8E0D6;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(15, 28, 26, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.text-box-container p:last-child {
  margin-bottom: 0;
}

.text-box-container p:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(15, 28, 26, 0.12);
}

.ai-box-container {
  width: 700px;
  margin: 3rem auto;
  padding: 2rem;
  word-break: break-all;
  background-color: rgba(224, 27, 49, 0.08);
  border: 2px solid #e01b31;
  border-radius: 21px;
  box-shadow: 0 8px 25px rgba(15, 28, 26, 0.1);
  font-size: 1.1rem;
  line-height: 1.7;
  color: #0F1C1A;
  text-align: left;
}

@media (max-width: 835px) {
  .ai-box-container {
    width: 90%;
    margin: none;
    padding: 1rem;
  }
}

.ai-box-container p {
  margin: 0 0 1.2rem 0;
  padding: 1.2rem 1.5rem;
  background-color: #E8E0D6;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(15, 28, 26, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ai-box-container p:last-child {
  margin-bottom: 0;
}

.ai-box-container p:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(15, 28, 26, 0.12);
}

.pie-container {
  max-width: 700px;
  background-color: rgba(224, 27, 49, 0.08);
  border: 2px solid #e01b31;
  border-radius: 21px;
  box-shadow: 0 8px 25px rgba(15, 28, 26, 0.1);
  color: #0F1C1A;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.pie-chart {
  width: 220px;
  height: 220px;
  position: relative;
}

.pie {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg); /* start from top */
}

.pie .segment {
  fill: none;
  stroke-width: 20;
}

.segment-1 {
  stroke: #e01b31;
  stroke-dasharray: 227.39 251.33;  /* 90,4762% of circumference */
  stroke-dashoffset: 0;
  animation: pie1 1.5s ease-out forwards;
}

.segment-2 {
  stroke: #0F1C1A;
  stroke-dasharray: 11.97 251.33;  /* 4,7619% of circumference */
  stroke-dashoffset: -227.39;
  animation: pie2 1.5s ease-out forwards;
}

.segment-3 {
  stroke: #8B0013;
  stroke-dasharray: 11.97 251.33;  /* 4,7619% */
  stroke-dashoffset: -239.36;
  animation: pie3 1.5s ease-out forwards;
}

/* Animation keyframes */
@keyframes pie1 { from { stroke-dasharray: 0 251.33; } }
@keyframes pie2 { from { stroke-dasharray: 0 251.33; } }
@keyframes pie3 { from { stroke-dasharray: 0 251.33; } }

/* Legend */
.pie-legend {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  width: 100%;
  max-width: 400px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 1.2rem;
  background-color: #E8E0D6;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(15, 28, 26, 0.06);
}

.legend-color {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex-shrink: 0;
}

.color-1 { background-color: #e01b31; }
.color-2 { background-color: #0F1C1A; }
.color-3 { background-color: #8B0013; }

.legend-text {
  font-size: 1.1rem;
  font-weight: 500;
  white-space: nowrap;
  text-align: left;
}

/* Responsive */
@media (min-width: 835px) {
  .pie-container {
    max-width: 90%;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 4rem;
  }
  
  .pie-legend {
    width: auto;
    width: 90%;
  } 
}

.dropdown {
  position: relative;
  display: inline-block;
  margin-bottom: 2rem;
}

.dropdown-toggle {
  cursor: pointer;
  padding: 10px 16px;
  background: #e01b31;
  color: white;
  border-radius: 6px;
}

.dropdown-content {
  display: none;
  position: center;
  background: white;
  min-width: 500px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  z-index: 1000;
  border-radius: 8px;
  overflow: hidden;
  top: 100%;            /* starts right at the bottom of the parent (.dropdown) */
  margin-top: 20px;
}

@media (max-width: 835px) {
  .dropdown-content {
    min-width: 380px;
  }
}

.dropdown:hover .dropdown-content,
.dropdown:focus-within .dropdown-content {
  display: block;
}

.image-fl {
    position: relative;
    height: 80px;
    margin: auto;
}

.round-image-fl {
  width: 65px;
  height: 65px;
  border-radius: 50%;
  border: 2px solid black;
  position: absolute;
  object-fit: cover;
}

.image-front-fl {
    left: 37px;  /* Overlaps by 33%*/
    z-index: 2;
}

.image-back-fl {
    left: 0;
    z-index: 1;
}

/* Fear and Greed Index */
.fear-greed-container {
  max-width: 700px;
  margin: 3rem auto;
  padding: 2rem;
  background-color: #EDE4DC;
  border: 2px solid #e01b31;
  border-radius: 21px;
  box-shadow: 0 8px 25px rgba(15, 28, 26, 0.1);
  text-align: center;
  color: #0F1C1A;
}

@media (max-width: 835px) {
  .fear-greed-container {
    width: 90%;
    margin: none;
    padding: 1rem;
  }
}

@media (max-width: 570px) {
  .fear-greed-container {
    width: 80%;
    margin: none;
    padding: 1rem;
  }
}

.fg-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 1.5rem;
  color: #e01b31; /* #E91E63 more pink*/
}

/* Gauge Container */
.fg-gauge {
  position: relative;
  width: 100%;
  height: 20px;
  background: linear-gradient(
    to right,
    #FF0000 0%,      /* Extreme Fear */
    #FF8C00 25%,     /* Fear */
    #FFFF00 50%,     /* Neutral */
    #9ACD32 75%,     /* Greed */
    #008000 100%     /* Extreme Greed */
  );
  border-radius: 10px;
  margin: 2rem 0;
  position: relative;
}

.fg-needle {
  position: absolute;
  top: -5px;
  width: 4px;
  height: 30px;
  background-color: #0F1C1A;
  border-radius: 2px;
  left: 0%;
  transition: left 1s ease-in-out;
  transform: translateX(-50%);
}

/* Gauge Labels */
.fg-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  transform: translateY(0.187rem);
}

.fg-label {
  color: #0F1C1A;
}

.fg-current {
  margin: 1.5rem 0;
}

.fg-value {
  display: block;
  font-size: 3rem;
  font-weight: bold;
  color: #e01b31;
  animation: pulse 2s infinite;
}

.fg-classification {
  display: block;
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  display: inline-block;
}

.fg-classification.extreme-fear {
  background-color: #FF0000;
  color: white;
}

.fg-classification.fear {
  background-color: #FF8C00;
  color: white;
}

.fg-classification.neutral {
  background-color: #FFFF00;
  color: #0F1C1A;
}

.fg-classification.greed {
  background-color: #9ACD32;
  color: white;
}

.fg-classification.extreme-greed {
  background-color: #008000;
  color: white;
}

.fg-description {
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 1.5rem 0;
  padding: 1rem;
  background-color: rgba(15, 28, 26, 0.05);
  border-radius: 12px;
  white-space: pre-line;
}

.fg-updated {
  font-size: 0.75rem;
  color: #0F1C1A;
  opacity: 0.7;
  margin-top: 1rem;
}

@media (max-width: 560px) {
  .fear-greed-container {
    margin: 1rem;
    padding: 1.5rem;
  }
  
  .fg-value {
    font-size: 2.5rem;
  }
  
  .fg-labels {
    font-size: 0.65rem;
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.dex {
  width: 100%;
  height: 100vh;
  min-height: 100vh;
  padding-bottom: 2rem;
}

.zoom-frame {
  width: 111.11%;
  height: 111.11%;
  transform: scale(0.9);
  transform-origin: top left;
  border: none;
}

.banner-container {
  width: 100%;
  background-color: #8B0013;
  padding: 8px 0;
  margin: 10px 0 0 0;
  overflow: hidden;
  padding-top: calc(64px + 1rem);
}

.banner-content {
  background-color: #EDE4DC;
  color: #0F1C1A;
  padding: 15px 30px;
  margin: 0 8px;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  border-radius: 15px;
}

.sliding-text {
  display: inline-block;
  animation: slide-left 5040s linear infinite;
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 1px;
}

@keyframes slide-left {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(-100%);
  }
}

.banner-content:hover .sliding-text {
  animation-play-state: paused;
}

.footer {
  background-color: #EDE4DC;
  padding: 0rem;
  text-align: center;
  font-size: 0.9rem;
  z-index: 69;

  background-image:
  /* Horizontal line */
  linear-gradient(to bottom,
    transparent 0%,
    transparent calc(50% - 10px),
    #e01b31 calc(50% - 10px),
    #e01b31 calc(50% + 10px),
    #EDE4DC calc(50% + 10px),
    #EDE4DC 100%
  );

  background-size:
    100% 100%;           /* horizontal line */

  background-position: center center;
  background-repeat: no-repeat;
  }

.social-links a {
  color:inherit;
  font-size:24px;
  text-decoration:none;
  display:inline-block;
  width:48px;
  height:40px;
  border-radius:50%;
  background-color:var(--content-color);
  margin-bottom: 2rem;
  transition:transform .3s,background-color .3s
}

.social-links a:hover {
  transform:scale(1.1);
  background-color:var(--button-hover)
}

.copyright {
  margin-bottom: 0.75rem;
  z-index: 80;
}