/* Skeleton UI 스타일 */

/* 기본 스켈레톤 애니메이션 */
@keyframes skeleton-loading {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

/* 스켈레톤 기본 클래스 */
.skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 0px,
        #f8f8f8 40px,
        #f0f0f0 80px
    );
    background-size: 200px 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 4px;
    display: inline-block;
}

/* 스켈레톤 텍스트 */
.skeleton-text {
    height: 1em;
    margin-bottom: 0.5em;
    width: 100%;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-text.medium {
    width: 80%;
}

.skeleton-text.long {
    width: 100%;
}

/* 스켈레톤 제목 */
.skeleton-title {
    height: 1.5em;
    margin-bottom: 1em;
    width: 70%;
}

/* 스켈레톤 버튼 */
.skeleton-button {
    height: 44px;
    width: 120px;
    border-radius: 8px;
}

.skeleton-button.full {
    width: 100%;
}

/* 스켈레톤 카드 */
.skeleton-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.skeleton-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.skeleton-card-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
}

.skeleton-card-body {
    margin-bottom: 12px;
}

.skeleton-card-footer {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

/* 스켈레톤 리스트 아이템 */
.skeleton-list-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.skeleton-list-item:last-child {
    border-bottom: none;
}

.skeleton-list-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-right: 16px;
    flex-shrink: 0;
}

.skeleton-list-content {
    flex: 1;
}

/* 스켈레톤 기도제목 아이템 */
.skeleton-prayer-item {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 12px;
}

.skeleton-prayer-name {
    height: 1.25em;
    width: 40%;
    margin-bottom: 8px;
}

.skeleton-prayer-content {
    height: 1em;
    width: 100%;
    margin-bottom: 4px;
}

.skeleton-prayer-content:nth-child(2) {
    width: 90%;
}

.skeleton-prayer-content:nth-child(3) {
    width: 75%;
}

.skeleton-prayer-meta {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.skeleton-prayer-meta-item {
    height: 0.875em;
    width: 80px;
}

/* 스켈레톤 통계 */
.skeleton-stat {
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.skeleton-stat-number {
    height: 2em;
    width: 60px;
    margin: 0 auto 8px;
    border-radius: 4px;
}

.skeleton-stat-label {
    height: 1em;
    width: 80px;
    margin: 0 auto;
    border-radius: 4px;
}

/* 스켈레톤 이미지 */
.skeleton-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
}

.skeleton-image.square {
    aspect-ratio: 1 / 1;
}

.skeleton-image.portrait {
    aspect-ratio: 3 / 4;
}

/* 스켈레톤 그리드 */
.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

/* 스켈레톤 컨테이너 */
.skeleton-container {
    padding: 20px;
}

.skeleton-container.hidden {
    display: none;
}

/* 모바일 최적화 */
@media (max-width: 768px) {
    .skeleton-card {
        padding: 12px;
        margin-bottom: 12px;
    }

    .skeleton-prayer-item {
        padding: 12px;
        margin-bottom: 10px;
    }

    .skeleton-stat {
        padding: 16px;
    }
}

/* 접근성: 애니메이션 비활성화 옵션 */
@media (prefers-reduced-motion: reduce) {
    .skeleton {
        animation: none;
        background: #f0f0f0;
    }
}

