/* 추가적인 커스텀 스타일을 위한 파일 */
body {
    font-family: 'Noto Sans JP', 'Inter', sans-serif;
}
.prose {
    max-width: 100%;
}


/* Quill Editor Content Styling */

/* 유튜브 비디오를 감싸는 컨테이너 스타일 */
.ql-editor {
    margin: 20px auto; /* 위아래 마진 및 좌우 자동 중앙 정렬 */
    max-width: 780px;  /* 비디오의 최대 너비 설정 */
    aspect-ratio: 16 / 9; /* 16:9 비율 유지 */
}

/* iframe 자체의 스타일 */
.ql-editor iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.prose {
    max-width: 100%;
    overflow-wrap: break-word; /* 표준 속성: 긴 단어를 강제로 줄바꿈 */
    word-wrap: break-word;     /* 구형 브라우저 호환용 */
    white-space: pre-wrap;     /* 공백/줄바꿈은 유지하면서 자동 줄바꿈 */
}

.prose .ql-video {
    display: block; /* 중앙 정렬을 위해 block 요소로 변경 */
    width: 100%;
    max-width: 780px; /* 비디오의 최대 너비 설정 */
    height: auto; /* 높이는 비율에 따라 자동 조절되도록 설정 */
    aspect-ratio: 16 / 9; /* 16:9 비율을 직접 지정 */
    margin: 20px auto; /* 위아래 마진 및 좌우 자동 중앙 정렬 */
    border: none;
}

/* .prose 내의 Quill 컨텐츠 스타일 (유튜브 iframe) */
.prose .ql-video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    margin: 1.5rem 0;
}
.prose .ql-video-wrapper iframe.ql-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* .prose 내의 HTML5 <video> 태그 스타일 (신규 추가)
*/
.prose video {
    width: 100%; /* 너비를 100%로 설정 */
    max-width: 800px; /* 최대 너비 제한 (선택 사항) */
    height: auto; /* 높이는 비율에 맞게 자동 조절 */
    display: block; /* 블록 요소로 변경 */
    margin: 1.5rem auto; /* 상하 마진 및 중앙 정렬 */
    border-radius: 8px; /* 모서리 둥글게 (선택 사항) */
    background-color: #000; /* 비디오 로딩 중 배경색 */
}


/* 기타 기본 스타일 */
body {
    font-family: 'Noto Sans JP', 'Inter', sans-serif;
}
.prose {
    max-width: 100%;
}


/* =================================================================
   토스트 알림 스타일 (신규 추가)
   ================================================================= */
#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    min-width: 300px;
    max-width: 400px;
    background-color: white;
    border-left: 4px solid;
    padding: 16px;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease-in-out;
}

/* 등장 애니메이션 상태 */
.toast.show {
    opacity: 1;
    transform: translateX(0);
}

/* 타입별 색상 */
.toast-success { border-color: #10B981; } /* Green */
.toast-error { border-color: #EF4444; }   /* Red */
.toast-info { border-color: #3B82F6; }    /* Blue */
.toast-warning { border-color: #F59E0B; } /* Yellow */

/* 아이콘 색상 */
.toast-icon-success { color: #10B981; }
.toast-icon-error { color: #EF4444; }
.toast-icon-info { color: #3B82F6; }

/* 닫기 버튼 */
.toast-close {
    color: #9CA3AF;
    cursor: pointer;
    margin-left: 12px;
}
.toast-close:hover {
    color: #4B5563;
}


/************POST CONTENT STYLE************/
.post-container {
    max-width: 900px;
    margin: 0 auto;
}

.post-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2.5rem;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1rem;
    font-size: 0.9rem;
    opacity: 0.95;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.post-body {
    background: white;
    padding: 2.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.post-content {
    line-height: 1.8;
    font-size: 1.05rem;
    color: #2d3748;
    padding: 2rem 0;
    border-top: 2px solid #e2e8f0;
    border-bottom: 2px solid #e2e8f0;
    margin: 1.5rem 0;
}

.action-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
}

.left-actions {
    display: flex;
    gap: 1rem;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 50px;
    border: 2px solid #e2e8f0;
    background: white;
    color: #4a5568;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

.action-btn:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.action-btn.liked {
    border-color: #667eea;
    background: #667eea;
    color: white;
}

.action-btn.scrapped {
    border-color: #eab308;
    background: #eab308;
    color: white;
}

.edit-delete-btns {
    display: flex;
    gap: 0.5rem;
}

.edit-btn, .delete-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.edit-btn {
    background: #fbbf24;
    color: white;
}

.edit-btn:hover {
    background: #f59e0b;
    transform: translateY(-2px);
}

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

.delete-btn:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

.comments-section {
    background: white;
    padding: 2.5rem;
    margin-top: 2rem;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.comments-header {
    font-size: 1rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid #667eea;
}

.comment-form {
    background: #f7fafc;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.comment-textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    resize: vertical;
}

.comment-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.comment-submit {
    background: #667eea;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.75rem;
}

.comment-submit:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

.comment-item {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: #fafafa;
    border-radius: 12px;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.comment-item:hover {
    background: #f0f0f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.comment-avatar {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    flex-shrink: 0;
}

.comment-content {
    flex-grow: 1;
}
@media (max-width: 640px) {
    .comment-content { line-height: 1.4; }
}

.comment-author {
    font-weight: 700;
    color: #2d3748;
    font-size: 0.95rem;
}

.comment-date {
    color: #a0aec0;
    font-size: 0.8rem;
    margin-left: 0.75rem;
}

.comment-text {
    color: #4a5568;
    line-height: 1.6;
    margin-top: 0.5rem;
    font-size: smaller;
}

.comment-actions {
    display: flex;
    gap: 1rem;
    margin-top: 0.75rem;
    font-size: 0.8rem;
}

.comment-actions button {
    color: #a0aec0;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.3s ease;
}

.comment-actions button:hover {
    color: #ef4444;
}

.comment-replies {
    margin-top: 1rem;
    padding-left: 2.5rem;
    border-left: 3px solid #e2e8f0;
}

.login-notice {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8eeff 100%);
    border-radius: 12px;
    margin-bottom: 2rem;
}

.login-link {
    color: #667eea;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.3s ease;
}

.login-link:hover {
    color: #5568d3;
}