@tailwind base;
@tailwind components;
@tailwind utilities;

html,
body {
  font-size: 18px !important;
}

.ty-top {
  background: #ffffff;
  box-shadow: 0rem 0.13rem 0.25rem 0rem rgba(0, 0, 0, 0.06);
}

.now-img {
  cursor: pointer;
}

.search-width {
  width: 28.13rem;
  height: 2.63rem;
  background: #f8f9fa;
  border-radius: 1.32rem;
  border: 0.06rem solid #e6e6e6;
  margin-left: 2.83rem;
  display: flex !important;
  align-items: center;
  position: relative;
  transition: all 0.3s ease;
  overflow: hidden;
}

.search-width:hover {
  border-color: #ff7224;
  box-shadow: 0 0 0 3px rgba(255, 114, 36, 0.1);
}

.search-width:focus-within {
  background: #ffffff;
  border-color: #ff7224;
  box-shadow: 0 0 0 3px rgba(255, 114, 36, 0.15);
}

.search-icon-left {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 1rem;
  padding-right: 0.5rem;
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 0.9rem;
  color: #333;
  padding: 0 0.5rem;
}

.search-input::placeholder {
  color: #999;
  font-size: 0.85rem;
}

.searchdiv {
  width: 100%;
  position: absolute;
  left: 0px;
  top: 47px;
  z-index: 999;
  background: #fff;
  border: 0.06rem solid #e6e6e6;
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  margin-top: 0.25rem;
}

.searchdiv-gp {
  width: 100%;
}

.searchdiv-gp img {
  width: 1.2rem;
  height: 1.2rem;
  margin-right: 3px;
}

.gp-searchnr {
  width: 100%;
  display: flex;
  align-items: center;
  font-size: 0.8rem;
  margin-left: 0.5rem;
  margin-right: 0.5rem;
  height: 1.8rem;
  color: #ff7224;
}

.searchdiv-gp-Array {
  width: 100%;
}

.searchdiv-gp-Array div {
  width: 100%;
  height: 1.5rem;
  font-size: 0.8rem;
  color: #666666;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  cursor: pointer;
  line-height: 1.5rem;
  transition: all 0.2s ease;
  border-radius: 0.25rem;
  margin: 0.15rem 0.5rem;
  width: calc(100% - 1rem);
}

.searchdiv-gp-Array div:hover {
  background: rgba(255, 114, 36, 0.08);
  color: #ff7224;
  padding-left: 0.75rem;
}

.searchdiv-bk {
  width: 100%;
}

.searchdiv-bk img {
  width: 1.2rem;
  height: 1.2rem;
  margin-right: 3px;
}

.bk-searchnr {
  width: 100%;
  display: flex;
  align-items: center;
  font-size: 0.8rem;
  height: 1.8rem;
  margin-left: 0.5rem;
  margin-right: 0.5rem;
  color: #ff7224;
}

.searchdiv-bk-Array {
  width: 100%;
}

.searchdiv-bk-Array div {
  width: 100%;
  height: 1.5rem;
  font-size: 0.8rem;
  color: #666666;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  cursor: pointer;
  line-height: 1.5rem;
  transition: all 0.2s ease;
  border-radius: 0.25rem;
  margin: 0.15rem 0.5rem;
  width: calc(100% - 1rem);
}

.searchdiv-bk-Array div:hover {
  background: rgba(255, 114, 36, 0.08);
  color: #ff7224;
  padding-left: 0.75rem;
}

.searchdiv-yh {
  width: 100%;
}

.searchdiv-yh img {
  width: 1.2rem;
  height: 1.2rem;
  margin-right: 3px;
}

.yh-searchnr {
  width: 100%;
  display: flex;
  align-items: center;
  font-size: 0.8rem;
  height: 1.8rem;
  margin-left: 0.5rem;
  margin-right: 0.5rem;
  color: #ff7224;
}

.searchdiv-yh-Array {
  width: 100%;
}

.searchdiv-yh-Array div {
  width: 100%;
  height: 1.5rem;
  font-size: 0.8rem;
  color: #666666;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  cursor: pointer;
  line-height: 1.5rem;
  transition: all 0.2s ease;
  border-radius: 0.25rem;
  margin: 0.15rem 0.5rem;
  width: calc(100% - 1rem);
}

.searchdiv-yh-Array div:hover {
  background: rgba(255, 114, 36, 0.08);
  color: #ff7224;
  padding-left: 0.75rem;
}

.searchdiv-zx {
  width: 100%;
}

.searchdiv-zx img {
  width: 1.2rem;
  height: 1.2rem;
  margin-right: 3px;
}

.zx-searchnr {
  width: 100%;
  display: flex;
  align-items: center;
  margin-left: 0.5rem;
  margin-right: 0.5rem;
  font-size: 0.8rem;
  height: 1.8rem;
  color: #ff7224;
}

.searchdiv-zx-Array {
  width: 100%;
}

.searchdiv-zx-Array div {
  width: 100%;
  height: 1.5rem;
  font-size: 0.8rem;
  color: #666666;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  cursor: pointer;
  line-height: 1.5rem;
  transition: all 0.2s ease;
  border-radius: 0.25rem;
  margin: 0.15rem 0.5rem;
  width: calc(100% - 1rem);
}

.searchdiv-zx-Array div:hover {
  background: rgba(255, 114, 36, 0.08);
  color: #ff7224;
  padding-left: 0.75rem;
}

.searchimg {
  width: 2.63rem;
  height: 2.63rem;
  border-radius: 0rem 1.32rem 1.32rem 0rem;
  background: linear-gradient(135deg, #ff7224 0%, #ff8c4a 100%);
  transition: all 0.3s ease;
}

.searchimg:hover {
  background: linear-gradient(135deg, #ff8c4a 0%, #ff7224 100%);
  transform: translateX(-2px);
}

.searchimg:active {
  transform: scale(0.95);
}

.thumbnail_searchimg {
  width: 1.5rem;
  height: 1.5rem;
}

.ty-top-tabs {
  width: 20rem;
  color: #000;
}

.ty-top-tabs div {
  cursor: pointer;
}

.activecolor {
  color: #ff7224;
}

.activecolor .layui-icon {
  color: #ff7224;
}

.ty-top-tabs .layui-icon {
  margin-right: 0.3rem;
  transition: all 0.3s ease;
}

.ty-tab-icon {
  font-size: 1.33rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* 图标大小层级：发现 < 自选 < 天眼（每个相差0.1rem） */
.faxian .ty-tab-icon {
  font-size: 1.33rem; /* 基准 */
}

.zixuan .ty-tab-icon {
  font-size: 1.43rem; /* 比发现大0.1rem */
}

.tianyan .ty-tab-icon {
  font-size: 1.53rem; /* 比自选大0.1rem */
}

.ty-tab-icon-bold {
  font-weight: 800;
}

.ty-top-tabs .tab-div:hover .layui-icon {
  color: #ff7224;
  transform: scale(1.1);
}

.ty-top-tabs-msg {
  white-space: nowrap;
}

.ty-top-tabs .tab-div:hover .ty-top-tabs-msg {
  color: #ff7224;
}

.ty-top-tabs-img {
  width: 1.5rem;
  height: 1.5rem;
  margin-right: 0.3rem;
}

.topgodl {
  width: 5.5rem;
  height: 2.25rem;
  background: linear-gradient(135deg, #ff7224 0%, #ff8c4a 100%) !important;
  border-radius: 1.125rem;
  color: #ffffff;
  border: none;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(255, 114, 36, 0.3);
}

.topgodl:hover {
  background: linear-gradient(135deg, #ff8c4a 0%, #ff7224 100%) !important;
  box-shadow: 0 4px 12px rgba(255, 114, 36, 0.4);
  transform: translateY(-1px);
}

.topgodl:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(255, 114, 36, 0.3);
}

.header-search-dropdown.layui-dropdown {
  border-radius: 0.75rem;
  border: 1px solid #f0f0f0;
  box-shadow: 0 12px 32px rgba(15, 27, 45, 0.12);
  padding: 0.75rem 0.5rem 0.9rem 0.5rem;
  background: #ffffff;
}

.header-search-dropdown.layui-dropdown::before {
  content: "";
  position: absolute;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 10px solid #ffffff;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  filter: drop-shadow(0 -2px 2px rgba(0, 0, 0, 0.08));
}

.header-search-dropdown .layui-dropdown-menu .layui-dropdown-menu-item-group > span {
  font-size: 0.78rem;
  color: #999;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
}

.header-search-dropdown .search-dropdown-item {
  padding: 0.35rem 0.75rem;
  border-radius: 0.5rem;
  transition: background 0.2s ease;
}

.header-search-dropdown .search-dropdown-item:hover {
  background: rgba(255, 114, 36, 0.08);
}

.header-search-dropdown .search-dropdown-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #252525;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.header-search-dropdown .search-dropdown-desc {
  font-size: 0.72rem;
  color: #8f8f8f;
  margin-top: 0.1rem;
  line-height: 1.2;
}

.header-search-dropdown .search-dropdown-tag {
  display: inline-flex;
  align-items: center;
  padding: 0 0.3rem;
  font-size: 0.68rem;
  border-radius: 999px;
  background: rgba(255, 114, 36, 0.12);
  color: #ff7224;
}

.header-search-dropdown .search-dropdown-loading {
  padding: 0.5rem 0.75rem;
  text-align: center;
  font-size: 0.8rem;
  color: #999;
}

.header-user-trigger {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  height: 64px;
  padding: 0 1.25rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease;
}

/* 右侧用户区域（含登录按钮 / 用户头像）整体垂直居中 */
#header-user-slot {
  display: flex;
  align-items: center;
  height: 100%;
}

/* 头像容器尺寸：固定为圆形 44x44，避免被父元素放大 */
.header-user-trigger .dlcgyuan {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.header-user-trigger:hover {
  background: rgba(255, 114, 36, 0.08);
}

.header-user-arrow {
  font-size: 14px;
  color: #a0a0a0;
  transition: transform 0.3s ease, color 0.3s ease;
}

.header-user-trigger:hover .header-user-arrow {
  color: #ff7224;
  transform: rotate(180deg);
}

.header-user-dropdown-panel.layui-dropdown {
  border-radius: 12px;
  border: 1px solid #f0f0f0;
  box-shadow: 0 10px 30px rgba(15, 27, 45, 0.12);
  background: #ffffff;
  min-width: 180px;
}

.header-user-dropdown-panel .layui-dropdown-menu {
  padding: 4px 0 !important;
}

.header-user-dropdown-item {
  display: flex;
  align-items: center;
  padding: 8px;
  font-size: 14px;
  color: #333333;
  transition: background 0.2s ease, color 0.2s ease;
}

.header-user-dropdown-item i {
  font-size: 16px;
  color: inherit;
}

/* 下拉项 hover 只改文字颜色，不加背景色 */
.header-user-dropdown-item:hover {
  background: transparent;
  color: #ff7224;
}

.header-user-dropdown-item.danger {
  color: #e53935;
}

.header-user-dropdown-item.danger:hover {
  background: transparent;
  color: #ff5722;
}

.dlcg {
  cursor: pointer;
  transition: all 0.3s ease;
}

.layui-nav.dlcg {
  display: flex;
  align-items: center;
  min-width: fit-content;
}

.layui-nav.dlcg .layui-nav-item {
  margin: 0;
}

.layui-nav.dlcg .layui-nav-item > a {
  white-space: nowrap;
}

.dlcgyuan {
  background: #ffffff;
  border: 2px solid #ff7224;
  border-radius: 50%;
  position: relative;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(255, 114, 36, 0.2);
}

.dlcgyuan:hover {
  border-color: #ff8c4a;
  box-shadow: 0 4px 10px rgba(255, 114, 36, 0.3);
  transform: translateY(-1px);
}

.dlcg .dlcguserimg {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.dluserinfo {
  font-family: PingFangSC, PingFang SC;
  font-weight: 500;
  font-size: 16px;
  margin-left: 8px;
  color: #333;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.dlcg:hover .dluserinfo {
  color: #ff7224;
}

.dlcg img {
  width: 20px;
  height: 20px;
}

.dlcgyuandian {
  height: 13px;
  width: 13px;
  border-radius: 100%;
  z-index: 11;
  position: absolute;
  left: 30px;
  top: 28px;
}

.ydredcolor {
  background: red;
}

.ydyellowcolor {
  background: rgb(238, 238, 35);
}

.ydygreencolor {
  background: rgb(4, 241, 4);
}

@keyframes ws-status-pulse {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.3;
    transform: scale(0.85);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.ws-status-indicator.ydyellowcolor {
  animation: ws-status-pulse 1s ease-in-out infinite;
}

.ws-status-indicator.ydredcolor,
.ws-status-indicator.ydygreencolor {
  animation: none;
}

.tandivxs {
  width: 170px;
  height: 0;
  overflow: hidden;
  padding-top: 3px;
  padding-bottom: 3px;
  transition: all 0.3s;
}

.tandiv {
  width: 120px;
  margin-left: 3px;
  height: 154px;
  background: rgb(255, 255, 255);
  position: relative;
  border-radius: 8px;
  z-index: 999;
  top: 15px;
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.15));
  overflow: hidden;
}

.triangle {
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 10px solid rgb(255, 255, 255);
  /*我们一般根据方向来写三角形，这样容易记忆；箭头指向的反方向的颜色设置为你想要的，然后箭头方向不要写，另外两个方向的颜色设置为transperent透明*/
  position: absolute;
  left: 25px;
  top: -9px;
  margin-left: -10px;
}

.tandiv div {
  width: 100%;
  height: 36px;
  cursor: pointer;
  font-size: 0.75rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 36px;
  transition: all 0.2s ease;
  position: relative;
}

.tandiv div img {
  margin-bottom: 2px;
  margin-right: 5px;
  transition: all 0.2s ease;
}

.dlcg:hover .tandivxs {
  height: 180px;
}

.dluserimg {
  transform: rotate(180deg);
  transition: all 0.3s ease;
}

.dlcg:hover .dluserimg {
  transform: rotate(360deg);
}

.tandiv div:hover {
  background: linear-gradient(90deg, rgba(255, 114, 36, 0.1) 0%, rgba(255, 140, 74, 0.15) 100%);
  color: #ff7224;
}

.tandiv div:hover img {
  transform: translateX(2px);
}

@media screen and (max-width: 930px) {
  .text-time {
    display: none !important;
  }
}

@media screen and (max-width: 1110px) {
.ty-top-tabs-msg {
  display: none !important;
  white-space: nowrap;
}

  /* 文字消失时，图标变大、间隙变大、更靠近期货开户 */
  .ty-top-tabs {
    width: auto !important;
    gap: 2rem;
    margin-left: 1rem !important;
  }

  .ty-top-tabs .tab-div {
    width: auto !important;
    margin: 0 !important;
    padding: 0 0.75rem;
  }

  /* 图标大小层级：发现 < 自选 < 天眼（每个相差0.1rem） */
  .faxian .ty-tab-icon {
    font-size: 1.7rem; /* 基准 */
  }

  .zixuan .ty-tab-icon {
    font-size: 1.8rem; /* 比发现大0.1rem */
  }

  .tianyan .ty-tab-icon {
    font-size: 1.9rem; /* 比自选大0.1rem */
  }

  .dluserinfo {
    display: none !important;
  }

  .dluserimg {
    display: none !important;
  }

  .layui-nav.dlcg .layui-nav-item > a {
    padding: 0 10px !important;
  }
}

@media screen and (max-width: 1000px) {
  .search-width {
    display: none !important;
  }

  /* 搜索框消失时，增大并分散导航图标 */
  .ty-top-tabs {
    width: auto !important;
    gap: 2.5rem;
    margin-left: 1.5rem !important;
  }

  .ty-top-tabs .tab-div {
    width: auto !important;
    margin: 0 !important;
    padding: 0 0.75rem;
    min-width: auto;
  }

  /* 图标大小层级：发现 < 自选 < 天眼（每个相差0.1rem） */
  .faxian .ty-tab-icon {
    font-size: 1.8rem; /* 基准 */
  }

  .zixuan .ty-tab-icon {
    font-size: 1.9rem; /* 比发现大0.1rem */
  }

  .tianyan .ty-tab-icon {
    font-size: 2.0rem; /* 比自选大0.1rem */
  }
}

/* 顶部导航栏天眼图标右上角的总未读消息数 - 使用layui徽章 */
.tianyan .layui-badge {
  position: absolute;
  top: 8px;
  right: -5px;
}

/* 期货开户广告样式 */
.qihuo-kaihu-ads {
  color: var(--theme-color-primary);
  transition: color 0.3s ease;
  white-space: nowrap;
}

.qihuo-kaihu-ads:hover {
  color: var(--theme-color-dark);
}

.qihuo-kaihu-dropdown-panel.layui-dropdown {
  border-radius: 8px;
  border: 1px solid #f0f0f0;
  box-shadow: 0 10px 30px rgba(15, 27, 45, 0.12);
  background: #ffffff;
  padding: 0;
  overflow: hidden;
}

.qihuo-kaihu-dropdown-panel.layui-dropdown img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* 手机端底部导航栏样式 */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: #ffffff;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 9999;
  border-top: 1px solid #e6e6e6;
}

.mobile-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 4px 0;
  position: relative;
}

.mobile-nav-item:active {
  background: rgba(255, 114, 36, 0.05);
}

.mobile-nav-icon {
  font-size: 24px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
  color: #666666;
  transition: all 0.3s ease;
}

.mobile-nav-item.active .mobile-nav-icon {
  color: #ff7224;
}

.mobile-nav-label {
  font-size: 11px;
  color: #666666;
  transition: color 0.3s ease;
}

.mobile-nav-item.active .mobile-nav-label {
  color: #ff7224;
}

.mobile-nav-user-icon {
  font-size: 24px;
  color: #666666;
  margin-bottom: 2px;
  transition: color 0.3s ease;
}

.mobile-nav-item.active .mobile-nav-user-icon {
  color: #ff7224;
}

.mobile-nav-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 2px;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px transparent;
  transition: box-shadow 0.3s ease;
}

.mobile-nav-item.active .mobile-nav-avatar {
  box-shadow: 0 0 0 2px #ff7224;
}

.mobile-nav-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 在小屏幕下的布局优化：底部导航 + 精简元素 */
@media screen and (max-width: 850px) {
  /* 手机端隐藏PC端头部 */
  header {
    display: none !important;
  }

  /* 显示手机端底部导航栏 */
  .mobile-bottom-nav {
    display: flex;
    flex-direction: row;
  }

  /* 为底部导航栏预留空间，避免内容被遮挡 */
  body {
    padding-bottom: 60px;
  }
  
  /* 确保页面容器不会超出视口 */
  .layui-container-fluid {
    padding-bottom: 60px;
  }
}