* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Noto Sans KR', sans-serif;
  background: #f5f7fa;
  min-height: 100vh;
  padding: 20px;
}

.site-header {
  text-align: center;
  margin-bottom: 40px;
  padding: 30px 20px;
}

.site-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 10px;
  font-family: 'Gowun Batang', serif;
  color: #2c3e50;
}

.site-subtitle {
  font-size: 1rem;
  color: #7f8c8d;
  margin-bottom: 20px;
}

.btn-write-toggle {
  padding: 12px 24px;
  background: #3498db;
  color: white;
  border: none;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.btn-write-toggle:hover {
  background: #2980b9;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(52, 152, 219, 0.4);
}

.container {
  max-width: 900px;
  margin: 0 auto;
}

.status {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: none;
  text-align: center;
  font-weight: 600;
}

.status:not(:empty) {
  display: block;
  background: #27ae60;
  color: white;
}

.status.error {
  background: #e74c3c;
}

/* 작성 섹션 */
.compose-section {
  margin-bottom: 40px;
  animation: slideDown 0.3s ease-out;
}

.compose-section.hidden {
  display: none;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: #2c3e50;
}

.compose-card {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: #2c3e50;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px;
  border: 1px solid #bdc3c7;
  border-radius: 6px;
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.btn-submit,
.btn-cancel-form {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-submit {
  background: #3498db;
  color: white;
  flex: 1;
}

.btn-submit:hover {
  background: #2980b9;
}

.btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-cancel-form {
  background: #ecf0f1;
  color: #7f8c8d;
}

.btn-cancel-form:hover {
  background: #bdc3c7;
}

/* 피드 섹션 */
.feed-section {
  margin-bottom: 40px;
}

.quote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.card {
  background: white;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  animation: slideIn 0.3s ease-out;
  transition: box-shadow 0.3s;
  position: relative;
}

.card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

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

.book-tag {
  display: inline-block;
  background: #ecf0f1;
  color: #2c3e50;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 12px;
  width: fit-content;
}

.quote-content {
  font-family: 'Gowun Batang', serif;
  font-size: 1.1rem;
  line-height: 1.6;
  color: #2c3e50;
  margin-bottom: 16px;
  flex-grow: 1;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid #ecf0f1;
}

.meta {
  font-size: 0.85rem;
  color: #95a5a6;
}

.btn-delete {
  padding: 6px 12px;
  background: transparent;
  color: #e74c3c;
  border: 1px solid #e74c3c;
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  opacity: 0;
  pointer-events: none;
}

.card:hover .btn-delete {
  opacity: 1;
  pointer-events: auto;
}

.btn-delete:hover {
  background: #e74c3c;
  color: white;
}

/* 스켈레톤 로딩 */
.skeleton-card {
  background: white;
  padding: 24px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.shimmer {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

.shimmer.sm {
  height: 12px;
  width: 60%;
}

.shimmer.lg {
  height: 20px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* 모달 */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s;
}

.modal-overlay.active {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  max-width: 400px;
  width: 90%;
  text-align: center;
}

.modal-content h3 {
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: #2c3e50;
}

.modal-content p {
  color: #7f8c8d;
  margin-bottom: 20px;
}

.modal-input {
  width: 100%;
  padding: 12px;
  border: 2px solid #bdc3c7;
  border-radius: 6px;
  font-size: 1rem;
  margin-bottom: 20px;
  font-family: 'Noto Sans KR', sans-serif;
  transition: border-color 0.3s;
}

.modal-input:focus {
  outline: none;
  border-color: #3498db;
}

.modal-buttons {
  display: flex;
  gap: 10px;
}

.btn-cancel,
.btn-confirm {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-cancel {
  background: #ecf0f1;
  color: #7f8c8d;
}

.btn-cancel:hover {
  background: #bdc3c7;
}

.btn-confirm {
  background: #3498db;
  color: white;
}

.btn-confirm:hover {
  background: #2980b9;
}

.site-title a {
  text-decoration: none;
  color: #2c3e50;
  transition: color 0.3s;
}

.site-title a:hover {
  color: #3498db;
}

/* 반응형 */
@media (max-width: 768px) {
  .site-title {
    font-size: 2rem;
  }

  .quote-grid {
    grid-template-columns: 1fr;
  }

  .compose-card {
    padding: 20px;
  }

  .form-actions {
    flex-direction: column;
  }

  .btn-submit,
  .btn-cancel-form {
    width: 100%;
  }
}
