/* /tools/snippets/style.css */

body {
  font-family: 'Segoe UI', sans-serif;
  margin: 80px 1rem 2rem;
  background: #fefefe;
  color: #2c3e50;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-title {
  font-size: 1.6rem;
  color: #34495e;
  text-align: center;
  margin-bottom: 1rem;
  position: relative;
}
.page-title::after {
  content: "";
  display: block;
  width: 50px;
  height: 3px;
  background: #3498db;
  margin: 8px auto 0;
  border-radius: 2px;
}

.subtitle {
  display: block;
  width: fit-content;
  margin: 0 auto 1.4rem;
  padding: 0.5rem 1rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: #2c3e50;
  background: #eaf4ff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.notice {
  background: #f5f5f5;
  border-left: 4px solid #3498db;
  padding: 0.8rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

.form-group {
  margin-top: 1rem;
}
label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.3rem;
}
input, textarea {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
  font-size: 1rem;
}

#saveBtn {
  margin-top: 1rem;
  padding: 0.7rem 1.2rem;
  background: #0066cc;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
}
#saveBtn:hover {
  background: #005bb5;
}

.snippets {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* 카드 기본 스타일 */
.card {
  position: relative;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid #222;
  background: #f9f9f9;
  white-space: pre-wrap; /* 줄바꿈 유지 */
}

/* 편집 버튼 (항상 우측 상단) */
.edit-btn {
  position: absolute;
  top: 3px;
  right: 12px;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  opacity: 0.8;
  padding: 6px;
}

/* 삭제 버튼 (카드 바깥쪽 우측 하단) */
.delete-btn {
  position: absolute;
  bottom: 3px;
  right: 12px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0.8;
  padding: 6px;
}

.edit-btn:hover,
.delete-btn:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 50%;
}

.card-title {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.card-date {
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.card-content {
  font-size: 0.95rem;
  line-height: 1.4;
  overflow: hidden;
  transition: max-height 0.3s;
  white-space: pre-wrap;
}
.card-content.collapsed {
  max-height: 4.2em; /* 1.4em × 3줄 */
}

.toggle-more {
  font-size: 0.85rem;
  color: #3498db;
  cursor: pointer;
  margin-top: 0.3rem;
}

/* 복사 알림 토스트 */
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.7);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  z-index: 999;
}

/* ────────────────────────────────────────── */
/* 🏠 다른 도구 더 보기 버튼 스타일 */
/* ────────────────────────────────────────── */
.home-button {
  position: fixed;
  top: 12px;
  left: 0;
  right: 0;
  margin: auto;
  width: fit-content;
  padding: 14px 24px;
  background-color: #0066cc;
  color: #fff;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1.3em;
  box-shadow: 0 6px 12px rgba(0,0,0,0.3);
  overflow: hidden;
  transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s;
  z-index: 999;
}
.home-button:hover {
  background-color: #004999;
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.5);
}
.home-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: rgba(255,255,255,0.4);
  transform: skewX(-30deg);
  animation: shine 3s infinite;
}
@keyframes shine {
  0%   { left: -75%; }
  50%  { left: 125%; }
  100% { left: -75%; }
}
@media (max-width: 600px) {
  .home-button {
    font-size: 1.1em;
    padding: 10px 16px;
    top: 10px;
  }
}
.warning {
  display: block;
  margin-top: 0.8rem;
  font-size: 0.9rem;
  color: #b90000;
  font-weight: 500;
}
