/* ===================================
   AI 學習指南 — 補充動畫樣式
   =================================== */

/* Scroll Reveal Base */
[data-aos] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-aos].aos-animate {
  opacity: 1;
  transform: translateY(0);
}

[data-aos-delay="100"] { transition-delay: 0.1s; }
[data-aos-delay="200"] { transition-delay: 0.2s; }
[data-aos-delay="300"] { transition-delay: 0.3s; }
[data-aos-delay="400"] { transition-delay: 0.4s; }
[data-aos-delay="500"] { transition-delay: 0.5s; }

/* Progress Bar */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #6c63ff, #ff6584, #43e97b);
  z-index: 2000;
  width: 0%;
  transition: width 0.1s linear;
}

/* Highlight animation for prompt boxes */
.prompt-box:hover .prompt-text {
  color: rgba(255,255,255,0.95);
}

/* Copy button */
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(108,99,255,0.1);
  color: var(--primary);
  border: 1px solid rgba(108,99,255,0.25);
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
  float: right;
  margin-top: 4px;
}

.copy-btn:hover {
  background: rgba(108,99,255,0.2);
  color: var(--primary-dark);
}

.copy-btn.copied {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
  border-color: rgba(34, 197, 94, 0.3);
}

.prompt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Tool card entrance */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Pulse for CTA */
@keyframes pulse {
  0%, 100% { box-shadow: 0 6px 24px rgba(108,99,255,0.35); }
  50% { box-shadow: 0 8px 32px rgba(108,99,255,0.55), 0 0 0 8px rgba(108,99,255,0.1); }
}

.btn-pulse {
  animation: pulse 2.5s ease-in-out infinite;
}

/* Sticky side banner */
.side-tutor-banner {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 900;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.side-banner-tab {
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  padding: 16px 12px;
  border-radius: 12px 0 0 12px;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: -4px 0 16px rgba(108,99,255,0.25);
  transition: all 0.3s ease;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.side-banner-tab:hover {
  padding-right: 16px;
  box-shadow: -6px 0 24px rgba(108,99,255,0.4);
}

.side-banner-tab i {
  font-size: 1rem;
  writing-mode: horizontal-tb;
}

@media (max-width: 768px) {
  .side-tutor-banner { display: none; }
}

/* Floating particles */
.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.3;
  animation: particleFloat linear infinite;
}

@keyframes particleFloat {
  0% { transform: translateY(0) translateX(0); opacity: 0.3; }
  50% { opacity: 0.6; }
  100% { transform: translateY(-100vh) translateX(20px); opacity: 0; }
}

/* Counter animation */
.counter {
  display: inline-block;
}

/* Section reveal divider */
.divider-wave {
  width: 100%;
  overflow: hidden;
  line-height: 0;
}

.divider-wave svg {
  display: block;
  width: 100%;
}

/* Mobile nav overlay */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 998;
  backdrop-filter: blur(4px);
}

.nav-overlay.active { display: block; }

/* Toast notification */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text-primary);
  color: white;
  padding: 12px 24px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 9999;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast i { color: #43e97b; }

/* Hover card glow effect */
.tool-card:hover .tool-icon,
.tip-card:hover .tip-icon {
  box-shadow: 0 8px 24px rgba(108,99,255,0.4);
}

/* Method card highlight on hover */
.method-card:hover .method-number {
  background: linear-gradient(180deg, #ff6584 0%, #c94b6a 100%);
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .tutor-mid-card { padding: 28px 20px; }
  .method-content { padding: 20px 16px; }
}
