/* バナスコAI - プロフェッショナルデザイン CSS */

/* ベースリセット */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* カスタムスクロールバー */
::-webkit-scrollbar {
  width: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: linear-gradient(45deg, #00f5ff, #8b5cf6);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(45deg, #8b5cf6, #ff6b9d);
}

/* ナビゲーション拡張スタイル */
.nav-link {
  position: relative;
  overflow: hidden;
}

.nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 245, 255, 0.2), transparent);
  transition: left 0.5s;
}

.nav-link:hover::before {
  left: 100%;
}

/* モバイルメニュートグル */
#mobile-menu-btn {
  transition: transform 0.3s ease;
}

#mobile-menu-btn:hover {
  transform: scale(1.1);
}

/* アニメーション拡張 */
@keyframes matrix-rain {
  0% {
    opacity: 1;
    transform: translateY(-100vh);
  }
  100% {
    opacity: 0;
    transform: translateY(100vh);
  }
}

.matrix-effect::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 98px,
    rgba(0, 245, 255, 0.03) 100px
  );
  animation: matrix-rain 20s linear infinite;
  pointer-events: none;
  z-index: 1;
}

/* グラデーション背景アニメーション */
@keyframes gradient-shift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.animated-gradient {
  background: linear-gradient(-45deg, #0a0a1f, #1a1a2e, #16213e, #2d3561);
  background-size: 400% 400%;
  animation: gradient-shift 15s ease infinite;
}

/* カードホバーエフェクト */
.card-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.card-hover:hover {
  transform: translateY(-8px) rotateX(5deg) rotateY(2deg);
  box-shadow: 0 25px 50px -12px rgba(0, 245, 255, 0.25);
}

/* テキストグロー効果 */
.text-glow {
  text-shadow: 
    0 0 5px currentColor,
    0 0 10px currentColor,
    0 0 15px currentColor,
    0 0 20px currentColor;
}

/* パルス効果の拡張 */
.pulse-intense {
  animation: pulse-intense 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-intense {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

/* ボタンリップル効果 */
.btn-ripple {
  position: relative;
  overflow: hidden;
}

.btn-ripple::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-ripple:active::after {
  width: 300px;
  height: 300px;
}

/* フォーム要素の拡張スタイル */
input:focus, select:focus, textarea:focus {
  box-shadow: 
    0 0 0 2px rgba(0, 245, 255, 0.2),
    0 0 20px rgba(0, 245, 255, 0.1);
  transform: scale(1.02);
}

/* プレースホルダーアニメーション */
input::placeholder {
  transition: all 0.3s ease;
}

input:focus::placeholder {
  transform: translateY(-2px);
  opacity: 0.7;
}

/* ローディングスピナー */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(0, 245, 255, 0.2);
  border-radius: 50%;
  border-top-color: #00f5ff;
  animation: spin 1s ease-in-out infinite;
}

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

/* 画像アップロードエリア */
.upload-zone {
  transition: all 0.3s ease;
  background: rgba(0, 245, 255, 0.02);
}

.upload-zone:hover {
  background: rgba(0, 245, 255, 0.05);
  border-color: rgba(0, 245, 255, 0.5) !important;
  transform: scale(1.01);
}

.upload-zone.dragover {
  background: rgba(0, 245, 255, 0.1);
  border-color: rgba(0, 245, 255, 0.8) !important;
  transform: scale(1.02);
}

/* スコア表示 */
.score-display {
  position: relative;
  overflow: hidden;
}

.score-display::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #00f5ff, #8b5cf6, #ff6b9d, #00ff88);
  border-radius: inherit;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s;
}

.score-display:hover::before {
  opacity: 0.3;
}

/* プログレスバー */
.progress-bar {
  position: relative;
  background: rgba(70, 130, 180, 0.2);
  border-radius: 10px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #00ff88, #00f5ff, #8b5cf6);
  border-radius: inherit;
  transition: width 1s ease-out;
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: progress-shine 2s ease-in-out infinite;
}

@keyframes progress-shine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* トーストメッセージ */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  color: white;
  font-weight: 500;
  z-index: 1000;
  transform: translateX(400px);
  transition: transform 0.3s ease-in-out;
}

.toast.show {
  transform: translateX(0);
}

.toast.success {
  background: linear-gradient(45deg, #00ff88, #00f5ff);
}

.toast.error {
  background: linear-gradient(45deg, #ff6b9d, #ff8c00);
}

.toast.info {
  background: linear-gradient(45deg, #00f5ff, #8b5cf6);
}

/* A/B比較結果スタイル */
.winner-badge {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 40px;
  height: 40px;
  background: linear-gradient(45deg, #ffd700, #ff8c00);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
  animation: winner-pulse 2s ease-in-out infinite;
}

@keyframes winner-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
  }
}

/* コピー生成結果のスタイル */
.copy-item {
  transition: all 0.3s ease;
  cursor: pointer;
}

.copy-item:hover {
  transform: translateX(10px);
  background: rgba(0, 245, 255, 0.05) !important;
}

.copy-item.selected {
  background: rgba(0, 245, 255, 0.1) !important;
  border-color: rgba(0, 245, 255, 0.5) !important;
}

/* 効果スコアの視覚化 */
.effectiveness-bar {
  position: relative;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.effectiveness-fill {
  height: 100%;
  border-radius: inherit;
  transition: width 1s ease-out;
  background: linear-gradient(90deg, #ff6b9d, #ff8c00, #ffd700, #00ff88);
}

/* 3D カードエフェクト */
.card-3d {
  perspective: 1000px;
}

.card-3d-inner {
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.card-3d:hover .card-3d-inner {
  transform: rotateY(10deg) rotateX(5deg);
}

/* パーティクルエフェクト背景 */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: #00f5ff;
  border-radius: 50%;
  animation: float-particle 10s linear infinite;
}

@keyframes float-particle {
  0% {
    opacity: 0;
    transform: translateY(100vh) scale(0);
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-100px) scale(1);
  }
}

/* レスポンシブ調整 */
@media (max-width: 768px) {
  .card-hover:hover {
    transform: translateY(-4px);
  }
  
  .upload-zone:hover {
    transform: none;
  }
  
  .copy-item:hover {
    transform: none;
  }
}

/* ダークモードの微調整 */
@media (prefers-color-scheme: dark) {
  ::-webkit-scrollbar-track {
    background: #0a0a1f;
  }
}

/* 印刷スタイル */
@media print {
  .no-print {
    display: none !important;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
}