/* 메인 CSS 파일 */

/* 기본 스타일 */
body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
}

/* 커스텀 스크롤바 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 버튼 스타일 */
.btn {
    @apply px-4 py-2 rounded transition duration-200 font-medium;
}

.btn-primary {
    @apply bg-blue-600 text-white hover:bg-blue-700;
}

.btn-secondary {
    @apply bg-gray-600 text-white hover:bg-gray-700;
}

.btn-success {
    @apply bg-green-600 text-white hover:bg-green-700;
}

.btn-danger {
    @apply bg-red-600 text-white hover:bg-red-700;
}

/* 카드 스타일 */
.card {
    @apply bg-white rounded-lg shadow-lg p-6;
}

.card-header {
    @apply border-b pb-4 mb-4;
}

.card-title {
    @apply text-xl font-semibold text-gray-800;
}

/* 폼 스타일 */
.form-group {
    @apply mb-4;
}

.form-label {
    @apply block text-sm font-medium text-gray-700 mb-2;
}

.form-input {
    @apply w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent;
}

.form-textarea {
    @apply w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent resize-vertical;
}

.form-select {
    @apply w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent;
}

/* 알림 스타일 */
.alert {
    @apply p-4 rounded-md mb-4;
}

.alert-success {
    @apply bg-green-100 text-green-800 border border-green-200;
}

.alert-error {
    @apply bg-red-100 text-red-800 border border-red-200;
}

.alert-warning {
    @apply bg-yellow-100 text-yellow-800 border border-yellow-200;
}

.alert-info {
    @apply bg-blue-100 text-blue-800 border border-blue-200;
}



/* TOAST UI Editor 커스텀 스타일 */
.toastui-editor-defaultUI {
    border: 1px solid #d1d5db !important;
    border-radius: 0.5rem !important;
}

.toastui-editor-defaultUI-toolbar {
    background-color: #f9fafb !important;
    border-bottom: 1px solid #e5e7eb !important;
}

.toastui-editor-toolbar-icons {
    border: none !important;
}

.toastui-editor-toolbar-icons:hover {
    background-color: #e5e7eb !important;
}

.toastui-editor-toolbar-icons.active {
    background-color: #dbeafe !important;
    color: #2563eb !important;
}

/* 저장된 글 표시 스타일 (중요!) */
.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
    font-weight: bold !important;
    margin-bottom: 0.5rem !important;
    margin-top: 1rem !important;
    display: block !important;
}

.prose h1 { 
    font-size: 2rem !important; 
    line-height: 1.2 !important;
}
.prose h2 { 
    font-size: 1.5rem !important; 
    line-height: 1.3 !important;
}
.prose h3 { 
    font-size: 1.25rem !important; 
    line-height: 1.4 !important;
}



.prose strong,
.prose b {
    font-weight: bold !important;
}

.prose em,
.prose i {
    font-style: italic !important;
}

.prose ul {
    list-style-type: disc !important;
    padding-left: 2rem !important;
    margin-bottom: 1rem !important;
    display: block !important;
}

.prose ol {
    list-style-type: decimal !important;
    padding-left: 2rem !important;
    margin-bottom: 1rem !important;
    display: block !important;
}

.prose li {
    margin-bottom: 0.25rem !important;
    display: list-item !important;
}

/* 링크 스타일 강제 적용 */
.prose a {
    color: #2563eb !important;
    text-decoration: underline !important;
}

.prose a:hover {
    color: #1d4ed8 !important;
    text-decoration: underline !important;
}

.prose blockquote {
    border-left: 4px solid #e5e7eb !important;
    padding-left: 1rem !important;
    font-style: italic !important;
    color: #6b7280 !important;
    margin: 1rem 0 !important;
    background-color: #f9fafb !important;
}

.prose p {
    margin-bottom: 1rem !important;
}

.prose img {
    max-width: 100% !important;
    height: auto !important;
    margin: 1rem 0 !important;
}

/* 로딩 스피너 */
.spinner {
    @apply inline-block w-4 h-4 border-2 border-gray-300 border-t-blue-600 rounded-full animate-spin;
}

/* 반응형 유틸리티 */
@media (max-width: 768px) {
    .card {
        @apply p-4;
    }
}

/* 텍스트 줄 제한 유틸리티 */
.line-clamp-1 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

.line-clamp-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.line-clamp-3 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

/* 다크모드 지원 */
@media (prefers-color-scheme: dark) {
    .dark-mode {
        @apply bg-gray-900 text-white;
    }
    
    .dark-mode .card {
        @apply bg-gray-800 border-gray-700;
    }
    
    .dark-mode .form-input {
        @apply bg-gray-700 border-gray-600 text-white;
    }
} 