/* KOL施策管理ツール カスタムスタイル */

/* 基本スタイル */
body {
  font-family: 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, Arial, sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

/* カスタムグラデーション */
.gradient-bg {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* モーダルアニメーション */
#campaign-modal {
  backdrop-filter: blur(4px);
}

#campaign-modal > div {
  animation: modalSlideIn 0.3s ease-out;
}

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

/* 進捗バーアニメーション */
.progress-bar {
  transition: width 0.8s ease-out;
}

/* ホバー効果 */
.campaign-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

/* カードアニメーション */
.card-entrance {
  animation: cardSlideUp 0.6s ease-out;
}

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

/* ボタンホバー効果 */
.btn-hover-scale:hover {
  transform: scale(1.05);
}

/* グラデーション効果 */
.gradient-text {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* スクロールバースタイル */
.overflow-y-auto::-webkit-scrollbar {
  width: 6px;
}

.overflow-y-auto::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.overflow-y-auto::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.overflow-y-auto::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* 通知アニメーション */
.notification {
  animation: notificationSlideIn 0.3s ease-out;
}

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

/* フォーカス状態 */
input:focus, select:focus, textarea:focus {
  outline: none;
  ring: 2px;
  ring-color: #3B82F6;
}

/* テーブルスタイル */
table {
  border-collapse: collapse;
}

table th {
  font-weight: 600;
  background-color: #f8fafc;
}

table td, table th {
  border: none;
}

/* ステータスバッジ */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* チャートコンテナ */
#progress-chart {
  height: 250px !important;
}

/* スティッキー要素 */
.sticky {
  position: -webkit-sticky;
  position: sticky;
}

/* カテゴリーヘッダー */
.category-header {
  position: relative;
  overflow: hidden;
}

.category-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: shine 3s infinite;
}

@keyframes shine {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* 乖離分析セクションのスタイル */
.deviation-toggle {
  transition: all 0.3s ease;
}

#deviation-detail-section {
  transition: all 0.4s ease;
  overflow: hidden;
}

/* コンパクト乖離カード */
.deviation-card {
  transition: all 0.3s ease;
}

.deviation-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 警告メッセージのアニメーション */
.warning-message {
  animation: pulseWarning 2s ease-in-out infinite;
}

@keyframes pulseWarning {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

/* レスポンシブ調整 */
@media (max-width: 768px) {
  .grid-cols-2 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
  
  #campaign-modal > div {
    width: 95%;
    margin: 10px auto;
  }
}

/* ローディングスピナー */
.spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid #3498db;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
}

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