/* Global Styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f9;
    padding-bottom: 100px; 
}

/* Toolbar Styles */
.toolbar {
    padding: 1px;
    background: #282c34;
    color: #fff;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    position: fixed; /* Change to fixed */
    top: 0;
    left: 0; /* Ensure it spans the full width */
    right: 0;
    z-index: 10000;
    border-bottom: 2px solid #444;
    background-color: #282c34;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Optional: Adds shadow for better visibility */
}

/* 让ad-banner与按钮同一行显示 */
.toolbar {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.ad-banner {
  position: static;
  flex: 0 1 450px;      /* 占据剩余空间，最小宽度320px */
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  height: 38px;
  display: flex;
  align-items: center;
  overflow: hidden;
  margin: 0 8px;
  border-radius: 8px;
  /* background: linear-gradient(90deg, #222 0%, #444 100%); */
}

.ad-banner-content {
  display: flex;
  align-items: center;
  gap: 32px;
  white-space: nowrap;
  font-size: 1rem;
  font-weight: 500;
  color: #fff;
  animation: ad-scroll 18s linear infinite;
}

@keyframes ad-scroll {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

.toolbar label, .toolbar input, .toolbar button, .toolbar select {
    margin-right: 5px;
}

/* Time Interval and Chart Settings Box Styles */
.time-interval-container, .chart-settings-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    padding: 4px;
    background-color: #1c1c1c;
    border-radius: 5px;
    border: 1px solid #444;
    margin-right: 15px;
}

.time-interval-container select, .chart-settings-container input {
    padding: 4px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #333;
    color: #fff;
    font-size: 14px;
    width: 120px;
}

.time-interval-container button, .chart-settings-container button {
    padding: 2px 10px;
    background-color: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
}

.time-interval-container button:hover, .chart-settings-container button:hover {
    background-color: #45a049;
}

/* Chart Container Styles */
.chart-container {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 0px; /* Adjusted margin to avoid overlap */
    height: calc(100vh - 160px); /* 计算高度，避免 footer 遮挡 */
    overflow-y: auto; /* 允许垂直滚动 */
    overflow-x: hidden;
}

/* Chart Item Styles */
.chart-item {
    position: relative;
    flex: 1;
    min-width: calc(100% / 3 - 10px); /* Default to 3 charts per row */
    height: 300px; /* Default chart height */
    resize: both;
    overflow: hidden;
    box-sizing: border-box;
    background-color: #282c34;
}

/* Add Chart Button */
.add-chart {
    text-align: center;
    padding: 10px;
    background: #007bff;
    color: #fff;
    cursor: pointer;
    margin: 10px;
    font-size: 18px;
    border-radius: 5px;
}

.add-chart:hover {
    background: #0056b3;
}

/* Symbol Selector Styles (H5 style) */
.symbol-selector {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 20px 25px;
    display: none;
    z-index: 10001;
    border-radius: 10px; /* Rounded corners for a modern look */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15); /* Soft shadow */
    max-width: 400px; /* Limiting max width for better presentation */
    width: 100%;
}

.symbol-selector h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
    text-align: center;
}

.symbol-selector input {
    width: 92%;
    padding: 12px 15px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: #f9f9f9;
    font-size: 16px;
    color: #333;
    transition: border-color 0.3s ease; /* Smooth transition */
}

.symbol-selector input:focus {
    border-color: #4CAF50; /* Highlight with green when focused */
    outline: none; /* Remove default focus outline */
}

.symbol-selector ul {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 250px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.symbol-selector li {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    font-size: 16px;
    color: #333;
    transition: background-color 0.3s ease;
}

.symbol-selector li:hover {
    background-color: #f4f4f4; /* Light hover effect */
}

.symbol-selector button {
    width: 48%;
    padding: 12px 0;
    background-color: #f44336;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.symbol-selector button:hover {
    background-color: #e53935; /* Hover effect for buttons */
}

.symbol-selector button:first-of-type {
    background-color: #4CAF50; /* Red background for cancel button */
}

.symbol-selector button:first-of-type:hover {
    background-color: #45a049; /* Darker red on hover */
}

/* Error message style */
.symbol-selector .error-message {
    color: #f44336;
    font-size: 14px;
    text-align: center;
    margin-top: 10px;
}

/* Ads Block */
.adsense-ad {
    margin-top: 20px;
    text-align: center;
}
/* Footer Toolbar Styles */
.footer-toolbar {
    padding: 1px;
    background: #f5f5f5; /* 设置为浅灰色背景 */
    color: #333;  /* 文本颜色可以设置为深灰色，和背景形成对比 */
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    background-color:#abb3c8;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1); /* Optional: Adds shadow for better visibility */
    height: 100px;  /* 设置高度 */
}

.footer-toolbar label, .footer-toolbar input, .footer-toolbar button, .footer-toolbar select {
    margin-right: 5px;
}

.footer-toolbar select, .footer-toolbar input {
    padding: 4px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    width: 120px;
    box-sizing: border-box;
}

/* 主容器样式：左右排列 */
.submit-container {
    display: flex;
    justify-content: space-between; /* 两侧对齐 */
    gap: 40px;
    padding: 10px;                 /* 内边距 */
    border: 1px solid #ccc; /* 可选，添加边框便于调试 */
    width: 280px;
    height: 100%;
}

/* 设置两个容器左右排列 */
.long-button-container,
.short-button-container {
    display: flex;
    flex-direction: column; /* 内部按钮上下排列 */
    align-items: center;    /* 居中对齐 */
    gap: 4px;              /* 按钮间距 */
    flex: 1;                /* 平分宽度 */
    border-radius: 5px;
    border: 1px solid #444;
    padding: 4px;
}

.buy-button {
    width: 100px;
    padding: 2px 10px;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    background-color: #4caf50;
    color: white;            
}

.buy-button:hover {
    padding: 2px 10px;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    background-color: #45a049;
}

.sell-button {
    width: 100px;
    padding: 2px 10px;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    background-color: #f44336;
    color: white;             
}

.sell-button:hover {
    padding: 2px 10px;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    background-color: #e53935;
}

#cancel-btn-container button {
    width: 80px;
    padding: 2px 10px;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    background-color: #f44336;
    color: white;             
}

#cancel-btn-container button:hover {
    padding: 2px 10px;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    background-color: #e53935;
}
/* 设置两个容器左右排列 */
.position-container,
.order-container {
    display: flex;
    flex-direction: column; /* 纵向排列 */
    align-items: left;   /* 子元素水平居中 */
    justify-content: top; /* 子元素垂直居中 */
    position: relative;    /* 相对定位，方便内部绝对定位 */
    border: 1px solid #ccc; /* 可选，添加边框便于调试 */
    padding: 10px;
    width: 220px;
    height: 100%;
    gap:4px;
}


/* 容器样式 */
.order-res-container {
    display: flex;
    flex-direction: column; /* 纵向排列 */
    align-items: left;   /* 子元素水平居中 */
    justify-content: top; /* 子元素垂直居中 */
    position: relative;    /* 相对定位，方便内部绝对定位 */
    border: 1px solid #ccc; /* 可选，添加边框便于调试 */
    padding: 10px;
    width: 220px;
    height: 100%
}
.position-detail-container {
    display: flex;
    flex-direction: column; /* 纵向排列 */
    align-items: left;   /* 子元素水平居中 */
    justify-content: top; /* 子元素垂直居中 */
    position: relative;    /* 相对定位，方便内部绝对定位 */
    border: 1px solid #ccc; /* 可选，添加边框便于调试 */
    padding: 10px;
    width: 550px;
    height: 100%
}

/* 标题样式 */
.order-title {
    position: absolute; /* 绝对定位，放置在左上角 */
    top: 10px;
    left: 10px;
    font-size: 14px; /* 字体稍小 */
    color: #888; /* 浅色，不显眼 */
}

.position-container label, .order-container label{
    display: inline-block;
    width: 70px;
    text-align: justify;
}

/* 内容样式 */
* {
    font-size: 14px;
}

/* 绿色 - 订单成功 */
.status-success {
    color: #4caf50;
    font-weight: bold;
}

/* 红色 - 其他状态 */
.status-fail {
    color: #f44336;
    font-weight: bold;
}

/* 🔹 每个 Tab 样式 */
.nav-item {
    cursor: pointer;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background 0.3s;
}

.nav-item:hover,
.nav-item.active {
    background: #444;
}

/* 弹窗 */
.modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 100001;
}
.modal-content img {
    width: 200px;
}

/* 🔹 加入社区 */
.join-community {
    margin-left: auto;
    margin-right: 40px;
    display: flex;
    align-items: center;
    gap: 50px;
    font-weight: bold;
}

/* 首页按钮，放在 "加入社区" 按钮的前面 */
.nav-item.home-button {
    position: absolute;
    top: 0;
    right: 144px;  /* 让 "首页" 按钮出现在 "加入社区" 左边 */
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    text-decoration: none; /* 去掉下划线 */
}

/* 悬停、选中状态 */
.nav-item.home-button:hover,
.nav-item.home-button.active {
    background: #444;
}

/* 关闭按钮样式 */
.close-btn {
    position: absolute;
    top: 4px;
    right: 6px;
    font-size: 20px;
    color: #333;
    cursor: pointer;  /* 默认显示为可点击 */
    transition: color 0.3s ease, transform 0.3s ease; /* 加入过渡效果 */
}

/* 鼠标悬停时的样式 */
.close-btn:hover {
    color: #e74c3c;  /* 悬停时按钮颜色变化 */
    transform: scale(1.2); /* 鼠标悬停时放大效果 */
}


