/**
 * TTBooks - Base CSS
 * 
 * Tailwind CSS를 기본으로 하고, 필요한 커스텀 스타일만 추가
 */

/* 기본 스크롤바 스타일 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 커스텀 애니메이션 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* 로딩 스피너 */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0ea5e9;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 책 카드 호버 효과 */
.book-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.book-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.15);
}

/* 모달 백드롭 */
.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

/* 트리 구조 들여쓰기 */
.tree-node {
    position: relative;
}

.tree-node::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e5e7eb;
}

/* 상태 뱃지 */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-wish {
    background-color: #fef3c7;
    color: #92400e;
}

.status-planning {
    background-color: #dbeafe;
    color: #1e40af;
}

.status-reading {
    background-color: #d1fae5;
    color: #065f46;
}

.status-read {
    background-color: #e0e7ff;
    color: #3730a3;
}

/* 반응형 그리드 */
.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .book-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (min-width: 1024px) {
    .book-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

/* 툴팁 */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 0.75rem;
    background-color: #1f2937;
    color: white;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    margin-bottom: 0.5rem;
}

.tooltip:hover::after {
    opacity: 1;
}

/* 프로그레스 바 */
.progress-bar {
    position: relative;
    width: 100%;
    height: 8px;
    background-color: #e5e7eb;
    border-radius: 9999px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(to right, #0ea5e9, #06b6d4);
    border-radius: 9999px;
    transition: width 0.3s ease;
}

