body {
  margin: 0;
  font-family: 'Segoe UI', 'Apple SD Gothic Neo', sans-serif;
  background: #f3f4f6;
  color: #333;
  transition: background 0.3s, color 0.3s;
}

.container {
  max-width: 900px;
  margin: 40px auto;
  padding: 24px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
  transition: box-shadow 0.3s;
}

.title {
  font-size: 2rem;
  font-weight: 800;
  color: #4f46e5;
  margin-bottom: 0.3rem;
  text-align: center;
}

.filename {
  font-size: 0.95rem;
  color: #6b7280;
  text-align: center;
  margin-bottom: 20px;
}

.viewer {
  border: 1px solid #e5e7eb;
  height: 600px;
  background: #ffffff;
  border-radius: 10px;
  overflow: auto;
  box-shadow: inset 0 0 8px rgba(0,0,0,0.05);
}

.location {
  margin-top: 12px;
  font-size: 0.9rem;
  text-align: center;
  color: #4b5563;
}

.controls {
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.9rem;
}

button {
  background: #e0e7ff;
  color: #1f2937;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}

button:hover {
  background: #c7d2fe;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transform: translateY(-1px);
}

.font-size-btn.active {
  border: 2px solid #6366f1;
  font-weight: bold;
  background-color: #dbeafe;
  color: #1e3a8a;
}

/* 📘 로딩 오버레이 */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(to bottom right, #eef2ff, #ffffff);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  animation: fadein 0.6s ease-in-out;
}

.loader {
  border: 8px solid #e5e7eb;
  border-top: 8px solid #6366f1;
  border-radius: 50%;
  width: 70px;
  height: 70px;
  animation: spin 1.2s linear infinite;
}

.loading-text {
  margin-top: 20px;
  font-size: 1.15rem;
  color: #4b5563;
  animation: fadein 1s ease-in-out;
}

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

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

/* ✅ 반응형 */
@media screen and (max-width: 640px) {
  .container {
    margin: 20px 12px;
    padding: 16px;
  }

  .viewer {
    height: 480px;
  }

  button {
    padding: 6px 10px;
    font-size: 0.85rem;
  }

  .title {
    font-size: 1.5rem;
  }
}
