* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Microsoft YaHei', sans-serif; background: #f5f7fa; color: #333; }
.container { max-width: 1000px; margin: 0 auto; padding: 20px; }

.header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.logo { font-size: 36px; color: #2c3e50; }
.badge { font-size: 14px; color: #7f8c8d; }
.divider { border: none; border-top: 2px solid #bdc3c7; margin-bottom: 30px; }

.main-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.bottom-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }

.card {
  background: #fff; border-radius: 12px; padding: 24px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05); cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s; text-align: center;
  border: 2px solid transparent;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,0.1); }
.card.selected { border-color: #3498db; }
.card-title { font-size: 20px; font-weight: bold; margin-bottom: 8px; }
.card-desc { font-size: 14px; color: #7f8c8d; }
.small .card-title { font-size: 16px; }

#input-dialog {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.5); display: flex; justify-content: center; align-items: center;
}
.hidden { display: none !important; }
.dialog-content { background: #fff; padding: 30px; border-radius: 12px; text-align: center; }
#stock-input { padding: 10px 15px; font-size: 18px; width: 280px; border: 1px solid #ccc; border-radius: 8px; }
#submit-btn { padding: 10px 20px; font-size: 18px; margin-left: 10px; background: #3498db; color: #fff; border: none; border-radius: 8px; cursor: pointer; }
#result-area { margin-top: 30px; }

.chart-box { background: #fff; border-radius: 12px; padding: 20px; margin-bottom: 20px; box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
.chart-title { font-size: 18px; font-weight: bold; margin-bottom: 10px; }
.option-buttons { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 15px; }
.option-btn { padding: 6px 14px; border: 1px solid #3498db; color: #3498db; background: #fff; border-radius: 6px; cursor: pointer; font-size: 14px; transition: 0.2s; }
.option-btn.active, .option-btn:hover { background: #3498db; color: #fff; }
.similar-list { display: flex; gap: 20px; flex-wrap: wrap; }
.similar-item { background: #ecf0f1; padding: 15px; border-radius: 8px; flex: 1; min-width: 150px; text-align: center; }

/* 新增样式 - GitHub Pages 版 */
.btn-primary { padding: 12px 24px; font-size: 16px; background: #3498db; color: #fff; border: none; border-radius: 10px; cursor: pointer; transition: 0.2s; }
.btn-primary:hover { background: #2980b9; }
.btn-secondary { padding: 12px 24px; font-size: 16px; background: #2ecc71; color: #fff; border: none; border-radius: 10px; cursor: pointer; transition: 0.2s; }
.btn-secondary:hover { background: #27ae60; }
.search-hint { font-size: 12px; color: #95a5a6; margin-top: 6px; text-align: center; }
.info-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin: 10px 0; }
.info-item { background: #f8f9fa; padding: 10px; border-radius: 8px; text-align: center; }
.info-item .label { font-size: 12px; color: #7f8c8d; }
.info-item .value { font-size: 18px; font-weight: bold; margin-top: 4px; }
.value.up { color: #e74c3c; }
.value.down { color: #27ae60; }
.loading-spinner { display: inline-block; width: 20px; height: 20px; border: 2px solid #ecf0f1; border-top-color: #3498db; border-radius: 50%; animation: spin 0.8s linear infinite; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.status-msg { text-align: center; padding: 20px; color: #7f8c8d; }
.badge-group { display: flex; gap: 8px; align-items: center; }
.badge-link { font-size: 12px; color: #3498db; text-decoration: none; padding: 4px 10px; border: 1px solid #3498db; border-radius: 12px; transition: 0.2s; }
.badge-link:hover { background: #3498db; color: #fff; }
.real-time-badge { font-size: 12px; padding: 3px 8px; border-radius: 8px; margin-left: 8px; }
.badge-live { background: #e74c3c; color: #fff; }
.badge-local { background: #95a5a6; color: #fff; }
.chart-box .option-buttons { margin-top: 10px; }