/* Alpha Trade AI - Custom Styles */

/* 自定义滚动条 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #1e2329;
}

::-webkit-scrollbar-thumb {
  background: #2b3139;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #fcd535;
}

/* 平滑滚动 */
html {
  scroll-behavior: smooth;
}

/* 页面加载动画 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fadeInUp {
  animation: fadeInUp 0.6s ease-out;
}

/* 按钮hover效果增强 */
.btn-glow:hover {
  box-shadow: 0 0 20px rgba(252, 213, 53, 0.3);
}

/* 卡片阴影效果 */
.card-shadow {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.card-shadow:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

/* 渐变背景 */
.bg-gradient-trading {
  background: linear-gradient(135deg, #0f1419 0%, #1e2329 50%, #0f1419 100%);
}

/* 文字渐变 */
.text-gradient {
  background: linear-gradient(135deg, #fcd535, #f0b90b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 加载动画 */
.loading-spinner {
  border: 2px solid #2b3139;
  border-radius: 50%;
  border-top: 2px solid #fcd535;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 模态框样式 */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: #1e2329;
  border: 1px solid #2b3139;
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

/* 表单样式 */
.form-input {
  background: #0f1419;
  border: 1px solid #2b3139;
  border-radius: 8px;
  color: #f0f0f0;
  padding: 12px 16px;
  width: 100%;
  transition: all 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: #fcd535;
  box-shadow: 0 0 0 2px rgba(252, 213, 53, 0.1);
}

.form-input::placeholder {
  color: #8a8a8a;
}

/* 错误和成功消息 */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}

.alert-error {
  background: rgba(248, 73, 96, 0.1);
  border: 1px solid rgba(248, 73, 96, 0.3);
  color: #f84960;
}

.alert-success {
  background: rgba(2, 192, 118, 0.1);
  border: 1px solid rgba(2, 192, 118, 0.3);
  color: #02c076;
}

.alert-warning {
  background: rgba(252, 213, 53, 0.1);
  border: 1px solid rgba(252, 213, 53, 0.3);
  color: #fcd535;
}

/* TradingView风格的图表容器 */
.chart-container {
  background: #0f1419;
  border: 1px solid #2b3139;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}

.chart-header {
  background: #1e2329;
  border-bottom: 1px solid #2b3139;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chart-toolbar {
  display: flex;
  gap: 8px;
}

.chart-button {
  background: transparent;
  border: 1px solid #2b3139;
  color: #8a8a8a;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chart-button:hover,
.chart-button.active {
  background: #fcd535;
  color: #0f1419;
  border-color: #fcd535;
}

/* 数据表格样式 */
.data-table {
  width: 100%;
  background: #1e2329;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #2b3139;
}

.data-table th {
  background: #0f1419;
  color: #8a8a8a;
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  border-bottom: 1px solid #2b3139;
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #2b3139;
  color: #f0f0f0;
}

.data-table tr:hover {
  background: rgba(252, 213, 53, 0.05);
}

/* 状态指示器 */
.status-indicator {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
}

.status-success {
  background: rgba(2, 192, 118, 0.2);
  color: #02c076;
}

.status-error {
  background: rgba(248, 73, 96, 0.2);
  color: #f84960;
}

.status-warning {
  background: rgba(252, 213, 53, 0.2);
  color: #fcd535;
}

.status-info {
  background: rgba(139, 149, 161, 0.2);
  color: #8b95a1;
}

/* 涨跌颜色 */
.text-up {
  color: #02c076;
}

.text-down {
  color: #f84960;
}

.bg-up {
  background: rgba(2, 192, 118, 0.1);
}

.bg-down {
  background: rgba(248, 73, 96, 0.1);
}

/* 响应式隐藏 */
@media (max-width: 768px) {
  .hidden-mobile {
    display: none !important;
  }
}

@media (min-width: 769px) {
  .hidden-desktop {
    display: none !important;
  }
}

/* 工具提示 */
.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip .tooltip-text {
  visibility: hidden;
  width: 200px;
  background: #0f1419;
  color: #f0f0f0;
  text-align: center;
  border-radius: 6px;
  padding: 8px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -100px;
  opacity: 0;
  transition: opacity 0.3s;
  border: 1px solid #2b3139;
  font-size: 12px;
}

.tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* 自定义选择框 */
.custom-select {
  position: relative;
  display: inline-block;
}

.custom-select select {
  appearance: none;
  background: #0f1419 url("data:image/svg+xml;charset=US-ASCII,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path fill='%23f0f0f0' d='M6 8L2 4h8z'/></svg>") no-repeat right 12px center;
  background-size: 12px;
  border: 1px solid #2b3139;
  border-radius: 6px;
  color: #f0f0f0;
  cursor: pointer;
  font-size: 14px;
  padding: 8px 32px 8px 12px;
  width: 100%;
}

.custom-select select:focus {
  border-color: #fcd535;
  outline: none;
}

/* 二维码样式 */
.qr-code-container {
  background: white;
  padding: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 进度条 */
.progress-bar {
  width: 100%;
  height: 4px;
  background: #2b3139;
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #fcd535, #f0b90b);
  transition: width 0.3s ease;
}

/* 动画效果 */
.pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: .5;
  }
}