/* デイトレード判断支援システム - カスタムスタイル */

/* スクロールバーのカスタマイズ */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
  background: #6b7280;
}

/* チャートコンテナ */
.chart-container {
  width: 100%;
  height: 400px;
  background: #111827;
  border-radius: 8px;
}

/* スコアバッジ */
.score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.875rem;
}

.score-high {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.score-medium {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}

.score-low {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
}

/* 推奨バッジ */
.recommendation-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.rec-strong-buy {
  background: #10b981;
  color: white;
}

.rec-buy {
  background: #34d399;
  color: #064e3b;
}

.rec-hold {
  background: #6b7280;
  color: white;
}

.rec-sell {
  background: #f87171;
  color: #7f1d1d;
}

.rec-strong-sell {
  background: #ef4444;
  color: white;
}

/* 市場バッジ */
.market-badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
}

.market-prime {
  background: #3b82f6;
  color: white;
}

.market-standard {
  background: #8b5cf6;
  color: white;
}

.market-growth {
  background: #ec4899;
  color: white;
}

/* センチメントインジケーター */
.sentiment-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-weight: 600;
}

.sentiment-bullish {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border: 1px solid #10b981;
}

.sentiment-bearish {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid #ef4444;
}

.sentiment-neutral {
  background: rgba(107, 114, 128, 0.2);
  color: #9ca3af;
  border: 1px solid #6b7280;
}

/* 変動率の色 */
.change-positive {
  color: #10b981;
}

.change-negative {
  color: #ef4444;
}

.change-neutral {
  color: #9ca3af;
}

/* カード */
.card {
  background: #1f2937;
  border-radius: 12px;
  border: 1px solid #374151;
  overflow: hidden;
}

.card-header {
  padding: 1rem;
  border-bottom: 1px solid #374151;
  background: #111827;
}

.card-body {
  padding: 1rem;
}

/* テーブル */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  text-align: left;
  padding: 0.75rem;
  background: #111827;
  color: #9ca3af;
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #374151;
}

.data-table td {
  padding: 0.75rem;
  border-bottom: 1px solid #374151;
}

.data-table tbody tr:hover {
  background: #374151;
  cursor: pointer;
}

/* ローディング */
.loading-spinner {
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  border: 2px solid #374151;
  border-radius: 50%;
  border-top-color: #3b82f6;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* インパクトスコア */
.impact-high {
  background: #ef4444;
  color: white;
}

.impact-medium {
  background: #f59e0b;
  color: white;
}

.impact-low {
  background: #6b7280;
  color: white;
}

/* フィルターボタン */
.filter-btn {
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
  border: 1px solid #374151;
  background: transparent;
  color: #9ca3af;
}

.filter-btn:hover {
  background: #374151;
  color: white;
}

.filter-btn.active {
  background: #3b82f6;
  border-color: #3b82f6;
  color: white;
}

/* モバイル対応 */
@media (max-width: 768px) {
  .chart-container {
    height: 300px;
  }

  .data-table {
    font-size: 0.875rem;
  }

  .data-table th,
  .data-table td {
    padding: 0.5rem;
  }

  .hide-mobile {
    display: none;
  }
}

/* アニメーション */
.fade-in {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* パルスアニメーション（更新中） */
.pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

/* ====== リアルタイム監視パネル ====== */

/* 監視パネル固定ヘッダー */
.realtime-panel {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  z-index: 40;
  background: linear-gradient(180deg, #111827 0%, rgba(17, 24, 39, 0.95) 100%);
  border-bottom: 1px solid #374151;
  backdrop-filter: blur(8px);
  transition: transform 0.3s ease;
}

.realtime-panel.collapsed {
  transform: translateY(-100%);
}

/* 監視カード */
.watch-card {
  background: #1f2937;
  border-radius: 8px;
  border: 1px solid #374151;
  padding: 0.75rem;
  min-width: 240px;
  transition: all 0.2s;
}

.watch-card:hover {
  border-color: #3b82f6;
}

.watch-card.tier-1 {
  border-left: 3px solid #10b981;
}

.watch-card.tier-2 {
  border-left: 3px solid #3b82f6;
}

.watch-card.has-signal {
  animation: signalPulse 2s ease-in-out infinite;
}

@keyframes signalPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
}

.watch-card.sell-signal {
  animation: sellPulse 2s ease-in-out infinite;
}

@keyframes sellPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
  }
}

/* シグナルバッジ */
.signal-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
}

.signal-buy {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.signal-strong-buy {
  background: linear-gradient(135deg, #10b981, #047857);
  color: white;
  animation: strongBuyPulse 1.5s ease-in-out infinite;
}

@keyframes strongBuyPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.signal-sell {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
}

.signal-strong-sell {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: white;
  animation: strongBuyPulse 1.5s ease-in-out infinite;
}

.signal-take-profit {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}

.signal-stop-loss {
  background: linear-gradient(135deg, #dc2626, #991b1b);
  color: white;
}

.signal-reversal {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: white;
}

/* Tier インジケーター */
.tier-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  font-size: 0.625rem;
  font-weight: 700;
}

.tier-1-indicator {
  background: #10b981;
  color: white;
}

.tier-2-indicator {
  background: #3b82f6;
  color: white;
}

.tier-3-indicator {
  background: #6b7280;
  color: white;
}

/* トレンドインジケーター */
.trend-up {
  color: #10b981;
}

.trend-down {
  color: #ef4444;
}

.trend-sideways {
  color: #6b7280;
}

/* レイヤーステータス */
.layer-status {
  display: flex;
  gap: 0.25rem;
}

.layer-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.layer-dot.buy {
  background: #10b981;
}

.layer-dot.sell {
  background: #ef4444;
}

.layer-dot.neutral {
  background: #6b7280;
}

/* シグナルポップアップ */
.signal-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 100;
  background: #1f2937;
  border-radius: 16px;
  border: 2px solid #374151;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  padding: 1.5rem;
  min-width: 360px;
  max-width: 90vw;
  animation: popupSlideIn 0.3s ease-out;
}

@keyframes popupSlideIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.signal-popup.buy-popup {
  border-color: #10b981;
}

.signal-popup.sell-popup {
  border-color: #ef4444;
}

.signal-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(2px);
  animation: overlayFadeIn 0.2s ease-out;
}

@keyframes overlayFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* 監視設定モーダル */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
}

.modal-content {
  position: relative;
  background: #1f2937;
  border-radius: 12px;
  border: 1px solid #374151;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow: hidden;
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid #374151;
  background: #111827;
}

.modal-body {
  padding: 1rem;
  overflow-y: auto;
  max-height: 60vh;
}

.modal-footer {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  padding: 1rem;
  border-top: 1px solid #374151;
  background: #111827;
}

/* ボタン */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: #3b82f6;
  color: white;
}

.btn-primary:hover {
  background: #2563eb;
}

.btn-success {
  background: #10b981;
  color: white;
}

.btn-success:hover {
  background: #059669;
}

.btn-danger {
  background: #ef4444;
  color: white;
}

.btn-danger:hover {
  background: #dc2626;
}

.btn-ghost {
  background: transparent;
  color: #9ca3af;
  border: 1px solid #374151;
}

.btn-ghost:hover {
  background: #374151;
  color: white;
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
}

/* 入力フィールド */
.input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  background: #111827;
  border: 1px solid #374151;
  border-radius: 8px;
  color: white;
  font-size: 0.875rem;
  transition: border-color 0.2s;
}

.input:focus {
  outline: none;
  border-color: #3b82f6;
}

.input::placeholder {
  color: #6b7280;
}

/* 検索結果リスト */
.search-results {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #374151;
  border-radius: 8px;
  margin-top: 0.5rem;
}

.search-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem;
  border-bottom: 1px solid #374151;
  cursor: pointer;
  transition: background 0.2s;
}

.search-result-item:hover {
  background: #374151;
}

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

/* ツールチップ */
.tooltip {
  position: relative;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.5rem 0.75rem;
  background: #111827;
  color: white;
  font-size: 0.75rem;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
  z-index: 50;
}

.tooltip:hover::after {
  opacity: 1;
  visibility: visible;
}

/* プログレスバー */
.progress-bar {
  height: 4px;
  background: #374151;
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #10b981);
  transition: width 0.3s ease;
}

/* タブ */
.tabs {
  display: flex;
  border-bottom: 1px solid #374151;
}

.tab {
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  color: #9ca3af;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  cursor: pointer;
}

.tab:hover {
  color: white;
}

.tab.active {
  color: #3b82f6;
  border-bottom-color: #3b82f6;
}

/* 更新インジケーター */
.update-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: #6b7280;
}

.update-indicator.updating {
  color: #3b82f6;
}

.update-dot {
  width: 6px;
  height: 6px;
  background: currentColor;
  border-radius: 50%;
}

.update-indicator.updating .update-dot {
  animation: updatePulse 1s ease-in-out infinite;
}

@keyframes updatePulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

/* 通知トースト */
.toast-container {
  position: fixed;
  top: 80px;
  right: 1rem;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 400px;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  background: #1f2937;
  border-radius: 8px;
  border: 1px solid #374151;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
  animation: toastSlideIn 0.3s ease-out;
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toast.toast-success {
  border-left: 3px solid #10b981;
}

.toast.toast-warning {
  border-left: 3px solid #f59e0b;
}

.toast.toast-error {
  border-left: 3px solid #ef4444;
}

.toast.toast-signal-buy {
  border-left: 3px solid #10b981;
  background: linear-gradient(135deg, #1f2937, rgba(16, 185, 129, 0.1));
}

.toast.toast-signal-sell {
  border-left: 3px solid #ef4444;
  background: linear-gradient(135deg, #1f2937, rgba(239, 68, 68, 0.1));
}

/* リアルタイムグラフ（ミニ） */
.mini-chart {
  width: 100px;
  height: 40px;
  background: #111827;
  border-radius: 4px;
  overflow: hidden;
}
