html, body {
  background: #000000;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  border: none;
}

body {
  font-family: 'Inter', sans-serif;
  color: white;
  text-align: center;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #000000;
  border: none;
  box-shadow: none;
}

/* Headings */
h1 {
  font-size: 2.8rem;
  letter-spacing: 0.15em;
  margin: 3rem 0 1rem;
  font-weight: 300;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.95);
  position: relative;
}
h1::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: #00bcd4;
  margin: 1.5rem auto;
  border-radius: 2px;
}
.subtitle {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 2rem;
  font-weight: 300;
}
h2 {
  font-size: 1.6rem;
  margin: 0.75rem 0;
  font-weight: 600;
  color: #00bcd4;
  width: 100%;
  text-align: center;
}
h3 {
  font-size: 1.2rem;
  margin: 0.25rem 0;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 300;
  width: 100%;
  text-align: center;
}

/* Containers */
#fallback-container, #train-container, #hidden-companies {
  background: #000000;
  border: none;
  box-shadow: none;
}

#fallback-container {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

/* Main layout container */
.main-container {
  width: 100%;
  position: relative;
  display: flex;
  justify-content: center;
}

/* Train container - perfect centering */
#train-container {
  display: none;
  width: 100%;
  max-width: 600px;
  position: relative;
  min-height: 500px;
  margin: 0 auto;
}

/* Company components */
.company-fallback, .company-train {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #000000;
  border: none;
  width: 100%;
  text-align: center;
}

.market-cap-circle {
  margin-bottom: 1rem;
  border-radius: 50%;
  border-width: 3px;
  border-style: solid;
  transition: all 0.4s;
  margin-left: auto;
  margin-right: auto;
}

.market-cap-circle:hover {
  transform: scale(1.03);
}

/* Explanations */
.explanation-desktop {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 250px;
  opacity: 0;
  transition: opacity 1s ease;
  z-index: 10;
}

.explanation-mobile {
  width: 100%;
  max-width: 500px;
  margin: 1rem auto;
  opacity: 0;
  transition: opacity 1s ease;
  display: none;
}

.explanation-content {
  background: rgba(0, 0, 0, 0.85);
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  text-align: left;
}

.explanation-desktop .explanation-content {
  border-left: 2px solid rgba(0, 188, 212, 0.5);
}

.explanation-mobile .explanation-content,
.company-train .explanation-content {
  border-top: 2px solid rgba(0, 188, 212, 0.5);
  margin-top: 20px;
  width: 100%;
  max-width: 90%;
  margin-left: auto;
  margin-right: auto;
}

.explanation h4 {
  color: #00bcd4;
  font-size: 1.2rem;
  margin-top: 0;
  margin-bottom: 1rem;
  font-weight: 500;
}

.explanation-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1rem;
  text-align: left;
  font-weight: 300;
}

.explanation-text:last-child {
  margin-bottom: 0;
}

/* Media queries */
@media (max-width: 1000px) {
  .explanation-desktop {
    left: 10px;
    width: 200px;
  }
}

@media (max-width: 900px) {
  /* Hide desktop explanation on smaller screens */
  .explanation-desktop {
    display: none;
  }
  
  h1 {
    margin-top: 1rem;
  }
  
  #train-container {
    min-height: 400px;
    padding-top: 20px;
  }
  
  body {
    padding: 1rem;
  }
  
  .subtitle {
    margin-bottom: 1rem;
  }
}

@media (max-width: 600px) {
  h1 {
    font-size: 1.8rem;
    margin-top: 0.5rem;
  }
  
  h2 {
    font-size: 1.4rem;
  }
  
  h3 {
    font-size: 1rem;
  }
  
  .company-train .explanation-content {
    padding: 1rem;
  }
  
  .company-train .explanation-text {
    font-size: 0.9rem;
  }
}