/* 自定義樣式 */

/* 登入按鈕樣式 */
.login-button-section {
  margin-top: 1.5rem;
}

.login-hint {
  animation: pulse-hint 2s ease-in-out infinite;
  text-shadow: 0 0 10px rgba(96, 165, 250, 0.5);
}

@keyframes pulse-hint {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.login-btn-pulse {
  position: relative;
  animation: button-glow 2s ease-in-out infinite;
}

.login-btn-pulse::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 8px;
  padding: 2px;
  background: linear-gradient(45deg, #60a5fa, #3b82f6, #2563eb, #1d4ed8);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: border-glow 2s ease-in-out infinite;
  opacity: 0;
}

@keyframes button-glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4), 0 0 40px rgba(59, 130, 246, 0.2);
  }
  50% {
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.6), 0 0 60px rgba(59, 130, 246, 0.3);
  }
}

@keyframes border-glow {
  0%, 100% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
}

.login-btn-pulse:hover {
  animation: button-glow-hover 0.5s ease-in-out infinite;
}

@keyframes button-glow-hover {
  0%, 100% {
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.6), 0 0 60px rgba(59, 130, 246, 0.4);
  }
  50% {
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.8), 0 0 80px rgba(59, 130, 246, 0.5);
  }
}

/* KPI 卡片樣式 */
.kpi-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(51, 65, 85, 0.5);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
  border-color: rgba(59, 130, 246, 0.5);
}

/* 圖表容器樣式 */
.chart-container {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(51, 65, 85, 0.5);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

.chart-box {
  width: 100%;
  height: 400px;
  min-height: 400px;
}

/* 表格樣式 */
table {
  background: rgba(15, 23, 42, 0.4);
}

table tbody tr:nth-child(even) {
  background: rgba(30, 41, 59, 0.3);
}

table tbody tr:hover {
  background: rgba(59, 130, 246, 0.1);
}

/* 導覽連結樣式 */
.nav-link.active {
  background: rgba(59, 130, 246, 0.2);
  border-left: 3px solid rgb(96, 165, 250);
  color: rgb(96, 165, 250);
  font-weight: 600;
}

.nav-link {
  color: #e2e8f0;
  text-decoration: none;
  display: block;
}

/* 區塊內容樣式 */
.section-content {
  animation: fadeIn 0.3s ease-in;
}

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

/* 向量比較列表特殊樣式 */
#table-vector-comparison tr:nth-child(even) {
  background: rgba(30, 41, 59, 0.5);
}

#table-vector-comparison tr:hover {
  background: rgba(59, 130, 246, 0.15);
}

/* 文字截斷樣式 */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* AI 決策建議橫條樣式 */
#ai-decision-banner {
  min-height: 50px;
  display: flex;
  align-items: center;
}

.ai-banner-item {
  transition: all 0.2s ease;
}

.ai-banner-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 前五名排行榜樣式 */
.top5-item {
  transition: all 0.3s ease;
}

.top5-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* 即時訊息跑馬燈樣式 */
@keyframes scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.animate-scroll {
  animation: scroll 30s linear infinite;
}

#messages-ticker-inner {
  display: flex;
  gap: 1.5rem;
  width: max-content;
}

.message-item {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  min-height: 180px;
}

#realtime-messages-ticker {
  position: relative;
  min-height: 120px;
}

#messages-ticker-content {
  height: 100%;
  overflow: hidden;
}

/* 淡入動畫 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.5s ease-out forwards;
}

/* 新訊息閃爍效果 */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.message-item.new-message {
  animation: pulse 1s ease-in-out 3;
  border-width: 3px;
}

/* 全屏模式樣式 */
.chart-container.fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  width: 100vw;
  height: 100vh;
  margin: 0;
  border-radius: 0;
  padding: 2rem;
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(10px);
}

.chart-container.fullscreen .chart-box {
  height: calc(100vh - 120px);
  min-height: calc(100vh - 120px);
}

.fullscreen-btn {
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.375rem;
  transition: all 0.2s;
}

.fullscreen-btn:hover {
  background: rgba(59, 130, 246, 0.1);
}

/* AI 建議卡片樣式 */
.suggestion-card {
  transition: all 0.3s ease;
}

.suggestion-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
}

.filter-btn.active {
  background: rgba(59, 130, 246, 0.3);
  border: 1px solid rgb(96, 165, 250);
  color: rgb(96, 165, 250);
}

.action-btn:active {
  transform: scale(0.98);
}

/* 響應式調整 */
@media (max-width: 768px) {
  .chart-box {
    height: 300px;
    min-height: 300px;
  }
  
  .kpi-card {
    padding: 1rem;
  }
  
  .grid.lg\\:grid-cols-3 {
    grid-template-columns: 1fr;
  }
}

