/* Crypto Profit Calculator Styles */

/* 默认货币样式 */
.default-currencies {
  margin: 0 0 20px;
}

.default-currencies h3 {
  color: var(--calc-text-primary);
  font-size: 1.2rem;
  margin-bottom: 15px;
  font-weight: 600;
}

.currencies-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.currency-item {
  padding: 4px 6px;
  border: 2px solid transparent;
  border-radius: 8px;
  background: #f9fafb;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.currency-item:hover {
  border-color: #d1d5db;
  background: var(--calc-bg-card);
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.currency-item .currency-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  margin-right: 8px;
}

.currency-item .currency-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.currency-item .currency-name {
  font-weight: 600;
  color: var(--calc-text-primary);
  font-size: 1rem;
}

.currency-item .currency-symbol {
  color: var(--calc-text-secondary);
  font-size: 0.8rem;
}

.currency-item .currency-price {
  color: var(--calc-success);
  font-size: 0.8rem;
  font-weight: 500;
}

.default-currencies-error {
  padding: 20px;
  text-align: center;
  color: var(--calc-text-muted);
  background: var(--calc-bg-card);
  border-radius: 8px;
  border: 1px solid var(--calc-border);
}

/* 浅色主题变量 */
:root {
  --calc-bg-primary: #f8fafc;
  --calc-bg-secondary: #ffffff;
  --calc-bg-card: #ffffff;
  --calc-text-primary: #0f172a;
  --calc-text-secondary: #64748b;
  --calc-text-muted: #94a3b8;
  --calc-border: #e2e8f0;
  --calc-input-bg: #ffffff;
  --calc-input-border: #d1d5db;
  --calc-accent: #6366f1;
  --calc-accent-hover: #4f46e5;
  --calc-success: #10b981;
  --calc-danger: #ef4444;
  --calc-warning: #f59e0b;
}

/* 主体样式 */
body {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  color: var(--calc-text-primary);
  min-height: 100vh;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* 导航栏浅色主题 */
.navbar-light {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--calc-border);
}

.navbar-light .navbar-brand {
  color: var(--calc-text-primary) !important;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar-light .nav-link {
  color: var(--calc-text-secondary) !important;
  transition: color 0.3s ease;
}

.navbar-light .nav-link:hover,
.navbar-light .nav-link.active {
  color: var(--calc-accent) !important;
}

/* 计算器容器 */
.calculator-container {
  min-height: calc(100vh - 200px);
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  padding: 2rem 0;
}

/* 计算器包装器 */
.calculator-wrapper {
  background: var(--calc-bg-card);
  border-radius: 1rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  border: 1px solid var(--calc-border);
}

.calculator-container .row {
  margin: 0;
}

/* 左侧输入区域 */
.calculator-left {
  background: transparent;
  padding: 2.5rem 1.5rem;
  border-right: 1px solid var(--calc-border);
  min-height: 500px;
}

.calculator-content {
  max-width: 600px;
  margin: 0 auto;
}

/* 页面标题区域 */
.hero-section {
border-bottom: 1px solid var(--calc-border);
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  color: var(--calc-text-primary);
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--calc-text-muted);
  line-height: 1.6;
  max-width: 700px;
  margin: 0 auto;
}

/* 计算器标题（保留用于其他地方） */
.calculator-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--calc-text-primary);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.calculator-subtitle {
  font-size: 1rem;
  color: var(--calc-text-secondary);
  line-height: 1.6;
  margin-bottom: 0;
}

/* 右侧结果区域 */
.calculator-right {
  background: transparent;
  padding: 2.5rem;
  min-height: 500px;
  display: flex;
  flex-direction: column;
}

.calculator-results {
  width: 100%;
  max-width: 500px;
}

/* 表单区域 */
.calculator-form {
  margin-top: 0rem;
}

.form-section {
  margin-bottom: 2rem;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--calc-text-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--calc-accent);
}

.form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--calc-text-secondary);
  margin-bottom: 0.5rem;
  display: block;
}

/* 加密货币选择器 */
.crypto-selector {
  margin-bottom: 1rem;
}

.selected-crypto {
  background: var(--calc-input-bg);
  border: 1px solid var(--calc-input-border);
  border-radius: 0.75rem;
  padding: 1rem;
  display: none;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.selected-crypto:hover {
  border-color: var(--calc-accent);
  background: rgba(99, 102, 241, 0.05);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.crypto-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.crypto-info {
  flex: 1;
}

.crypto-symbol {
  font-size: 1rem;
  font-weight: 600;
  color: var(--calc-text-primary);
  display: block;
}

.crypto-price {
  font-size: 0.875rem;
  color: var(--calc-text-secondary);
}

.remove-crypto {
  color: var(--calc-text-muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 0.25rem;
  transition: all 0.3s ease;
}

.remove-crypto:hover {
  color: var(--calc-danger);
  background: rgba(239, 68, 68, 0.1);
}

/* 输入框组合样式 */
.input-group {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  width: 100%;
}

.input-group .calculator-input {
  background: var(--calc-input-bg) !important;
  border: 1px solid var(--calc-input-border) !important;
  color: var(--calc-text-primary) !important;
  border-radius: 0.5rem 0 0 0.5rem !important;
  padding: 0.75rem 1rem !important;
  font-size: 1rem !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
  border-right: none !important;
  flex: 1 1 auto;
  width: 1%;
  min-width: 0;
}

.input-group .calculator-input:focus {
  border-color: var(--calc-accent) !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
  background: var(--calc-input-bg) !important;
  z-index: 3;
}

.input-group .calculator-input::placeholder {
  color: var(--calc-text-muted) !important;
}

/* 清除按钮 */
.input-group .clear-btn {
  background: var(--calc-input-bg) !important;
  border: 1px solid var(--calc-input-border) !important;
  color: var(--calc-text-muted) !important;
  border-radius: 0 0.5rem 0.5rem 0 !important;
  padding: 0.75rem 1rem !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
  border-left: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
}

.input-group .clear-btn:hover {
  color: var(--calc-danger) !important;
  background: rgba(239, 68, 68, 0.05) !important;
  border-color: rgba(239, 68, 68, 0.2) !important;
  z-index: 2;
}

.input-group .clear-btn:focus {
  z-index: 3;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

/* 单独的输入框样式（没有按钮组合的） */
.calculator-input:not(.input-group .calculator-input) {
  background: var(--calc-input-bg) !important;
  border: 1px solid var(--calc-input-border) !important;
  color: var(--calc-text-primary) !important;
  border-radius: 0.5rem !important;
  padding: 0.75rem 1rem !important;
  font-size: 1rem !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
}

.calculator-input:not(.input-group .calculator-input):focus {
  border-color: var(--calc-accent) !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
  background: var(--calc-input-bg) !important;
}

/* 复选框样式 */
.form-check-input {
  background-color: var(--calc-input-bg) !important;
  border: 1px solid var(--calc-input-border) !important;
}

.form-check-input:checked {
  background-color: var(--calc-accent) !important;
  border-color: var(--calc-accent) !important;
}

.form-check-input:focus {
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1) !important;
}

.form-check-label {
  color: var(--calc-text-secondary);
  font-size: 0.875rem;
}

/* 结果区域样式 */
.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--calc-border);
}

.results-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--calc-text-primary);
  margin: 0;
}

.help-icon {
  color: var(--calc-text-muted);
  cursor: help;
  transition: color 0.3s ease;
}

.help-icon:hover {
  color: var(--calc-accent);
}

/* 利润显示 */
.profit-display {
  text-align: center;
  margin-bottom: 3rem;
}

.profit-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--calc-text-secondary);
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.profit-amount {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--calc-success);
  line-height: 1.2;
}

.profit-amount.negative {
  color: var(--calc-danger);
}

/* 投资摘要 */
.investment-summary {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.summary-item {
  text-align: center;
  padding: 0.5rem 1.5rem;
}

.summary-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--calc-text-secondary);
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.summary-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--calc-text-primary);
}

/* 计算详情 */
.calculation-details {
  background: var(--calc-bg-card);
  border-radius: 0.75rem;
  padding: 1.5rem;
  border: 1px solid var(--calc-border);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.details-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--calc-text-primary);
  margin-bottom: 1rem;
}

.details-grid {
  display: grid;
  gap: 0.75rem;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--calc-border);
}

.detail-item:last-child {
  border-bottom: none;
  font-weight: 600;
}

.detail-label {
  font-size: 0.875rem;
  color: var(--calc-text-secondary);
}

.detail-value {
  font-size: 0.875rem;
  color: var(--calc-text-primary);
  font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 991.98px) {
  .calculator-container {
    min-height: auto;
    padding: 2rem 0;
  }
  
  .calculator-left {
    border-right: none;
    border-bottom: 1px solid var(--calc-border);
    padding: 2rem;
    min-height: auto;
  }
  
  .calculator-right {
    padding: 2rem;
    min-height: auto;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  .calculator-title {
    font-size: 2rem;
  }
  
  .profit-amount {
    font-size: 2rem;
  }
}

@media (max-width: 767.98px) {
  .calculator-left,
  .calculator-right {
    padding: 1rem;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .hero-section .py-5 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }
  
  .calculator-title {
    font-size: 1.75rem;
  }
  
  .profit-amount {
    font-size: 1.75rem;
  }
  
  .summary-value {
    font-size: 1.25rem;
  }
}

/* 工具提示样式 */
.tooltip {
  font-size: 0.875rem;
}

.tooltip-inner {
  background: var(--calc-bg-card);
  color: var(--calc-text-primary);
  border: 1px solid var(--calc-border);
}

.tooltip.bs-tooltip-top .tooltip-arrow::before {
  border-top-color: var(--calc-border);
}

.tooltip.bs-tooltip-bottom .tooltip-arrow::before {
  border-bottom-color: var(--calc-border);
}

.tooltip.bs-tooltip-start .tooltip-arrow::before {
  border-left-color: var(--calc-border);
}

.tooltip.bs-tooltip-end .tooltip-arrow::before {
  border-right-color: var(--calc-border);
}

/* 动画效果 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

.form-section:nth-child(2) {
  animation-delay: 0.1s;
}

.form-section:nth-child(3) {
  animation-delay: 0.2s;
}

.form-section:nth-child(4) {
  animation-delay: 0.3s;
}

/* 加载状态 */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* 错误状态 */
.error {
  border-color: var(--calc-danger) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

/* 成功状态 */
.success {
  border-color: var(--calc-success) !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

/* Q&A 模块样式 */
.qa-section {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-top: 1px solid var(--calc-border);
}

.qa-content {
  padding: 2rem;
  text-align: left;
}

.qa-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--calc-border);
}

.qa-item:last-child {
  border-bottom: none;
}

.qa-question {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--calc-text-primary);
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.qa-answer {
  font-size: 1rem;
  color: var(--calc-text-secondary);
  line-height: 1.6;
  margin-bottom: 0;
}

/* Q&A 响应式设计 */
@media (max-width: 767.98px) {
  .qa-section {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }
  
  .qa-item {
    padding: 1.5rem;
  }
  
  .qa-question {
    font-size: 1.125rem;
  }
  
  .qa-answer {
    font-size: 0.9rem;
  }
}

/* 预设金额按钮样式 */
.preset-amounts {
  margin-top: 1rem;
}

.preset-amounts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.preset-amount-btn {
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: 2px;
  transition: background-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
  border: 1px solid #d1d5db;
  color: #374151;
  background: #f9fafb;
}

.preset-amount-btn:hover {
  background: #e5e7eb;
  color: #374151;
  border-color: #9ca3af;
}

.preset-amount-btn:active {
  background: #d1d5db;
  color: #374151;
  border-color: #6b7280;
}

.preset-amount-btn.active {
  background: #374151;
  color: white;
  border-color: #374151;
}

/* 预设金额按钮响应式设计 */
@media (max-width: 991.98px) {
  .preset-amounts-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 767.98px) {
  .preset-amounts-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  
  .preset-amount-btn {
    font-size: 0.8rem;
    padding: 0.6rem 0.5rem;
  }
}

@media (max-width: 575.98px) {
  .preset-amounts-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
  
  .preset-amount-btn {
    font-size: 0.75rem;
    padding: 0.5rem 0.4rem;
  }
}