/* 전역 반응형 최적화 CSS */

/* 기본 설정 */
* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: #333;
}

/* 컨테이너 최적화 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* 반응형 그리드 */
.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -15px;
}

.col {
  flex: 1;
  padding: 0 15px;
}

/* 카드 컴포넌트 */
.card {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

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

.card-body {
  padding: 1.5rem;
}

/* 버튼 최적화 */
.btn {
  display: inline-block;
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
  font-weight: 500;
}

.btn-primary {
  background: #007bff;
  color: white;
}

.btn-primary:hover {
  background: #0056b3;
  transform: translateY(-1px);
}

.btn-secondary {
  background: #6c757d;
  color: white;
}

.btn-success {
  background: #28a745;
  color: white;
}

.btn-danger {
  background: #dc3545;
  color: white;
}

/* 폼 요소 최적화 */
.form-control {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.form-control:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
  outline: none;
}

/* 파일 업로드 영역 */
.file-upload-area {
  border: 2px dashed #dee2e6;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  background: #f8f9fa;
  transition: all 0.3s ease;
  cursor: pointer;
}

.file-upload-area:hover {
  border-color: #007bff;
  background: #e3f2fd;
}

.file-upload-area.dragover {
  border-color: #007bff;
  background: #e3f2fd;
  transform: scale(1.02);
}

/* 업로드된 파일 아이템 */
.uploaded-file-item {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  margin-bottom: 8px;
  transition: all 0.3s ease;
}

.uploaded-file-item:hover {
  background: #f8f9fa;
}

.uploaded-file-item .file-icon {
  margin-right: 10px;
  font-size: 18px;
}

.uploaded-file-item .file-info {
  flex: 1;
}

.uploaded-file-item .file-name {
  font-weight: 500;
  color: #212529;
}

.uploaded-file-item .file-size {
  font-size: 12px;
  color: #6c757d;
}

.uploaded-file-item .file-actions {
  display: flex;
  gap: 5px;
}

/* 반응형 디자인 */
@media (max-width: 1200px) {
  .container {
    max-width: 100%;
    padding: 0 20px;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 15px;
  }

  .card-body {
    padding: 1rem;
  }

  .btn {
    padding: 6px 12px;
    font-size: 13px;
  }

  .file-upload-area {
    padding: 15px;
  }

  .uploaded-file-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .uploaded-file-item .file-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

@media (max-width: 576px) {
  .container {
    padding: 0 10px;
  }

  .card-body {
    padding: 0.75rem;
  }

  .btn {
    padding: 4px 8px;
    font-size: 12px;
  }

  .file-upload-area {
    padding: 10px;
    font-size: 14px;
  }

  .uploaded-file-item {
    padding: 6px 8px;
  }

  .file-actions .btn {
    padding: 3px 6px;
    font-size: 11px;
  }
}

/* 접근성 개선 */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 다크 모드 지원 */
@media (prefers-color-scheme: dark) {
  body {
    background: #1a1a1a;
    color: #e0e0e0;
  }

  .card {
    background: #2d2d2d;
    border-color: #404040;
  }

  .form-control {
    background: #2d2d2d;
    border-color: #404040;
    color: #e0e0e0;
  }

  .file-upload-area {
    background: #2d2d2d;
    border-color: #404040;
  }

  .uploaded-file-item {
    background: #2d2d2d;
    border-color: #404040;
  }
}
