/* 수행평가 AI 도우미 - 커스텀 스타일 */

/* 애니메이션 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

/* 기본 애니메이션 적용 */
.animate-fade-in {
  animation: fadeIn 0.5s ease-out;
}

.animate-slide-up {
  animation: slideUp 0.6s ease-out;
}

/* 파일 업로드 영역 호버 효과 */
.upload-area {
  transition: all 0.3s ease;
}

.upload-area:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* 진행 바 애니메이션 */
.progress-bar {
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 카드 호버 효과 */
.card-hover {
  transition: all 0.3s ease;
}

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

/* 버튼 효과 */
.btn-gradient {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  transition: all 0.3s ease;
}

.btn-gradient:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-gradient:active {
  transform: translateY(0);
}

/* 점수 디스플레이 애니메이션 */
.score-display {
  animation: slideUp 1s ease-out;
}

.score-number {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 채팅 메시지 애니메이션 */
.chat-message {
  animation: fadeIn 0.4s ease-out;
}

/* 스크롤바 스타일링 */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

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

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}

/* 텍스트 영역 스타일링 */
.improved-content {
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.8;
  font-size: 14px;
}

.improved-content:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* 모달 애니메이션 */
.modal-backdrop {
  animation: fadeIn 0.3s ease-out;
}

.modal-content {
  animation: slideUp 0.4s ease-out;
}

/* 성공/에러 상태 표시 */
.status-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.status-error {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
}

.status-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
}

/* 로딩 스피너 */
.loading-spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid #667eea;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

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

/* 반응형 텍스트 */
@media (max-width: 768px) {
  .score-number {
    font-size: 2rem;
  }
  
  .mobile-text-sm {
    font-size: 0.875rem;
  }
  
  .mobile-p-2 {
    padding: 0.5rem;
  }
}

/* 다크 모드 준비 */
@media (prefers-color-scheme: dark) {
  .dark-bg {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  }
  
  .dark-text {
    color: #f9fafb;
  }
  
  .dark-card {
    background: rgba(31, 41, 55, 0.8);
    border: 1px solid rgba(75, 85, 99, 0.3);
  }
}

/* 접근성 개선 */
.focus-ring:focus {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

/* 인터랙티브 요소 */
.interactive:hover {
  cursor: pointer;
}

.interactive:focus {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

/* 그리드 레이아웃 보조 */
.grid-auto-fit {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* 유틸리티 클래스 */
.text-gradient {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-gradient-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bg-gradient-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.bg-gradient-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.bg-gradient-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* 그림자 효과 */
.shadow-soft {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.shadow-medium {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.shadow-strong {
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

/* 글래스모피즘 효과 */
.glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 피드백 애니메이션 */
.bounce-in {
  animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3) translateY(-30px);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* 상태 인디케이터 */
.status-indicator {
  position: relative;
}

.status-indicator::after {
  content: '';
  position: absolute;
  top: -2px;
  right: -2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid white;
}

.status-indicator.online::after {
  background: #10b981;
  animation: pulse 2s infinite;
}

.status-indicator.busy::after {
  background: #f59e0b;
}

.status-indicator.offline::after {
  background: #6b7280;
}