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

/* 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 */
}

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

/* Time Interval and Chart Settings Box Styles */
.time-interval-container, .chart-settings-container, .position-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, .position-container select {
    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 */
}

/* 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;
}

/* 内容样式 */
* {
    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: 10px;
    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); /* 鼠标悬停时放大效果 */
}
.ad-banner {
    position: static;
    flex: 0 1 250px;      /* 占据剩余空间，最小宽度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%); }
  }
  



