@charset "utf-8";
/* view.css */
h2 { font-size: 1.2rem; margin-top: 2rem; }
.title { font-size: 1.3rem; font-weight: bold; margin-bottom: 0.5rem; margin-top: 0px;}
.info { font-size: 0.85rem; color: #666; margin-bottom: 1rem; }
.post-img { width: 100%; height: auto; margin-bottom: 1rem; border-radius: 5px; }
.content { white-space: pre-wrap; margin-bottom: 1rem; line-height: 1.2; }
.attachments ul { list-style: none; padding: 0; margin: 0 0 1rem 0; }
.attachments li { margin-bottom: 0.3rem; }
.attachments a { color: #007bff; text-decoration: none; }
.attachments a:hover { text-decoration: underline; }

/* 이미지 크기조절 */
.post-img { max-width: 800px;height: auto; cursor: pointer; }

textarea { margin-bottom: 1rem; } 

.btn { display: inline-block; padding: 0.6rem 1rem; background: #007bff; color: white; border: none; border-radius: 5px; text-decoration: none; font-size: 0.9rem; cursor: pointer; }

.btn:hover { background: #0056b3; }

.menu-wrapper { position: absolute; top: 1rem; right: 1rem; }
.menu-btn { background: none; border: none; font-size: 1.2rem; cursor: pointer; }
.menu-list { display: none; position: absolute; top: 2rem; right: 0; list-style: none; margin: 0; padding: 0.5rem 0; background: white; border: 1px solid #ccc; border-radius: 5px; z-index: 100; }
.menu-list li a { display: block; padding: 0.4rem 1rem; text-decoration: none; color: #333; font-size: 0.9rem; }
.menu-list li a:hover { background: #f1f1f1; }
.pagination { text-align: center; margin: 1.5rem 0; }
.pagination a, .pagination span { display: inline-block; padding: 0.4rem 0.8rem; margin: 0 0.2rem; text-decoration: none; border: 1px solid #ccc; border-radius: 3px; font-size: 0.9rem; color: #333; }
.pagination .active { background: #007bff; color: white; border-color: #007bff; }
.vote-btn { padding: 0.2rem 0.5rem; margin-right: 0.5rem; background: #eee; border: none; border-radius: 4px; font-size: 0.85rem; cursor: pointer; }
.vote-btn:hover { background: #ddd; }
.likes { margin: 1rem 0; text-align: center; }


.comments { padding: 0; margin: 0; }
.comment { padding: 1rem; border-bottom: 1px solid #eee; display: flex; flex-direction: column; gap: 0.5rem; }
.comment-author { font-weight: bold; font-size: 1rem; color: #333; }
.comment .info { font-size: 0.85rem; color: #777; }
.comments .text { font-size: 0.95rem; line-height: 1.4; white-space: pre-wrap; text-align: left; margin-left: 1rem;}
.comment .actions { display: flex; gap: 0.5rem; }
.comment .actions .vote-btn { background: #eee; border: none; border-radius: 4px; padding: 0.4rem 0.8rem; font-size: 0.9rem; cursor: pointer; }
.comment .actions .vote-btn:hover { background: #ddd; }
.comment-form { margin-top: 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.comment-form textarea { resize: vertical; min-height: 80px; }
.comment-form .btn { align-self: flex-end; background: #007bff; color: white; padding: 0.6rem 1.2rem; border: none; border-radius: 4px; cursor: pointer; }
.comment-form .btn:hover { background: #0056b3; }
@media (max-width: 480px) {
  .wrap { padding: 1rem 0.7rem; }
  .menu-wrapper { top: 0.5rem; right: 0.5rem; }
}
@media (min-width: 768px) {
  .comment { flex-direction: row; align-items: flex-start; }
  .comment-author { flex: 0 0 120px; }
  .comment .info, .comment .text { flex: 1; }
  .comment .actions { flex: 0 0 auto; align-self: center; }
  .comment-form { flex-direction: row; align-items: flex-start; }
  .comment-form textarea { flex: 1; }
  .comment-form .btn { margin-left: 1rem; align-self: center; }
}


/* 모바일 퍼스트: 클래스마다 한 줄, 클래스 변경 시 줄바꿈 */
.container { width:100%; max-width:600px; margin:0 auto; padding:1rem; box-sizing:border-box; }
.title { font-size:1.5rem; margin:1rem 0; text-align:center; }
.info { font-size:0.9rem; color:#666; text-align:center; margin-bottom:1rem; }
.yt-wrapper { position:relative; padding-top:56.25%; margin-bottom:1rem; }
.yt-wrapper iframe { position:absolute; top:0; left:0; width:100%; height:100%; }
.content { font-size:1rem; line-height:1.6; margin-bottom:1.5rem; }
.likes { margin-bottom:1rem; text-align:right; }
.btn { display:inline-block; padding:0.5rem 1rem; margin:0.25rem; font-size:1rem; color:#fff; background:#007bff; text-decoration:none; border:none; border-radius:4px; cursor:pointer; }
.delete-btn { background:#dc3545; }
@media (min-width:480px) {
  .container { padding:2rem; }
  .title { font-size:2rem; }
  .content { font-size:1.1rem; }
  .btn { font-size:1.1rem; padding:0.6rem 1.2rem; }
}
