/* --- Skeleton UI Styles --- */
@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

.skeleton {
    background-color: #2c2f33;
    background-image: linear-gradient(to right, #2c2f33 0%, #3e4247 20%, #2c2f33 40%, #2c2f33 100%);
    background-repeat: no-repeat;
    background-size: 2000px 104%; /* 104% for slightly larger height */
    animation: shimmer 2s infinite linear;
    border-radius: 4px;
}

#skeleton-container .section-header {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 1.5rem;
}

#skeleton-container .section-title {
    background-color: transparent; /* Prevent double background */
}

.skeleton-traveler-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 70px;
    flex-shrink: 0;
    padding: 8px;
}
.skeleton.traveler-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}
.skeleton.traveler-name {
    width: 50px;
    height: 16px;
}
.skeleton.preview-item {
    width: 100%;
    height: 80px; 
}
.skeleton.build-card {
    width: 100%;
    height: 172px; /* 패딩 포함 실제 빌드 카드 높이 */
}

/* --- 홈페이지 전용 스타일 --- */
.home-section {
    margin-bottom: 3rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
}

.section-title {
    font-size: 1.8rem;
    color: #00aaff;
}

.see-more-link {
    color: #aaa;
    text-decoration: none;
    font-size: 0.9rem;
}
.see-more-link:hover {
    color: #fff;
}

/* 여행자 섹션 */
.horizontal-scroll-container {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 5px;
    background-color: #2a2a2a;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #444;
}
.horizontal-scroll-container::-webkit-scrollbar { height: 6px; }
.horizontal-scroll-container::-webkit-scrollbar-track { background: #1e1e1e; }
.horizontal-scroll-container::-webkit-scrollbar-thumb { background: #555; border-radius: 3px; }
.horizontal-scroll-container::-webkit-scrollbar-thumb:hover { background: #888; }

.traveler-icon-entry {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 8px;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    width: 70px;
    flex-shrink: 0;
    text-decoration: none;
    color: inherit;
    background-color: #2a2a2a;
}
.traveler-icon-entry:hover {
    background-color: #3a3a3a;
    border-color: #00aaff;
}
.traveler-icon {
    width: 50px;
    height: 50px;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}
.traveler-icon-name {
    font-size: 0.8rem;
    font-weight: bold;
    text-align: center;
}


/* 회상 & 도전과제 섹션 */
.dual-section {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 이 부분은 더 이상 건드리지 않겠습니다. */
    gap: 30px;
}
.item-preview-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.preview-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    background-color: #2a2a2a;
    padding: 12px;
    border-radius: 5px;
    text-decoration: none;
    color: #ddd;
    border-left: 3px solid #555;
    transition: background-color 0.2s, border-color 0.2s;
    min-height: 80px;
}
.preview-item:hover {
    background-color: #3a3a3a;
    border-color: #00aaff;
}
.preview-item-header {
    display: flex;
    align-items: center;
    gap: 10px;
}
.preview-item-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}
.preview-item-name {
    font-size: 0.9rem;
    font-weight: bold;
}
.preview-item-desc {
    font-size: 0.8rem;
    color: #aaa;
    line-height: 1.4;
    width: 100%;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}


/* 빌드 목록 카드 스타일 */
.build-card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}
.build-card {
    display: flex;
    gap: 15px;
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.2s ease-in-out;
    text-decoration: none;
    color: inherit;
    align-items: center;
}
.build-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    border-color: #00aaff;
}
.build-card-portrait {
    width: 80px;
    height: 140px;
    flex-shrink: 0;
    border-radius: 8px;
    object-fit: cover;
    object-position: top;
}
.build-card-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    width: 0px;
}
.info-header .build-name {
    font-size: 1.2rem;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.info-header .author-name {
    font-size: 0.8rem;
    color: #aaa;
    margin-top: 4px;
}
/* [수정] info-items 스타일을 buildlist.css와 동기화 */
.info-items {
    display: flex;
    flex-direction: column;
    gap: 5px;
    justify-content: center;
    min-height: 150px;
    
    /* [핵심 수정] buildlist.css에서 가져온 스크롤 로직 */
    overflow-x: auto; 
    padding-bottom: 5px; 
}
.info-items::-webkit-scrollbar { height: 6px; }
.info-items::-webkit-scrollbar-track { background: transparent; }
.info-items::-webkit-scrollbar-thumb { background: #555; border-radius: 3px; }
.info-items::-webkit-scrollbar-thumb:hover { background: #888; }


.info-item-group {
    display: flex;
    gap: 8px;
    /* overflow 속성 제거 */
}
.info-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    background-color: #333;
    padding: 2px 5px;
    border-radius: 4px;
    white-space: nowrap;
}
.info-item img {
    width: 18px;
    height: 18px;
}
.info-item.highlight-dejavu {
    box-shadow: inset 0 0 0 2px #e67e22;
}
.info-item.highlight-core {
    box-shadow: inset 0 0 0 2px #f1c40f;
}
.info-footer {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #888;
    margin-top: auto;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .dual-section {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .info-header .build-name {
        white-space: normal;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        word-break: break-all;
    }
    .build-card .info-item span {
        display: none;
    }
    .build-card .info-item {
        padding: 2px;
        background-color: transparent;
    }
    .build-card .info-item img {
        width: 22px;
        height: 22px;
    }
    .build-card .info-item.highlight-dejavu {
        box-shadow: none;
        background-color: #e67e2244;
        border-radius: 4px;
    }
    .build-card .info-item.highlight-core {
        box-shadow: none;
        background-color: #f1c40f44;
        border-radius: 4px;
    }
    .build-card .info-items {
        margin: auto;
    }
    .build-card .info-item-group {
        border: 1px solid #555;
        border-radius: 6px;
        padding: 5px;
        background-color: #333;
        width: fit-content;
    }
}