/* ========================================
   Index Page Styles
   ======================================== */

/* Banner Carousel */
.banner {
  margin-top: 64px;
  width: 100%;
  height: 577px;
  position: relative;
  overflow: hidden;
}

.banner-carousel {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.5s ease-in-out;
}

.banner-slide {
  min-width: 100%;
  height: 100%;
}

.banner-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-dots {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.banner-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: none;
  cursor: pointer;
  transition: all 0.3s;
}

.banner-dot:hover {
  background: rgba(255, 255, 255, 0.8);
}

.banner-dot.active {
  background: white;
  width: 30px;
  border-radius: 5px;
}

.banner-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #333;
  transition: all 0.3s;
  z-index: 10;
  opacity: 0;
}

.banner:hover .banner-arrow {
  opacity: 1;
}

.banner-arrow:hover {
  background: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.banner-arrow.prev {
  left: 40px;
}

.banner-arrow.next {
  right: 40px;
}

/* Crypto Ticker */
.crypto-ticker {
  background: var(--primary-color);
  height: 36px;
  overflow: hidden;
  white-space: nowrap;
}

.ticker-content {
  display: inline-flex;
  animation: ticker 30s linear infinite;
}

.ticker-item {
  padding: 0 30px;
  font-size: 14px;
  font-weight: 500;
  color: white;
  line-height: 36px;
}

.ticker-item .positive {
  color: #22d3bb;
}

.ticker-item .negative {
  color: #ff6b6b;
}

@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Main Content */
.main-content {
  width: 1360px;
  margin: 0 auto;
  padding: 60px 0;
  padding-bottom: 120px;
}

@media (max-width: 1400px) {
  .main-content {
    width: 100%;
    padding: 60px 40px;
  }
}

/* Section Title */
.section-title {
  font-size: 32px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 30px;
}

.section-title .dot {
  color: var(--primary-color);
}

/* ========================================
   Platform Advantages
   ======================================== */
.advantages-section {
  margin-bottom: 80px;
}

.advantages-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.advantage-card {
  background: white;
  border: 1px solid var(--border-gray);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}

.advantage-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.advantage-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.advantage-icon img {
  width: 64px;
  object-fit: contain;
}

.advantage-title {
  font-size: 20px;
  font-weight: 500;
  color: var(--text-dark);
  line-height: 28px;
  margin-bottom: 16px;
}

.advantage-desc {
  font-size: 14px;
  color: var(--text-gray);
  line-height: 20px;
}

/* ========================================
   Hot Markets
   ======================================== */
.markets-section {
  margin-bottom: 80px;
}

.markets-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.markets-loading,
.markets-error {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-gray);
  font-size: 16px;
}

.market-card {
  background: white;
  border: 1px solid var(--border-gray);
  border-radius: 16px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  height: 220px;
  box-shadow: 0 0 12px rgba(18, 83, 212, 0.08);
  transition: transform 0.3s, box-shadow 0.3s;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.market-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(18, 83, 212, 0.12);
}

.market-header {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.market-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.market-title {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.market-body {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 12px;
}

.market-body::-webkit-scrollbar {
  width: 4px;
}

.market-body::-webkit-scrollbar-track {
  background: transparent;
}

.market-body::-webkit-scrollbar-thumb {
  background: var(--border-gray);
  border-radius: 2px;
}

.option-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.option-row:last-child {
  border-bottom: none;
}

.option-name {
  font-size: 14px;
  color: var(--text-secondary);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: 12px;
}

.option-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.option-percent {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
  min-width: 40px;
  text-align: right;
}

.option-btn {
  background: var(--green-bg);
  color: var(--green-text);
  padding: 6px 16px;
  border-radius: 12px;
  font-size: 14px;
  cursor: pointer;
  transition: opacity 0.3s;
}

.option-btn:hover {
  opacity: 0.8;
}

.market-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--bg-gray);
  font-size: 14px;
  color: var(--text-gray);
}

.market-footer img {
  width: 16px;
  height: 16px;
  opacity: 0.6;
}

.market-footer .divider {
  width: 1px;
  height: 12px;
  background: var(--border-gray);
}

/* ========================================
   News Section
   ======================================== */
.news-section {
  margin-bottom: 80px;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.news-card {
  background: rgba(255, 255, 255, 0.6);
  border: 0.5px solid rgba(229, 231, 235, 0.5);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  text-decoration: none;
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.news-image {
  width: 100%;
  height: 185px;
  object-fit: cover;
  display: block;
}

.news-content {
  padding: 24px;
  padding-bottom: 10px;
}

.news-title {
  font-size: 18px;
  font-weight: 500;
  color: #101828;
  line-height: 27px;
  height: 54px;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-desc {
  font-size: 14px;
  color: #4a5565;
  line-height: 20px;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 40px;
}

.news-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 0.5px solid rgba(229, 231, 235, 0.5);
}

.news-date {
  font-size: 14px;
  color: #6a7282;
}

.news-more {
  font-size: 14px;
  font-weight: 500;
  color: var(--primary-color);
  text-decoration: none;
}

.news-more:hover {
  text-decoration: underline;
}

/* CTA Section */
.cta-section {
  margin-top: 60px;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.06);
  background: var(--primary-color);
}

.cta-bg {
  position: absolute;
  inset: 0;
}

.cta-bg img {
  width: 110%;
  height: 110%;
  position: relative;
  left: -4px;
  object-fit: cover;
}

.cta-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 40px;
}

.cta-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cta-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.cta-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cta-title {
  font-size: 24px;
  font-weight: 600;
  color: white;
  white-space: nowrap;
}

.cta-desc {
  font-size: 14px;
  color: #e0e1e6;
  letter-spacing: 2px;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px 10px 12px;
  background: white;
  border-radius: 12px;
  font-size: 14px;
  color: #1e1f24;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s;
}

.cta-btn:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1200px) {
  .advantages-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .markets-grid,
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  /* ===== Mobile Banner ===== */
  .banner {
    margin-top: 96px;
    height: 193px;
  }
  
  .banner-slide {
    position: relative;
  }
  
  .banner-dots {
    bottom: 16px;
  }
  
  .banner-dot {
    width: 8px;
    height: 8px;
  }
  
  .banner-dot.active {
    width: 24px;
  }
  
  .banner-arrow {
    display: none;
  }
  
  /* ===== Mobile Crypto Ticker ===== */
  .crypto-ticker {
    height: 30px;
  }
  
  .ticker-item {
    padding: 0 20px;
    font-size: 12px;
    line-height: 30px;
  }
  
  /* ===== Mobile Main Content ===== */
  .main-content {
    width: 100%;
    padding: 30px 16px;
    padding-bottom: 0;
  }
  
  /* ===== Mobile Section Title ===== */
  .section-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
  }
  
  /* ===== Mobile Platform Advantages ===== */
  .advantages-section {
    margin-bottom: 30px;
  }
  
  .advantages-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  
  .advantage-card {
    min-height: 200px;
    padding: 20px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
  }
  
  .advantage-icon {
    width: 64px;
    height: 64px;
    margin: 0;
    flex-shrink: 0;
  }
  
  .advantage-icon img {
    width: 64px;
    height: 64px;
  }
  
  .advantage-title {
    font-size: 16px;
    font-weight: 500;
    color: black;
    line-height: 28px;
    margin-bottom: 0;
  }
  
  .advantage-desc {
    font-size: 14px;
    color: #8b8d98;
    line-height: 20px;
    text-align: center;
  }
  
  /* ===== Mobile Hot Markets ===== */
  .markets-section {
    margin-bottom: 30px;
  }
  
  .markets-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .market-card {
    height: 220px;
    padding: 12px;
    border-radius: 16px;
  }
  
  .market-header {
    gap: 8px;
    margin-bottom: 12px;
  }
  
  .market-icon {
    width: 40px;
    height: 40px;
  }
  
  .market-title {
    font-size: 14px;
  }
  
  .option-row {
    padding: 6px 0;
  }
  
  .option-name {
    font-size: 14px;
  }
  
  .option-right {
    gap: 16px;
  }
  
  .option-percent {
    font-size: 16px;
    min-width: 36px;
  }
  
  .option-btn {
    padding: 8px 20px;
    border-radius: 12px;
    font-size: 14px;
    min-width: 64px;
    text-align: center;
  }
  
  .market-footer {
    gap: 4px;
    padding-top: 4px;
    font-size: 14px;
  }
  
  /* ===== Mobile News Section ===== */
  .news-section {
    margin-bottom: 30px;
  }
  
  .news-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .news-card {
    border-radius: 16px;
  }
  
  .news-image {
    height: 191px;
  }
  
  .news-content {
    padding: 8px 16px 16px;
  }
  
  .news-title {
    font-size: 16px;
    line-height: 24px;
    height: auto;
    margin-bottom: 8px;
    -webkit-line-clamp: 2;
  }
  
  .news-desc {
    font-size: 12px;
    line-height: 16px;
    height: auto;
    margin-bottom: 8px;
    -webkit-line-clamp: 3;
  }
  
  .news-footer {
    padding-top: 8px;
  }
  
  .news-date {
    font-size: 12px;
  }
  
  .news-more {
    font-size: 12px;
  }
  
  /* ===== Mobile CTA Section ===== */
  .cta-section {
    margin-top: 30px;
    border-radius: 0;
    margin-left: -16px;
    margin-right: -16px;
    width: calc(100% + 32px);
  }
  
  .cta-content {
    flex-direction: column;
    gap: 16px;
    padding: 20px 16px;
    text-align: center;
  }
  
  .cta-left {
    flex-direction: column;
    gap: 12px;
  }
  
  .cta-logo {
    width: 48px;
    height: 48px;
  }
  
  .cta-text {
    gap: 8px;
  }
  
  .cta-title {
    font-size: 16px;
    white-space: normal;
  }
  
  .cta-desc {
    font-size: 12px;
    letter-spacing: 1px;
  }
  
  .cta-btn {
    width: 100%;
    padding: 14px 20px;
    font-size: 14px;
    border-radius: 12px;
  }
}
